2013-03-25 12:04:10 +00:00
|
|
|
/*! \page grib_copy grib_copy
|
|
|
|
\section DESCRIPTION
|
|
|
|
Copies the content of grib files printing values of some keys.
|
|
|
|
|
|
|
|
\section USAGE
|
|
|
|
grib_copy
|
|
|
|
[options] grib_file grib_file ... output_grib_file
|
|
|
|
|
|
|
|
\section OPTIONS
|
|
|
|
-f \n Force. Force the execution not to fail on error.
|
|
|
|
\n \n -r \n Repack data. Sometimes after setting some keys involving properties
|
|
|
|
of the packing algorithm a repacking of data is needed.
|
|
|
|
This repacking is performed setting this -r option.
|
2016-06-16 17:52:29 +00:00
|
|
|
\n \n -p key[:{s/d/i}],key[:{s/d/i}],... \n
|
2013-03-25 12:04:10 +00:00
|
|
|
Declaration of keys to print.
|
2016-06-16 17:52:29 +00:00
|
|
|
For each key a string (key:s), a double (key:d) or an integer (key:i)
|
2013-03-25 12:04:10 +00:00
|
|
|
type can be requested. Default type is string.
|
2016-06-16 17:52:29 +00:00
|
|
|
\n \n -P key[:{s/d/i}],key[:{s/d/i}],... \n
|
2013-03-25 12:04:10 +00:00
|
|
|
As -p adding the declared keys to the default list.
|
2016-06-16 17:52:29 +00:00
|
|
|
\n \n -w key[:{s/d/i}]{=/!=}value,key[:{s/d/i}]=value,... \n
|
2013-03-25 12:04:10 +00:00
|
|
|
Where clause.
|
|
|
|
Only grib messages matching the key/value constraints are copied to the
|
|
|
|
output_grib_file.
|
2016-06-16 17:52:29 +00:00
|
|
|
A valid constraint is of type key=value or key!=value.
|
|
|
|
For each key a string (key:s), a double (key:d) or an integer (key:i)
|
2013-03-25 12:04:10 +00:00
|
|
|
type can be defined. Default type is string.
|
|
|
|
\n \n -B order by directive \n
|
2016-06-16 17:52:29 +00:00
|
|
|
Order by. The output will be ordered according to the order by directive.
|
2017-01-23 10:55:33 +00:00
|
|
|
Order by example: "step:i asc, centre desc" (step numeric ascending and centre descending)
|
2013-03-25 12:04:10 +00:00
|
|
|
\n \n -V \n Version.
|
|
|
|
\n \n -W width \n
|
|
|
|
Minimum width of each column in output. Default is 10.
|
2016-06-16 17:52:29 +00:00
|
|
|
\n \n -M \n Multi-field support off. Turn off support for multiple fields in single grib message.
|
|
|
|
\n \n -T T | B | M | A \n Message type. T->GTS, B->BUFR, M->METAR (Experimental),A->Any (Experimental).
|
|
|
|
The input file is interpreted according to the message type.
|
2013-03-25 12:04:10 +00:00
|
|
|
\n \n -g \n Copy GTS header.
|
|
|
|
\n \n -G \n GRIBEX compatibility mode.
|
|
|
|
\n \n -7 \n Does not fail when the message has wrong length
|
|
|
|
\n \n -v \n Verbose.
|
|
|
|
\n \n
|
|
|
|
\section grib_copy_examples grib_copy examples
|
|
|
|
-# To copy only the pressure levels from a file\n
|
|
|
|
\verbatim
|
|
|
|
> grib_copy -w levtype=pl ../data/tigge_pf_ecmwf.grib2 out.grib
|
|
|
|
\endverbatim\n
|
|
|
|
-# To copy only the fields that are not on pressure levels from a file\n
|
|
|
|
\verbatim
|
|
|
|
> grib_copy -w levtype!=pl ../data/tigge_pf_ecmwf.grib2 out.grib
|
|
|
|
\endverbatim\n
|
2016-06-16 17:52:29 +00:00
|
|
|
-# To copy only the first three fields from a file\n
|
|
|
|
\verbatim
|
|
|
|
> grib_copy -w count=1/2/3 ../data/tigge_pf_ecmwf.grib2 out.grib
|
|
|
|
\endverbatim\n
|
2013-03-25 12:04:10 +00:00
|
|
|
-# A grib_file with multi field messages can be converted in single field messages
|
|
|
|
with a simple grib_copy.\n
|
|
|
|
\verbatim
|
|
|
|
> grib_copy multi.grib simple.grib
|
|
|
|
\endverbatim\n
|
|
|
|
-# Use the square brackets to insert the value of a key
|
|
|
|
in the name of the output file.\n
|
|
|
|
\verbatim
|
2016-06-16 17:52:29 +00:00
|
|
|
> grib_copy in.grib 'out_[shortName].grib'
|
2013-03-25 12:04:10 +00:00
|
|
|
\endverbatim\n
|
|
|
|
*/
|