From 352f1eb1bfda6e5ff66176150bdb6f326407dca1 Mon Sep 17 00:00:00 2001 From: Ignacio Pisso <ip@nilu.no> Date: Wed, 5 Sep 2018 21:50:55 +0200 Subject: [PATCH] add unsaved chages before implementing in Jenkins --- README | 27 +++++++++++++++++++++++++++ export_and_run.sh | 8 ++++++++ export_flexgen.sh | 8 ++++++++ gen_options.sh | 4 +++- gen_pathnames.sh | 3 ++- reference/pathnames | 6 ++++++ 6 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 reference/pathnames diff --git a/README b/README index d6391f2..beb09b8 100644 --- a/README +++ b/README @@ -226,3 +226,30 @@ gen_batch_jobs_cl.sh FLEXPART -i cd exportG ./gen_options_all.sh ; ./gen_pathnames.sh ; ./gen_batch_jobs_SLURM.sh + +FLEXPARTa FLEXPARTb executables +generate 2 different case sets for comparison of the output + + +export + ./export_flexgen.sh casesA_2 _A + ./export_flexgen.sh casesA_1 _A + +cd + cd casesA_2 + +generate set + ./gen_options_all.sh + ./gen_pathnames.sh + +generate batch jobs + ./gen_batch_jobs_cl.sh FLEXPARTa -i + +../run_batch_cl.sh + + + ./export_flexgen.sh default_fail _default + +./export_flexgen.sh exportA_fail _A + + diff --git a/export_and_run.sh b/export_and_run.sh index 7062df1..29809b6 100755 --- a/export_and_run.sh +++ b/export_and_run.sh @@ -1,4 +1,9 @@ #!/bin/bash +# scrit to sequentially and for every case group +# 1) export group to a sepecific subdirectory +# change to this dir and generate options, pathnames and batch jobs. +# batch jobs to be run on NILU SLURM only, locally (relative paths) +# Ignacio Pisso, August 2018 list="default A B C D E F G H I J" for i in $list @@ -15,3 +20,6 @@ echo ../run_batch_SLURM.sh echo cd .. done + +touch export_and_run_done + diff --git a/export_flexgen.sh b/export_flexgen.sh index a6238a2..a9df079 100755 --- a/export_flexgen.sh +++ b/export_flexgen.sh @@ -1,4 +1,10 @@ #!/bin/bash +# create a target and copy all necessary scripts to build a set of case uses +# $1 if present is the target path name (default "./export") +# $2 if present is the pattern to match (default *) +# examples +# ./export_flexgen.sh will include all define_options_*.sh in "./export" +# ./export_flexgen.sh casesA _A will include only define_options_A.sh in "./casesA" #target=$1 #/Users/ignacio/todo/doing/flexpart/flex_gen_input/2018-07-03 default_target=./export @@ -17,6 +23,8 @@ cp define_options$options.sh $target cp gen_options_all.sh $target cp gen_pathnames.sh $target cp gen_batch_jobs_*.sh $target +cp -r reference/options $target +cp reference/pathnames $target #cp define_default_run.sh $target cp Makefile $target diff --git a/gen_options.sh b/gen_options.sh index 3c3058e..c9a066b 100755 --- a/gen_options.sh +++ b/gen_options.sh @@ -10,7 +10,9 @@ define_options=${1:-$define_options_default} #template is in 1 or defalt here #options_template_default=~/repos/flexpart/options -options_template_default=~/repos/flex_gen_input/reference/options +#options_template_default=~/repos/flex_gen_input/reference/options +# relative path, options reference copied +options_template_default=./options options_template=${2:-$options_template_default} # to do: diff --git a/gen_pathnames.sh b/gen_pathnames.sh index 7137e36..3ea3dd9 100755 --- a/gen_pathnames.sh +++ b/gen_pathnames.sh @@ -9,7 +9,8 @@ # /Users/ignacio/todo/doing/flexpart/2018-05-24/loop_on_ls.sh # there the aim was to convert the format -pathnames_template=~/repos/flexpart/pathnames +#pathnames_template=~/repos/flexpart/pathnames +pathnames_template=./pathnames echo pathnames_template = $pathnames_template #defaultdir= diff --git a/reference/pathnames b/reference/pathnames new file mode 100644 index 0000000..c464acb --- /dev/null +++ b/reference/pathnames @@ -0,0 +1,6 @@ +./options/ +./output/ +/ +/xnilu_wrk/flex_wrk/WIND_FIELDS/AVAILABLE_ECMWF_OPER_fields_global +============================================ + -- GitLab