bug in 1.9b4 sdfopen and templating?

Jennifer Adams jma at COLA.IGES.ORG
Wed Jul 20 15:24:26 EDT 2005


Jamie, Hoop --
I vaguely remember making a small change to the templating code a long
time ago (for 1.9b1 perhaps) and I will take some time to go back and
look at whether my fix broke something else. In the meanwhile, I think
you can do what you want if you put the full path in the template
string as well as the filename string. In the sdfopen documentation, it
doesn't explicitly say that the path can be removed, it's just in the
example that it's done that way... perhaps it's just a documentation
problem. Try this:

ga-> sdfopen /Datasets/ncep.reanalysis.dailyavgs/pressure/hgt.2004.nc
Datasets/ncep.reanalysis.dailyavgs/pressure/hgt.%y4.nc 500'

Jennifer


On Jul 19, 2005, at 2:09 PM, James D Scott wrote:

> I'm having trouble with the template feature of grads1.9b4 (solaris).
> (Config: v1.9b4 32-bit big-endian readline sdf/xdf netcdf lats athena
> printim)
>
> If I try to open two netcdf files in this manner:
>
> 'sdfopen /Datasets/ncep.reanalysis.dailyavgs/pressure/hgt.2004.nc
> hgt.%y4.nc 500'
>
> and try to dispay the field at t=500:
>
> 'd hgt.1(t=500)'
>
> I get a plot of data with very strange random values and no error
> messages.
>
> If I change the working directory to the one where the data resides and
> issue this command:
>
> 'sdfopen hgt.2004.nc hgt.%y4.nc 500'
> 'd hgt.1(t=500)'
>
> then everything works.   Also, if I run the first command with the full
> path to the data from a different
> directory on grads1.8, (Config: v1.8SL10 32-bit big-endian readline
> sdf/xdf netcdf lats athena im/image-output printim)
> it works.
>
>
> Don Hooper's comments:
> "Hoop sez -
>        The old code in the function gasdfopen put the directory parts
> of
> the pathname into the template field; the new code there doesn't.  This
> may have something to do with it, as the error messages indicate a
> simple
> filename rather than a full pathname is what it tried to open."
>
>
> Thanks,
>
>
> Jamie Scott
> NOAA Climate Diagnostics Center
> james.d.scott at noaa.gov
>
>
--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
4041 Powder Mill Road, Suite 302
Calverton, MD 20705 USA
jma at cola.iges.org



More information about the gradsusr mailing list