[gradsusr] setting time with intervals

Jeff Duda jeffduda319 at gmail.com
Tue Jan 15 15:19:40 EST 2013


Since you are using GRIB formatted data, this is very easy to do.  The
question remains what time interval you want.  In your initial email you
said you wanted data only at 12 PM.  However, in subsequent emails, you
said you wanted to use an interval of 2.  Given a time interval of 6 hrs in
your data, those time increments do not match.  It's easy to make changes
based on what you want, though.

Anyway, everything you need to do involves changing the TDEF line of your
control file:

tdef 1460 linear 00Z01jan2009 6hr

This controls the time interval of the data you will see.  That last entry
is the interval.  Change it to 12hr or 24hr/1dy depending on what time
interval you want.  Also you'll want to change the second entry, 1460,
which is the number of time slices you want to view.  You'll either divide
that by 2 or 4 depending on your time interval.  Finally, if you use a 24
hour interval, make sure to change the initial time string (currently
00Z01JAN2009) to the correct UTC hour.  Let me know if you need
clarification or any further examples.  You can find documentation on this
at http://www.iges.org/grads/gadoc/descriptorfile.html#TDEF.

Jeff

On Tue, Jan 15, 2013 at 2:05 PM, Sagar Parajuli <psagar at utexas.edu> wrote:

> Hi Jeff,****
>
> Attached is my ctl file. ****
>
> ** **
>
> Sincerely,****
>
> ** **
>
> Sagar Prasad Parajuli****
>
> Graduate Student/Research Assistant****
>
> University of Texas at Austin****
>
> Jackson School of Geosciences****
>
> 1 University Station C1100, JGB 5.322
> Austin, TX 78712****
>
> Contact: psagar at utexas.edu****
>
> Cell: 512 965 4093****
>
> [image: texas-longhorn-logo]****
>
> ** **
>
> *From:* gradsusr-bounces at gradsusr.org [mailto:
> gradsusr-bounces at gradsusr.org] *On Behalf Of *Jeff Duda
> *Sent:* Tuesday, January 15, 2013 1:06 PM
> *To:* GrADS Users Forum
> *Subject:* Re: [gradsusr] setting time with intervals****
>
> ** **
>
> Sagar,
> What does your control file look like?  Can you send it to me please?
>
> Jeff****
>
> On Tue, Jan 15, 2013 at 12:23 PM, Sagar P Parajuli <psagar at utexas.edu>
> wrote:****
>
> Hi Jeff
> I need to plot and print those extracted data. I know how to print it but
> I want to know how to specify the time interval required. The code I am
> using is:
> open ERA.INTERIM.SFC.ctl
> set lat 31.4
> set lon 61.3
> set t 1 last (It will print values pertaining to all t but I want to
> specify an interval of 2).
> set gxout print
> set prnopts %g 1 1
> d mag(no10usfc,no10vsfc)
>
> How can I specify the required time interval for t?
>
> thank you,
>
> -Sagar****
>
>
>
> ****
>
> On Tue, Jan 15, 2013 at 10:03 AM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> ****
>
> What do you want to do with the data?  Do you want to make plots in Grads
> or just extract the data?  If it's the latter, then you don't really even
> need to use Grads.
>
> Jeff****
>
> ** **
>
> On Tue, Jan 15, 2013 at 8:47 AM, Sagar P Parajuli <psagar at utexas.edu>
> wrote:****
>
> Hi Jeff,
> I think I didn't clarify my question. I am writing control file for
> extracting some wind speed data corresponding to particular time of a day.
> What I could do in grads is:
>  set t 1 last
> But I want to do this skipping certain values eg. I want values
> corresponding to t = 1, 3, 5, 7, 9, etc (i.e. with certain interval). So, I
> need to skip some data and only extract those datas.
> How can I do this?
>
>
> Thank you so much again.
>
>
>
> Sagar****
>
>
>
> ****
>
> On Mon, Jan 14, 2013 at 11:13 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> ****
>
> Time interval is specified in the control file used to open the data file.
>  However, if you used xdfopen or sdfopen, there may be a different way to
> determine the time interval.  In those cases, you should be able to find it
> by dumping the contents.  If your data are in netCDF format, for example,
> you could use ncdump -h (data file) to find out.****
>
> ** **
>
> Jeff Duda****
>
> On Mon, Jan 14, 2013 at 9:47 PM, Sagar P Parajuli <psagar at utexas.edu>
> wrote:****
>
> Hi all,
> I need to extract wind speed data at a particular time (12:00 pm only)
> everyday from the 6 hourly data of one year. So I need to set time as,
> t = 1, 1460, 2 (start, end, interval). How is the time interval specified
> in grads?
>
> Thank you very much for your help.
>
> ****
>
> ** **
>
> *Sagar P. Parajuli*****
>
> Graduate Research Assistant****
>
> The University of Texas at Austin
> Jackson School of Geosciences
> e-mail: psagar at utexas.edu****
>
> Contact: +1 512 965 4093 ****
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr****
>
>
>
> ****
>
> ** **
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms****
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr****
>
>
>
>
> -- ****
>
> Best regards,****
>
> ** **
>
> *Sagar P. Parajuli*****
>
> Graduate Research Assistant****
>
> The University of Texas at Austin
> Jackson School of Geosciences
> e-mail: psagar at utexas.edu****
>
> Contact: +1 512 965 4093 ****
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr****
>
>
>
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms****
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr****
>
>
>
>
> -- ****
>
> Best regards,****
>
> *Sagar P. Parajuli*****
>
> Graduate Research Assistant****
>
> The University of Texas at Austin
> Jackson School of Geosciences
> e-mail: psagar at utexas.edu****
>
> Contact: +1 512 965 4093 ****
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr****
>
>
>
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms****
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130115/282d51bf/attachment-0003.html 


More information about the gradsusr mailing list