pcmdi_metrics icon indicating copy to clipboard operation
pcmdi_metrics copied to clipboard

[Feature]: Generalized calendar fixes

Open acordonez opened this issue 1 year ago • 0 comments

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

acordonez avatar Feb 20 '24 19:02 acordonez