1GRIBTOCDL(1)                General Commands Manual               GRIBTOCDL(1)
2
3
4

NAME

6       gribtocdl - create netCDF CDL-file from GRIB dataset
7

SYNOPSIS

9       gribtocdl [-v] [-g tabfile] [-q qspecs] gribfiles
10

DESCRIPTION

12       This  program  decodes GRIB products and generates to stdout the corre‐
13       sponding CDL code that can be used in gribtonc(1) to convert  the  GRIB
14       products  to  netCDF format.  The default parameter translation is made
15       according to a definition by UCAR, but the  user  may  supply  specific
16       translations in a separate file by the -g tabfile option. The user-sup‐
17       plied translations will override the default ones.
18

OPTIONS

20       -v     Verbose, reports decoding steps to stderr.
21
22       -g tabfile
23              Use GRIB-netcdf translation defined in this file. The format  of
24              this file is described below.
25
26       -q qspecs
27              Specification  for  how  to  expand  so-called  quasi-regular or
28              thinned grids into rectangular grids.  This argument is a comma-
29              delimited text string that specifies the method of interpolation
30              used (currently lin for linear or cub for cubic), and the  lati‐
31              tude  and longitude increments in degrees for the resulting grid
32              (e.g. dlat=2.5,dlon=5.0).
33
34

FORMAT OF GRIB TO NETCDF TRANSLATION TABLE

36       The format of the translation table is as follows: Each line contains
37           GRIB parameter number
38           netCDF parameter name (cannot start with digit, [A-Za-z0-9_] only )
39           netCDF long description
40           netCDF units
41           An optional comment
42
43       These are all separated by semicolon (";"). To comment  a  whole  line,
44       put  any letter or special character (i.e. not a digit) in front of it.
45       Trailing spaces are ignored before each semicolon, but not after.   The
46       GRIB number may have spaces in front.  Parameters found in the separate
47       file take presidence over the default parameter table, those not listed
48       in  the separate file are unchanged.  All parameters will be named with
49       a level suffix in addition to the name assigned in the separate file.
50
51

EXAMPLE

53       The command
54           gribtocdl -v -g my.tab sst.grib > sst.cdl
55
56       will decode the products in sst.grib and generate the corresponding CDL
57       code into file sst.cdl.  The file my.tab contains a specific conversion
58       table to be used when naming a parameter from  GRIB.   Later  the  GRIB
59       file may be converted to netCDF by using gribtonc:
60           gribtonc -v -g my.tab sst.cdl sst.nc < sst.grib
61
62       The file my.tab looks like this:
63           Grib;netCDF;long name               ;units;comments
64            31 ;CI    ;Sea-ice cover           ;none ;(0-1)
65            34 ;SSTK  ;Sea surface temperature ;K    ;
66           151 ;MSL   ;Mean sea-level pressure ;Pa   ;
67           167 ;T2M   ;2 metre temperature     ;K    ;
68

SEE ALSO

70       gribdump(1), gribtonc(1), netcdf(3), udunits(3)
71

DIAGNOSTICS

73       Error messages and log messages are written to stderr.
74
75
76
77
78
79
80                                  31 May 2002                     GRIBTOCDL(1)
Impressum