[ncl-talk] About local time (UTC+9)
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Tue Jan 24 13:46:18 MST 2017
Soares,
Also show the output from print (time(0)) before you call cd_string.
--Dave
On Tue, Jan 24, 2017 at 1:29 PM, Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:
> Soares,
>
> The documentation for cd_string says that you must have this line at the
> top of your program:
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"
>
> If that does not solve your problem, then please show:
>
> 1. Complete console output up to the point of error. This should include
> the command to run your program, and the NCL version number.
>
> 2. A complete copy of your NCL script, or a reduced test script that just
> shows this error.
>
> --Dave
>
>
> On Mon, Jan 23, 2017 at 9:28 PM, isakhar sakhar isakhar <
> isakhar.inside13 at gmail.com> wrote:
>
>> Dear Mr. Dave
>>
>> I have modified the syntax to cd_string but I still face the error
>> 'fatal:Undefined identifier: (cd_string) is undefined, can't continue'
>>
>> time_numeric=cd_string(time,"%Y%N%D%H%M") ;; will return in hours since
>> 1800-01-01 unless specified otherwise
>> offset=-9 ; hours
>> time_numeric =time_numeric-offset
>>
>> time=cd_string(time_numeric,"%Y%N%D%H%M")
>>
>>
>> Soares
>>
>> On Tue, Jan 24, 2017 at 12:39 PM, Dave Allured - NOAA Affiliate <
>> dave.allured at noaa.gov> wrote:
>>
>>> Soares,
>>>
>>> The function cd_inv_string is in the next NCL release. It is not
>>> available in the current release 6.3.0. That is why you are getting a
>>> syntax error.
>>>
>>> If your data already has date/time in numeric format as hours since XXX,
>>> then you might be able to directly subtract the offset and use cd_string to
>>> print the times that you want.
>>>
>>> --Dave
>>>
>>>
>>> On Mon, Jan 23, 2017 at 8:07 PM, isakhar sakhar isakhar <
>>> isakhar.inside13 at gmail.com> wrote:
>>>
>>>> Dear Mr.Dennis
>>>>
>>>> I have a wrfout data and it is in UTC. I want to print in my local time
>>>> (UTC+9). I already have the file cd_inv_string.ncl and already load it in
>>>> my top of file. I also adjust as below to the my local time but I still
>>>> face the error.
>>>>
>>>> time_numeric=cd_inv_string(ntimes,“%Y%N%D%H%M”) ;; will return in
>>>> hours since 1800-01-01 unless specified otherwise
>>>> offset=-9 ; hours
>>>> time_numeric =time_numeric-offset
>>>> time=cd_string(time_numeric,“%Y%N%D%H%M” )
>>>>
>>>> I got the error say: fatal:syntax error: line 34 in file script.ncl
>>>> before or near �
>>>> time_numeric=cd_inv_string(time,
>>>>
>>>> My file in attachment.
>>>> Really appreciate for any help.
>>>>
>>>> Big thanks
>>>> Soares
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170124/fa41cd02/attachment.html
More information about the ncl-talk
mailing list