Re: Converting Julian day of the year (JJJ) to the correct date in YYYYMMDD

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Dec 06 2013 - 15:36:29 MST

jjj@units="days since 2011-12-31"

On 12/6/13, 3:30 PM, A.J. Eiserloh wrote:
> Thanks,
>
> But, what should I change to get what I want (11/28)? I tried changing the
> units to "2012-1-0" but that did not work and it gave me _FillValues.
>
> -A.J.
>
>
> On Fri, Dec 6, 2013 at 2:23 PM, Daniel Barandiaran
> <dbarandiaran@gmail.com>wrote:
>
>> Hi A.J.,
>>
>> the units on jjj are "days since 2012-1-1", so 1 is 2012-1-2, and 0 is
>> 2012-1-1. That's why you are getting 11-29 for day 333.
>>
>>
>> On Fri, Dec 6, 2013 at 3:18 PM, A.J. Eiserloh <arthur.eiserloh@gmail.com>wrote:
>>
>>> Hi, I know that the Julian day 333 of the year 2012 is 11/28/2012.
>>> However, when I use cd_calendar() to try and give me the date of the year,
>>> it gives me 11/29 instead. Why is this so and how can I fix this. This is
>>> what I type in ncl. I also know that 2012 was a leap year.
>>>
>>> jjj=333
>>> jjj@units="days since 2012-1-1"
>>> jjj@calendar="julian"
>>> doy=cd_calendar(jjj,-2)
>>>
>>> output:
>>>
>>> (0) 20121129
>>>
>>> --
>>> Arthur J. Eiserloh, Jr.
>>> San Jose State University
>>> Graduate Student
>>> Dept. of Meteorology and Climate Science
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>>
>> --
>> Danny Barandiaran
>> Department of Plants, Soils, and Climate
>> Utah State University
>>
>>
>>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Dec 6 15:36:38 2013

This archive was generated by hypermail 2.1.8 : Fri Dec 13 2013 - 11:39:30 MST