[ncl-talk] UTC to Local time conversion

Barry Lynn barry.h.lynn at gmail.com
Mon Aug 27 10:07:01 MDT 2018


Hi:

I am not sure of a simple way to do it.  You could create more than one
time_var for each time zone, and then code that in.

Anyway, I am not sure if this would help.

    new_time_units = "hours since 1800-01-01 00:00"

    new_time_units = new_time_units

    new_time_array = cd_inv_calendar( year(it_val),  month(it_val),
day(it_val), hour(it_val), minute(it_val), 0, new_time_units,0)


    it_val = it_val +it_inc

    print("new_time_array = " + new_time_array)



    format = "%H%M IST %d %c %Y"

    new_time_array = new_time_array + 2

    time_var=cd_string(new_time_array,format)

    print("time_var = " + time_var)

On Mon, Aug 27, 2018 at 6:24 PM Ipsita Putatunda <ipsita.putatunda at gmail.com>
wrote:

> Dear all,
> I am trying to convert my data  from UTC to Local time. Is there any way
> to do it in NCL?
> In a older post in ncltalk I have found a suggestion where, with a known
> Timezone one can convert UTC to Local time, but what if my region spans
> along more than one time zones?
> Can it not be done with a known lat/lon?
> Any suggestions in this issue will be appreciated.
>
> Thanks in advance,
> Ipsita
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Barry H. Lynn, Ph.D
Senior Associate Scientist, Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581

C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180827/540400ef/attachment.html>


More information about the ncl-talk mailing list