GrADS bugs on combining PDEF and FILEHEADER/THEADER

Jennifer Adams jma at COLA.IGES.ORG
Fri Mar 9 11:08:18 EST 2007


Youhua --
If you change 'theader' in your descriptor file to 'headerbytes',
then it will work properly. The 'headerbytes' option has been in
GrADS from the beginning, but (for unknown reasons) was never
documented. The 'theader' command was implemented later by someone
else to do the same thing but in a slightly different way, and it
doesn't quite get it right for pdef files. I will track down the
problem, but in the meantime, the quick fix is to just use
headerbytes instead. Thanks for reporting this one!
Jennifer


On Jan 30, 2007, at 8:21 AM, Youhua Tang wrote:

> Hi, All:
>
> I think I may find a bug about grads 1.9b4 on AIX when using
> PDEF and FILEHEADER/THEADER. My description file is
>
> dset /ptmp/wx20yt/premaq-20060802/aqm.t12z.grdcro2d.bin
> title 12km domain for CONUS
> undef  -9.99e-33
> PDEF 442 265 lcc 21.8212 -120.628 1 1 33 45 -97 12000. 12000.
> FILEHEADER 12844
> THEADER 48
> xdef 614 linear -133.459000 0.113383763365335
> ydef 290 linear 22.190000 0.110827272727273
> zdef 1 linear 1 1
> tdef 1 linear 12:00Z02AUG2006 1hr
> vars 6
> mlat 0 99 Longitude
> mlon 0 99 Latitude
> mf 0 99 squared map-scale factor (M/M)**2
> topo 0 99 TOPOGRAPH
> land 0 99 Landuse in USGS 25-Category
> purb 0 99 percent of urban category
> endvars
>
>
> I found grads did not read this file correctly as it showed some funny
> value. However, when I removed the PDEF and use native the grid,
>
> dset /ptmp/wx20yt/premaq-20060802/aqm.t12z.grdcro2d.bin
> title 12km domain for CONUS
> undef  -9.99e-33
> FILEHEADER 12844
> THEADER 48
> xdef 442 linear 1 1
> ydef 265 linear 1 1
> zdef 1 linear 1 1
> tdef 1 linear 12:00Z02AUG2006 1hr
> vars 6
> mlat 0 99 Longitude
> mlon 0 99 Latitude
> mf 0 99 squared map-scale factor (M/M)**2
> topo 0 99 TOPOGRAPH
> land 0 99 Landuse in USGS 25-Category
> purb 0 99 percent of urban category
> endvars
>
> then all value look correct just without map projection.
>
> To test it again, I also converted my binary files to NETCDF, and used
> grads read netcdf file. GrADS can read netcdf file correctly in both
> native grid and PDEF grid. So I think the problem is on the
> combination of
> PDEF and FILEHEADER/THEADER. The same bug is also found in GrADS
> 1.8sl11
> on AIX.
>
>
> Youhua
>

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20070309/4dca460e/attachment.html 


More information about the gradsusr mailing list