LBL-EESA / TECA

TECA, theToolkit for Extreme Climate Analysis, contains a collection of climate anlysis algorithms targetted at extreme event detection and analysis.
Other
58 stars 21 forks source link

handle equivalent calendars #661

Open taobrienlbl opened 3 years ago

taobrienlbl commented 3 years ago

I just ran across an error that I think shouldn't be an error:

ERROR: The base calendar is "proleptic_gregorian" but file 1 "ts_Amon_EC-Earth3_piControl_r2i1p1f1_gr_210401-210412.nc" has the "gregorian" calendar

I believe the two calendars are equivalent (we should check the calendaring code to be certain), so I think this should raise a warning rather than an error.

burlen commented 3 years ago

The proleptic Gregorian calendar is produced by extending the Gregorian Calendar to dates preceding its official introduction. so for time ranges spanning the introduction date (1582) calculations would be incorrect if one were to apply the proleptic logic to the other (and vice versa). Practically speaking I'm guessing that most of our work does not cross the introduction date and when it did it's most likely that the proleptic calendar would be used as I doubt simulation codes would care to handle this.

a table with conversion differences is here https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar