-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calendar issues, leap years, data types #3
Comments
Well, my concern about leap days is only for the indexing of the time dimension of NetCDF -- which is only measured in "days after a {reference date}", rather than a standardized timestamp. A wrong assumption on the indexing, will accrue in the simulation period (typically of 2.5 centuries starting in 1-1-1850, --- other models even use as reference date 1-1-0001) and produce large shifts in the calendar, and induce a drift in seasonal patterns of the predictions (now I think about it, I wonder how many local studies claiming change in the climate seasonality of PR and TS are a result of these kind of errors). Right now, the KNN method doesn't include leap days, and operates with years with 365 julian days, skipping the leap days points of the GCM. However, so far we have not encountered a use case where the lack of leap days is problematic (hydrological models like InVEST work on monthly averages which are marginally affected by leap days. Other models, like SWAT or WEAP have built-in interpolation methods to add the missing day). |
When I open a GCM (CanESM5 in this case), I do see real calendar dates in the mfds = xarray.open_mfdataset([historical_ds_path, future_ds_path])
mfds.time
array(['1850-01-01T12:00:00.000000000', '1850-01-02T12:00:00.000000000',
'1850-01-03T12:00:00.000000000', ..., '2100-12-29T12:00:00.000000000',
'2100-12-30T12:00:00.000000000', '2100-12-31T12:00:00.000000000'],
dtype='datetime64[ns]') Do some other GCM's include leap days? Okay, so for the simulation period we pretend all years have 365 days. That's easy enough. @flector-co |
Yes, other GCMs include leap days. See for instance the MPI* models |
and for the simulation, is ok to work with years of 365 days |
Here's a summary of the challenges and solutions we implemented so far. To get a calendar of 365-day years, we can use netCDF's time dimension can be read by We can convert to |
Once I tried out the original CMIP netCDFs, I discovered
|
In testing, it seems most of the CMIP models we have use a 365-day ("noleap") calendar. But at least one ( As discussed, it should not make a difference analytically whether a given period of the GCM includes a leap day for some models and not for others. For example, as we simulate for a date such as Whether the window is, |
Some GCM models follow a calendar that includes leap days (Feb, 29) while some do not (I assume, I haven't checked them all myself). I'm not sure of all the implications for this yet.
Presumeably, our observed historical records always include leap days. So I guess the question is, "what to do when the GCM calendar does not include leap days"?
The text was updated successfully, but these errors were encountered: