[ncl-talk] how to read a variable in group of hdf file?

李嘉鹏 lijpbasin at 126.com
Tue Nov 4 03:32:46 MST 2014


Hi, Try `ncl_filedump AMSR_E_L2A_201108010017_D.hdf`, it might give you some hints of the corresponding variable name in NCL.

On November 4, 2014 6:13:49 PM GMT+08:00, "dyjbean at gmail.com" <dyjbean at gmail.com> wrote:
>hi,
>i want to read a variable "Time" which is involved in group  in a hdf
>file, a part of information of this hdf file is as follows:
>+++++++++++++++++++++++++++++++++++++++++++
>......
>GROUP=GeoField 
>OBJECT=GeoField_1 
>GeoFieldName="Time" 
>DataType=DFNT_FLOAT64 
>DimList=("DataTrack_lo") 
>END_OBJECT=GeoField_1 
>OBJECT=GeoField_2 
>GeoFieldName="Latitude" 
>DataType=DFNT_FLOAT32 
>DimList=("DataTrack_lo","DataXTrack_lo") 
>END_OBJECT=GeoField_2 
>OBJECT=GeoField_3 
>GeoFieldName="Longitude" 
>DataType=DFNT_FLOAT32 
>DimList=("DataTrack_lo","DataXTrack_lo") 
>END_OBJECT=GeoField_3 
>END_GROUP=GeoField 
>......
>++++++++++++++++++++++++++++++++++++++++++++++++++
>
>i want to extract the "Time" in ncl, but it showed:
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>ncl 0> ff=addfile("AMSR_E_L2A_201108010017_D.hdf","r") 
>ncl 1> time=ff->Time 
>fatal:["Execute.c":6321]:variable (Time) is not in file (ff) 
>fatal:["Execute.c":8565]:Execute: Error occurred at or near line 1
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
>it seems that there doesn't exist "Time" variable in this hdf file,but
>it does,
>
>how can i read this time info in ncl?
>
>
>thanks 
>
> 
>
>
>dyjbean at gmail.com
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ncl-talk mailing list
>List instructions, subscriber options, unsubscribe:
>http://mailman.ucar.edu/mailman/listinfo/ncl-talk




More information about the ncl-talk mailing list