<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Symlinking the file names, as James describes, is a good option. You can also use '%ch' and 'chsub', like this:<div><br></div><div>dset ^MYD08_D3.A%y4%j3.%ch.hdf</div><div>tdef 2 linear 1may2003 1dy</div><div>chsub 1 1 005.2007081003101</div><div>chsub 2 2 005.2007081005859</div><div><br></div><div>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.</div><div>--Jennifer</div><div><br></div><div><br></div><div><br><div><div>On Nov 20, 2012, at 10:17 AM, James E. Johnson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Monday, November 19, 2012 11:53:28 pm See Hai Ooi wrote:<br><blockquote type="cite">Thank you Jennifer.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am sorry I did not express my problem clearly. Say, I have the following<br></blockquote><blockquote type="cite">two files:- <br></blockquote><blockquote type="cite">MYD08_D3.A2003121.005.2007081003101.hdf<br></blockquote><blockquote type="cite">MYD08_D3.A2003122.005.2007081005859.hdf<br></blockquote><br>This is what I would do (I have done this for similar OMI products with the <br>production time stamp as part of the version). Just create a sym link without <br>the product time stamp pointing to the data files above, i.e.<br><br>$ ln -s MYD08_D3.A2003121.005.2007081003101.hdf MYD08_D3.A2003121.005.hdf<br><br>then you can use this in your control file (GrADS will open the sym link which <br>points to the data file)<br><br>DSET ^./MYD08_D3.A2003%t3.005.hdf<br><br>If you want you can put the sym links into their own directory just to keep <br>things organized. This is the simplest approach since GrADS doesn't support a <br>* wild card.<br><br>James <br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">As you are aware, the second group of the MODIS data file<br></blockquote><blockquote type="cite">(.....005.2007081003101.hdf) refers to the processing date and time and<br></blockquote><blockquote type="cite">this differs from file to file. The following .ctl file gives rise to<br></blockquote><blockquote type="cite">error [By the way, I am using window version of GrADS Version 2.0.1.oga.1]<br></blockquote><blockquote type="cite">:- <br></blockquote><blockquote type="cite">dset ^./MYD08_D3.A2003%t3.005.*.hdf<br></blockquote><blockquote type="cite">options yrev template<br></blockquote><blockquote type="cite">xdef XDim:mod08 360 linear -180.0 1.0<br></blockquote><blockquote type="cite">ydef YDim:mod08 180 linear -90.0 1.0<br></blockquote><blockquote type="cite">tdef TIME2DIMS:mod08 2 linear 1may2003 1dy<br></blockquote><blockquote type="cite">vars 3<br></blockquote><blockquote type="cite">Deep_Blue_Aerosol_Optical_Depth_550_Land_Mean=>od_550 0 t,y,x Optical depth<br></blockquote><blockquote type="cite">at 0.55 microns for land (corrected): Mean<br></blockquote><blockquote type="cite">Deep_Blue_Aerosol_Optical_Depth_550_Land_Standard_Deviation=>od_550_sd 0<br></blockquote><blockquote type="cite">t,y,x Optical depth at 0.55 microns for land (corrected): Standard<br></blockquote><blockquote type="cite">Deviation Deep_Blue_Aerosol_Optical_Depth_550_Land_Minimum=>od_550_min 0<br></blockquote><blockquote type="cite">t,y,x Optical depth at 0.55 microns for land (corrected): Minimum endvars<br></blockquote><blockquote type="cite">Error:-<br></blockquote><blockquote type="cite">---------<br></blockquote><blockquote type="cite">ga-> xdfopen c:/homeuse/asip2/test2/mod08.ctl<br></blockquote><blockquote type="cite">Scanning Descriptor File: c:/homeuse/asip2/test2/mod08.ctl<br></blockquote><blockquote type="cite">read_metadata: gaopfn failed (rc=-88888)<br></blockquote><blockquote type="cite">gadsdf: Couldn't ingest SDF metadata.<br></blockquote><blockquote type="cite">SDF Descriptor file c:/homeuse/asip2/test2/mod08.ctl was not successfully<br></blockquote><blockquote type="cite">opened & parsed.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In addition, I am not sure whether my tdef is correct or not. I use %t3 to<br></blockquote><blockquote type="cite">stand for the consecutive time steps such as 121, 122, 123 etc. Hope you<br></blockquote><blockquote type="cite">can assist me in obtaining the right template to open 31 files<br></blockquote><blockquote type="cite">(particularly to replace the different processing data and time groups in<br></blockquote><blockquote type="cite">a specific way) , say, in January 2003. <br></blockquote><blockquote type="cite">Best regards.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Ooi<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--- On Mon, 19/11/12, Jennifer Adams <<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a>> wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">From: Jennifer Adams <<a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a>><br></blockquote><blockquote type="cite">Subject: Re: [gradsusr] opening modis hdf files<br></blockquote><blockquote type="cite">To: "GrADS Users Forum" <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br></blockquote><blockquote type="cite">Date: Monday, 19 November, 2012, 9:42 PM<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The template option %ch along with CHSUB entries allows you to map any file<br></blockquote><blockquote type="cite">name to a single time or a range of time steps. --Jennifer<br></blockquote><br>------------------------------------------------------------------------------<br>| James E. Johnson | address: |<br>| Wyle Information Systems, Inc. | NASA Goddard Space Flight Center |<br>| e-mail: <a href="mailto:james.johnson@nasa.gov">james.johnson@nasa.gov</a> | Distributed Active Archive Center |<br>| phone: 301-614-5121 | Code 610.2, Bldg 32, Room S130G |<br>| fax: 301-614-5268 | Greenbelt, MD 20771 |<br>------------------------------------------------------------------------------<br>_______________________________________________<br>gradsusr mailing list<br><a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>http://gradsusr.org/mailman/listinfo/gradsusr<br></div></blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>--</div><div>Jennifer M. Adams</div><div>IGES/COLA</div><div>4041 Powder Mill Road, Suite 302</div><div>Calverton, MD 20705</div><div><a href="mailto:jma@cola.iges.org">jma@cola.iges.org</a></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span></span>
</div>
<br></div></body></html>