[gradsusr] opening modis hdf files

James E. Johnson James.Johnson at nasa.gov
Tue Nov 20 10:17:09 EST 2012


On Monday, November 19, 2012 11:53:28 pm See Hai Ooi wrote:
> Thank you Jennifer.
>  
> I am sorry I did not express my problem clearly.  Say, I have the following
> two files:- 
> MYD08_D3.A2003121.005.2007081003101.hdf
> MYD08_D3.A2003122.005.2007081005859.hdf

This is what I would do (I have done this for similar OMI products with the 
production time stamp as part of the version). Just create a sym link without 
the product time stamp pointing to the data files above, i.e.

$ ln -s MYD08_D3.A2003121.005.2007081003101.hdf MYD08_D3.A2003121.005.hdf

then you can use this in your control file (GrADS will open the sym link which 
points to the data file)

DSET ^./MYD08_D3.A2003%t3.005.hdf

If you want you can put the sym links into their own directory just to keep 
things organized. This is the simplest approach since GrADS doesn't support a 
* wild card.

James 

>  
> As you are aware, the second group of the MODIS data file
> (.....005.2007081003101.hdf) refers to the processing date and time and
> this differs from file to file.  The following .ctl file gives rise to
> error [By the way, I am using window version of GrADS Version 2.0.1.oga.1]
> :- 
> dset ^./MYD08_D3.A2003%t3.005.*.hdf
> options yrev template
> xdef XDim:mod08 360 linear -180.0 1.0
> ydef YDim:mod08 180 linear -90.0 1.0
> tdef TIME2DIMS:mod08 2 linear 1may2003 1dy
> vars 3
> Deep_Blue_Aerosol_Optical_Depth_550_Land_Mean=>od_550 0 t,y,x Optical depth
> at 0.55 microns for land (corrected): Mean
> Deep_Blue_Aerosol_Optical_Depth_550_Land_Standard_Deviation=>od_550_sd 0
> t,y,x Optical depth at 0.55 microns for land (corrected): Standard
> Deviation Deep_Blue_Aerosol_Optical_Depth_550_Land_Minimum=>od_550_min 0
> t,y,x Optical depth at 0.55 microns for land (corrected): Minimum endvars
> Error:-
> ---------
> ga-> xdfopen c:/homeuse/asip2/test2/mod08.ctl
> Scanning Descriptor File:  c:/homeuse/asip2/test2/mod08.ctl
> read_metadata: gaopfn failed (rc=-88888)
> gadsdf: Couldn't ingest SDF metadata.
> SDF Descriptor file c:/homeuse/asip2/test2/mod08.ctl was not successfully
> opened & parsed.
>  
> In addition, I am not sure whether my tdef is correct or not.  I use %t3 to
> stand for the consecutive time steps such as 121, 122, 123 etc.  Hope you
> can assist me in obtaining the right template to open 31 files
> (particularly to replace the different processing data and time groups in
> a specific way) , say, in January 2003.  
> Best regards.
>  
> Ooi
>  
>  
>  
> 
> 
> --- On Mon, 19/11/12, Jennifer Adams <jma at cola.iges.org> wrote:
> 
> From: Jennifer Adams <jma at cola.iges.org>
> Subject: Re: [gradsusr] opening modis hdf files
> To: "GrADS Users Forum" <gradsusr at gradsusr.org>
> Date: Monday, 19 November, 2012, 9:42 PM
> 
> 
> The template option %ch along with CHSUB entries allows you to map any file
> name to a single time or a range of time steps. --Jennifer

------------------------------------------------------------------------------
| James E. Johnson                      | address:                           |
| Wyle Information Systems, Inc.        |  NASA Goddard Space Flight Center  |
| e-mail: james.johnson at nasa.gov        |  Distributed Active Archive Center |
| phone:  301-614-5121                  |  Code 610.2, Bldg 32, Room S130G   |
| fax:    301-614-5268                  |  Greenbelt, MD  20771              |
------------------------------------------------------------------------------



More information about the gradsusr mailing list