If you are using
Navigator 4.x
or
Internet Explorer 4.x
or
Omni Web 4.x
, this site will not render
correctly!
SYNOPSIS
gribtonc [-l logpath] [-v] [-t timeout] [-e errpath] [-g userparams.tbl] [-q qspecs] [CDL_path] netCDF_path
DESCRIPTION
This program decodes GRIB products (embedded in WMO prod uct envelopes) on the NWS High-Resolution Data Service (HRS) feed, writing the decoded products into a single netCDF output file, specified by netCDF_path. In case the output netCDF file does not already exist, the CDL_path must be supplied to specify the structure for the desired netCDF file, which gribtonc creates. The default parame ter translation is made according to a definition by UCAR, but the user may supply specific translations in a sepa rate file by the -g tabfile option. The user-supplied translations will override the default ones. GRIB prod ucts are converted to the units specified for the appro priate netCDF variable, if this differs from the units used for the GRIB parameter. A set of CDL files for all the model outputs appearing on the HRS data stream is pro vided with gribtonc for use in decoding HRS GRIB data.
FORMAT OF GRIB TO NETCDF TRANSLATION TABLE
The format of the translation table is as follows: Each line contains GRIB parameter number netCDF parameter name (cannot start with digit, [A-Za-z0-9_] only ) netCDF long description netCDF units An optional comment These are all separated by semicolon (";"). To comment a whole line, put any letter or special character (i.e. not a digit) in front of it. Trailing spaces are ignored be fore each semicolon, but not after. The GRIB number may have spaces in front. Parameters found in the separate file take presidence over the default parameter table, those not listed in the separate file are unchanged. All parameters will be named with a level suffix in addition to the name assigned in the separate file.
EXAMPLE
The command gribtocdl -v -g my.tab sst.grib > sst.cdl will decode the products in sst.grib and generate the cor responding CDL code into file sst.cdl. The file my.tab contains a specific conversion table to be used when nam ing a parameter from GRIB. Later the GRIB file may be be used as a standalone decoder, decoding products on its standard input into netCDF form, as specified by netCDF_file GRIB products that do not conform to the spec ified file structure (e.g. they are defined on a different grid or contain a grid parameter not included in the spec ified netCDF file) are skipped. To use gribtonc from the LDM pqact(1) program requires adding entries to the pqact configuration file that invoke gribtonc on appropriate HRS products. The PIPE action should be used in pattern-action entries. The form of such an entry is: HRS pattern PIPE gribtonc-executable gribtonc-options cdl-file netcdf-file where pattern is a regular expression pattern matching product identifiers of products that are to be decoded and written to the output file netcdf-file. Any directories that do not exist in netcdf-file will be created as needed, so date components, for example, may be part of the output file path, specified by using matched parts of the regular expression pattern. In case the out put netcdf-file does not already exist, it will be created from the CDL specification in the file specified by cdl- file. The path of the executable for gribtonc must be specified as the first argument to the PIPE command, and should be either an absolute path name or in a directory in the exe cutable search path of pqact. An example pqact.conf entry for decoding GRIB products from the ETA model as they appear on the HRS data stream is: # ETA model on Lambert conformal grid to yymmddhh_eta.nc HRS ^Y.Q... KWBC (..)(..).*/mETA PIPE /usr/local/ldm/decoders/gribtonc etc/eta.cdl da ta/GRIB/(1:yy)(1:mm)12_eta.nc Since gribtonc reads GRIB products from its standard in put, it may be invoked independently of pqact(1) by using I/O redirection.
OPTIONS
-l logpath Log file pathname. The program uses Unidata's ulog(3) package to write error and log messages. of the specified timeout, the program exits grace fully. -e errpath If a GRIB product cannot be decoded, perhaps be cause it is truncated or otherwise corrupted, it is appended to this file. -g tabfile Use GRIB-netcdf translation defined in this file. The format of this file is described below. -q qspecs Specification for how to expand so-called quasi- regular or thinned grids into rectangular grids. This argument is a comma-delimited text string that specifies the method of interpolation used (cur rently lin for linear or cub for cubic), and the latitude and longitude increments in degrees for the resulting grid (e.g. dlat=2.5,dlon=5.0). CDL_path The path name of a file to be used as a template for the netCDF file, if the netCDF file specified as output does not exist. If the netCDF output file does exist, this argument is ignored. A path name relative to the directory specified by the LDM_ETCDIR environment variable may be used, but you must make sure this environment variable is de fined in gribtonc netCDF_path The path name of the netCDF output file. This may be specified as an absolute path name or (more typ ically) relative to the directory from which gribtonc is invoked. Directories that do not exist in the path name of the output file will be created as needed.
EXAMPLE
The command gribtonc -v -l- -q "lin,dlat=2.5,dlon=5.0" avn-x.cdl avn-x.nc < avn-x.wmo will decode the products in avn-x.wmo into the netCDF file avn-x.nc, creating the latter file if it does not already exist from the ASCII CDL template file avn-x.cdl. If the data contain quasi-regular grids, they will be expanded to full regular grids on a 2.5 by 5.0 degree grid before be ing written into the output file.
SEE ALSO
gribdump(1), netcdf(3), pqact(1), udunits(3), ulog(3)
Man(1) output converted with man2html