g2gdf.pl part2

Mark Sponsler msponsler at COMCAST.NET
Thu Apr 17 16:10:10 EDT 2008


Hi Arlindo,
Yeah - this is a tricky bug.

OK - here's the result of trying to get to model_25.gdf


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

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 model_25.gdf
Scanning description file:  model_25.gdf
Open Error:  Can't open description file

ga-> g2_open c:\Program Files\PCGrADS19\data\model_25.gdf
Scanning description file:  c:\Program
Open Error:  Can't open description file

Next I tried editing the gfs gdf file as specified using the carrot ^  (file attached).  Notice the grep error.

ga-> g2_open c:\grib\hires_input\gfs_t12z.gdf g2_verb
Scanning description file:  c:\grib\hires_input\gfs_t12z.gdf
Data file c:\grib\hires_input\gfs_t12z.grib2___ is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1000 1000
Time values set: 2008:4:16:18 2008:4:16:18
Define memory allocation size = 4 bytes

ga-> set lev 825
LEV set to 825 825

ga-> d g2(tmpprs)
grep: gfs_t12z.inv: No such file or directory
*** FATAL ERROR: could not open file: c:gribhires_inputgfs_t12z.grib2 ***
Cannot contour grid - all undefined values

ga-> close 1
File 1 has been closed

Next I tried using the non-Posix / in the gdf file.

ga-> g2_open c:\grib\hires_input\gfs_t12z.gdf g2_verb
Scanning description file:  c:\grib\hires_input\gfs_t12z.gdf
Data file c:\grib\hires_input\gfs_t12z.grib2___ is open as file 1
LON set to 0 360
LAT set to -90 90
LEV set to 1000 1000
Time values set: 2008:4:16:18 2008:4:16:18

ga-> set lev 825
LEV set to 825 825

ga-> d g2(tmpprs)
: No such file or directoryfs_t12z.inv
*** FATAL ERROR: could not open file: c:gribhires_inputgfs_t12z.grib2 ***
Cannot contour grid - all undefined values

ga->

Then I went back to trying a bunch of options on model_25.gdf (posix, non-posix, upper and lower case C):

ga-> close 1
File 1 has been closed

ga-> g2_open model_25.gdf g2_verb
Scanning description file:  model_25.gdf
Open Error:  Can't open description file

ga-> close 1
Close Error: Only last file may be closed

ga-> g2_open c:\Program Files\PCGrADS19\data\model_25.gdf g2_verb
Scanning description file:  c:\Program
Open Error:  Can't open description file

ga-> g2_open C:\Program Files\PCGrADS19\data\model_25.gdf g2_verb
Scanning description file:  C:\Program
Open Error:  Can't open description file

ga-> g2_open C:/Program Files/PCGrADS19/data/model_25.gdf g2_verb
Scanning description file:  C:/Program
Open Error:  Can't open description file

ga-> g2_open c:/Program Files/PCGrADS19/data/model_25.gdf g2_verb
Scanning description file:  c:/Program
Open Error:  Can't open description file
ga->
--
Thanks,
Mark

-------------- Original message --------------
From: Arlindo da Silva <dasilva at ALUM.MIT.EDU>
On Thu, Apr 17, 2008 at 12:54 PM, Mark Sponsler <msponsler at comcast.net> wrote:

Arlindo - No luck. I've tried doing a 'cd' in the past when I've had pathing issues and it seems to make no difference.  The only way to make progress is to explicitly identify the whole path to the input file:

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

P:\>cd c:\grib\hires_input\

P:\>g2gdf.exe -verf gfs_t12z.grib2
cannot find any GRIB-2 file at script/g2gdf.pl line 124.

P:\>g2gdf -verf gfs_t12z.grib2
cannot find any GRIB-2 file at script/g2gdf.pl line 124.


Rats! I suspect that the problem is related to the "\" in the file names, as indicated by the grads error message:

: No such file or directoryt12z.inv

To test this hypothesis, edit the last 2 lines of your .gdf

FROM:

@ global String dset      c:\grib\hires_input\gfs_t12z.grib2
@ global String inventory c:\grib\hires_input\gfs_t12z.inv

TO:

@ global String dset  ^gfs_t12z.grib2
@ global String inventory ^gfs_t12z.inv

and if that does not work replace all the "\" with "/"

@ global String dset      c:/grib/hires_input/gfs_t12z.grib2
@ global String inventory c:/grib/hires_input/gfs_t12z.inv

One frustating aspect of all of this is that I have no such problem on my Windows XP boxes, so I cannot perform these tests myself. Are you running Vista by any chance?

Also, after the "g2_open" please add a "g2_verb" for extra diagnostic messages.

BTW, are you able to display the model_25.gdf included in the data/ directory?

  Thanks,

     Arlindo


--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080417/ea38ad0f/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 9419 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080417/ea38ad0f/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 9457 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080417/ea38ad0f/attachment-0001.obj 


More information about the gradsusr mailing list