pcmdi_metrics
pcmdi_metrics copied to clipboard
[Feature]: Generalized calendar fixes
Is your feature request related to a problem?
With xcdat, we cannot open datasets and decode times if the dataset uses a non cf-compliant calendar.
Describe the solution you'd like
We can add functionality to either edit calendar types to be cf-compliant if possible. I have an example of changing the calendar name here: https://github.com/acordonez/pcmdi_metrics/blob/variability_fixes/pcmdi_metrics/precip_variability/lib/lib_variability_across_timescales.py#L32-L40. In this example, I've added a fix to convert calendar names with hyphens to use underscores.
Describe alternatives you've considered
We could only allow PMP to work with cf-compliant calendars, but that would be very restrictive.
Additional context
No response