Skip to content

Commit

Permalink
Use aliases in perfmetrics (#3058)
Browse files Browse the repository at this point in the history
Co-authored-by: Manuel Schlund <[email protected]>
Co-authored-by: Alistair Sellar <[email protected]>
Co-authored-by: Valeriu Predoi <[email protected]>
Co-authored-by: Bouwe Andela <[email protected]>
Co-authored-by: sloosvel <[email protected]>
Co-authored-by: sloosvel <[email protected]>
Co-authored-by: Rémi Kazeroni <[email protected]>
Co-authored-by: Tomas Torsvik <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: valeriupredoi <[email protected]>
  • Loading branch information
11 people authored Mar 21, 2023
1 parent 23f47e0 commit 6faf263
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/sphinx/source/recipes/recipe_perfmetrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion esmvaltool/diag_scripts/perfmetrics/cycle_zonal.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion esmvaltool/diag_scripts/perfmetrics/zonal.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6faf263

Please sign in to comment.