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

NAME

6       minmax - Find extreme values in data tables
7

SYNOPSIS

9       minmax   [   files]  [  -C  ]  [  -EL|l|H|hcol  ]  [  -H[i][nrec]  ]  [
10       -I[p]dx[/dy[/dz...]  ]  [  -M[flag]  ]  [  -Tdz  ]  [   -:[i|o]   ]   [
11       -bi[s|S|d|D[ncol]|c[var1/...]] ] [ -f[i|o]colinfo ]
12

DESCRIPTION

14       minmax  reads  its standard input [or from files] and finds the extreme
15       values in each of the columns.  It recognizes NaNs and will print warn‐
16       ings  if  the  number  of  columns  vary  from record to record.  As an
17       option, minmax will find the extent of the first n columns  rounded  up
18       and  down  to  the  nearest  multiple  of  the supplied increments.  By
19       default, this output will be in the form -Rw/e/s/n which  can  be  used
20       directly  in  the command line for other programs (hence only dx and dy
21       are neede), or the output will be in column form for as many columns as
22       there  are  increments  provided.  A similar option (-T) will provide a
23       -Tzmin/zmax/dz string for makecpt.
24
25       xyzfile
26              ASCII [or binary, see -b] file(s) holding a fixed number of data
27              columns.
28

OPTIONS

30       -C     Report  the  min/max  values  per  column  in  separate  columns
31              [Default uses <min/max> format].
32
33       -E     Returns the record whose column col contains the minimum (l)  or
34              maximum  (h) value.  Upper case (L|H) works on absolute value of
35              the data.  In case of multiple matches, only the first record is
36              returned.
37
38       -H     Input  file(s)  has  Header record(s).  Number of header records
39              can be changed by editing your .gmtdefaults4 file.  If used, GMT
40              default  is  1  header record. Use -Hi if only input data should
41              have header records [Default will write out  header  records  if
42              the input data have them]. Blank lines and lines starting with #
43              are always skipped.
44
45       -I     Report the min/max of the first n columns to the nearest  multi‐
46              ple  of  the  provided  increments (separate the n increments by
47              slashes), and output results in the form -Rw/e/s/n (unless -C is
48              set).   If  only  one  increment is given we also use it for the
49              second column (for backwards compatibility).  To  override  this
50              behaviour, use -Ipdx.
51
52       -M     Multiple  segment  file(s).  Segments are separated by a special
53              record.  For ASCII  files  the  first  character  must  be  flag
54              [Default  is  '>'].  For binary files all fields must be NaN and
55              -b must set the number of output columns explicitly.  By default
56              the  -M  setting  applies to both input and output.  Use -Mi and
57              -Mo to give separate settings.
58
59       -T     Report the min/max of the first column to the  nearest  multiple
60              of dz and output this in the form -Tzmin/zmax/dz.
61
62       -:     Toggles  between  (longitude,latitude)  and (latitude,longitude)
63              input and/or output.  [Default is (longitude,latitude)].  Append
64              i  to  select  input  only or o to select output only.  [Default
65              affects both].  Only works when -I is selected.
66
67       -bi    Selects binary input.  Append s for single precision [Default is
68              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
69              Optionally, append ncol, the number of columns  in  your  binary
70              input  file if it exceeds the columns needed by the program.  Or
71              append c  if  the  input  file  is  netCDF.  Optionally,  append
72              var1/var2/...  to specify the variables to be read.  [Default is
73              2 input columns].
74
75       -f     Special formatting of input and/or output columns (time or  geo‐
76              graphical  data).   Specify  i  or  o to make this apply only to
77              input or output [Default applies to both].   Give  one  or  more
78              columns (or column ranges) separated by commas.  Append T (abso‐
79              lute calendar time), t (relative time in chosen TIME_UNIT  since
80              TIME_EPOCH),  x (longitude), y (latitude), or f (floating point)
81              to each column or column range item.  Shorthand  -f[i|o]g  means
82              -f[i|o]0x,1y (geographic coordinates).
83

ASCII FORMAT PRECISION

85       The ASCII output formats of numerical data are controlled by parameters
86       in your .gmtdefaults4  file.   Longitude  and  latitude  are  formatted
87       according  to  OUTPUT_DEGREE_FORMAT, whereas other values are formatted
88       according to D_FORMAT.  Be aware that the format in effect can lead  to
89       loss  of  precision  in  the output, which can lead to various problems
90       downstream.  If you find the output is not written with  enough  preci‐
91       sion, consider switching to binary output (-bo if available) or specify
92       more decimals using the D_FORMAT setting.
93

EXAMPLES

95       To find the extreme values in the file ship_gravity.xygd:
96
97       minmax ship_gravity.xygd
98
99       Output should look like
100
101       ship_gravity.xygd:  N  =  6992   <326.125/334.684>   <-28.0711/-8.6837>
102       <-47.7/177.6> <0.6/3544.9>
103
104       To  find the extreme values in the file track.xy to the nearest 5 units
105       and use this region to draw a line using psxy, run
106
107       psxy `minmax -I5 track.xy` track.xy -Jx1 -B5 -P > track.ps
108
109       To find the min and max values for each of the  first  4  columns,  but
110       rounded to integers, use
111
112       minmax junkfile -C -I1/1/1/1
113

BUGS

115       The  -I  option does not yet work properly with time series data (e.g.,
116       -f0T).  Thus, such variable intervals as months and years are not  cal‐
117       culated.   Instead, specify your interval in the same units as the cur‐
118       rent setting of TIME_UNIT.
119

SEE ALSO

121       GMT(1)
122
123
124
125GMT 4.3.1                         15 May 2008                        MINMAX(1)
Impressum