Re: [CF-metadata] calendar-based units of time

2012-12-17 Thread John Caron

Hi Jonathan:

On 12/17/2012 10:51 AM, Jonathan Gregory wrote:

Dear John


I have prototyped similar functionality in the CDM, documented here:

http://www.unidata.ucar.edu/software/netcdf-java/CDM/CalendarDateTime.html

Thanks for this. I recall the earlier discussion and I think what you have
implemented would be a good extension to CF, namely

* Optional prefix "calendar" to the time-units means the corresponding
component of time is manipulated. You show only years and months. Do you
also accept the unproblematic units of days, hours, minutes and seconds
with "calendar" prefixed? Do you allow the SI prefixes to these units?


yes, the same periods are allowed that are in the udunits grammer:

period = "millisec" | "msec" | "second" | "sec" | "s" | "minute" | "min" | "hour" | "hr" | "day" | 
"week" | "month" | "mon" |
"year" | "yr"


we do not allow SI prefixes. we do allow plural forms, ie with an 
appended s.





* With calendar, only integer numbers of units are allowed. Are negative
numbers allowed?


yes



* Invalid dates caused by adding months and years are decremented in whole
days until a valid date is reached.

yes

regards,
John
___
CF-metadata mailing list
CF-metadata@cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata


[CF-metadata] calendar-based units of time

2012-12-17 Thread Jonathan Gregory
Dear John

> I have prototyped similar functionality in the CDM, documented here:
> 
> http://www.unidata.ucar.edu/software/netcdf-java/CDM/CalendarDateTime.html

Thanks for this. I recall the earlier discussion and I think what you have
implemented would be a good extension to CF, namely

* Optional prefix "calendar" to the time-units means the corresponding
component of time is manipulated. You show only years and months. Do you
also accept the unproblematic units of days, hours, minutes and seconds
with "calendar" prefixed? Do you allow the SI prefixes to these units?

* With calendar, only integer numbers of units are allowed. Are negative
numbers allowed?

* Invalid dates caused by adding months and years are decremented in whole
days until a valid date is reached.

Best wishes

Jonathan
___
CF-metadata mailing list
CF-metadata@cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata


[CF-metadata] calendar-based units of time

2012-12-14 Thread John Caron



On 12/14/2012 10:35 AM, Jonathan Gregory wrote:





I think that calendar-based units of time cannot be introduced without a new
syntax for time units, and some rules about how to interpret the cases when
adding months to a reference date gives an impossible date. We could make such
changes to the convention.


I have prototyped similar functionality in the CDM, documented here:

http://www.unidata.ucar.edu/software/netcdf-java/CDM/CalendarDateTime.html

John
___
CF-metadata mailing list
CF-metadata@cgd.ucar.edu
http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata