mirror of https://github.com/ecmwf/eccodes.git
Tool documentation updates
This commit is contained in:
parent
366bd1ff3d
commit
911fa13990
|
@ -146,14 +146,13 @@ int theStart=-1;
|
||||||
int theEnd=-1;
|
int theEnd=-1;
|
||||||
|
|
||||||
char* grib_tool_description=
|
char* grib_tool_description=
|
||||||
"Compare grib messages contained in two files."
|
"Compare GRIB messages contained in two files."
|
||||||
"\n\tIf some differences are found it fails returning an error code."
|
"\n\tIf some differences are found it fails returning an error code."
|
||||||
"\n\tFloating point values are compared exactly by default, different tolerance can be defined see -P -A -R."
|
"\n\tFloating point values are compared exactly by default, different tolerance can be defined see -P -A -R."
|
||||||
"\n\tDefault behaviour: absolute error=0, bit-by-bit compare, same order in files.";
|
"\n\tDefault behaviour: absolute error=0, bit-by-bit compare, same order in files.";
|
||||||
|
|
||||||
char* grib_tool_name="grib_compare";
|
char* grib_tool_name="grib_compare";
|
||||||
char* grib_tool_usage="[options] "
|
char* grib_tool_usage="[options] grib_file1 grib_file2";
|
||||||
"grib_file grib_file";
|
|
||||||
|
|
||||||
int grib_options_count=sizeof(grib_options)/sizeof(grib_option);
|
int grib_options_count=sizeof(grib_options)/sizeof(grib_option);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,19 @@ echo "> grib_copy multi.grib simple.grib"
|
||||||
echo "\endverbatim\\n"
|
echo "\endverbatim\\n"
|
||||||
|
|
||||||
echo "-# Use the square brackets to insert the value of a key"
|
echo "-# Use the square brackets to insert the value of a key"
|
||||||
echo "in the name of the output file.\\n"
|
echo "in the name of the output file (This is a good way to split a large GRIB file)\\n"
|
||||||
echo "\verbatim"
|
echo "\verbatim"
|
||||||
echo "> grib_copy in.grib 'out_[shortName].grib'"
|
echo "> grib_copy in.grib 'out_[shortName].grib'"
|
||||||
echo "\endverbatim\\n"
|
echo "\endverbatim\\n"
|
||||||
|
|
||||||
|
echo "-# To copy fields whose typeOfLevel is either 'surface' or 'meanSea'"
|
||||||
|
echo "\verbatim"
|
||||||
|
echo "> grib_copy -w typeOfLevel=surface/meanSea orig.grib out.grib"
|
||||||
|
echo "\endverbatim\\n"
|
||||||
|
echo "Note: we need to quote the name of the output so the shell does not interpret the square brackets"
|
||||||
|
|
||||||
|
echo "-# To copy selected fields and apply sorting (sorted by level in ascending order)"
|
||||||
|
echo "\verbatim"
|
||||||
|
echo "> grib_copy -w typeOfLevel=heightAboveGround -B'level:i asc' tigge_af_ecmwf.grib2 out.grib"
|
||||||
|
echo "\endverbatim\\n"
|
||||||
|
echo "Note: we need to specify the ':i' to get a numerical sort. By default values are sorted as strings so a level of 100 would come before 20!"
|
||||||
|
|
|
@ -4,7 +4,7 @@ DESCRIPTION
|
||||||
Print the total number of GRIB messages in the given files.
|
Print the total number of GRIB messages in the given files.
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
grib_count [options] file file ...
|
grib_count [options] grib_file grib_file ...
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-v Verbose mode. The number of messages is given for each file.
|
-v Verbose mode. The number of messages is given for each file.
|
||||||
|
|
|
@ -71,6 +71,10 @@ echo " - set keyname = keyvalue;"
|
||||||
echo " - print \"string to print also with key values like in the file name\""
|
echo " - print \"string to print also with key values like in the file name\""
|
||||||
echo " - transient keyname1 = keyname2;"
|
echo " - transient keyname1 = keyname2;"
|
||||||
echo " - comments beginning with #"
|
echo " - comments beginning with #"
|
||||||
|
echo " - defined(keyname) to check if a key is defined in a message"
|
||||||
|
echo " - missing(keyname) to check if the value of the key is set to MISSING"
|
||||||
|
echo " - To set a key value to MISSING, use 'set key=MISSING;' (note the case)"
|
||||||
|
echo " - You can also make an assertion with 'assert(condition)'. If condition is false, it will abort the filter."
|
||||||
echo " ."
|
echo " ."
|
||||||
echo "A complex example of grib_filter rules is the following to change temperature in a grib edition 1 file."
|
echo "A complex example of grib_filter rules is the following to change temperature in a grib edition 1 file."
|
||||||
echo "\\verbatim"
|
echo "\\verbatim"
|
||||||
|
|
|
@ -36,7 +36,8 @@ grib_option grib_options[]={
|
||||||
{"V",0,0,0,1,0}
|
{"V",0,0,0,1,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
char* grib_tool_description="Print a latitude, longitude, data values list ";
|
char* grib_tool_description="Print a latitude, longitude, data values list.\n"
|
||||||
|
"\tNote: Rotated grids are first unrotated";
|
||||||
char* grib_tool_name="grib_get_data";
|
char* grib_tool_name="grib_get_data";
|
||||||
char* grib_tool_usage="[options] grib_file grib_file ...";
|
char* grib_tool_usage="[options] grib_file grib_file ...";
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ echo "\\verbatim"
|
||||||
echo ">grib_get_data ../data/reduced_gaussian_model_level.grib2"
|
echo ">grib_get_data ../data/reduced_gaussian_model_level.grib2"
|
||||||
echo "\\endverbatim"
|
echo "\\endverbatim"
|
||||||
|
|
||||||
echo "-# If you want to define your missing value=1111 and to print the string missing in place of it"
|
echo "-# If you want to define your missing value=1111 and to print the string 'missing' in place of it"
|
||||||
echo "\\verbatim"
|
echo "\\verbatim"
|
||||||
echo ">grib_get_data -m 1111:missing ../data/reduced_gaussian_model_level.grib2"
|
echo ">grib_get_data -m 1111:missing ../data/reduced_gaussian_model_level.grib2"
|
||||||
echo "\\endverbatim"
|
echo "\\endverbatim"
|
||||||
|
@ -16,6 +16,3 @@ echo "-# If you want to print the value of other keys with the data value list"
|
||||||
echo "\\verbatim"
|
echo "\\verbatim"
|
||||||
echo ">grib_get_data -p centre,level,step ../data/reduced_gaussian_model_level.grib2"
|
echo ">grib_get_data -p centre,level,step ../data/reduced_gaussian_model_level.grib2"
|
||||||
echo "\\endverbatim"
|
echo "\\endverbatim"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
#include "grib_tools.h"
|
#include "grib_tools.h"
|
||||||
|
|
||||||
char* grib_tool_description="Build an index file for a set of input grib files.";
|
char* grib_tool_description="Build an index file for a set of input GRIB files.";
|
||||||
char* grib_tool_name="grib_index_build";
|
char* grib_tool_name="grib_index_build";
|
||||||
char* grib_tool_usage="[options] grib_file grib_file ... ";
|
char* grib_tool_usage="[options] grib_file grib_file ... ";
|
||||||
grib_index* idx=NULL;
|
grib_index* idx=NULL;
|
||||||
|
|
|
@ -33,3 +33,9 @@ echo "\\code "
|
||||||
echo ">grib_ls -l 51.46,-1.33,1 -p paramId,name ../data/reduced_gaussian_surface.grib2"
|
echo ">grib_ls -l 51.46,-1.33,1 -p paramId,name ../data/reduced_gaussian_surface.grib2"
|
||||||
./grib_ls -l 51.46,-1.33,1 -p paramId,shortName ../data/reduced_gaussian_surface.grib2
|
./grib_ls -l 51.46,-1.33,1 -p paramId,shortName ../data/reduced_gaussian_surface.grib2
|
||||||
echo "\\endcode\\n"
|
echo "\\endcode\\n"
|
||||||
|
|
||||||
|
echo "-# To get a list ordered by the 'level' key (ascending order).\\n "
|
||||||
|
echo "\\verbatim "
|
||||||
|
echo "> grib_ls -B 'level:i asc' tigge_af_ecmwf.grib2"
|
||||||
|
echo "\\endverbatim\\n "
|
||||||
|
echo "Note: we need to specify the ':i' to get a numerical sort. By default values are sorted as strings so a level of 100 would come before 20!"
|
||||||
|
|
|
@ -77,7 +77,9 @@ grib_options_help grib_options_help_list[] ={
|
||||||
" key/value constraints."
|
" key/value constraints."
|
||||||
"\n\t\tA valid constraint is of type key=value or key!=value."
|
"\n\t\tA valid constraint is of type key=value or key!=value."
|
||||||
"\n\t\tFor each key a string (key:s), a double (key:d) or"
|
"\n\t\tFor each key a string (key:s), a double (key:d) or"
|
||||||
" an integer (key:i)\n\t\ttype can be specified. Default type is string.\n"},
|
" an integer (key:i)\n\t\ttype can be specified. Default type is string."
|
||||||
|
"\n\t\tIn the value you can also use the forward-slash character '/' to specify an OR condition (i.e. a logical disjunction)\n"
|
||||||
|
},
|
||||||
{"v",0,"Verbose.\n"},
|
{"v",0,"Verbose.\n"},
|
||||||
{"7",0,"Does not fail when the message has wrong length\n"},
|
{"7",0,"Does not fail when the message has wrong length\n"},
|
||||||
{"A:","absolute error\n",
|
{"A:","absolute error\n",
|
||||||
|
|
Loading…
Reference in New Issue