Skip to content

Commit

Permalink
Update gnuplot, improve titles and fonts (CICE-Consortium#490)
Browse files Browse the repository at this point in the history
Add run_testoutput script to generate release plots for Icepack
  • Loading branch information
apcraig authored May 28, 2024
1 parent ae69b80 commit 083d6e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
14 changes: 14 additions & 0 deletions configuration/scripts/tests/run_testoutput.csh
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 7 additions & 6 deletions configuration/scripts/tests/timeseries.csh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 083d6e3

Please sign in to comment.