Options for HDF and units

Jennifer M. Adams jma at COLA.IGES.ORG
Mon Aug 28 09:50:17 EDT 2006


On Aug 28, 2006, at 8:22 AM, M.Mahakur wrote:

> GrADS Users:
>
> I  created a ctl for the HDF (Gridded) data file. But, it shows entire
> domain as undefined!! The data is "16 bits signed short integer". What
> should I write in the ctl for 'OPTIONS' and 'variable units' for
> non-standard binary (as I guess I have to treat like non-standard
> binary!!).
With 'dtype hdfsds', you use the variable declaration as documented
here:
    http://iges.org/grads/gadoc/SDFdescriptorfile.html

For your data set, it will probably look like this:
npp 0 y,x npp

Also, you may have to change your undef value -- most HDF files I
have met have an undef of the same type as the data, and many use an
undef value of "0" (zero).  If you can GrADS to open the descriptor
file, try the 'q attr' command and see what other metadata is there...

Jennifer




>
> The No. of lats and lons are 3275 and 3222. I feel the file size
> should
> be 21104100 bytes (=3275*3222*2). However, the actual file size is
> 21106990 i.e. 2890 extra bytes. Is this because of some 'HEADER'
> inside
> the HDF data file?
>
> I had mentioned earlier I could NOT open using 'sdfopen'.
>
> Thanks.
>
> With Regards,
>
> M. Mahakur
>
> P.S. : I am using the following as ctl:
>
> DSET ^test.HDF
> DTYPE hdfsds
> UNDEF -1.0E-33
> XDEF  3275  LINEAR 68.1442 0.008928571
> YDEF  3222 linear 6.74583 0.008928571
> TDEF  1 LINEAR 01apr1998 1dy
> ZDEF  1 LINEAR 1 1
> VARS 1
> npp -1,40,2,-1 0  NPP
> ENDVARS
>

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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20060828/5f16279e/attachment.html 


More information about the gradsusr mailing list