Re: time step adding

From: ahmed lasheen <ahmed4kernel_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 14 2011 - 02:21:15 MST

i have read the date functions , they are very useful functions.
thnaks

On Thu, Jan 13, 2011 at 12:22 AM, Dennis Shea <shea@ucar.edu> wrote:

> There are a lot of 'time/calendar' functions.
> Please look at the documentation.
> http://www.ncl.ucar.edu/Document/Functions/ [ See "Date" ]
>
> tunits = "hours ref 1-1-1 00:00:0.0" ; use whatever you want
>
> hard wired
> tStrt = ut_inv_calendar(2010,1,12,12,0,0,time@units, 0)
>
> use variables
> tStrt = ut_inv_calendar(year,month,day,hour,minute,second,units, 0)
>
> print(tStrt)
>
> tstep = 12
> ntim = 100
> time = tStrt + ispan(0,tstep*(ntim-1),12)
> Then you can use
>
> ymdh = ut_inv_calendar(time, 0) ; what ever option you want
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/ut_inv_calendar.shtml
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/ut_calendar.shtml
>
>
> On 1/12/11 1:29 PM, ahmed lasheen wrote:
>
>> Hello
>> I wanna to know how can i add hours to certain date.
>> for example , i have these variables year=2010, month=01 ,day=12 and
>> hour=12:00 and i wanna to make loop which each iteration add 06:00 hours
>> to this date.
>> thanks in advance
>>
>> --
>> ===============
>> Ahmed Lasheen
>> Egyptian Meteorological Authority(EMA)
>> Cairo,Egypt
>> ===============
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
===============
Ahmed Lasheen
Junior researcher at Cairo Numerical Weather Prediction Center (CNWPC)
Egyptian Meteorological Authority(EMA)
Cairo,Egypt
===============

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 14 02:22:04 2011

This archive was generated by hypermail 2.1.8 : Tue Jan 25 2011 - 14:22:16 MST