Commit 4f047255 authored by dumoda01's avatar dumoda01

Ajout d'un script nouveau pour lancer des simulations biologiques en mode...

Ajout d'un script nouveau pour lancer des simulations biologiques en mode batch. Ce script est applicable a tous les modeles bio et remplace les script batch_fasham.sh, etc. Ces scripts seront eventuellement retires du depot.
parent dd570312
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: $0 <bio_model>"
echo "Example: ./batch_bio.sh ismer"
exit
fi
export EXPDIR=$(pwd)
echo $EXPDIR
model=$1
biofile=bio_$model
runfile=gotmrun
if [ ! $biofile.mal ] || [ ! $runfile.mal ]
then
echo " ERROR : .mal files missing"
exit
else
echo "-----------------------------------------------------"
echo $0 $1
echo "-----------------------------------------------------"
# Parameters for the biological model
# The number of runs will be the product of the number of values
# for each parameter
vp="0.02"
alpha="0.02"
inib="0.0"
k1="0.2"
k2="0.1"
w_p="-0.38"
#vp="0.02 0.12 0.22 0.32 0.42 0.52 0.62 0.72"
#alpha="0.02 0.08 0.16 0.22 0.28"
#inib="0.0 0.0005 0.0010 0.0015 0.0020"
#w_p="-0.05 -0.25 -0.45"
count=0
for a in $vp
do
for b in $alpha
do
for c in $inib
do
for d in $w_p
do
count=`expr $count + 1`
count=`expr 000$count | tail -5c`
echo $count
if [ -f bio_$model.nml ]
then
rm -f bio_$model.nml
fi
cat bio_$model.mal | sed \
-e "s/param1/$a/g" \
-e "s/param2/$b/g" \
-e "s/param3/$c/g" \
-e "s/param4/$d/g" \
> bio_$model.nml
if [ -f bio_$model.nml ]
then
echo " bio_$model.nml created"
fi
if [ -f $runfile.nml ]
then
rm -f $runfile.nml
fi
cat $runfile.mal | sed \
-e "s/experiment_name/$count/g" \
> $runfile.nml
if [ -f $runfile.nml ]
then
echo " $runfile.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
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