From 7113e79354eccc35b22fcc54c2347e0217089379 Mon Sep 17 00:00:00 2001
From: Ignacio Pisso <Ignacio.Pisso@nilu.no>
Date: Fri, 24 Aug 2018 13:54:17 +0200
Subject: [PATCH] add define_OH.sh from 2018-07-14

---
 define_OH.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100755 define_OH.sh

diff --git a/define_OH.sh b/define_OH.sh
new file mode 100755
index 0000000..73ec34b
--- /dev/null
+++ b/define_OH.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+# Ignacio Pisso 2018-03-29
+# generate FLEXPART variations on the default for parameter sweep hello world tests
+
+#define input options
+options_repo=~/repos/flexpart/options
+#define winds
+pathnames_local=~/repos/flexpart/pathnames
+
+#copy default
+cp -r  $options_repo options
+
+if [ ! -d output ]; then
+  # Control will enter here if $DIRECTORY exists.
+  mkdir output
+fi
+
+cp $pathnames_local pathnames
+
+
+#F different species
+
+#F1: 
+suffix=_spec_CH4
+options_new=options$suffix
+if [  -d "$options_new" ]; then
+   echo 'rm -r $options_new'
+   rm -r $options_new
+fi
+cp -r  options $options_new
+sed -i "/SPECNUM_REL=/c\ SPECNUM_REL=  26," $options_new/RELEASES
+output_new=output$suffix
+mkdir $output_new
+pathnames_new=pathnames$suffix
+cp pathnames $pathnames_new
+sed -i "s/\boptions\b/$options_new/g" $pathnames_new
+sed -i "s/\boutput\b/$output_new/g" $pathnames_new
+
+suffix=_spec_C2H6
+options_new=options$suffix
+cp -r  options $options_new
+sed -i "/SPECNUM_REL=/c\ SPECNUM_REL=  27," $options_new/RELEASES
+output_new=output$suffix
+mkdir $output_new
+pathnames_new=pathnames$suffix
+cp pathnames $pathnames_new
+sed -i "s/\boptions\b/$options_new/g" $pathnames_new
+sed -i "s/\boutput\b/$output_new/g" $pathnames_new
+
-- 
GitLab