COSIMA / libaccessom2

ACCESS-OM2 library
3 stars 7 forks source link

Gregorian calendar hard-coded in datetime-fortran #37

Open aekiss opened 4 years ago

aekiss commented 4 years ago

I just noticed that the Gregorian definition of leap years is hard-coded in datetime-fortran: https://github.com/wavebitscientific/datetime-fortran/blob/master/src/lib/mod_datetime.f90#L1053

I guess this would prohibit the use of different calendars (e.g. noleap) - could this cause any problems, e.g. with RYF?

Note that this also means a proleptic Gregorian calendar is applied prior to the year 1582 (see https://github.com/COSIMA/access-om2/issues/117).

aidanheerdegen commented 4 years ago

That library doesn't seem to support any calendar type but iso variant of gregorian

https://github.com/wavebitscientific/datetime-fortran/blob/335cf9a495ba7df43e14c6a793523fd180b1b345/README.md#isocalendar

Darn.

nichannah commented 4 years ago

I think that this library is intended to have similar functionality to the Python module of the same name. I think it is difficult to find date handling libraries that support different calendar types.

libaccessom2 does a workaround to support noleap.