Skip to content

Commit da0705a

Browse files
author
borong
committed
change vp/vs and eps
1 parent 8de306f commit da0705a

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

examples/california/run_adloc.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def run_adloc(
9797

9898
# %%
9999
config["mindepth"] = 0.0
100-
config["maxdepth"] = 30.0
100+
config["maxdepth"] = 60.0
101101
config["use_amplitude"] = True
102102

103103
# %%
@@ -151,8 +151,11 @@ def run_adloc(
151151
# Northern California (Gil7)
152152
zz = [0.0, 1.0, 3.0, 4.0, 5.0, 17.0, 25.0, 62.0]
153153
vp = [3.2, 3.2, 4.5, 4.8, 5.51, 6.21, 6.89, 7.83]
154-
vs = [1.5, 1.5, 2.4, 2.78, 3.18, 3.40, 3.98, 4.52]
154+
# vs = [1.5, 1.5, 2.4, 2.78, 3.18, 3.40, 3.98, 4.52]
155+
vp_vs_ratio = 1.73
156+
vs = [v / vp_vs_ratio for v in vp]
155157
h = 0.3
158+
# h = 0.1
156159

157160
vel = {"Z": zz, "P": vp, "S": vs}
158161
config["eikonal"] = {
@@ -384,6 +387,8 @@ def parse_args():
384387
calc_jdays = lambda year: 366 if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0) else 365
385388
jdays = [f"{year}.{i:03d}" for i in range(1, calc_jdays(year) + 1)]
386389
jdays = [jdays[i::num_nodes] for i in range(num_nodes)]
390+
# jdays = [[f'2023.{i:03d}' for i in range(41, 51)]]
391+
jdays = [[f"{year}.366"]] # for leap year
387392

388393
# %%
389394
with fs.open(f"{bucket}/{region}/config.json", "r") as fp:

examples/california/run_gamma.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def run_gamma(
3232
jday = int(jday.split(".")[1])
3333

3434
# %%
35-
result_path = f"{region}/gamma_bo/{year:04d}"
35+
result_path = f"{region}/gamma_bo3/{year:04d}"
3636
if not os.path.exists(f"{root_path}/{result_path}"):
3737
os.makedirs(f"{root_path}/{result_path}")
3838

@@ -144,6 +144,25 @@ def run_gamma(
144144
2021: 10.5,
145145
2020: 10.5,
146146
2019: 10.5,
147+
2018: 10.5,
148+
2017: 10.5,
149+
2016: 11.0,
150+
2015: 12.5,
151+
2014: 12.5,
152+
2013: 13.0,
153+
2012: 13.0,
154+
2011: 13.0,
155+
2010: 14.0,
156+
2009: 15.5,
157+
2008: 16.0,
158+
2007: 14.0,
159+
2006: 14.0,
160+
2005: 14.0,
161+
2004: 14.0,
162+
2003: 14.0,
163+
2002: 14.0,
164+
2001: 14.0,
165+
2000: 15.0,
147166
}
148167
config["dbscan_eps"] = eps_year[year]
149168
config["dbscan_min_samples"] = 6
@@ -158,6 +177,8 @@ def run_gamma(
158177
zz = [0.0, 1.0, 3.0, 4.0, 5.0, 17.0, 25.0, 62.0]
159178
vp = [3.2, 3.2, 4.5, 4.8, 5.51, 6.21, 6.89, 7.83]
160179
vs = [1.5, 1.5, 2.4, 2.78, 3.18, 3.40, 3.98, 4.52]
180+
vp_vs_ratio = 1.73
181+
vs = [v / vp_vs_ratio for v in vp]
161182
h = 0.3
162183
vel = {"z": zz, "p": vp, "s": vs}
163184
config["eikonal"] = {
@@ -310,6 +331,8 @@ def parse_args():
310331
calc_jdays = lambda year: 366 if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0) else 365
311332
jdays = [f"{year}.{i:03d}" for i in range(1, calc_jdays(year) + 1)]
312333
jdays = [jdays[i::num_nodes] for i in range(num_nodes)]
334+
# jdays = [['2018.032', '2018.064', '2018.096', '2018.128', '2018.160', '2018.192', '2018.224', '2018.256', '2018.288', '2018.320', '2018.352']]
335+
jdays = [[f'{year}.366']] # for leap year
313336

314337
# %%
315338
with fs.open(f"{bucket}/{region}/config.json", "r") as fp:

0 commit comments

Comments
 (0)