-
Notifications
You must be signed in to change notification settings - Fork 2
/
04_run_postpro.sh
executable file
·64 lines (51 loc) · 1.81 KB
/
04_run_postpro.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#----------------------------
## -- (1) global diagnosis --
#----------------------------
## LOOP OVER SETUPS LISTED IN SETUPS_diagnosis.txt
input="hamster/SETUPS_diagnosis.txt"
{
read # to skip the header line of input
while IFS= read -r line
do
# extract parameters (separated by white space -d ' ')
expid=$(echo $line | cut -f1 -d ' ')
echo " "
echo "*** JOB SUBMISSION: $expid"
declare -a nvars=("P" "P_n_part" "E" "E_n_part" "H" "H_n_part")
for ivar in ${nvars[@]};
do
echo " -- $ivar"
qsub -v expid=$expid,process_diag_data=TRUE,process_traj_data=FALSE,ivar=$ivar 04_postpro_hamster.sh
echo " "
sleep 30 # sleep between experiments to avoid simultaneous reading of the same files
done
i=$((i+1))
done
} < "$input"
#----------------------------
## -- (2) trajectory analysis
#----------------------------
# LOOP OVER SETUPS LISTED IN SETUPS_diagnosis.txt
input="hamster/SETUPS_diagnosis.txt"
{
read # to skip the header line of input
while IFS= read -r line
do
# extract parameters (separated by white space -d ' ')
expid=$(echo $line | cut -f1 -d ' ')
for icity in 1001 3001 5002;
do
echo "*** JOB SUBMISSION: $icity -- $expid"
echo " * linear, no upscaling"
qsub -v expid=$expid,process_diag_data=FALSE,process_traj_data=TRUE,icity=$icity,iexp="linear" 04_postpro_hamster.sh
sleep 5
echo " * linear, upscaling"
qsub -v expid=$expid,process_diag_data=FALSE,process_traj_data=TRUE,icity=$icity,iexp="linear_upscaled" 04_postpro_hamster.sh
sleep 5
echo " * random, upscaling"
qsub -v expid=$expid,process_diag_data=FALSE,process_traj_data=TRUE,icity=$icity,iexp="random2_upscaled" 04_postpro_hamster.sh
sleep 5
done
done
} < "$input"