reading CERES HDF

Katia Fernandes kfernbern at YAHOO.COM
Fri Jul 1 18:29:44 EDT 2005


Hello,

I have been trying to read a HDF file into GrADS for about a month with no
complete success, so I wonder if one of you would have an idea of what it is
I am doing wrong.

One noticeable particularity of the data I am dealing with is that it
contains more than one variable with the same name, differing in dimensions
only, as seen in the example below:
(the ncdump (-h) file is 50 pages long, so in case it is needed I can send
it in a subsequent email) .

----------------------------------------------------------------------------
netcdf CER_SRBAVG1_TRMM-PFM-VIRS_Edition2B_010018 {dimensions:
        1_0_deg__regional_colat__zones = 180 ;
        1_0_deg__regional_long__zones = 360 ;
        Surface_type = 20 ;
        Stats = 3 ;
        Monthly_Hourly_Avgs = 24 ;
        Monthly_Avg = 1 ;
        1_0_deg__zonal_colat__zones = 180 ;
        1_0_deg__zonal_long__zones = 1 ;
        1_0_deg__global_colat__zones = 1 ;
        1_0_deg__global_long__zones = 1 ;


variables:
float LW_Surface_Emissivity(Monthly_Hourly_Avgs,
1_0_deg__regional_colat__zones, 1_0_deg__regional_long__zones) ;
                LW_Surface_Emissivity:_FillValue = 3.4028235e+038f ;
                LW_Surface_Emissivity:long_name = "1.0 Degree Regional
Monthly Hourly Surface Data" ;
                LW_Surface_Emissivity:units = "unitless" ;
                LW_Surface_Emissivity:valid_range = 0.f, 0.f ;
.
.
.
float LW_Surface_Emissivity(Monthly_Avg, 1_0_deg__regional_colat__zones,
1_0_deg__regional_long__zones) ;
                LW_Surface_Emissivity:_FillValue = 3.4028235e+038f ;
                LW_Surface_Emissivity:long_name = "1.0 Degree Regional
Monthly Surface Data" ;
                LW_Surface_Emissivity:units = "unitless" ;
                LW_Surface_Emissivity:valid_range = 0.f, 0.f ;
-----------------------------------------------------------------------
SDFOPEN
I am using GrADS 1.9b4. I tried sdfopen and got the message.
Scanning self-describing file:  CER_SRBAVG1_TRMM-PFM-VIRS_Edition2B_010018
SDF file has no discernable X coordinate.

-----------------------------------------------------------------------------------------------------------------------------------------

OPEN
So I tried using open with the following .ctl:

DSET ^CER_SRBAVG1_TRMM-PFM-VIRS_Edition2B_010018
DTYPE hdfsds
TITLE CERES-TRMM monthly data
UNDEF 3.4028235E38 _FillValue
XDEF 360 LINEAR -180 1.0
YDEF 180 LINEAR  -90 1.0
ZDEF 1  LEVELS 1000
TDEF  1 LINEAR 01FEB1998 1mo
VARS 1
LW_Surface_Emissivity=>lwe 0 y,x Emissivity
ENDVARS

ga-> open ceres.ctl
Scanning description file:  ceres.ctl
Data file CER_SRBAVG1_TRMM-PFM-VIRS_Edition2B_010018 is open as file 1
LON set to 0 360
LAT set to 90 89
LEV set to 1000 1000
Time values set: 1998:2:1:0 1998:2:1:0
ga-> d lwe
Error: Variable LW_Surface_Emissivity not in HDF-SDS file
Data Request Error:  Error for variable 'lwe'
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = lwe

-----------------------------------------------------------------------------------------------------------------------------------------

XDFOPEN

Then I tried xdfopen, so it would give me more flexibility on pointing the
variable to its specific time dimension in TDEF, making it “clear” which
variable I want. Below is the ddf.

DSET ^CER_SRBAVG1_TRMM-PFM-VIRS_Edition2B_010018
TITLE CERES-TRMM monthly data
UNDEF 3.4028235E38 _FillValue
XDEF 1_0_deg__regional_long__zones 360 LINEAR -180.0 1.0
YDEF 1_0_deg__regional_colat__zones 180 LINEAR  -90.0 1.0
ZDEF Stats 3 LINEAR 1 1
TDEF Monthly_Avg 1 LINEAR 01FEB1998 1mo
VARS 1
LW_Surface_Emissivity=>lwe 0 y,x Emissivity
ENDVARS

ga-> xdfopen ceres.ddf
Scanning Descriptor File:  ceres.ddf
XDFOpen Error:  Invalid variable record
  --> The invalid description file record is:
  --> lw_surface_emissivity=>lwe 0 y,x emissivity
  The data file was not opened.


I wonder if a specific path for each variable is necessary, since they are
named the same. I don’t know how to do that, though.

I appreciate any help, suggestions, thoughts on this
.

Thanks a lot,
Kátia



More information about the gradsusr mailing list