Re: More questions about

NOTE: The decoders mailing list is no longer active. The list archives are made available for historical reasons.

>cc: Roberto San Jose <roberto@xxxxxxxxx>
>From: Jose Ignacio Lopez Chavarrias <nacho.lopez@xxxxxxxxxxxxxxxxxxxx>
>Subject: Some questions about gribtonc
>Organization: Laboratorio de Medio Ambiente
>Keywords: 199802131652.JAA12752 gribtonc

> From: luro@xxxxxxxxxxxxxxxxxxxx
> Date: Wed, 18 Feb 1998 20:51:02 +0100 (NFT)
> Subject: More questions about
> To: russ@xxxxxxxxxxxxxxxx
> Cc: Roberto San Jose <roberto@xxxxxxxxx>, nalo@xxxxxxxxxxxxxxxxxxxx

Hi Luis,

>      I am a colleague of Jose Ignacio Lopez in Enviromental Software and
> Modelling Group of the Computer Science School at Technical University in
> Madrid. Jose has made me a forward of your kind mail replying his
> questions about how to use gribtronc. As I can read in your mail you
> are not sure about the platform we are using. It is a IBM-SP2 which uses
> AIX 4.0 (parallel processor). We are not able to perform the program
> successfully because when we run your command with an input file:
> pgb.1998011100 it produces a file with only about 6 Kb with nomeaningful
> information. I suggest to give you temporally the access to the 
> computer I am using.
> 
> The machine is: besiberri.sp.cesca.es; login: ******** password: ********
> 
> You can go to /u/roberto/nalo/_russ where I have left the full information
> Please, let me know as soon as possible, my best regards,
> 
> Luis
> 
> **********************************************************************
> *  Luis Rodriguez Garcia                                             *
> *  luro@xxxxxxxxxxxxxxxxxxxx                                         *        
>  
> *--------------------------------------------------------------------*        
>  
> *         Enviromental Software and Modelling Group                  *
> *                Computer Science School                             *
> *             Technical University of Madrid                         *
> *--------------------------------------------------------------------*
> *  Director: Roberto San Jose                                        *
> *  Ph.: +34-1-336-7465                                               *
> *  Fax: +34-1-336-7412                                               *
> *  Mobile Phone +34-(9)70-712402                                     *
> *  http://artico.lma.fi.upm.es                                       *
> *--------------------------------------------------------------------* 

I have placed a new file in 

   /u/roberto/_russ/pgb.cdl

that describes most of the data in the GRIB file pgb.1998011100 in that
directory.  The GRIB file contains 162 GRIB products, and this will
allow using gribtonc to decode 150 of them into a netCDF file named
pgb.nc, as follows:

  gribtonc -v -l- pgb.cdl pgb.nc < pgb.1998011100

The gribtonc program invokes another program "ncgen" from the netcdf
package in order to convert the text CDL file into a binary netCDF file
in which to write the data.  Thus the directory in which ncgen is
installed must be included in the PATH environment variable when
gribtonc is invoked.  I'm not sure where this is located on your system,
so I couldn't test gribtonc there.

You may be able to decode more than 150 GRIB products by continuing work
on the pgb.cdl file or on the gribtonc program, using either of the
commands

  gribdump -b pgb.1998011100

or

  gribdump -h pgb.1998011100

to show what is in the GRIB file.  The "-b" gives a brief (one-line)
summary of the contents of each GRIB product, whereas the "-h" flag
prints a header for each GRIB product, showing everything but the data.
You may even want to omit the "-h" flag to see the data values, in order
to get the units right when there is a question about those.

One problem with the GRIB file for gribtonc is that it contains data on
multiple grids, one a 2.5 degree global grid (grid "2" in the file), and
the other a much larger 1 degree grid (grid "3" in the file) for a few
products.  The pgb.cdl file only includes a description for the grid #2
and parameters defined on it.  Making a separate file of the grid #3
products and supplying a CDL file for those would make it possible to
decode those similarly.  Otherwise if you want them in the same file,
it's necessary to think up names for new lat and lon dimensions.

There are a few other problems with some of the products, such as the
use of level flags that had no documented purpose when gribtonc was
written (level flags 242, 243, 244).  The source for gribtonc needs to
be modified to understand what these flags for levels mean.  Also there
is a GRIB parameter flag that gribtonc didn't understand: parameter
144.  This is apparently a relatively new NCEP parameter for:
"volumetric soil moisture content" as a unit-less fraction, so gribtonc
needs to be updated to handle it.

It is some work to modify gribtonc to handle new kinds of levels and
parameters, but often most GRIB data can be decoded by just supplying
the necessary information in a CDL file, such as the pgb.cdl file I have
provided.  The way you develop such a CDL file is iterative:

  - run gribtonc with a draft CDL file and GRIB file and note the error
    messages
  - use "gribdump" to tell what is really in the GRIB file
  - add new parameter declarations, level dimensions, and layer
    dimensions as needed to get some of the error messages to go away
  - repeat

You may have to look at the source code for gribdump to add new levels,
layers, and parameters.  Especially note the gribtonc source files
levels.h, levels.c, params.h, and params.c.

We will continue to maintain gribtonc to handle the GRIB data we see in
the NWS FOS data stream, but we don't currently have the resources to
rewrite it to handle all possible GRIB data.

I hope this helps.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



  • 1998 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the decoders archives: