Re: Re[4]: 19990120: Help with decoders!

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

Jason,

I would use the conventions of the cdls that are supplied with gribtonc,
ie ruc2.cdl  Especially note the variables reftime and valtime. Some of
the cdl from FSL don't follow those convention and don't work well with
gribtonc. It's an iterative process of running gribdump to find out the
variable names, gribtonc to check the netCDF variables and cdl files. The
grib documentation is necesssity.  The method I use is to start with a
small initial cdl file and use the output of gribtonc to build the cdl.
Use ncdump to do a final check on the created netCDF file.


Hope this helps,
Robb...

On 28 Jan 1999, Jason Burks wrote:


Robb,
I have been messing around with the cdl files and found that if I remove the variable grid_type_code = 3; then I get a core dump. I am supposing that this variable lets the decoder know how to decode the data. I am ultimately interested in converting GRIB files that are not the standard model files. Is there anything that I need to know as far as converting non-supported models. Is there a generic model grid. Does this use only the grids like 211, 212, etc. or can it convert from a non-standard grid? Now I am starting to enter into an area I know very little about (GRIB files themselves and their format). Thanks so very much for all of your help, it has been vital to my project.
Take care,
Jason
On 27 Jan 1999, Jason Burks wrote:
>
>      Robb,
>      I tried just doing a ncgen on the cdl file and it allowed me to do
> that without any problem. However I still have the same problem with > the core dumping.
> A question I have for you is how does the gribtonc know which grib variables
 get
> converted into what netcdf variables.
Jason, The gribtonc software uses Table 2 page 34?, parameters and units to build the netCDF variables from the: The GRIB document (Office Note 388) dated
March 10, 1998 in ftp://nic.fb4.noaa.gov/pub/doc/nws/nmc/gribed1.
It also located on : www.unidata.ucar.edu/staff/chiz/grib The actual conversion to the netCDF variables is done in gribtonc/params.c using param_table and the parameter number. One would have to change the variable names in the table to change the netCDF variable. Nobody has ever requested this before you. There is also netCDF documentation at www.unidata.ucar.edu/packages/netcdf/docs.html One could probably create a second netCDF file from the first with different variables names also by writting a c program. As stated before, nobody has requested this either. Does gribdump dump core on your grib file? If yes then a non-conforming grib file. If not, I suggest using a debugger with gribtonc to see what's causing the core. Robb... In other words if I just wanted to convert
> a file that is in GRIB format and I want it to be written to a netCDF file as
 a
> different variable than is currently output into the netCDF file how would I
 do
> that.  I need to convert some grib files and change the way they are outputed.
 I
> realize I can change the cdl file but is there something else I need to
 change.
> Thanks in advance
> Jason
>
> ______________________________ Reply Separator
 _________________________________
> Subject: Re: 19990120: Help with decoders!
> Author: rkambic@xxxxxxxxxxxxxxxx at EXTERNAL > Date: 1/20/1999 5:28 PM
>
>
> On Wed, 20 Jan 1999, Unidata Support wrote: >
> > >To: support@xxxxxxxxxxxxxxxx
> > >From: Jason Burks <Jason.Burks@xxxxxxxx> > > >Subject: Help with decoders!
> > >Organization: .
> > >Keywords: 199901202032.NAA27487 > >
> >
> > I have downloaded the latest decoders and have been trying to get them > > to work. The decoder I am interested in is the gribtonc decoder. After > > Installing the decoders I went to try a sample grib file and the > > decoder core dumped. I am not sure if the problem is the data file I > > am using or the program. Do you have any sample grib files and cdl > > files I could test my gribtonc decoder with? If not what would cause > > the decoder to core dump?
> >      the error I get is
> >      udunits(3): syntax error:
> >      /seconds
> >         ^
> > Segmentation fault (core dumped) > > > > I noticed if I tried to use another cdl file the program does not core > > dump. I have a valid cdl, it is the one used in AWIPS! > > Thanks in advance for your help! > > Jason Burks
>
> Jason,
>
> Just because the cdl is used with AWIPS doesn't mean it will work/follow > conventions with gribtonc. A simple test would be to test the cdl on the > command line.
>
> % ncgen -o output.nc  awips.cdl
>
> This will create an empty output.nc file with all the define variables or > complain about problems. You will probably have to modify the the > awips.cdl file with the assistance of gribdump utility on the grib file. > gribdump is built along with gribtonc.
>
> Robb...
>
>
> >
>
>
 ==============================================================================
> Robb Kambic                          Unidata Program Center
> Software Engineer III Univ. Corp for Atmospheric > Research > rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/ >
 ==============================================================================
>
=============================================================================== Robb Kambic Unidata Program Center
Software Engineer III                  Univ. Corp for Atmospheric
 Research
rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/ ==============================================================================


==============================================================================
Robb Kambic                                Unidata Program Center
Software Engineer III                      Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx                   WWW: http://www.unidata.ucar.edu/
==============================================================================


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