-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWDPM.sh
More file actions
executable file
·23 lines (19 loc) · 1.36 KB
/
WDPM.sh
File metadata and controls
executable file
·23 lines (19 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# do curve 1
precip=1
delta=1
nice -19 ./WDPMCL add SubBasin3_fixed.asc NULL $precip'_0_0_0_u.asc' NULL $delta'.0' 1.0 100.0 1 1 | tee $precip'_0_0_0_u.txt'
nice -19 ./WDPMCL drain SubBasin3_fixed.asc $precip'_0_0_0_u.asc' $precip'_0_0_0_d.asc' $precip'_0_0_0_d_backup.asc' 0.001 0.1 1 1 | tee $precip'_0_0_0_d.txt'
nice -19 ./WDPMCL add SubBasin3_fixed.asc $precip'_0_0_0_d.asc' $precip'_0_1_0_u.asc' NULL 1.0 1 100.0 1 1 | tee $precip'_0_1_0_u.txt'
nice -19 ./WDPMCL drain SubBasin3_fixed.asc $precip'_0_1_0_u.asc' $precip'_0_1_0_d.asc' $precip'_0_1_0_d_backup.asc' 0.001 0.1 1 1 | tee $precip'_0_1_0_d.txt'
oldprecip=1
for precip in 5 10 20 50 100 200 300
do
delta=`expr $precip - $oldprecip`
nice -19 ./WDPMCL add SubBasin3_fixed.asc $oldprecip'_0_0_0_d.asc' $precip'_0_0_0_u.asc' NULL $delta'.0' 1.0 100.0 1 1 | tee $precip'_0_0_0_u.txt'
nice -19 ./WDPMCL drain SubBasin3_fixed.asc $precip'_0_0_0_u.asc' $precip'_0_0_0_d.asc' $precip'_0_0_0_d_backup.asc' 0.001 0.1 1 1 | tee $precip'_0_0_0_d.txt'
nice -19 ./WDPMCL add SubBasin3_fixed.asc $precip'_0_0_0_d.asc' $precip'_0_1_0_u.asc' NULL 1.0 1 100.0 1 1 | tee $precip'_0_1_0_u.txt'
nice -19 ./WDPMCL drain SubBasin3_fixed.asc $precip'_0_1_0_u.asc' $precip'_0_1_0_d.asc' $precip'_0_1_0_d_backup.asc' 0.001 0.1 1 1 | tee $precip'_0_1_0_d.txt'
oldprecip=$precip
rm $precip'_0_0_0_d_backup.asc'
done