[ncl-talk] Sub: cd_calendar help

Guido Cioni guidocioni at gmail.com
Sun Oct 8 13:24:39 MDT 2017


You need this in your preamble:
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl”



> Il giorno 08 ott 2017, alle ore 21:23, dale zuri <dalezuri at gmail.com> ha scritto:
> 
> Hi ,
> Thanks for your reply. I need to create a time array with the actual date associated with each forecast time. 
> fatal:Undefined identifier: (cd_string) is undefined, can't continue error
> t=cd_string(time, "%H:%M")
> 
> DZ
> 
> On Sun, Oct 8, 2017 at 9:32 AM, Guido Cioni <guidocioni at gmail.com <mailto:guidocioni at gmail.com>> wrote:
> You should really take a look at the starting guide of NCL and to the documentation of the individual functions before posting questions here.
> 
> I’ve just checked your file and it seems that the time variable has the right attributes. 
> 
> Something like this should work (NOT TESTED)
> 
> a=addfile("tmp2m.1995053100.time.grb2","r”)
> time=a->forecast_time0
> 
> date_title= "Forecast for "+cd_string(time, "%d %c. %Y")+" at "+cd_string(time, "%H:%M")+" UTC”
> 
> Cheers 
> 
>> Il giorno 08 ott 2017, alle ore 11:40, dale zuri <dalezuri at gmail.com <mailto:dalezuri at gmail.com>> ha scritto:
>> 
>> date = cd_calendar(r, -3)
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171008/8df2a2b3/attachment.html>


More information about the ncl-talk mailing list