From 083d6e3cf42198bc7b4ffd1f02063c4c5b35b639 Mon Sep 17 00:00:00 2001 From: Tony Craig Date: Tue, 28 May 2024 09:21:19 -0700 Subject: [PATCH] Update gnuplot, improve titles and fonts (#490) Add run_testoutput script to generate release plots for Icepack --- configuration/scripts/tests/run_testoutput.csh | 14 ++++++++++++++ configuration/scripts/tests/timeseries.csh | 13 +++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 configuration/scripts/tests/run_testoutput.csh diff --git a/configuration/scripts/tests/run_testoutput.csh b/configuration/scripts/tests/run_testoutput.csh new file mode 100644 index 000000000..cbb2a91ec --- /dev/null +++ b/configuration/scripts/tests/run_testoutput.csh @@ -0,0 +1,14 @@ +#/bin/csh -f + +./icepack.setup -m conda -e macos --case basecase -s diag1,run1year +cd basecase +./icepack.build +./icepack.submit +cd logs +foreach file (ice*[0-9]) + cp ${file} ${file}.txt +end +conda activate icepack +../../configuration/scripts/tests/timeseries.csh ice_diag.full_ITD.*[0-9] + +echo "run_testoutput DONE" diff --git a/configuration/scripts/tests/timeseries.csh b/configuration/scripts/tests/timeseries.csh index 75faa81a6..459c905b8 100755 --- a/configuration/scripts/tests/timeseries.csh +++ b/configuration/scripts/tests/timeseries.csh @@ -71,9 +71,10 @@ foreach field ($fieldlist:q) endif set output = `echo $fieldname | sed 's/ /_/g'` - set casename = `echo $basename | rev | cut -d / -f 1-2 | rev | sed 's/\//, /'` - set fname_base = "${casename}_${output}" + set logfileonly = `echo $basename | rev | cut -d / -f 1 | rev` + set title = "${logfileonly}" set output_fname = "${basename}_${output}.png" + rm ${output_fname} echo "Plotting data for '$fieldname' and saving to $output_fname" @@ -85,7 +86,7 @@ set style data points set datafile separator "," # Term type and background color, canvas size -set terminal png size 1920,960 +set terminal png size 1920,960 font "default,20" # x-axis set xdata time @@ -95,9 +96,9 @@ set format x "%Y/%m/%d" # Axis tick marks set xtics rotate -set title "$fname_base" -set ylabel "$field" -set xlabel "Simulation Day" +set title "$title" noenhanced font "default,30" +set ylabel "$field" font "default,30" +set xlabel "Simulation Day" font "default,30" # Set y-axis limits $yrange