1GRDCLIP(1)                   Generic Mapping Tools                  GRDCLIP(1)
2
3
4

NAME

6       grdclip - Clipping of range in grid files.
7

SYNOPSIS

9       grdclip   input_file.grd   -Goutput_file.grd   [   -Sahigh/above   ]  [
10       -Sblow/below ] [ -V ]
11

DESCRIPTION

13       grdclip will set values < low to below and/or values > high  to  above.
14       Useful  when  you  want all of a continent or an ocean to fall into one
15       color or grayshade in image processing, or clipping  of  the  range  of
16       data  values  is required.  above/below can be any number or NaN (Not a
17       Number).  You must choose at least one of -Sa or -Sb.
18
19       input_file.grd
20              The input 2-D binary grid file.
21
22       -G     output_file.grd is the modified output grid file.
23

OPTIONS

25       -Sa    Set all data[i] > high to above.
26
27       -Sb    Set all data[i] < low to below.
28
29       -V     Selects verbose mode, which will send progress reports to stderr
30              [Default runs "silently"].
31

GRID FILE FORMATS

33       By  default GMT writes out grid as single precision floats in a COARDS-
34       complaint netCDF file format.  However, GMT is  able  to  produce  grid
35       files  in  many  other commonly used grid file formats and also faciliā€
36       tates so called "packing" of grids, writing out floating point data  as
37       2-  or 4-byte integers. To specify the precision, scale and offset, the
38       user should add the suffix =id[/scale/offset[/nan]], where id is a two-
39       letter  identifier of the grid type and precision, and scale and offset
40       are optional scale factor and offset to be applied to all grid  values,
41       and  nan  is  the  value  used  to indicate missing data.  When reading
42       grids, the format is generally automatically recognized.  If  not,  the
43       same  suffix can be added to input grid file names.  See grdreformat(1)
44       and Section 4.17 of the GMT Technical Reference and Cookbook  for  more
45       information.
46
47       When reading a netCDF file that contains multiple grids, GMT will read,
48       by default, the first 2-dimensional grid that can find in that file. To
49       coax  GMT  into  reading another multi-dimensional variable in the grid
50       file, append ?varname to the file name, where varname is  the  name  of
51       the variable. Note that you may need to escape the special meaning of ?
52       in your shell program by putting a backslash in  front  of  it,  or  by
53       placing  the  filename and suffix between quotes or double quotes.  The
54       ?varname suffix can also be used for output grids to specify a variable
55       name  different  from the default: "z".  See grdreformat(1) and Section
56       4.18 of the GMT Technical Reference and Cookbook for more  information,
57       particularly on how to read splices of 3-, 4-, or 5-dimensional grids.
58

EXAMPLES

60       To set all values > 70 to NaN and all values < 0 to 0 in file data.grd:
61
62       grdclip data.grd -Gnew_data.grd -Sa70/NaN -Sb0/0 -V
63

SEE ALSO

65       GMT(1), grdlandmask(1), grdmask(1), grdmath(1), grd2xyz(1), xyz2grd(1)
66
67
68
69GMT 4.3.1                         15 May 2008                       GRDCLIP(1)
Impressum