[ncl-talk] Day to date

Alan Brammer abrammer at albany.edu
Tue Jun 23 12:51:43 MDT 2015


I think monthday was the function you really want. ​You can then split the
return into month and day separately.  The below three lines are how I have
it written in one of my functions.




monday = monthday(year, doy)

month = toint(monday)/100

day = toint( toint(monday) - (month*100) )



​
Alan.






On Tue, Jun 23, 2015 at 2:22 PM, Appo derbetini <appopson4 at gmail.com> wrote:

> Thank's Kyle and Denis
>
> I already checked  in the list of functions given.
>
> 'day_of_year' is converting calendar to DOY. I'm right?
>
> But, I'm trying to do the reverse: going from the DOY to the date
> (Greogorian calendar)
>
> Regards
>
> 2015-06-23 18:18 UTC+01:00, Kyle Griffin <ksgriffin2 at wisc.edu>:
> > This is easy to find on the NCL website.
> >
> > Under the 'Functions' header on the main page, look at 'category
> listing':
> > http://www.ncl.ucar.edu/Document/Functions/ and choose 'Date'.
> > Here, you should be able to find multiple functions that will do what you
> > describe.
> >
> >
> > Kyle
> >
> > ----------------------------------------
> > Kyle S. Griffin
> > Department of Atmospheric and Oceanic Sciences
> > University of Wisconsin - Madison
> > Room 1421
> > 1225 W Dayton St, Madison, WI 53706
> > Email: ksgriffin2 at wisc.edu
> >
> > On Tue, Jun 23, 2015 at 11:33 AM, Appo derbetini <appopson4 at gmail.com>
> > wrote:
> >
> >> Dear NCL users,
> >>
> >> There is a function can be used to convert day (order of the day in
> >> the year) to time ?
> >>
> >> For example
> >>
> >> 15 -> 15 January
> >> 32-> 02 February
> >> ....
> >>
> >> 364-> 30 December
> >> 365-> 31 December
> >>
> >> Regards
> >> _______________________________________________
> >> ncl-talk mailing list
> >> ncl-talk at ucar.edu
> >> List instructions, subscriber options, unsubscribe:
> >> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >>
> >
> _______________________________________________
> 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/20150623/58b01a3b/attachment.html 


More information about the ncl-talk mailing list