diff --git a/esmvalcore/_data_finder.py b/esmvalcore/_data_finder.py index 782042022b..c892ec959e 100644 --- a/esmvalcore/_data_finder.py +++ b/esmvalcore/_data_finder.py @@ -144,7 +144,11 @@ def _apply_caps(original, lower, upper): def _resolve_latestversion(dirname_template): - """Resolve the 'latestversion' tag.""" + """Resolve the 'latestversion' tag. + + This implementation avoid globbing on centralized clusters with very + large data root dirs (i.e. ESGF nodes like Jasmin/DKRZ). + """ if '{latestversion}' not in dirname_template: return dirname_template diff --git a/tests/integration/data_finder.yml b/tests/integration/data_finder.yml index 81f907a046..1677e6ff32 100644 --- a/tests/integration/data_finder.yml +++ b/tests/integration/data_finder.yml @@ -116,6 +116,27 @@ get_input_filelist: - ta_Amon_HadGEM2-ES_historical_r1i1p1*.nc found_files: [] + - drs: BADC + variable: + <<: *variable + start_year: 1980 + end_year: 2002 + available_files: + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20110329/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_193412-195911.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20110329/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_195912-198411.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20110329/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_198412-200511.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_193412-195911.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_195912-198411.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_198412-200511.nc + dirs: + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta + file_patterns: + - ta_Amon_HadGEM2-ES_historical_r1i1p1*.nc + found_files: + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_195912-198411.nc + - MOHC/HadGEM2-ES/historical/mon/atmos/Amon/r1i1p1/v20120928/ta/ta_Amon_HadGEM2-ES_historical_r1i1p1_198412-200511.nc + + - drs: BADC variable: <<: *variable