Open bouweandela opened 2 years ago
Have you tried adding the latest=True
facet? I have used that in the past for other API searches following the instructions here.
The problem is that that doesn't work, because some datasets are incorrectly labeled as latest on ESGF.
It looks like mixing of two different versions of a dataset is a problem with version selection in the
esmvalcore.esgf
module. This occurs if different versions contain differently named files.Specifically, this code https://github.com/ESMValGroup/ESMValCore/blob/c4696b4db16e61ff3d3a2c825e817e00e841cd0a/esmvalcore/esgf/_search.py#L44-L63 first creates a list of all available files and then selects the latest version of each file, because it was reported in https://github.com/ESMValGroup/ESMValCore/issues/286 that not every file is present in every version. Maybe we should consider making the code for selecting the most recent version of the data more advanced and have a second pass over the available data looking at the temporal coverage?
Originally posted by @bouweandela in https://github.com/ESMValGroup/ESMValTool/pull/2563#issuecomment-1059027527