Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed 'write_plots' from all NCL diagnostics #2331

Merged
merged 2 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 25 additions & 32 deletions esmvaltool/diag_scripts/bock20jgr/model_bias.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
; none
;
; Modification history
; 20190312-A_bock_ls: adapted code (based on clouds/clouds_bias.ncl)
; 20211006-lauer_axel: removed write_plots
; 20190312-bock_lisa: adapted code (based on clouds/clouds_bias.ncl)
;
; ############################################################################

Expand Down Expand Up @@ -84,12 +85,6 @@ begin
; Create work dir
system("mkdir -p " + work_dir)

if (config_user_info@write_plots.eq."True") then
write_plots = True
else
write_plots = False
end if

end

begin
Expand Down Expand Up @@ -316,38 +311,36 @@ begin
plotfile = new(numseas, string)
plotfile(:) = ""

if (write_plots) then
do is = 0, numseas - 1
; --------------------------------------------------------------------
; create workspace
do is = 0, numseas - 1
; --------------------------------------------------------------------
; create workspace

if (isvar("wks")) then
delete(wks)
end if
if (isvar("wks")) then
delete(wks)
end if

wks = get_wks("dummy_for_wks", DIAG_SCRIPT, "model_bias_" + var0 \
+ "_" + season(is) + "_" + project)
wks = get_wks("dummy_for_wks", DIAG_SCRIPT, "model_bias_" + var0 \
+ "_" + season(is) + "_" + project)

plotfile(is) = wks@fullname
plotfile(is) = wks@fullname

if (numseas.gt.1) then
pres@txString = season(is)
plots(0, is) = contour_map(wks, mmdata(is, :, :), var0)
plots(1, is) = contour_map(wks, diff(is, :, :), var0)
gsn_panel(wks, plots(plotind, is), plotsperline, pres)
else
plots(0, 0) = contour_map(wks, mmdata, var0)
plots(1, 0) = contour_map(wks, diff, var0)
gsn_panel(wks, plots(plotind, 0), plotsperline, pres)
end if
if (numseas.gt.1) then
pres@txString = season(is)
plots(0, is) = contour_map(wks, mmdata(is, :, :), var0)
plots(1, is) = contour_map(wks, diff(is, :, :), var0)
gsn_panel(wks, plots(plotind, is), plotsperline, pres)
else
plots(0, 0) = contour_map(wks, mmdata, var0)
plots(1, 0) = contour_map(wks, diff, var0)
gsn_panel(wks, plots(plotind, 0), plotsperline, pres)
end if

; add meta data to plot (for reporting)
; add meta data to plot (for reporting)

caption = "Multi-model values, from top left to bottom right: " \
+ "mean, bias"
caption = "Multi-model values, from top left to bottom right: " \
+ "mean, bias"

end do ; is-loop (seasons)
end if ; if write_plots
end do ; is-loop (seasons)

; ###########################################
; # output to netCDF #
Expand Down
Loading