Creating Grid Templates in Saga
templates (also called "dummy grids") are empty grid structures created
for future data storage or manipulation.
Their numbers of columns and rows, their cell sizes, and their
geo-referencing (i.e. location on the globe) are carefully chosen to
represent specific areas, data types and/or resolutions of real data. Real
datasets can easily be "resampled" into these templates, yielding
identical data products required for display and numerical analysis.
The method to create a suite of grid templates is demonstrated here.
Preliminary Reading (in
OceanTeacher, unless otherwise indicated):
|1. Run Saga, and don't open
any project. If you have a project showing, then you can clear it with
FILE > PROJECT > NEW PROJECT.
|2. Select TOOLS > GRID
TOOLS > CREATE GRID SYSTEM
complicated window provides the controls for Saga's grid creation
algorithms. Beside SET EXTENT BY there are 4 possible methods in a
drop-down menu. [You can read more about this module on the
INFORMATION tab in the properties window.] We will always use the
method XMIN, YMIN, NX, NY. This method requires only the following
The grids we will make must have exactly the same outer edges as the
project area. This means that the corner cells must be centered
1/2 cell-width inside the area, both vertically and horizontally. In
other words, we want to make "cell-centered" grids, described in the reading
4. First, let's make a 1-degree grid template for the Liberia project area:
- XMIN = the left side of the project area = -23
- the OFFSET below will move the location 1/2 cell to the right
- YMIN = the bottom of the project area = -6
- the OFFSET below will move the location 1/2 cell upward
- NX = number of columns in the grid = (GRID WIDTH) divided by CELL SIZE =
(-3-(-23))/1 = 20/1 = 20
- NY = number of rows in the grid = (GRID HEIGHT) divided by CELL SIZE = (9-(-6))/1 =
15/1 = 15
- CELLSIZE = 1
- X OFFSET = Half of CELLSIZE = 0.5
- Y OFFSET = Half of CELLSIZE = 0.5
|5. Enter the values above
into the window. Make sure to check USE OFFSET. The
INITIALIZATION VALUE is the value in each grid cell, which can remain 1.
Then click OK.
|6. A new object appears with
the name DUMMY GRID. Just above it is a "grid system description" line
showing these values:
1; 20x 15y; -22.5x -5.5y
They are, in this order:
- XMIN (offset to the right by 0.5)
- YMIN (offset upward by 0.5)
Right-click on DUMMY GRID and select ADD TO MAP.
Elect to show the grid on the same map with the frame.
|7. Change the
name of the new grid to frame_grid_liberia_1deg, then click
NOTE: It is always a good
idea to rename made object ASAP so you know what they are. Don't
depend on your memory.
|8. Right-click on the
re-named grid and select SAVE GRID AS.
|9. Navigate to
the folder PRODUCTS > SAGA > GRIDS, and save the grid as
|10. Now we'll
continue to make other needed grid templates. The next one has
|11. Notice that to make the
next template, you leave XMIN and YMIN unchanged, but make simple changes to
the other 5 settings we need.
Then click OK.
|12. In this same
way, make and save the following grid templates. You can check your
folder to see that each grid consists of 3 files: *.SGRD the header,
*.SDAT the binary data, and *.MGRD the history of the file.
- Liberia 1-deg grid - saved as frame_grid_liberia_1deg
- Liberia 0.5-deg grid - saved as frame_grid_liberia_0.5deg
- Liberia 0.1-deg grid - saved as frame_grid_liberia_0.1deg
- Liberia 0.05-deg grid - saved as frame_grid_liberia_0.05deg
- Liberia 0.01-deg grid - saved as frame_grid_liberia_0.01deg
Look at the SGRD and the MGRD
files with an ASCII editor to see what they contain. The SDAT file
contains the binary grid values and can't be inspected visually.
|13. Check all 5
grids to make sure they are described as follows in the "grid system"
line appearing in the objects list (left menu):
- 1; 20x 15y; -22.5x -5.5y
- 0.5; 40x 30y; -22.75x -5.75y
- 0.1; 200x 150y; -22.95x -5.95y
- 0.05; 400x 300y; -22.975x -5.975y
- 0.01; 2000x 1500y; -22.995x -5.995y
These grids are required for work in future OTA exercises, so you must
complete a set for Liberia now. Later on you'll need to make
completely different template grids for your own project areas.
You absolutely, positively cannot use these grids for any area but Liberia.