Skip to content
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 conversion in the ETCCDI recipe #2372

Open
nicocortesi opened this issue Mar 14, 2024 · 0 comments
Open

Calendar conversion in the ETCCDI recipe #2372

nicocortesi opened this issue Mar 14, 2024 · 0 comments

Comments

@nicocortesi
Copy link

Hi! There is an issue when running 'recipe_extreme_events.yml' to measure the set of indices of extreme events of the ETCCDI.

In this recipe, model data and observational datasets are combined. It is known that when the datasets have daily resolution, non-standard model calendars can cause issues (see e.g. Issue #2106).

In this case, the preprocessor function 'fix_metadata' fails at converting the Proleptic Gregorian calendar of the daily reanalysis values from ERA5 (pr, tas, tasmax, tasmin) to the Standard calendar of the CMIP6 models:

ValueError: Unable to convert from 'Unit('days since 1950-1-1 00:00:00', calendar='proleptic_gregorian')' to 'Unit('days since 1850-1-1 00:00:00.0', calendar='standard')'

Changing the calendar of ERA5 data from Proleptic Gregorian to Standard didn't fix the issue, as a different error is introduced:

ValueError: invalid day number provided in cftime.DatetimeGregorian(1950, 2, 30, 12, 0, 0, 0, has_year_zero=False)

which I'm not able to solve. Do you know any possible fix?

I attach the recipe and the main log debug:

main_log_debug.txt
recipe_extreme_events.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant