reading CERES HDF

Jennifer Adams jma at COLA.IGES.ORG
Fri Jul 1 21:39:48 EDT 2005


Katia,
Thanks for providing a clear and complete picture of your problem.  
Your descriptors look good, except you need "t,y,x" in the units  
field of your variable declaration, since the variable  
LW_Surface_Emissivity does vary in three dimensions, even if one of  
them is size 1. (For xdfopen, the units field of the variable  
declaration isn't used.) However, my hunch is that even with this  
change, all your hard work will not pay off because an HDF file with  
two variables of identical name but different size is ... diabolical.  
I don't even know how you could create a file like that, and I'm  
pretty sure the GrADS I/O on such a file would be questionable at  
best, since everything begins with the variable name. I suggest you  
ask the data providers for an explanation and forward the answer to  
us. Anyone on the CERES team subscribed to gradsusr?
Jennifer
--
Jennifer Miletta Adams
IGES/COLA
4041 Powder Mill Rd., Suite 302
Calverton, MD 20705
jma at cola.iges.org

On Jul 1, 2005, at 6:29 PM, Katia Fernandes wrote:

> 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
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20050701/74bb51fa/attachment.html 


More information about the gradsusr mailing list