1GRDCLIP(1)                            GMT                           GRDCLIP(1)
2
3
4

NAME

6       grdclip - Clip the range of grids
7

SYNOPSIS

9       grdclip   ingrid    -Goutgrid  [   -Rregion  ]  [   -Sahigh/above  ]  [
10       -Sblow/below ] [  -Silow/high/between ] [  -Srold/new ] [  -V[level] ]
11
12       Note: No space is allowed between the option flag  and  the  associated
13       arguments.
14

DESCRIPTION

16       grdclip  will  set values < low to below and/or values > high to above.
17       You can also specify one or more intervals where all values  should  be
18       set  to IT(between), or replace individual values.  Such operations are
19       useful when you want all of a continent or an ocean to  fall  into  one
20       color  or gray shade in image processing, when clipping of the range of
21       data values is  required,  or  for  reclassification  of  data  values.
22       above, below, between, old and new can be any number or even NaN (Not a
23       Number). You must choose at least one of the -S options. Use -R to only
24       extract a subset of the ingrid file.
25

REQUIRED ARGUMENTS

27       ingrid The input 2-D binary grid file.
28
29       -Goutgrid
30              outgrid is the modified output grid file.
31

OPTIONAL ARGUMENTS

33       -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
34              Specify  the region of interest. Using the -R option will select
35              a subsection of ingrid grid.  If  this  subsection  exceeds  the
36              boundaries   of  the  grid,  only  the  common  region  will  be
37              extracted.
38
39       -Sahigh/above
40              Set all data[i] > high to above.
41
42       -Sblow/below
43              Set all data[i] < low to below.
44
45       -Silow/high/between
46              Set all data[i] >= low and  <=  high  to  between.   Repeat  the
47              option for as many intervals as are needed.
48
49       -Srold/new
50              Set  all data[i] == old to new.  This is mostly useful when your
51              data are known to be integer values.  Repeat the option  for  as
52              many replacements as are needed.
53
54       -V[level] (more ...)
55              Select verbosity level [c].
56
57       -^ or just -
58              Print  a  short  message  about  the syntax of the command, then
59              exits (NOTE: on Windows just use -).
60
61       -+ or just +
62              Print an extensive usage (help) message, including the  explana‐
63              tion  of  any  module-specific  option  (but  not the GMT common
64              options), then exits.
65
66       -? or no arguments
67              Print a complete usage (help) message, including the explanation
68              of all options, then exits.
69

GRID FILE FORMATS

71       By  default  GMT  writes  out  grid  as  single  precision  floats in a
72       COARDS-complaint netCDF file format. However, GMT is  able  to  produce
73       grid  files  in  many  other  commonly  used grid file formats and also
74       facilitates so called "packing" of grids, writing  out  floating  point
75       data as 1- or 2-byte integers. (more ...)
76

EXAMPLES

78       To set all values > 70 to NaN and all values < 0 to 0 in file data.nc:
79
80              gmt grdclip data.nc -Gnew_data.nc -Sa70/NaN -Sb0/0 -V
81
82       To  reclassify  all  values in the 25-30 range to 99, those in 35-39 to
83       55, exchange 17 for 11 and all values < 10 to 0 in file classes.nc, try
84
85              gmt grdclip classes.nc -Gnew_classes.nc -Si25/30/99 -Si35/39/55 -Sr17/11 -Sb10/0 -V
86

SEE ALSO

88       gmt, grdlandmask, grdmask, grdmath, grd2xyz, xyz2grd
89
91       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
92
93
94
95
965.4.5                            Feb 24, 2019                       GRDCLIP(1)
Impressum