diff --git a/doc/sphinx/source/recipes/recipe_perfmetrics.rst b/doc/sphinx/source/recipes/recipe_perfmetrics.rst index e1d27e9e15..0a966d648a 100644 --- a/doc/sphinx/source/recipes/recipe_perfmetrics.rst +++ b/doc/sphinx/source/recipes/recipe_perfmetrics.rst @@ -53,6 +53,7 @@ User settings in recipe * calc_grading: calculates grading metrics (default: False) * stippling: uses stippling to mark statistically significant differences (default: False = mask out non-significant differences in gray) * show_global_avg: diplays the global avaerage of the input field as string at the top-right of lat-lon plots (default: False) + * annots: choose the annotation style, e.g. ```alias``` which would display the alias of the dataset as title (applies to plot_type zonal and cycle_zonal) * metric: chosen grading metric(s) (if calc_grading is True) * normalization: metric normalization (for RMSD and BIAS metrics only) * abs_levs: list of contour levels for absolute plot diff --git a/esmvaltool/diag_scripts/perfmetrics/cycle_zonal.ncl b/esmvaltool/diag_scripts/perfmetrics/cycle_zonal.ncl index 7c4a11e6bf..62bcff1966 100644 --- a/esmvaltool/diag_scripts/perfmetrics/cycle_zonal.ncl +++ b/esmvaltool/diag_scripts/perfmetrics/cycle_zonal.ncl @@ -19,7 +19,11 @@ begin modidx := array_append_record(ref_ind, modidx(ind(modidx.ne.ref_ind)), 0) end if - annots = project_style(info_items, diag_script_info, "annots") + if (isatt(diag_script_info, "annots")) then + annots = metadata_att_as_array(info_items, diag_script_info@annots) + else + annots = project_style(info_items, diag_script_info, "annots") + end if ; Loop over datasets do ii = 0, dimsizes(modidx) - 1 diff --git a/esmvaltool/diag_scripts/perfmetrics/zonal.ncl b/esmvaltool/diag_scripts/perfmetrics/zonal.ncl index ea052197a8..788c465625 100644 --- a/esmvaltool/diag_scripts/perfmetrics/zonal.ncl +++ b/esmvaltool/diag_scripts/perfmetrics/zonal.ncl @@ -14,7 +14,13 @@ begin modidx = ispan(0, nDatasets - 1, 1) modidx := array_append_record(ref_ind, modidx(ind(modidx.ne.ref_ind)), 0) - annots = project_style(info_items, diag_script_info, "annots") + if (isatt(diag_script_info, "annots")) then + annots = metadata_att_as_array(info_items, diag_script_info@annots) + else + annots = project_style(info_items, diag_script_info, "annots") + end if + + print(annots) ; Loop over datasets do ii = 0, dimsizes(modidx) - 1