1GRDLANDMASK(1) Generic Mapping Tools GRDLANDMASK(1)
2
3
4
6 grdlandmask - Create "wet-dry" mask grid file from shoreline data base.
7
9 grdlandmask -Gmask_grd_file] -Ixinc[unit][=|+][/yinc[unit][=|+]]
10 -Rwest/east/south/north[r] [ -Amin_area[/min_level/max_level] ] [
11 -Dresolution ] [ -F ] [ -Nmaskvalues[o] ] [ -V ]
12
14 grdlandmask reads the selected shoreline database and uses that infor‐
15 mation to decide which nodes in the specified grid are over land or
16 over water. The nodes defined by the selected region and lattice spac‐
17 ing will be set according to one of two criteria: (1) land vs water, or
18 (2) the more detailed (hierarchical) ocean vs land vs lake vs island vs
19 pond. The resulting mask may be used in subsequent operations involv‐
20 ing grdmath to mask out data from land [or water] areas.
21
22 -G Name of resulting output mask grid file. (See GRID FILE FORMATS
23 below).
24
25 -I x_inc [and optionally y_inc] is the grid spacing. Optionally,
26 append a suffix modifier. Geographical (degrees) coordinates:
27 Append m to indicate arc minutes or c to indicate arc seconds.
28 If one of the units e, k, i, or n is appended instead, the
29 increment is assumed to be given in meter, km, miles, or nauti‐
30 cal miles, respectively, and will be converted to the equivalent
31 degrees longitude at the middle latitude of the region (the con‐
32 version depends on ELLIPSOID). If /y_inc is given but set to 0
33 it will be reset equal to x_inc; otherwise it will be converted
34 to degrees latitude. All coordinates: If = is appended then the
35 corresponding max x (east) or y (north) may be slightly adjusted
36 to fit exactly the given increment [by default the increment may
37 be adjusted slightly to fit the given domain]. Finally, instead
38 of giving an increment you may specify the number of nodes
39 desired by appending + to the supplied integer argument; the
40 increment is then recalculated from the number of nodes and the
41 domain. The resulting increment value depends on whether you
42 have selected a gridline-registered or pixel-registered grid;
43 see Appendix B for details.
44
45 -R west, east, south, and north specify the Region of interest, and
46 you may specify them in decimal degrees or in
47 [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and
48 upper right map coordinates are given instead of w/e/s/n. The
49 two shorthands -Rg and -Rd stand for global domain (0/360 and
50 -180/+180 in longitude respectively, with -90/+90 in latitude).
51
53 -A Features with an area smaller than min_area in km^2 or of hier‐
54 archical level that is lower than min_level or higher than
55 max_level will be ignored [Default is 0/4 (all features)]. See
56 DATABASE INFORMATION in the pscoast man-pages for more details.
57
58 -D Selects the resolution of the data set to use ((f)ull, (h)igh,
59 (i)ntermediate, (l)ow, or (c)rude). The resolution drops off by
60 ~80% between data sets. [Default is l]. Note that because the
61 coastlines differ in details a node in a mask file using one
62 resolution is not guaranteed to remain inside [or outside] when
63 a different resolution is selected.
64
65 -F Force pixel node registration [Default is gridline registra‐
66 tion]. (Node registrations are defined in GMT Cookbook Appendix
67 B on grid file formats.)
68
69 -N Sets the values that will be assigned to nodes. Values can be
70 any number, including the textstring NaN. Append o to let nodes
71 exactly on feature boundaries be considered outside [Default is
72 inside]. Specify this information using 1 of 2 formats:
73 -Nwet/dry.
74 -Nocean/land/lake/island/pond.
75 [Default is 0/1/0/1/0 (i.e., 0/1)].
76
77 -V Selects verbose mode, which will send progress reports to stderr
78 [Default runs "silently"].
79
81 By default GMT writes out grid as single precision floats in a COARDS-
82 complaint netCDF file format. However, GMT is able to produce grid
83 files in many other commonly used grid file formats and also facili‐
84 tates so called "packing" of grids, writing out floating point data as
85 2- or 4-byte integers. To specify the precision, scale and offset, the
86 user should add the suffix =id[/scale/offset[/nan]], where id is a two-
87 letter identifier of the grid type and precision, and scale and offset
88 are optional scale factor and offset to be applied to all grid values,
89 and nan is the value used to indicate missing data. See grdreformat(1)
90 and Section 4.17 of the GMT Technical Reference and Cookbook for more
91 information.
92
93 When writing a netCDF file, the grid is stored by default with the
94 variable name "z". To specify another variable name varname, append
95 ?varname to the file name. Note that you may need to escape the spe‐
96 cial meaning of ? in your shell program by putting a backslash in front
97 of it, or by placing the filename and suffix between quotes or double
98 quotes.
99
101 To set all nodes on land to NaN, and nodes over water to 1, using the
102 high resolution data set, do
103
104 grdlandmask -R-60/-40/-40/-30 -Dh -I5m -N1/NaN -Gland_mask.grd -V
105
106 To make a 1x1 degree global grid with the hierarchical levels of the
107 nodes based on the low resolution data:
108
109 grdlandmask -R0/360/-90/90 -Dl -I1 -N0/1/2/3/4 -Glevels.grd -V
110
112 GMT(1), grdmath(1), grdclip(1), psmask(1), psclip(1), pscoast(1)
113
114
115
116GMT 4.3.1 15 May 2008 GRDLANDMASK(1)