From ba9bb4180442feb303407031a0293d1d07bae6a1 Mon Sep 17 00:00:00 2001 From: James Rising Date: Sat, 2 Mar 2024 21:56:02 -0500 Subject: [PATCH] describe variables --- tutorial-content/content/working-with-shapefiles.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tutorial-content/content/working-with-shapefiles.md b/tutorial-content/content/working-with-shapefiles.md index a304610..a53abf9 100644 --- a/tutorial-content/content/working-with-shapefiles.md +++ b/tutorial-content/content/working-with-shapefiles.md @@ -57,7 +57,10 @@ to generate a collection of points at the center of each grid cell. This approach can be used without generating an $A$ matrix, but the matrix method improves efficiency. -As an example, you generate these points like so: +As an example, suppose that you have a grid with a longitudinal (zonal) +dimension from `longitude0` to `longitude1` and a latitudinal (meridional) dimension +from `latitude0` to `latitude1`, with equal spacing of `gridwidth` for +both dimensions. You can generate a full list of grid cell points like so: `````{tab-set} ````{tab-item} R @@ -84,6 +87,11 @@ pts = pd.DataFrame(np.array(np.meshgrid(longitudes, latitudes)).T.reshape(-1, 2) ```` ````` +Often you can get the longitude and latitude values for the grid cells +directly from your weather dataset. In this case, replace the steps to +generate `longitudes` and `latitudes` variables by hand with directly +loading those values. + Now, you can iterate through each region, and get a list of all of the points within each region. Here's how you would do that with the `PBSmapping` library in R: @@ -173,4 +181,4 @@ Matching observations by name can be very time-consuming. These problems even ex 2. Use string matching. However, in this case, you will need to inspect all of the matches to make sure that they are correct. -3. Construct “translation functions” for each dataset, which map the regional names in that dataset to a canonical list of region names. For example, choose the names in one dataset as a canonical list, and name the matching functions as `2canonical` and `canonical2`. \ No newline at end of file +3. Construct “translation functions” for each dataset, which map the regional names in that dataset to a canonical list of region names. For example, choose the names in one dataset as a canonical list, and name the matching functions as `2canonical` and `canonical2`.