-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_dirs.py
executable file
·30 lines (21 loc) · 991 Bytes
/
gen_dirs.py
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
#!/usr/bin/env python
import os
n = 1
for level in [0.0, 0.5, 1.0, 1.5]:
for veg_on in [True, False]:
for wind_speed in [7.5, 10, 15]:
for wind_dir in [0, 45, 90, 135, 180, 225, 270, 315]:
directory = 'run' + str(n).zfill(3)
if not os.path.exists(directory):
os.makedirs(directory)
print level, veg_on, wind_speed, wind_dir, directory
f = open(directory + '/runargs.py', 'w')
f.write("level = " + str(level) + "\n")
f.write("wind_speed = " + str(wind_speed) + "\n")
f.write("wind_dir = " + str(wind_dir) + "\n")
f.write("veg_on = " + str(veg_on) + "\n")
f.write("friction_on = True\n")
f.write("friction_type = \"Madsen\"\n")
f.write("madsen_kn = 0.0015\n")
f.close()
n = n + 1