[gradsusr] Problem in opening MODIS HDF files

Ehsan Erfani e.erfani81 at gmail.com
Sat Oct 13 23:31:50 EDT 2012


Thank you Jim,

But when I abbreviate the name of variable as:

AELQA_Mean      0    1,  1,  0,  0 Surface pressure [hPa]

I receive this errror message:

Error: Variable aelqa_mean not in HDF-SDS file
Data Request Error:  Error for variable 'aelqa_mean'
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = aelqa_mean


Any idea?

Thank you in advance,
Ehsan



On Sat, Oct 13, 2012 at 7:46 PM, James T. Potemra <jimp at hawaii.edu> wrote:

>  Ehsan:
>
> I think there is a character limit on the variable name.  So, you have
> a variable called "Angstrom_Exponent_Land_QA_Mean", but GrADS
> is looking for "angstrom_expone".  Instead, you can map the variable
> to something shorter (see http://www.iges.org/grads/gadoc/gadocindex.html
> ),
> e.g., in your ctl file:
>
> Angstrom_Exponent_Land_QA_Mean=>AELQA_Mean      0    1,  1,  0,  0 Surface
> pressure [hPa]
>
> then open and display "aelqa_mean", or whatever you call it.
>
> Jim
>
>
> On 10/13/12 1:54 PM, Ehsan Erfani wrote:
>
> Hi again,
>
> I attached an hdf file with a ctl (I downloaded the data from Giovanni
> website and I wrote the ctl). This time, the Grads can open the data, but
> when I write the command: d Angstrom_Exponent_Land_QA_Mean, This error
> message appears:
> Syntax Error:  Invalid Operand
>   'angstrom_exponent' not a variable or function name
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = angstrom_exponent_land_qa_mean
>
> But, I am sure the name of variable is true. I checked it by HDFView and
> this is the information from HDFView:
> Angstrom_Exponent_Land_QA_Mean (720, 2)
>     32-bit floating-point,    180 x 360
>     Number of attributes = 18
>         _FillValue = -9999.0
>         QA_Useful_Flag_Bit = 0
>         Quality_Assurance_Data_Set = Quality_Assurance_Land
>         scale_factor = 1.0
>         QA_Value_Start_Bit = 1
>         add_offset = 0.0
>         long_name = Angstrom exponent (Land) for 0.47 and 0.66 microns:
> Level-2 QA Weighted Mean
>         Statistic_Type = Simple
>         units = unitless
>         QA_Byte = 0
>         Aggregation_Data_Set = None
>         valid_range = -500,5000
>         Included_Level_2_Nighttime_Data = False
>         Derived_From_Level_2_Data_Set = Angstrom_Exponent_Land
>         QA_Value_Num_Bits = 3
>         Level_2_Pixel_Values_Read_As = Real
>         structureType = Grid
>         unitsCategory = exponent
>
> Hope these help to solve the problems. I appreciate all your consideration
> and help.
>
> Best regards,
> Ehsan
>
> On Sat, Oct 13, 2012 at 1:26 AM, Ehsan Erfani <e.erfani81 at gmail.com>wrote:
>
>> 1- I used grads-2.0.a3.oga.1.win32_superpack (GrADS OPenNDAP). Also, I
>> tried grads-2.0.1.oga.1-win32_superpack.
>> 2- Both of them are opengrads and run in windows.
>> 3- First, I want to open hdf data without ctl (I have a lot of data and
>> they do not have similar variables). So, I consider using sdfopen to open
>> the files.
>>
>> 4- By using sdfopen, I received these error message for the above grads
>> versions, respectively:
>>
>>
>> "gradsdf : SDF file has no discernable X coordinate."
>>
>>  "gadsdf: SDF file has no discernable X coordinate.
>>  To open this file with GrADS, use a descriptor file with an XDEF entry."
>>
>> 5- I used MODIS hdf files. A typical name of the files can be
>> "MOD08_D3.A2011152.051.2011153120457.hdf". I wanted to plot 550 nm AOD and
>> deep blue AOD. These data are typical satellite data from terra or aqua.
>> I do not have access to linux to provide ncdump data. Anyway, the message
>> would be very long and I write some first lines (containing the dimension
>> and grid data) from  the HDF Import Tool and write the full message in the
>> end:
>> Name: MERRA200.prod.assim.tavg1_2d_lnd_Nx.20000601.hdf HDFEOSVersion:
>> HDFEOS_V2.14 StructMetadata.0: GROUP=SwathStructure
>> END_GROUP=SwathStructure GROUP=GridStructure     GROUP=GRID_1
>> GridName="EOSGRID"         XDim=540         YDim=361
>> UpperLeftPointMtrs=(-180000000.000000,90000000.000000)
>> LowerRightMtrs=(180000000.000000,-90000000.000000)
>> Projection=GCTP_GEO         GridOrigin=HDFE_GD_LL
>> GROUP=Dimension             OBJECT=Dimension_1
>> DimensionName="TIME"                 Size=24
>> END_OBJECT=Dimension_1         END_GROUP=Dimension
>> GROUP=DataField             OBJECT=DataField_1
>> DataFieldName="GRN"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim") 3- I used sdfopen command to open them.
>>
>> Final word:
>> I know that the problem can be due to the dimension, however the
>> dimension is defined in the data by XDim and YDim, Time.  I wonder does
>> anyone successfully use GrADS to open hdf files by sdfopen command. Is a
>> certain version of GrADS recommended to do this?
>>
>> Thank you in advance,
>> Ehsan
>>
>>
>>  On Fri, Oct 12, 2012 at 10:53 AM, Jennifer Adams <jma at cola.iges.org>wrote:
>>
>>> Your post is missing the following information:
>>> 1. The version of GrADS you are running
>>> 2. What operating system you're running it on
>>> 3. The contents of your ctl file
>>> 4. The error message you get when you try to open your ctl file
>>> 5. More information about the grid in your MODIS file, especially the
>>> output from ncdump (which is often enabled to handle HDF files)
>>>  Nobody can help until you provide these things.
>>> --Jennifer
>>>
>>>
>>>
>>
>> Name: MERRA200.prod.assim.tavg1_2d_lnd_Nx.20000601.hdf HDFEOSVersion:
>> HDFEOS_V2.14 StructMetadata.0: GROUP=SwathStructure
>> END_GROUP=SwathStructure GROUP=GridStructure     GROUP=GRID_1
>> GridName="EOSGRID"         XDim=540         YDim=361
>> UpperLeftPointMtrs=(-180000000.000000,90000000.000000)
>> LowerRightMtrs=(180000000.000000,-90000000.000000)
>> Projection=GCTP_GEO         GridOrigin=HDFE_GD_LL
>> GROUP=Dimension             OBJECT=Dimension_1
>> DimensionName="TIME"                 Size=24
>> END_OBJECT=Dimension_1         END_GROUP=Dimension
>> GROUP=DataField             OBJECT=DataField_1
>> DataFieldName="GRN"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_1             OBJECT=DataField_2
>> DataFieldName="LAI"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_2             OBJECT=DataField_3
>> DataFieldName="GWETROOT"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_3             OBJECT=DataField_4
>> DataFieldName="GWETTOP"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_4             OBJECT=DataField_5
>> DataFieldName="TPSNOW"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_5             OBJECT=DataField_6
>> DataFieldName="TUNST"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_6             OBJECT=DataField_7
>> DataFieldName="TSAT"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_7             OBJECT=DataField_8
>> DataFieldName="TWLT"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_8             OBJECT=DataField_9
>> DataFieldName="PRECSNO"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_9             OBJECT=DataField_10
>> DataFieldName="PRECTOT"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_10             OBJECT=DataField_11
>> DataFieldName="SNOMAS"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_11             OBJECT=DataField_12
>> DataFieldName="SNODP"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_12             OBJECT=DataField_13
>> DataFieldName="EVPSOIL"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_13             OBJECT=DataField_14
>> DataFieldName="EVPTRNS"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_14             OBJECT=DataField_15
>> DataFieldName="EVPINTR"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_15             OBJECT=DataField_16
>> DataFieldName="EVPSBLN"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_16             OBJECT=DataField_17
>> DataFieldName="RUNOFF"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_17             OBJECT=DataField_18
>> DataFieldName="BASEFLOW"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_18             OBJECT=DataField_19
>> DataFieldName="SMLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_19             OBJECT=DataField_20
>> DataFieldName="FRUNST"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_20             OBJECT=DataField_21
>> DataFieldName="FRSAT"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_21             OBJECT=DataField_22
>> DataFieldName="FRSNO"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_22             OBJECT=DataField_23
>> DataFieldName="FRWLT"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_23             OBJECT=DataField_24
>> DataFieldName="PARDF"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_24             OBJECT=DataField_25
>> DataFieldName="PARDR"                 DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_25             OBJECT=DataField_26
>> DataFieldName="SHLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_26             OBJECT=DataField_27
>> DataFieldName="LHLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_27             OBJECT=DataField_28
>> DataFieldName="EVLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_28             OBJECT=DataField_29
>> DataFieldName="LWLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_29             OBJECT=DataField_30
>> DataFieldName="SWLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_30             OBJECT=DataField_31
>> DataFieldName="GHLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_31             OBJECT=DataField_32
>> DataFieldName="TWLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_32             OBJECT=DataField_33
>> DataFieldName="TELAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_33             OBJECT=DataField_34
>> DataFieldName="WCHANGE"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_34             OBJECT=DataField_35
>> DataFieldName="ECHANGE"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_35             OBJECT=DataField_36
>> DataFieldName="SPLAND"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_36             OBJECT=DataField_37
>> DataFieldName="SPWATR"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_37             OBJECT=DataField_38
>> DataFieldName="SPSNOW"
>> DataType=DFNT_FLOAT32
>> DimList=("TIME","YDim","XDim")
>> END_OBJECT=DataField_38             OBJECT=DataField_39
>> DataFieldName="XDim"                 DataType=DFNT_FLOAT64
>> DimList=("XDim")             END_OBJECT=DataField_39
>> OBJECT=DataField_40                 DataFieldName="YDim"
>> DataType=DFNT_FLOAT64                 DimList=("YDim")
>> END_OBJECT=DataField_40             OBJECT=DataField_41
>> DataFieldName="Time"                 DataType=DFNT_FLOAT64
>> DimList=("TIME")             END_OBJECT=DataField_41
>> END_GROUP=DataField         GROUP=MergedFields
>> END_GROUP=MergedFields     END_GROUP=GRID_1 END_GROUP=GridStructure
>> GROUP=PointStructure END_GROUP=PointStructure END
>>
>>>    On Oct 11, 2012, at 9:53 PM, Ehsan Erfani wrote:
>>>
>>>   Hello,
>>>
>>> I cannot open MODIS (Moderate Resolution Imaging Spectroradiometer) HDF
>>> files by grads. I receive this message when I use the sdfopen:
>>> "gradsdf : SDF file has no discernable X coordinate."
>>>
>>> I tried to open by xdfopen without any success. Also, I made a ctl but
>>> again it did not help. I appreciate it if you let me know how to open hdf
>>> files by GrADS. Thank you.
>>>
>>> Best regards,
>>>  Ehsan _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>>   --
>>> Jennifer M. Adams
>>> IGES/COLA
>>> 4041 Powder Mill Road, Suite 302
>>> Calverton, MD 20705
>>> jma at cola.iges.org
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>>
>>
>
>
> _______________________________________________
> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121013/aa045a66/attachment-0003.html 


More information about the gradsusr mailing list