[gradsusr] Date and time functions in GrADS

James T. Potemra jimp at hawaii.edu
Thu Feb 25 01:37:15 EST 2016


Hi Brian,

Are you doing this with an open dataset?  If so, you might be able to 
take advantage of the time step.  For example, if your file has a time 
step of 1 hour,

time1 = 1
'set t 'time1
'q time'
date1 = subwrd(result,3)
'set t 'time1 + 36
'q time'
date2 = subwrd(result,3)
say time1', 'time2

Jim

On 2/24/16 6:43 AM, Brian Gaze wrote:
>
> Hi,
>
> Is there a function in GrADS to add x hours to an existing datetime 
> string and get the resulting datetime?
>
> For example where 00Z23feb2016 is the existing datetime string:
>
> 00Z23feb2016 + 36 hours = 12Z23feb2016
>
> Thanks
>
> Brian
>
>
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20160224/f33492f7/attachment.html 


More information about the gradsusr mailing list