[ncl-talk] Problem with "cd_calendar"
Mary Haley
haley at ucar.edu
Wed Nov 11 09:01:10 MST 2015
You need to use cd_inv_calendar:
http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_inv_calendar.shtml
Some of the examples on the above page should help you.
To get the required year, month, day, hour, minutes, and seconds arrays,
you will need to parse the "time" array in the same fashion that you parsed
the CSV file.
For example:
month = str_get_field(time,1,"/")
day = str_get_field(time,2,"/")
year = str_get_field(time,3,"/ ") ; note the use of both '/' and ' ' as
delimiters
--Mary
On Wed, Nov 11, 2015 at 8:25 AM, Amadou Coulibaly <mpapin24 at gmail.com>
wrote:
> Dear NCL users,
>
> I am trying to use cd_calendar for my dataset to be able to plot daily
> timeseries. But I have a problem converting my Timstamp, which is in the
> format 10/05/2014 06:00:00, mm/dd/yyyy hh:MM:ss. I want to use it in the
> format time at units = "minuts since 2014-10-05 06:00:00" with dates =
> cd_calendar(Time, 0) as specifying in my script (readcsv.ncl). Please,
> find attached a sample of my data and script.
>
>
> How to solve this issue?
>
> Best regards
>
> --
> * COULIBALY AMADOU *
> PhD Student on West African Climate System (WACS)
> FUTA - Federal University of Technology of Akure, Nigeria
>
> *Visiting Student - *
> *University of Cologne, Germany**Institute of Geophysics and Meteorology*
> Pohligstr. 3 / Office 3.102
> D-50969 Köln
>
> *Project*: WASCAL (West African Science Service Centre on Climate Change
> and Adapted Land Use)
> Phone:(+234) 810 795 2836 /(+223) 65 67 27 57 /(+226) 64 57 37 27 /+49
> 15218352574
>
> E-mail: mpapin24 at gmail.com / coulibalya68 at yahoo.com
>
> "*The time is always right to do right": Nelson Mandela*
>
> *"Character is like a tree and reputation like a shadow. The shadow is
> what we think of it; the tree is the real thing" : Abraham Lincoln*
>
> *"Do what you can, with what you have, where you are" Theodore Roosevelt*
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151111/058eac52/attachment.html
More information about the ncl-talk
mailing list