FFSM++  1.1.0
French Forest Sector Model ++
/srv/datadisk03/home/ffsm/code/ffsm_pp/run_single_scenario.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 #---------------------------------------
4 # Shell script to run a single ffsm scenario, where the scenario name is the first argument and input file is the second (optional) argument.
5 # e.g. ./run_single_scenario.sh 'data/ffsmInput_2015_wdulef.ods' 'baseline'
6 #---------------------------------------
7 
8 if [ $# -eq 2 ]
9  then
10  ./ffsm -c -s $2 -i $1 > logs/${2}.txt
11  echo "Ended running scenario" $2 "on input file" $1
12  else
13  if [ $# -eq 1 ]
14  then
15  ./ffsm -c -s $1 > logs/${1}.txt
16  echo "Ended running scenario" $1
17  else
18  echo "ERROR: this script must be called with either 1 argument (scenario name) or 2 arguments (input file, scenario name)"
19  fi
20 fi
21 
22 
23 
24