[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

adding levels



Hi there,
I am reading a somewhat "non-standard" grib file, in that I am trying
to read vaiables that are not defined in the gribtonc source code. The
variables I am having rouble reading are 2-dim variables. They have
been assigned param id 7 which is geopotential height, but they have
different levels ids (207, 208, and 209), which are not level ids
being used in the source code at this time. So I added them to
levels.h, and I modified the functions "levelname", "levelsuffix",
"level1", "level2", "levelunits" in levels.c and the function
"levelsuffix" in params.c to accomodate these additions. When I run
gribdump on the grib file, it recognizes these new parameter, level
combinations, and prints out the correct information:

vis:richeym:~/coamps/grib> cmps_gribdump -b
cbrha1200001280000000000000000000sfl.grib
 cnt mdl grd prm    lvlf lev1 lev2  trf tr0 tr1 bits bms gds   npts header
  58  83 255   7    cbrh    0    0    0   0   0   21   0   1   1591 1


Where "cbrh" is the level suffix I chose. gribdump also gets the
correct string for Level Type:
(cut from output from gribdump using the -h flag)
 ...
                  Parameter : 7 (Z)
                      Units : gp m
                 Level Type : Cloud base from Rh
 ...
            
The problem is that gribtonc is not decoding anything. When I run
gribtonc on the same file that I successfully ran gribdump on, I get
this in the logfile:

vis:richeym:~/coamps/grib> m cbrh.log
Feb 01 02:40:35 cmps_gribtonc[28085]: Starting Up
Feb 01 02:40:36 cmps_gribtonc[28085]: EOF on input
Feb 01 02:40:36 cmps_gribtonc[28085]: Exiting
Feb 01 02:40:36 cmps_gribtonc[28085]: 1 WMO msgs, 1 GRIBs decoded, 0
written

Which looks to me  like it is not recognizing the variable names I am
using in the cdl file.
I am using Z_cbrh, Z_cbas, and Z_ceil, which are the suffix names that
I used in levels.c. Is that the correct way to express these new
variables?

Do you have any idea as to what the problem might be?

Thanks,
Missy Petty

>From address@hidden  Tue Feb  1 08:24:26 2000

Hi there,
I sent you this message last night regarding my difficulty in decoding
variables with new level definitions. I found the problem.  The levels
I added were 1-dim levels and needed to be added to the function
"getlev" in nc.c, so that the function returned a -2 in their case.
The decoder works now.

Missy Petty