g2gdf.pl part2

Mark Sponsler msponsler at COMCAST.NET
Tue Apr 15 15:02:43 EDT 2008


Hi Arlindo,
I started trying to process grib2 files after building a gdf and inv file
using g2gdf.pl but encountered some errors.

1) Documentation:  http://opengrads.org/doc/udxt/grib2/grib2.html
In the example section the sample command below indicates it produces a
inv and gdf file.  I found that using the '-v' option does not produce the
expected results, and causes g2gdfl.pl to error out. If the -v option is
removed, all works fine.

'g2gdf.pl -v gfs.t00z.pgrb2bf00' should be 'g2gdf.pl gfs.t00z.pgrb2bf00'

2)When running g2gdfl.pl to produce a control file, something interesting
occurs in the control file.  Here's a snippet of the first few lines of
the ctl file:

dset c:\grib\hires_input\multi_1.wc_4m.t12z.grib2___
undef 9.999E+20
title c:\grib\hires_input\multi_1.wc_4m.t12z.grib2
*  produced by g2ctl v0.0.3g
* griddef=1:0:(736 x 526):grid_template=0: lat-lon grid:(736 x 526) units
1e-06 input WE:NS output WE:SN res 48 lat 50.000000 to 15.000000 by
0.066667 lon 195.000000 to 244.000000 by 0.066667 #points=387136

ydef 526 linear 15.000000 0.066667
xdef 736 linear 195.000000 0.066667

When trying to open that file, an error is received:

P:\>set PATH=c:\Program Files\PCGrADS19\win32;%PATH%

P:\>gradsc -l
Starting X server under /Xming
Starting gradsc under c:\PROGRA~1\PCGRAD~2\win32 ...

Grid Analysis and Display System (GrADS) Version 1.9.0-rc1
Copyright (c) 1988-2007 by Brian Doty and IGES
Center for Ocean-Land-Atmosphere Studies (COLA)
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v1.9.0-rc1 32-bit little-endian readline lats athena printim

Issue 'q config' command for more information.

GX Package Initialization: Size = 11 8.5
ga-> g2_open c:/grib/hires_input/wc_4m.gdf
Scanning description file:  c:/grib/hires_input/wc_4m.gdf
Open Error:  Can't open binary data file
  File name = c:\grib\hires_input\multi_1.wc_4m.t12z.grib2___
ga->

Notice the underscores at the end of the dset name. If I manully delete
those underscores, then try to open the file, all goes well. Can do a 'q
file' with good results.

But the documentation seems to suggest that maybe there should be a binary
file produced??? And if I try and actually display a variable things do
not go well.

Not sure what to do now.

I've got another way to get to the data, but am just trying to use the new
interface to see how it works.



More information about the gradsusr mailing list