Handling GRIB records with two or more variables of the same type

Charles J. Alonge calonge at HSB.GSFC.NASA.GOV
Tue Oct 25 08:38:09 EDT 2005


Grads Gurus,

   I am currently working with grib files
that contain multiple records of the same
type.  Does any one know of a way to create
a control file to differentiate between
the two of them in grads using the grib
"Process ID".

Example of "wgrib filename" output:

14:1587804:d=05102623:APCP:kpds5=61:kpds6=1:kpds7=0:TR=4:P1=0:P2=1:TimeU=1:sfc:0-1hr
acc:NAve=4
15:1741654:d=05102623:APCP:kpds5=61:kpds6=1:kpds7=0:TR=4:P1=0:P2=1:TimeU=1:sfc:0-1hr
acc:NAve=4

Example of "wgrib -V filename" output:

rec 14:1587804:date 2005102623 APCP kpds5=61 kpds6=1 kpds7=0
levels=(0,0) grid=0 sfc 0-1hr acc: bitmap: 23497 undef
  APCP=Total precipitation [kg/m^2]
  timerange 4 P1 0 P2 1 TimeU 1  nx 464 ny 224 GDS grid 0 num_in_ave 4
missing 0
  center 222 subcenter 222 process 155 Table 1
  latlon: lat  25.063000 to 52.938000 by 0.125000  nxny 103936
          long -124.938000 to -67.063000 by 0.125000, (464 x 224) scan
64 mode 128 bdsgrid 1
  min/max data 0 0.8475  num bits 14  BDS_Ref 0  DecScale 4 BinScale 0

rec 15:1741654:date 2005102623 APCP kpds5=61 kpds6=1 kpds7=0
levels=(0,0) grid=0 sfc 0-1hr acc: bitmap: 23497 undef
  APCP=Total precipitation [kg/m^2]
  timerange 4 P1 0 P2 1 TimeU 1  nx 464 ny 224 GDS grid 0 num_in_ave 4
missing 0
  center 222 subcenter 222 process 156 Table 1
  latlon: lat  25.063000 to 52.938000 by 0.125000  nxny 103936
          long -124.938000 to -67.063000 by 0.125000, (464 x 224) scan
64 mode 128 bdsgrid 1
  min/max data -9999 -9999  num bits 0  BDS_Ref -9.999e+07  DecScale 4
BinScale 0


The only difference between fields is the
process id (process 155 vs. 156).
I have been currently stripping out the
multiple records to do my analysis,
however this is not only time consuming
but can occupy a great deal of disk space
at times. Is there any way to differentiate
between these two fields in a GrADS control file?
Or has anyone been able to successfully modify the
GrADS source to do something along these
lines?  Any help/suggestions you can throw
my way will be greatly appreciated.

Thanks,
Chuck

Charles J. Alonge
NASA Goddard Space Flight Center - SAIC
Hydrological Sciences Branch
NASA-GSFC Mail Code 614.3
Greenbelt, MD 20771

Office: Building 22, Room 008
Phone:  (301) 286-8272
Fax:    (301) 286-8624
Email:  Charles.Alonge at gsfc.nasa.gov



More information about the gradsusr mailing list