Skip to content

Commit c088aba

Browse files
committed
updates coupling test
1 parent 78b3bf2 commit c088aba

File tree

14 files changed

+31
-22
lines changed

14 files changed

+31
-22
lines changed

.github/scripts/run_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ fi
144144
# coupling SPECFEM
145145
if [ "$TESTDIR" == "EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/" ]; then
146146
# turning off mesh output to avoid using too much memory on the test nodes
147-
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.coarse/Par_file
147+
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.regional/Par_file
148148
sed -i "s:^SAVE_MESH_FILES .*:SAVE_MESH_FILES = .false.:" DATA.local/Par_file
149-
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.coarse/meshfem3D_files/Mesh_Par_file
149+
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.regional/meshfem3D_files/Mesh_Par_file
150150
sed -i "s:^CREATE_VTK_FILES .*:CREATE_VTK_FILES = .false.:" DATA.local/meshfem3D_files/Mesh_Par_file
151151
fi
152152
# elastic halfspace, no absorbing

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ jobs:
907907

908908
- name: Run build
909909
env:
910-
TESTFLAGS: --with-mpi
910+
TESTFLAGS: --with-mpi --enable-vectorization
911911
run: ./.github/scripts/run_build.sh
912912
shell: bash
913913

EXAMPLES/applications/small_example_coupling_SPECFEM_specfem/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Couple with injection - example of hybrid method run Specfem/Specfem
22

33
This is a very small example to test the coupling between SPECFEM3D and itself.
4-
In other words, it runs a coarse simulation to create an initial wavefield for a distant event,
4+
In other words, it runs a coarse regional simulation to create an initial wavefield for a distant event,
55
and then re-injects that wavefield at the coupling boundaries of a small-scale local simulation.
66

77

@@ -11,7 +11,7 @@ This coupling example uses the following steps:
1111
1. create the coupling boundary points of the small-scale local mesh by running the mesher
1212
with the small-scale local setup in folder `DATA.local/`
1313

14-
2. run the coarse simulation using DATA.coarse/ to store the wavefield at the boundary points
14+
2. run the coarse regional simulation using DATA.regional/ to store the wavefield at the boundary points
1515
into a separate folder `COUPLING_FILES/`
1616

1717
3. run the small-scale local simulation with injecting the wavefield at the boundary points
@@ -26,16 +26,16 @@ To launch the full coupling example with the above 3 steps, type:
2626

2727
## Notes
2828

29-
* The coupling example here between coarse and small-scale mesh uses a flat top surface.
30-
This allows the coarse simulation to locate all coupling points at the exact locations.
29+
* The coupling example here between coarse regional and small-scale local mesh uses a flat top surface.
30+
This allows the coarse regional simulation to locate all coupling points at the exact locations.
3131
The resulting seismograms for stations inside the small-scale region should therefore become (almost) identical.
3232

3333
You can compare the seismograms in the output folder `OUTPUT_FILES/` from the small-scale local simulation, with the
34-
seismograms in `OUTPUT_FILES.coarse/` from the coarse simulation.
34+
seismograms in `OUTPUT_FILES.regional/` from the coarse regional simulation.
3535

36-
* In case coarse and small-scale simulation would use realistic topographic interfaces, there might be a difference
36+
* In case coarse regional and small-scale local simulation would use realistic topographic interfaces, there might be a difference
3737
in topography resolution and thus coupling points from the small-scale coupling boundary could be located slightly
38-
outside the coarser mesh. Locating those coupling points would move them closer to the nearest coarse mesh elements.
38+
outside the coarser regional mesh. Locating those coupling points would move them closer to the nearest coarse mesh elements.
3939
Storing the wavefield and re-injecting it would then lead to smaller artefacts.
4040

4141
To work-around this, one would have to make sure that the top of the small-scale mesh surfaces match exactly
@@ -44,13 +44,13 @@ To launch the full coupling example with the above 3 steps, type:
4444
For "smoother" incoming wavefields and small discrepencies between surface points, the injected wavefield however
4545
might still be good enough.
4646

47-
* To save storage space, we use `NTSTEP_BETWEEN_OUTPUT_SAMPLE == 2` in the `Par_file` of the coarse simulation.
47+
* To save storage space, we use `NTSTEP_BETWEEN_OUTPUT_SAMPLE == 2` in the `Par_file` of the coarse regional simulation.
4848
This seems to provide enough time samplings for the injection. One would have to test this out a bit for other examples.
4949
In general, the storage of the wavefield components (velocity & traction) over all coupling boundary points and over all time steps
5050
can lead to significant file sizes.
5151

5252
In any case, the stored wavefield will be (time) interpolated during the preparation stage of the small-scale local simulation,
53-
as the time steps `DT` of the coarse and small-scale simulations are likely different. Time interpolation is done by a
53+
as the time steps `DT` of the coarse regional and small-scale local simulations are likely different. Time interpolation is done by a
5454
Catmull-Rom scheme that provides cubic interpolation between time samples. This scheme seems to exhibit a good balance between accuracy
5555
and speed for these kind of simulations. Thus, storing the wavefield at lower sampling rates can be fine for many applications.
5656

@@ -67,7 +67,7 @@ to see what requirements they have.
6767
You can use the script in `utils/scripts/run_get_simulation_topography.py` to download and setup the topography surface
6868
(including one "downshifted" surface to optimize the mesh with the in-house mesher).
6969

70-
For example, to download a 3-arc seconds topography for the specified coarse region, you would type:
70+
For example, to download a 3-arc seconds topography for the specified coarse regional region, you would type:
7171
```
7272
./run_get_simulation_topography.py 7.2 47.5 8.6 48.5 --SRTM=topo3 --toposhift=10000.0 --toposcale=0.0
7373
```
@@ -100,7 +100,7 @@ to see what requirements they have.
100100
```
101101
./run_convert_IRIS_EMC_netCDF_2_tomo.py --EMC_file=IRIS_EMC/LSP-Eucrust1.0.nc --mesh_area=7.2,47.5,8.6,48.5 --maximum_depth=80.0
102102
```
103-
using the area and depth of the coarse mesh used above. This script will create the needed `tomography_model.xyz` file, which you
103+
using the area and depth of the coarse regional mesh used above. This script will create the needed `tomography_model.xyz` file, which you
104104
can for example copy into a `DATA/tomo_files/` folder.
105105

106106
Once you have a tomography file, you would adjust the `TOMOGRAPHY_PATH` parameter in `DATA/Par_file`, as well

0 commit comments

Comments
 (0)