[ncl-talk] Sub: cd_calendar help

dale zuri dalezuri at gmail.com
Sun Oct 8 13:48:51 MDT 2017


Hi ,
This result is almost similar to cd_calendar result.
(0)    Forecast for 1 Jan. 1979 at 06:00
(1)    Forecast for 1 Jan. 1979 at 12:00
(2)    Forecast for 1 Jan. 1979 at 18:00
(3)    Forecast for 2 Jan. 1979 at 00:00
(4)    Forecast for 2 Jan. 1979 at 06:00
I am confused with 1979 year .
But the initial_time :    05/31/1995 (00:00)

Thanks

DZ

On Sun, Oct 8, 2017 at 11:24 AM, Guido Cioni <guidocioni at gmail.com> wrote:

> 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> 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> ha
>> scritto:
>>
>> date = cd_calendar(r, -3)
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171008/c95d59f1/attachment.html>


More information about the ncl-talk mailing list