[ncl-talk] Sub: cd_calendar help
dale zuri
dalezuri at gmail.com
Sun Oct 8 03:40:31 MDT 2017
Hi ,
How to add the forecast time to initial time to get the actual date
associated with each time step? Could someone help me to fix this? I have
to loop this for many files with different forecast time.
I would appreciate any suggestion.
Thanks
DZ
a = addfile(""r")
t2 = a->TMP_P0_L103_GGA0(:,:,:)
t2=t2-273.15
printVarSummary(t2) ;
r=a->forecast_time0
printVarSummary(r) ;print out structure/basic info of the data
;print(r)
date = cd_calendar(r, -3)
print(date)
tmp2m.1995053100.time.grb2
<https://drive.google.com/file/d/0B59Ie0G9dH6uNWxBMmpkSEU4Vm8/view?usp=drive_web>
Thanks,
DZ
On Sun, Oct 8, 2017 at 12:59 AM, dale zuri <dalezuri at gmail.com> wrote:
> Hi,
> Could someone help me to read the forecast time in the file? This prints
> wrong year and date.
>
> I would appreciate any help to read the actual forecast in theyyyymmddhh
> format.
> Thanks,
> DZ
>
>
> tmp2m.2002050100.time.nc
> <https://drive.google.com/file/d/0B59Ie0G9dH6ueklMSmtZdjNLUHc/view?usp=drive_web>
> a = addfile(""r")
> t2 = a->TMP_P0_L103_GGA0(:,:,:)
>
> t2=t2-273.15
> printVarSummary(t2) ;
>
> r=a->forecast_time0
> printVarSummary(r) ;print out structure/basic info of the data
> ;print(r)
> date = cd_calendar(r, -3)
> print(date)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171008/b3cc0277/attachment.html>
More information about the ncl-talk
mailing list