[ncl-talk] Reopen: "proleptic_gregorian" Support in Date Routines

Mary Haley haley at ucar.edu
Thu Dec 3 15:18:03 MST 2015


Hi Karl,

>From looking at the cd_calendar and cd_inv_calendar interfaces, it seems
like they should be handling the proleptic_gregorian calendar just fine.

The issue is with other date functions, like day_of_year, day_of_week,
monthday, etc. These don't recognize this calendar.

If you are running into a problem with cd_calendar not working, then can
you provide us with a sample clean code that illustrates this?

For the other date functions, we already had two tickets open on this,
NCL-1891 and NCL-2231, so I've modified them to indicate they should be
fixed in V6.3.1.

Albert Yau provided a fix, but we just haven't had time to test it out.
None of us are familiar with the "proleptic gregorian" calendar, and are
not sure if special code is needed to handle it.  I believe Albert's fix
treats the "proleptic gregorian" as being the same as "gregorian", but I'm
not sure if this is correct.

If there are any proleptic gregorian/gregorian experts out there, we would
love to hear from them.  :-)

--Mary


On Tue, Dec 1, 2015 at 7:43 AM, Karl-Hermann Wieners <
karl-hermann.wieners at mpimet.mpg.de> wrote:

> Hi all,
>
> as of NCL 6.3.0, cd_calendar cannot not handle time axes with the
> calendar="proleptic_gregorian" attribute, despite what is written in the
> docs. I've unearthed Albert and Mary's thread from January 2014 (see
> below), where you planned to fix this issue in 6.2. Can you tell me what
> happened to that or if and when this will be fixed?
>
> Cheers,
> Karl
>
> --------------------------------------------------------------------
>
> Re: "proleptic_gregorian" Support in Date Routines
>
>     This message: [ Message body ] [ More options ]
>     Related messages: [ Next message ] [ Previous message ] [ In reply to ]
>
> From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
> Date: Thu Jan 30 2014 - 10:48:45 MST
>
> Sorry Albert, I missed the fact that you had attached a simple fix! I'll
> look at this now and see if we can incorporate it into 6.2.0.
>
> --Mary
>
> On Jan 30, 2014, at 10:44 AM, Mary Haley <haley at ucar.edu> wrote:
>
> > Hi Albert,
> >
> > Can you tell us what the different units are that you're seeing in
> this one model, and how you are having to edit the files and resave them?
> >
> > I'm not exactly sure which "rebasing" feature you are referring to in
> V6.2.0.
> >
> > Would the "calendar_decode2" function get you the support you need for
> proleptic_gregorian?
> >
> >
>
> http://www.ncl.ucar.edu/Document/Functions/User_contributed/calendar_decode2.shtml
> >
> >
> > --Mary
> >
> > On Jan 28, 2014, at 8:38 AM, Albert Yau <albert.yau at stonybrook.edu>
> wrote:
> >
> >> Hi everyone,
> >>
> >> I found that the date routines in 6.1.2 are not yet fully supporting
> the "proleptic_gregorian" calendar. For example, days_in_month will
> return "illegal calendar" for this input. I have this problem while
> processing some of the CMIP5 model's data. It is a trivial fix in
> datesW.c which I have attached here, I hope it has already been included
> in the next release.
> >>
> >> I have to say thanks for all of you developers, I am really looking
> forward to the automatic time rebasing feature in 6.2.0, because one
> particular model has monthly netcdf data with different units for a
> hundred years. Right now I have to edit and save all the nc files before
> calling addfiles.
> >>
> >> Best regards,
> >> Albert
> >>
> <ncl-6.1.2-calendar.patch>_______________________________________________
> >> 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
>
> _______________________________________________
> ncl-talk mailing list
> 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/20151203/f8d424e6/attachment.html 


More information about the ncl-talk mailing list