From 4ab64905c2c6ed601d987df431d5a1c6ad96e4a7 Mon Sep 17 00:00:00 2001 From: Manuel Schlund <32543114+schlunma@users.noreply.github.com> Date: Tue, 21 May 2024 14:21:19 +0200 Subject: [PATCH] Fixed attribute handling in austral_jet/main.ncl for iris>=3.8 (#3603) --- esmvaltool/diag_scripts/austral_jet/main.ncl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/esmvaltool/diag_scripts/austral_jet/main.ncl b/esmvaltool/diag_scripts/austral_jet/main.ncl index c078830687..1b7604d4f5 100644 --- a/esmvaltool/diag_scripts/austral_jet/main.ncl +++ b/esmvaltool/diag_scripts/austral_jet/main.ncl @@ -342,14 +342,22 @@ begin lat_range = f->lat_bnds end if else - if (isatt(f, "plev") .and. \ + f_var = f->$var0$ + if (isatt(f, "plev") .and. \ ; ESMValCore < 2.11.0 isatt(f, "lat_range_0") .and. \ isatt(f, "lat_range_1")) then lev = f@plev lat_range = (/f@lat_range_0, f@lat_range_1/) + else if (isatt(f_var, "plev") .and. \ ; ESMValCore >= 2.11.0 + isatt(f_var, "lat_range_0") .and. \ + isatt(f_var, "lat_range_1")) then + lev = f_var@plev + lat_range = (/f_var@lat_range_0, f_var@lat_range_1/) else error_msg("f", DIAG_SCRIPT, "", "cannot read plev and latrange") end if + end if + delete(f_var) end if log_info("Retrieved pressure level " + lev + " and latitude range " + \ lat_range(0) + " to " + lat_range(1) + " from preprocessed data")