Commit 1146a145 authored by dumoda01's avatar dumoda01

Ajout du repertoire shell et de scripts pour tourner en mode batch

parent 1faa4fe1
#!/bin/bash
export EXPDIR=$(pwd)
echo $EXPDIR
if [ ! obs.mal ] || [ ! gotmrun.mal ]
then
echo " ERROR : .mal files missing"
exit
else
echo "-----------------------------------------------------"
echo " batch_fasham.sh"
echo "-----------------------------------------------------"
# Parameters for the Fasham model
# The number of runs will be the product of the number of values
# for each parameter
count=0
for file in nprof_*.dat
do
count=`expr $count + 1`
count=`expr 000$count | tail -4c`
#count=`expr 000$count | tail -8c`
echo $count
if [ -f obs.nml ]
then
rm -f obs.nml
fi
cat obs.mal | sed \
-e "s/nproffile/$file/g" \
> obs.nml
if [ -f obs.nml ]
then
echo " obs.nml created"
fi
if [ -f gotmrun.nml ]
then
rm -f gotmrun.nml
fi
cat gotmrun.mal | sed \
-e "s/experiment_name/$count/g" \
> gotmrun.nml
if [ -f gotmrun.nml ]
then
echo " gotmrun.nml created"
fi
strt=`date +%H:%M:%S`
echo " started at "$strt
./gotm_prod_IFORT >& $count.out
end=`date +%H:%M:%S`
echo " ended at "$end
done
fi
exit
#!/bin/bash
export EXPDIR=$(pwd)
echo $EXPDIR
if [ ! bio_fasham.mal ] || [ ! gotmrun.mal ]
then
echo " ERROR : .mal files missing"
exit
else
echo "-----------------------------------------------------"
echo " batch_fasham.sh"
echo "-----------------------------------------------------"
# Parameters for the Fasham model
# The number of runs will be the product of the number of values
# for each parameter
vp="0.02 0.08 0.24 0.48 0.72"
alpha="0.01 0.04 0.16 0.32 0.48"
inib="0.0 0.001 0.01 0.1"
k1="0.2"
k2="0.8"
w_p="-0.38"
count=0
for a in $vp
do
for b in $alpha
do
for c in $inib
do
for d in $k1
do
for e in $k2
do
for f in $w_p
do
count=`expr $count + 1`
count=`expr 000$count | tail -8c`
echo $count
if [ -f bio_fasham.nml ]
then
rm -f bio_fasham.nml
fi
cat bio_fasham.mal | sed \
-e "s/param1/$a/g" \
-e "s/param2/$b/g" \
-e "s/param3/$c/g" \
-e "s/param4/$d/g" \
-e "s/param5/$e/g" \
-e "s/param6/$f/g" \
> bio_fasham.nml
if [ -f bio_fasham.nml ]
then
echo " bio_fasham.nml created"
fi
if [ -f gotmrun.nml ]
then
rm -f gotmrun.nml
fi
cat gotmrun.mal | sed \
-e "s/experiment_name/$count/g" \
> gotmrun.nml
if [ -f gotmrun.nml ]
then
echo " gotmrun.nml created"
fi
strt=`date +%H:%M:%S`
echo " started at "$strt
./gotm_prod_IFORT >& $count.out
end=`date +%H:%M:%S`
echo " ended at "$end
done
done
done
done
done
done
fi
exit
#!/bin/bash
export EXPDIR=$(pwd)
echo $EXPDIR
if [ ! bio_npzd.mal ] || [ ! gotmrun.mal ]
then
echo " ERROR : .mal files missing"
exit
else
echo "-----------------------------------------------------"
echo " batch_npzd.sh"
echo "-----------------------------------------------------"
# Parameters for the NPZD model
rmax="0.04"
alpha="0.3"
inib="0.4"
k1="0.1"
w_p="-0.38"
count=0
for a in $rmax
do
for b in $alpha
do
for c in $inib
do
for d in $k1
do
for e in $w_p
do
count=`expr $count + 1`
count=`expr 00$count | tail -4c`
echo $count
if [ -f bio_npzd.nml ]
then
rm -f bio_npzd.nml
fi
cat bio_npzd.mal | sed \
-e "s/param1/$a/g" \
-e "s/param2/$b/g" \
-e "s/param3/$c/g" \
-e "s/param4/$d/g" \
-e "s/param5/$e/g" \
> bio_npzd.nml
if [ -f bio_npzd.nml ]
then
echo " bio_npzd.nml created"
fi
if [ -f gotmrun.nml ]
then
rm -f gotmrun.nml
fi
cat gotmrun.mal | sed \
-e "s/experiment_name/$count/g" \
> gotmrun.nml
if [ -f gotmrun.nml ]
then
echo " gotmrun.nml created"
fi
strt=`date +%H:%M:%S`
echo " started at "$strt
./gotm_prod_IFORT >& $count.out
end=`date +%H:%M:%S`
echo " ended at "$end
done
done
done
done
done
fi
exit
Markdown is supported
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