Open rbeucher opened 1 month ago
You might be able to use the frequency
facet, which should be available in fixes, to figure out the frequency instead of looking at the data. That should avoid the problem that it's impossible compute an interval from a single time point.
So you mean drop the get_frequency
function entirely and rely on the frequency
facet?
Yes
Describe the bug
The ERA5 replica collection at the National Computing Infrastructure down here in Australia stores monthly-averaged variable in multiple files, one file per month.
Here is an example for the tas (tp) variable:
Using ESMValCore and the following code:
Produces the following error:
As per trace above, the issue arises in the following lines: https://github.com/ESMValGroup/ESMValCore/blob/f969e82796f5f3e47c97169b635ef6bb8b8a5eb1/esmvalcore/cmor/_fixes/native6/era5.py#L25-L29
At that time, each cube from each NetCDF file has a time dimension length of 1 which raises the issue.
An easy fix is to rewrite the
get_frequency
variable to make it a bit more flexible:I will submit a PR to fix this.