⇐ ⇒

[CF-metadata] udunits time units question

From: Jon Blower <j.d.blower>
Date: Fri, 1 Apr 2011 11:09:25 +0000

I guess such a library also needs the ability to add and subtract fixed durations to and from reference date/times. Also conversion to and from string representations (e.g. ISO8601).

(At least, this is the functionality of Joda-time that we exploit in ncWMS.)

Jon

-----Original Message-----
From: cf-metadata-bounces at cgd.ucar.edu [mailto:cf-metadata-bounces at cgd.ucar.edu] On Behalf Of John Caron
Sent: 01 April 2011 12:05
To: cf-metadata at cgd.ucar.edu
Subject: Re: [CF-metadata] udunits time units question

Hi Martin and all:

Im wondering what essential methods a calendar library needs to have to
support, eg 360 day calendars? The only one that comes to mind is to
calculate the difference between two dates in, say, seconds? What else?

John

On 4/1/2011 12:55 AM, Schultz, Martin wrote:
> Hi Chris et al.,
>
> indeed it seems like some clarification is necessary about the use of different calendars in modelling. Your suggestion to "map" the 360 day calendar onto the Gregorian calendar in output files won't work: there would be no need for a 360 day calendar if it would. The idea behind fixed-length-year calendars is precisely the opposite: preserve seasonality without having to deal with leap years etc. Of course you need to adjust the solar cycle accordingly, that means your model will have a solar year that is precisely 360 days long (and not 365.25 as in reality). If you were to map these dates onto the gregorian calendar, you would have to interpolate the time axis so that days 1 to 360 fit into the range 1 to 365 or 366, respectively. Yes - a converter 360-days (or 365-days) to gregorian (and reverse) could be written, but you would redce the number of your friends if you insist that this is the only valid way to represent time of the model output ;-)
>
> You are right that a date such as 1960-01-31 is invalid in a 360-day calendar, and indeed a smart tool should flag this as an error.
>
> Hope this helps,
>
> Martin
>
>
>
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDirig Dr. Karl Eugen Huthmacher
> Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
> Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
> Prof. Dr. Sebastian M. Schmidt
> ------------------------------------------------------------------------------------------------
> ------------------------------------------------------------------------------------------------
>
> Besuchen Sie uns auf unserem neuen Webauftritt unter www.fz-juelich.de
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata


_______________________________________________
CF-metadata mailing list
CF-metadata at cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Received on Fri Apr 01 2011 - 05:09:25 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒