cambecc / grib2json

converts GRIB2 files to JSON
MIT License
351 stars 152 forks source link

--fc, --fp, --fs and --fv Numeric Value Definitions #7

Closed phynweb closed 10 years ago

phynweb commented 10 years ago

Is there a list of numeric value definitions that can be passed to --fc, --fp, --fs and --fv: [--filter.category --fc value] : select records with this numeric category [--filter.parameter --fp value] : select records with this numeric parameter [--filter.surface --fs value] : select records with this numeric surface type [--filter.value --fv value] : select records with this numeric surface value

i.e. looking at the full list of possible options in a grib2 file here http://www.nco.ncep.noaa.gov/pmb/products/gfs/gfs.t00z.pgrbf00.grib2.shtml

How does one call different weather variables? For example if i wanted the 850mb temperature (or any other variable in the file), what would i need to pass to the options listed above?

Along the same lines, can grib2json be used to request multiple parameters at the same time or do I have to run a separate command for each parameter i need?

Thanks.

phynweb commented 10 years ago

Just needed to use the --names or -n command i.e. "[--names -n] : print names of numeric codes". For example:

grib2json -n -o fieldsAndValues.json gfs.t18z.pgrbf00.2p5deg.grib2

....can then look through the json output to figure out what the unique category, parameters, surface types and values are that way.