tadd script to plot temporal evolution of field - cngf-pf - continuum model for… | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 4e5828e062c676396ca0c67660c83cc6755f7002 | |
parent 63448eb2803256024a9e887c9f29aae7bfc35946 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Thu, 9 Sep 2021 14:54:41 +0200 | |
add script to plot temporal evolution of field | |
Diffstat: | |
A plot_cngf_pf_evolution | 27 +++++++++++++++++++++++++++ | |
1 file changed, 27 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/plot_cngf_pf_evolution b/plot_cngf_pf_evolution | |
t@@ -0,0 +1,27 @@ | |
+#!/bin/sh | |
+ | |
+usage() { | |
+ printf 'usage: %s [-f field] [-h] [-l label] [-t term]\n' "${0##*/}" 1… | |
+} | |
+ | |
+field="2" | |
+label="shear velocity [m/s]" | |
+term="pdf" | |
+while getopts 'f:hl:t:' arg; do | |
+ case "${arg}" in | |
+ f) field="${OPTARG}" ;; | |
+ h) usage; exit 0 ;; | |
+ l) label="${OPTARG}" ;; | |
+ t) term="${OPTARG}" ;; | |
+ *) usage; exit 1 ;; | |
+ esac | |
+done | |
+shift $((OPTIND - 1)) | |
+ | |
+for f in "$@"; do | |
+ tail -n 1 "$f" | |
+done | \ | |
+gnuplot -e "set term ${term};\ | |
+ set xlabel 'Timestep [-]';\ | |
+ set ylabel '${label}';\ | |
+ plot '-' u 0:${field} with lines title ''" |