Commit c8b00d79 authored by Ignacio Pisso's avatar Ignacio Pisso
Browse files

separate definition from creation and setup: new files define_options_A etc

parent 8f120f54
......@@ -160,6 +160,18 @@ verifies that the runs have finished without errors
from scratch
./gen_options.sh
./gen_options.sh define_options_1.sh
# now we have 9 options
./gen_pathnames.sh
# now we have corresponding pathnames and output
./gen_batch_jobs_cl.sh
# command line batch files
or
./gen_batch_jobs_cl.sh $fp_exec $args
./gen_batch_jobs_cl.sh FLEXPART -i
......
suffix=_1
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=1,' $options_new/COMMAND
suffix=_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=2,' $options_new/COMMAND
suffix=_3
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=3,' $options_new/COMMAND
suffix=_4
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=4,' $options_new/COMMAND
suffix=_5
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=5,' $options_new/COMMAND
suffix=_9
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=9,' $options_new/COMMAND
suffix=_10
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=10,' $options_new/COMMAND
suffix=_11
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=11,' $options_new/COMMAND
suffix=_12
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=12,' $options_new/COMMAND
suffix=_1
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=1,' $options_new/COMMAND
suffix=_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=2,' $options_new/COMMAND
suffix=_3
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=3,' $options_new/COMMAND
suffix=_4
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=4,' $options_new/COMMAND
suffix=_5
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=5,' $options_new/COMMAND
suffix=_9
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=9,' $options_new/COMMAND
suffix=_10
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=10,' $options_new/COMMAND
suffix=_11
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=11,' $options_new/COMMAND
suffix=_12
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/IOUT=/c\ IOUT=12,' $options_new/COMMAND
#D: particle output
#D1: part1: Trajectories from default (conc)
options_new=options_part1
cp -r $options_template $options_new
sed -i '/IPOUT=/c\ IPOUT= 1,' $options_new/COMMAND
#D2: part2 -- default + partposit in the end
options_new=options_part2
cp -r $options_template $options_new
sed -i '/IPOUT=/c\ IPOUT= 2,' $options_new/COMMAND
#D3: part_bwd1 -- backward trajectories
options_new=options_part_bwd1
cp -r $options_template $options_new
sed -i '/LDIRECT=/c\ LDIRECT= -1,' $options_new/COMMAND
sed -i '/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1,' $options_new/COMMAND
sed -i '/IPOUT=/c\ IPOUT= 1,' $options_new/COMMAND
#D4: part_QUASILAG: Trajectories MQUASILAG
suffix=part_QUASILAG
options_new=options$suffix
cp -r $options_template $options_new
sed -i '/MQUASILAG=/c\ MQUASILAG= 1,' $options_new/COMMAND
## backward
#E4: bwd 1 2 --
suffix=_bwd_ind_1_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/IND_RECEPTOR=/c\ IND_RECEPTOR= 2," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#E5: bwd 2 1 --
suffix=_bwd_ind_2_1
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#E6: bwd 2 2
suffix=_bwd_ind_2_2
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/IND_SOURCE=/c\ IND_SOURCE= 2," $options_new/COMMAND
sed -i "/IND_RECEPTOR=/c\ IND_RECEPTOR= 2," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#F different species
#F1:
suffix=_specNO
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/SPECNUM_REL=/c\ SPECNUM_REL= 3," $options_new/COMMAND
#F2
suffix=_specAERO-TRACE
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/SPECNUM_REL=/c\ SPECNUM_REL= 25," $options_new/COMMAND
#F3:
suffix=_specCO
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/SPECNUM_REL=/c\ SPECNUM_REL= 22," $options_new/COMMAND
output_new=output$suffix
#F4:
suffix=_specBC
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/SPECNUM_REL=/c\ SPECNUM_REL= 40," $options_new/COMMAND
#F5:
suffix=_bwd_specNO
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/SPECNUM_REL=/c\ SPECNUM_REL= 3," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#G nested output
#G1
suffix=_nested
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/NESTED_OUTPUT=/c\ NESTED_OUTPUT= 1," $options_new/COMMAND
#G2
suffix=_nested_bwd
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/NESTED_OUTPUT=/c\ NESTED_OUTPUT= 1," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#G1
suffix=_nested1
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/NESTED_OUTPUT=/c\ NESTED_OUTPUT= 1," $options_new/COMMAND
sed -i "/LON1=/c\ LON1= -0.1," $options_new/RELEASES
sed -i "/LON1=/c\ LON1= 0.1," $options_new/RELEASES
sed -i "/OUTLAT0=/c\ OUTLAT0= -3," $options_new/OUTGRID_NEST
# LON1= 0.000 ,
# LON2= 0.000 ,
# LAT1= 0.000 ,
# LAT2= 0.000 ,
# Z1= 50.000 ,
# Z2= 50.000 ,
#G2
suffix=_nested1_bwd
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/NESTED_OUTPUT=/c\ NESTED_OUTPUT= 1," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
# H MDOMAINFILL
# H1: DOMAINFILL
suffix=_DOMAINFILL
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/MDOMAINFILL=/c\ MDOMAINFILL= 1," $options_new/COMMAND
#sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
#sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
# I LINIT_COND + SURF_ONLY
# I1: Gmode
suffix=_Gmode
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/LINIT_COND=/c\ LINIT_COND= 1," $options_new/COMMAND
sed -i "/SURF_ONLY=/c\ SURF_ONLY= 1," $options_new/COMMAND
#sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
#sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
# I2: Gmode_bwd
suffix=_Gmode_bwd
options_new=options$suffix
cp -r $options_template $options_new
sed -i "/LINIT_COND=/c\ LINIT_COND= 1," $options_new/COMMAND
sed -i "/SURF_ONLY=/c\ SURF_ONLY= 1," $options_new/COMMAND
sed -i "/LDIRECT=/c\ LDIRECT= -1," $options_new/COMMAND
sed -i "/IOUTPUTFOREACHRELEASE=/c\ IOUTPUTFOREACHRELEASE= 1," $options_new/COMMAND
#!/bin/bash
define_options_dir_list="$(ls -d1 define_options*)"
for i in ${define_options_dir_list}
do
echo call ./gen_options.sh $i
./gen_options.sh $i
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment