commit 63a7aea187ad7c0c99223e065f93d93df89833e7
parent e0dcf1befbb1ce20ac121370d41599279e944bd6
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Fri, 10 May 2019 15:51:59 -0700
Add plotting of diurnal time series
Diffstat:
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/Blue-sequential.plt b/BlueSeq.plt
diff --git a/Makefile b/Makefile
@@ -13,7 +13,7 @@ plots: 1d_fd_simple_shear.png \
1d_fd_simple_shear_rheology_kamb.png \
1d_fd_simple_shear_rheology_iverson.png \
1d_fd_simple_shear_rheology_tulaczyk.png \
- diurnal.output00000.txt
+ diurnal.timeseries.png
diurnal.mp4: diurnal.output00000.txt.png
ffmpeg -i diurnal.output%05d.txt.png -y diurnal.mp4
@@ -26,7 +26,15 @@ diurnal.output00000.txt.png: 1d_fd_simple_shear_fluid.gp diurnal.output00000.txt
diurnal.output00000.txt: 1d_fd_simple_shear
/usr/bin/env zsh -c '\
- ./$< --resolution 50 --length 2.0 --normal-stress 150e3 --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 --fluid-pressure-ampl 50e3 --fluid-pressure-freq $$(( 1.0/(3600*24) )) --time-step 1e-1 --file-interval $$(( 60*10 )) --time-end $$(( 3600*24*4 )) diurnal'
+ ./$< --resolution 50 --length 2.0 --normal-stress 150e3 --fluid --fluid-permeability 2e-17 --fluid-pressure-top 50e3 --fluid-pressure-ampl 50e3 --fluid-pressure-freq $$(( 1.0/(3600*24) )) --time-step 1e-1 --file-interval $$(( 60*10 )) --time-end $$(( 3600*24*7 )) diurnal'
+
+diurnal.timeseries.txt: diurnal.output00000.txt
+ for f in diurnal.output*.txt; do \
+ tail -n 1 "$$f" | cut -f2- >> $@; \
+ done
+
+diurnal.timeseries.png: diurnal.timeseries.gp diurnal.timeseries.txt
+ gnuplot $< > $@
diurnal.gif: diurnal.mp4
convert diurnal.output*.txt.png \
diff --git a/diurnal.timeseries.gp b/diurnal.timeseries.gp
@@ -0,0 +1,11 @@
+#!/usr/bin/env gnuplot
+
+set terminal pngcairo color size 18.6 cm, 10.0 cm
+set xlabel "Time, t [s]"
+set ylabel "Shear velocity, v [m/s]" offset 2
+
+# set xrange [0.0:0.7]
+# set yrange [0.0:0.01]
+# set key top left #samplen 0.9
+
+plot "diurnal.timeseries.txt" u 1 w l lw 2 t ""