generated from NOAA-OWP/owp-open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathrun_cfe.sh
executable file
·37 lines (33 loc) · 1.27 KB
/
run_cfe.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
flag=$1
if [ ! $# == 1 ]; then
echo "Usage: $0 OPTION={BASE,FORCING,FORCINGPET,AETROOTZONE}"
echo "One of these options must be specified to run CFE"
exit
fi
if [ $flag == "BASE" ] || [ "$flag" == "FORCING" ] || [ "$flag" == "FORCINGPET" ] || [ "$flag" == "AETROOTZONE" ]; then
echo "CFE running with option $flag"
else
echo "Invalid option! $flag"
exit
fi
args=" "
exe_name=" "
if [ $flag == "BASE" ]; then
args='./configs/cfe_config_cat_87.txt'
exe_name='cfe_base'
else if [ $flag == "FORCING" ]; then
args="./configs/cfe_config_cat_87_pass.txt ./extern/aorc_bmi/configs/aorc_config_cat_87.txt"
exe_name='cfe_forcing'
else if [ $flag == "FORCINGPET" ]; then
args='./configs/cfe_config_cat_87_pass.txt ./extern/aorc_bmi/configs/aorc_config_cat_87.txt ./extern/evapotranspiration/configs/pet_config_cat_87_pass.txt'
exe_name='cfe_forcingpet'
else if [ $flag == "AETROOTZONE" ]; then
args='./configs/cfe_config_laramie_pass_aet_rz.txt ./extern/aorc_bmi/configs/aorc_config_laramie.txt ./extern/evapotranspiration/configs/pet_config_laramie_pass.txt ./extern/SoilMoistureProfiles/configs/smp_config_laramie.txt'
exe_name='cfe_aet_rootzone'
fi
fi
fi
fi
echo "config file: $args"
./build/${exe_name} $args