Saving Module: Add calendar to output NetCDF attributes + Support for non-gregorian calendars
Hi @aho
I have created a new branch dev-saving-add_calendar to handle the calendar issue. The idea is to use the PCICt library to compute the leadtimes according to the original calendar of the data when saving. This way we can correctly handle calendars like 360_day, 365_day, etc. Then, the time structure of the output data is the same as the input data. Since there wasn't much that needed to be changed I have already done some testing for the seasonal and decadal cases and I think it will work well. But I still want to put some order in the code, lol.
I see that in the decadal archive there is already a calendar parameter, and I'd like to implement this in the seasonal archive as well. I noticed however that in your archive it is only under daily_mean and it's missing from some systems:
MPI-ESM1.2-HR:
src:
hcst: "exp/CMIP6/dcppA-hindcast/MPI-ESM1-2-HR/DCPP/MPI-M/MPI-ESM1-2-HR/dcppA-hindcast/"
fcst:
monthly_mean:
table: {"tas":"Amon", "pr":"Amon", "psl":"Amon", "tasmin":"Amon", "tasmax":"Amon"}
grid: {"tas":"gn", "pr":"gn", "psl":"gn", "tasmin":"gn", "tasmax":"gn"}
version: {"tas":"v20200320", "pr":"v20200320", "psl":"v20200320", "sfcWind":"v20200320"}
daily_mean:
grid: {"pr":"gn", "tas":"gn", "tasmax":"gn", "tasmin":"gn"}
version: {"pr":"v20210128", "tas":"v20200320", "tasmax":"v20200101", "tasmin":"v20200101"}
calendar: "standard"
Are there models where the calendar type depends on the time aggregation? Separating them is no problem, just asking to make sure.
If you agree we can go ahead and add the calendars to the archive for every system/reference and go for this approach. Let me know what you think.
Thanks,
Victòria