Skip to content
Snippets Groups Projects
Commit ecaae4f0 authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

Merge branch 'master' of git.nilu.no:ignacio/flex_gen_input

parents 7113e793 8be99956
No related branches found
No related tags found
No related merge requests found
options:
./define_default_run_0.sh
slfiles:
./loop_on_pathnames_laptop.sh
run:
./run_all_sl
clean: this_is_a_run
rm -r options*
cleanrun:
rm *.out rm *.err *.sl
README 0 → 100644
flex gen cases
Generates flexpart run cases based on the current default options dir and pathnames file.
(pathanmes can be edited at a later stage to accomodate different winds with the same options IMPLEMENT
)
files
- define_<runs>: Generates flexpart run cases (groups depending on _<runs>)
- export*: copy define* to a ifferent directory to build the run cases there.
- (pathanmes could be edited here)
- loop_on_pathnames*.sh: for a fived options-pathnames pair, create a run case (adding an executable and an output directory)
- run_all_sl*: execute the run cases generating a set of flexpart outputs
- read_joblist*.sh: verify that the runs finished properly.
input:
options dir:
default located repo in the same directory
i.e. ../flexpart/options/
pathname: ../flexpart/pathnames
destinantion dir:
default "../flex_cases" alongside in the same directory level
it is created every time. it it already exists from a previous run it will stop
(add --force option ENHANCE)
history
repo flex_gen_input cloned to ~/repos
how to run
example
./export_flexgen_0.sh
generates ../flex_cases
containing
Makefile
define_default_run_0.sh*
loop_on_pathnames_laptop.sh*
run_all_sl_laptop*
this by itself or a s a copy can generate a list of flexpart run cases
(only default FIXME)
just running
make or
define_default_run_0.sh
generates:
pathnames
output
options
./loop_on_pathnames_laptop.sh*
generates a file (e.g. batch_dry_pathnames*.sl) that associates the executable with that patnames in a FLEXPART_run_string
(the executable is by default FLEXPART_8d70e43)
in can be configured with exporting variable $FLEXPARTvar
now all batch_dry_pathnames*.sl
can be run by
./run_all_sl_*
the stdout of flexpart is tee'd to stdoutbatch_dry_pathnames*.sl
the output* directory(es) is(are) ready to be read by flex_read
#!/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
#sed -i '/IOUT=/c\ IOUT= 2,' options2/COMMAND
mkdir output
cp $pathnames_local pathnames
#sed -i "s/\boptions\b/options2/g" pathnames2
#sed -i "s/\boutput\b/output2/g" pathnames2
#!/bin/bash
#OUTPUT=${OUTPUTvar:-$OUTPUTdefault}
#target=$1 #/Users/ignacio/todo/doing/flexpart/flex_gen_input/2018-07-03
target_default='../flex_cases'
target_in=$1
target=${target_in:-$target_default}
echo target=$target
#[ -e $target ] && (echo WARNING: target=$target exists as file)
#echo post -e
#[ -d $target ] || mkdir $target
#echo post -d
if [ -d $target ]
then
echo WARNING: target=$target exists as dir, exit
exit
else
if [ -e $target ]
then
echo WARNING: target=$target exists as file, exit
exit
else
mkdir $target
echo $target created
fi
fi
listoffiles=(define_default_run_0.sh Makefile loop_on_pathnames_laptop.sh run_all_sl_laptop)
echo copy ${listoffiles[*]} to $target
cp ${listoffiles[*]} $target
#exit
#cp define_default_run_0.sh $target
cp Makefile_0 $target/Makefile
#cp loop_on_pathnames_laptop.sh $target
#cp run_all_sl_laptop $target
#echo "created by $(basename \"$0\") on $(date) from $(pwd)" > $target/README
echo "created by $(basename "$0") on $(date) from $(pwd)" > $target/README
#!/bin/bash #!/bin/bash
#OUTPUT="$(ls -1 *.sl)" #OUTPUT="$(ls -1 *.sl)"
OUTPUdefaultT="$(ls -1 *.sl)" OUTPUTdefault="$(ls -1 *.sl)"
OUTPUT=${OUTPUTvar:-$OUTPUTdefault} OUTPUT=${OUTPUTvar:-$OUTPUTdefault}
rm joblist rm joblist
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment