[gradsusr] opening modis hdf files
Jennifer Adams
jma at cola.iges.org
Tue Nov 20 11:24:11 EST 2012
Symlinking the file names, as James describes, is a good option. You can also use '%ch' and 'chsub', like this:
dset ^MYD08_D3.A%y4%j3.%ch.hdf
tdef 2 linear 1may2003 1dy
chsub 1 1 005.2007081003101
chsub 2 2 005.2007081005859
Of course, this means you have to have one chsub entry for each time step, but that is just about as cluttery as a set of symlinks in the file system. You can put the chsub entries anywhere in the descriptor, so all the important information can be at the top and the chsub stuff can be tacked on at the end of the file. Note the use of "%j3" for julian day in the template string.
--Jennifer
On Nov 20, 2012, at 10:17 AM, James E. Johnson wrote:
> 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 |
> ------------------------------------------------------------------------------
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121120/76a9a891/attachment-0003.html
More information about the gradsusr
mailing list