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

Fix plots and provenance in Russell diagnostics #3479

Merged
merged 2 commits into from Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 14 additions & 12 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig2.ncl
Expand Up @@ -76,7 +76,7 @@ begin
colors = project_style(input_file_info, diag_script_info, "colors")
dashes = project_style(input_file_info, diag_script_info, "dashes")
thicks = project_style(input_file_info, diag_script_info, "thicks")
plotpath = config_user_info@plot_dir + "/russell18jgr_fig2_" \
plotpath = config_user_info@plot_dir + "russell18jgr_fig2_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -156,17 +156,6 @@ begin
delete(var_lon_avg)
delete(dataset)

; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 2", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
infile_path)

if (iii .ne. 0) then
overlay(plot(0), plot(iii))
end if
Expand All @@ -192,4 +181,17 @@ begin
"lgLineDashSegLenF" : 0.11
end create
draw(legend)

frame(wks)

; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 2", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
infile_path)
end
23 changes: 13 additions & 10 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig3b-2.ncl
Expand Up @@ -72,7 +72,7 @@ begin
thicks = project_style(input_file_info, diag_script_info, "thicks")

plotpath = config_user_info@plot_dir \
+ "/russell18jgr_fig3_Polar-Front-position_" \
+ "russell18jgr_fig3_Polar-Front-position_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -273,15 +273,6 @@ begin
delete(e)
delete(last_index)
delete(out_var)
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 3b part 2", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
inputfile_paths(iii))
end do

draw(plot(0))
Expand All @@ -301,4 +292,16 @@ begin
end create
draw(legend)

frame(wks)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 3b part 2", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
inputfile_paths)

end
23 changes: 13 additions & 10 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig3b.ncl
Expand Up @@ -69,7 +69,7 @@ begin
dashes = project_style(input_file_info, diag_script_info, "dashes")
thicks = project_style(input_file_info, diag_script_info, "thicks")

plotpath = config_user_info@plot_dir + "/Russell18jgr_fig3_Subantarctic" \
plotpath = config_user_info@plot_dir + "Russell18jgr_fig3_Subantarctic" \
+ "-Fronts_" + sprinti("%0.4i", min(toint(start_years_data))) \
+ "-" + sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -263,15 +263,6 @@ begin
delete(e)
delete(last_index)
delete(out_var)
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 3b", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
inputfile_paths(iii))
end do
draw(plot(0))

Expand All @@ -291,4 +282,16 @@ begin
end create
draw(legend)

frame(wks)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 3b", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
inputfile_paths)

end
23 changes: 12 additions & 11 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig4.ncl
Expand Up @@ -93,7 +93,7 @@ begin
(/238, 91, 12/), (/209, 49, 7/), (/178, 0, 0/) /)
colors_new = colors_new / 256.0

plotpath = config_user_info@plot_dir + "/Russell18jgr-fig4_" \
plotpath = config_user_info@plot_dir + "Russell18jgr-fig4_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -366,16 +366,6 @@ begin
delete(var_final)
delete(exact_lon)
delete(totaltransport)
; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + file_type, \
"Russell et al 2018 figure 4", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
(/inputfile_paths(iii), volfile_paths(iii)/))

end do

Expand All @@ -389,4 +379,15 @@ begin
+ "This is not an error, no response is needed by user for " \
+ "plotting. ")
end if

; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + file_type, \
"Russell et al 2018 figure 4", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
inputfile_paths)
end
23 changes: 12 additions & 11 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig5.ncl
Expand Up @@ -59,7 +59,7 @@ end

begin

plotpath = config_user_info@plot_dir + "/russell18jgr-fig5_" + var0 + "_" \
plotpath = config_user_info@plot_dir + "russell18jgr-fig5_" + var0 + "_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -168,21 +168,22 @@ begin
ncdf_outfile = ncdf_write(dataset, nc_filename)
delete(dataset)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 5 -polar", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end do

; Draw the panel
pres = True
pres@gsnPanelLabelBar = False
outfile = panelling(wks, plots, nvert, nhori, pres)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 5 -polar", \
"mean", \
"sh", \
"geo", \
"russell_joellen", \
"russell18jgr", \
infile_path)


end
26 changes: 14 additions & 12 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig5g.ncl
Expand Up @@ -84,7 +84,7 @@ begin
dashes = project_style(input_file_info, diag_script_info, "dashes")
thicks = project_style(input_file_info, diag_script_info, "thicks")

plotpath = config_user_info@plot_dir + "/russell18jgr-fig5g_" + var0 + "_" \
plotpath = config_user_info@plot_dir + "russell18jgr-fig5g_" + var0 + "_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -224,17 +224,6 @@ begin
overlay(plots(0), plots(iii))
end if

; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 5g", \
"mean", \
"sh", \
"times", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end do

draw(plots(0))
Expand All @@ -261,4 +250,17 @@ begin
"not an error, no responce is needed by user for plotting ")
end if

frame(wks)

; Call provenance logger
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 5g", \
"mean", \
"sh", \
"times", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end
Expand Up @@ -90,7 +90,7 @@ end

begin

plotpath = config_user_info@plot_dir + "/Russell_figure-6a_" \
plotpath = config_user_info@plot_dir + "Russell_figure-6a_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down
Expand Up @@ -92,7 +92,7 @@ end

begin

plotpath = config_user_info@plot_dir + "/russell18jgr-fig6b_" \
plotpath = config_user_info@plot_dir + "russell18jgr-fig6b_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down
23 changes: 13 additions & 10 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig7h.ncl
Expand Up @@ -64,7 +64,7 @@ begin
dashes = project_style(input_file_info, diag_script_info, "dashes")
thicks = project_style(input_file_info, diag_script_info, "thicks")

plotpath = config_user_info@plot_dir + "/Russell_figure7h_" + var0 + "_" \
plotpath = config_user_info@plot_dir + "Russell_figure7h_" + var0 + "_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -163,15 +163,6 @@ begin
ncdf_outfile = ncdf_write(var_lon_avg, nc_filename)
delete(var_lon_avg)
delete(dataset)
log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 7h", \
"mean", \
"sh", \
"zonal", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end do
draw(plot(0))
Expand All @@ -192,4 +183,16 @@ begin
end create
draw(legend)

frame(wks)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 7h", \
"mean", \
"sh", \
"zonal", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end
24 changes: 13 additions & 11 deletions esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig7i.ncl
Expand Up @@ -61,7 +61,7 @@ begin

var0 = variable_info[0]@short_name

plotpath = config_user_info@plot_dir + "/Russell_figure7i_" + var0 + "_" \
plotpath = config_user_info@plot_dir + "Russell_figure7i_" + var0 + "_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -201,16 +201,6 @@ begin
overlay(plot(0), plot(iii))
end if

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 7i", \
"mean", \
"sh", \
"zonal", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end do
draw(plot(0))

Expand All @@ -230,4 +220,16 @@ begin
end create
draw(legend)

frame(wks)

log_provenance(ncdf_outfile, \
plotpath + "." + output_type(), \
"Russell et al 2018 figure 7i", \
"mean", \
"sh", \
"zonal", \
"russell_joellen", \
"russell18jgr", \
infile_path)

end
4 changes: 3 additions & 1 deletion esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig9a.ncl
Expand Up @@ -103,7 +103,7 @@ end

begin

plotpath = config_user_info@plot_dir + "/russell18jgr-fig9a_" \
plotpath = config_user_info@plot_dir + "russell18jgr-fig9a_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -297,6 +297,8 @@ begin
end create
draw(legend)

frame(wks)

do idd = 0, dimsizes(lat_width) - 1
nc_filename = config_user_info@work_dir + "russell18jgr_fig9a_" \
+ annots(idd) + "_" + (start_years_data(idd)) + "-" \
Expand Down
4 changes: 3 additions & 1 deletion esmvaltool/diag_scripts/russell18jgr/russell18jgr-fig9b.ncl
Expand Up @@ -94,7 +94,7 @@ end

begin

plotpath = config_user_info@plot_dir + "/russell18jgr-fig9b_" \
plotpath = config_user_info@plot_dir + "russell18jgr-fig9b_" \
+ sprinti("%0.4i", min(toint(start_years_data))) + "-" \
+ sprinti("%0.4i", max(toint(end_years_data)))

Expand Down Expand Up @@ -315,6 +315,8 @@ begin
end create
draw(legend)

frame(wks)

do idd = 0, dimsizes(lat_width) - 1
nc_filename = config_user_info@work_dir + "russell18jgr_fig9b_" \
+ annots(idd) + "_" + (start_years_data(idd)) + "-" \
Expand Down