Creating
a GRIB2 Dataset
Adding a new GRIB2
dataset that accesses data in the MySQL database is a multi-step process. You
must first access the navigation parameters of the grib2 file, add these
parameters to the ~mcidas/data/grib2NavLookup.txt file, use the DSSERVE
command to add the dataset to your RESOLV.SRV file, stop and restart
-XCD for your changes to take effect.
- As user oper, run the grib2nav command to access
the navigation parameters of the grib2 file.
Type: grib2nav grib2Filename
where grib2Filename is the fully qualified path of a valid
GRIB-2 file on your system.
Example output is:
Nav parameters for message 66, field 0 are NAM, 6, -4564482,
2089981, 20318, 950000, 250000, 250000 |
- If these navigation parameters do not exist in the ~mcidas/data/grib2NavLookup.txt file,
then you will need to add them. The format of this data file
is as follows:
Column 1 is the filename prefix for the grib2 file created by -XCD
(12 character maximum). It is best if this is also the dataset
descriptor name for the new dataset.
Column 2 is the grid source name (4 character maximum)
Column 3 is the projection type (1 and 4 are Mercator, 2 is Polar
Stereographic, 6 is Lambert Conformal)
Columns 4-9 are the navigation parameters calculated by the grib2nav
command
From the example above, the new navigation entry you should add to
the ~mcidas/data/grib2NavLookup.txt file would be:
NAM-USLCAW20 | NAM | 6 | -4564482 |2089981 | 20318 | 950000 | 250000 | 250000 |
- If the navigation parameters already exist in the ~mcidas/data/grib2NavLookup.txt file,
then you can either edit the first column to match your new dataset
descriptor, or leave it as is.
- Use the DSSERVE command to add the dataset to the RESOLV.SRV file
in the mcadde account.
DSSERVE ADD SAMPLE/NAM-USLCAW20 GRIB 1 999999 TYPE=GRID RT=Y INFO='''DATABASE=mcrtgrib
DATAFILE=DESCRIPTOR GRIBTYPE=2''' "NAM - CONUS/LC; AWIPS 20 km
DATAFILE=DESCRIPTOR indicates that this dataset
will contain only the data files that match the descriptor name (in
this case, NAM-USLCAW20* files). If you have a different name
in column 1 of your ~mcidas/data/grib2NavLookup.txt file, then you
can include that name here in place of the word DESCRIPTOR. GRIBTYPE=2 will
only search for GRIB2 data files.
- Stop and restart -XCD for your changes to the ~mcidas/data/grib2NavLookup.txt file
to take effect in the database.
|