File tree Expand file tree Collapse file tree
esmvaltool/diag_scripts/fire Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -458,9 +458,11 @@ def _read_variable_from_netcdf(
458458 callback = _sort_time ,
459459 )
460460 else :
461+ # Fallback for CMIP7 data for tasmax
462+ var = "tas" if "tasmax/tas_tmaxavg" in filename [0 ] else filename [1 ]
461463 dataset = iris .load_raw (
462464 Path (directory ) / filename [0 ],
463- filename [ 1 ] ,
465+ var ,
464466 callback = _sort_time ,
465467 )
466468 dataset = dataset [0 ]
Original file line number Diff line number Diff line change @@ -341,7 +341,15 @@ def main(cfg: dict) -> None:
341341 vars_file = {}
342342 for i , attributes in enumerate (group ):
343343 logger .info ("Variable %s" , attributes ["short_name" ])
344- vars_file [attributes ["short_name" ]] = attributes
344+ # Fallback for CMIP7 data for tasmax
345+ short_name_key = (
346+ "tasmax"
347+ if attributes .get ("branding_suffix" )
348+ and attributes ["short_name" ] == "tas"
349+ and "tmax" in attributes ["branding_suffix" ]
350+ else attributes ["short_name" ]
351+ )
352+ vars_file [short_name_key ] = attributes
345353 # Save model information for output plot name
346354 if i == 0 :
347355 plot_file_info = "_" .join (
You can’t perform that action at this time.
0 commit comments