Skip to content

Commit b183450

Browse files
authored
Merge pull request #1850 from danielpeter/devel
updates perturbation grid size; adds Myanmar example
2 parents 4db8521 + 5d71255 commit b183450

41 files changed

Lines changed: 219811 additions & 61442 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

EXAMPLES/applications/cmt_force_hybrid/get_stations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
np.random.seed(10)
44

5-
nsta = 10
6-
x = -1500 + np.random.rand(nsta) * 3000
7-
y = -1500 + np.random.rand(nsta) * 3000
5+
nsta = 10
6+
x = -1500 + np.random.rand(nsta) * 3000
7+
y = -1500 + np.random.rand(nsta) * 3000
88

99
fio = open("DATA/STATIONS","w")
1010
for i in range(nsta):

EXAMPLES/applications/cmt_force_hybrid/step1_get_stf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import numpy as np
2-
import matplotlib.pyplot as plt
1+
import numpy as np
2+
import matplotlib.pyplot as plt
33

44
def ricker_wavelet(t, f_c):
55
"""
@@ -18,7 +18,7 @@ def ricker_wavelet(t, f_c):
1818

1919
nt = 3000
2020
dt = 2.0e-3
21-
t = np.arange(nt) * dt
21+
t = np.arange(nt) * dt
2222

2323
NS_CMT = 10
2424
NS_FORCE = 5
@@ -32,7 +32,7 @@ def ricker_wavelet(t, f_c):
3232
fio.write("%f\n" %(stf[it]))
3333

3434
# cmt
35-
stf1 = np.cumsum(stf) * dt
35+
stf1 = np.cumsum(stf) * dt
3636
for i in range(NS_CMT):
3737
with open(f"DATA/stf.cmt.{i}.txt","w") as fio:
3838
for it in range(nt):

EXAMPLES/applications/cmt_force_hybrid/step4_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
import matplotlib.pyplot as plt
2+
import matplotlib.pyplot as plt
33

44
# load data
55
stnm = 'XA.A2.CXZ.semd'

EXAMPLES/applications/wavefield_discontinuity/plot/plot_utils_injection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def get_waveforms_from_specfem(self, fn_list, fn_stations,
219219
except Exception as e:
220220
sys.exit(f"{e}\n")
221221
self.coord_list = coord_list
222-
222+
223223
waveforms = []
224224
if t is not None:
225225
if (verbose==1): print(f'use time t0={t[0]}, dt={t[1]-t[0]}, nt={nt}\n')
@@ -250,6 +250,6 @@ def get_waveforms_from_specfem(self, fn_list, fn_stations,
250250
except Exception as e:
251251
sys.exit(f"{e}\n")
252252
self.waveforms = waveforms
253-
self.t = t
254-
255-
253+
self.t = t
254+
255+

EXAMPLES/real_world/Birch_glacier_collapse/convert_Diehletal_to_SPECFEM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def save_as_GeoCSV():
202202
header = f"""
203203
# dataset: GeoCSV2.0
204204
# created: {str(datetime.datetime.now())}
205-
# delimiter: |
205+
# delimiter: |
206206
# global_title: CentralAlp_VelocityModel_3D
207207
# global_model: CentralAlp_VelocityModel_3D_Pg_Sg_v07
208208
# global_id: CentralAlp_VelocityModel_3D_Pg_Sg_v07

EXAMPLES/real_world/Birch_glacier_collapse/download_Swiss_data.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def amplitude_correction(st,catalog,inventory):
590590

591591
# original for vis
592592
trace_org = tr.data.copy()
593-
593+
594594
# correct waveform
595595
tr.data = tr.data * correction_factor
596596

@@ -1006,14 +1006,14 @@ def add_missing_zero_traces(st):
10061006
from obspy.core.trace import Stats
10071007

10081008
complete_stream = Stream()
1009-
1009+
10101010
# Get unique station names from the stream
10111011
stations = sorted(list(set(tr.stats.station for tr in st)))
10121012

10131013
for station_name in stations:
10141014
# Extract traces for the current station
10151015
station_traces = st.select(station=station_name)
1016-
1016+
10171017
# Check for existing channels
10181018
channels = sorted(list(set(tr.stats.channel for tr in station_traces)))
10191019

@@ -1037,7 +1037,7 @@ def add_missing_zero_traces(st):
10371037
print(f" station {station_name}: adding zero trace for {channel}")
10381038
zero_data = np.zeros(num_samples, dtype=stored_trace.data.dtype)
10391039
zero_trace = Trace(data=zero_data)
1040-
1040+
10411041
# Copy relevant stats and update channel
10421042
zero_trace.stats = stored_trace.stats.copy()
10431043
#zero_trace.stats.network = stored_trace.stats.network
@@ -1059,7 +1059,7 @@ def add_missing_zero_traces(st):
10591059

10601060
# Sort the stream to ensure consistent ordering (optional but good practice)
10611061
complete_stream.sort(['station', 'channel'])
1062-
1062+
10631063
return complete_stream
10641064

10651065
#----------------------------------------------------------------------------------------

EXAMPLES/real_world/Moon_Apollo_impact/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The setup is done by the following steps:
7070
The script also modified the entries in the `interfaces.dat` to read the correct number of entries and increments.
7171
It also modifies `Mesh_Par_file` to set the correct mesh lat/lon-dimensions and lunar projection zone number (as the `UTM_PROJECTION_ZONE`).
7272

73-
> [!NOTE]
73+
> [!NOTE]
7474
> For Moon simulations, instead of the Universal Transverse Mercator (UTM) projection valid for Earth, the mesher will use a Lunar Transverse Mercator (LTM) projection (for latitudes between [-82,82] degrees) or a Lunar Polar Stereographic (LPS) at North/South pole regions. To enable these lunar projections, use a model name starting with `moon_***` (see `moon_default` in `Par_file`; or use `moon_tomo` for combining it with a tomography model).
7575
>
7676
> The zone numbers are positive for the Northern hemisphere and negative for Southern hemisphere. LTM uses zone numbers in the range +/- [1,45], LPS uses 46 for North pole and -46 for South pole regions. The script `run_get_simulation_topography.py` will output the corresponding zone number for the specified area (using its midpoint to determine the zone).

0 commit comments

Comments
 (0)