SPECFEM / specfem2d

SPECFEM2D simulates forward and adjoint seismic wave propagation in two-dimensional acoustic, (an)elastic, poroelastic or coupled acoustic-(an)elastic-poroelastic media, with Convolution PML absorbing conditions.
https://specfem.org
GNU General Public License v3.0
203 stars 147 forks source link

Update Tape2007 example checkerboard model #1150

Closed bch0w closed 2 years ago

bch0w commented 2 years ago

This PR updates the Tape2007 example legacy checkerboard model (model_velocity.dat_checker) and reference files (REF_SEIS/jpg, .semd, output.log) due to a file structure bug causing the model to be read in incorrectly by xspecfem2d.

The original velocity model defines coordinates (X, Z) and a model (rho, vp, vs), which is a smooth checkerboard with alternating low and high velocity perturbations. When plotted directly, the input model looks like:

tape2007_checkerboard_expected

However, when read in by xspecfem2d (more specifically: src/specfem2d/read_external_model.f90), specfem ignores the input file coordinate system and assumes an internal coordinate system based on line numbers.

There seems to be a mismatch between the input coordinate system and the internal coordinate, leading to a jumbled output model. This is visualized by plotting the output model when the Par_file parameter SAVE_MODEL=='gll' (also tried with 'ascii' format .dat file, same result).

tape2007_checkerboard_gll_model

I fixed the input model by matching the order of the internal coordinate system with the values defined by the input model. The relevant code is here: https://github.com/bch0w/simutils/blob/master/specfem/utils/rebuild_tape2007_checkerboard.py

The newly outputted velocity model now matches the expected input model:

tape2007_updated_checkerboard_gll

The new model (updated) shows a smoother waveform coda when compared to the jumbled input (original) and the reference seismograms (ref_seis), which is what I would expect from a very smooth checkerboard model.

tape2007_waveform_comps

For reference here is a comparison of the forward wavefield image at time step 2000 (~72s). First for the updated model:

forward_image000002000

And for the original model:

forward_image0002000

buildbot-princeton commented 2 years ago

The files changed do not require a buildbot test. The maintainers can commit these changes.

danielpeter commented 2 years ago

accept

On 1 Sep 2022, at 2:01 AM, buildbot-princeton @.**@.>> wrote:

The files changed do not require a buildbot test. The maintainers can commit these changes.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/geodynamics/specfem2d/pull/1150*issuecomment-1233526177__;Iw!!Nmw4Hv0!2_WqanvanC6rBhn3OKPydiAQYmgrm8_ynYz4-tazqUMixv0TY_P-dePGdqCNe0F0qlGp_tyWcw0Hn92EY2cPUOr4eF_15ao$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABMLXWMQI65B2XACGAPEXPTV37P5PANCNFSM6AAAAAAQB2EYZM__;!!Nmw4Hv0!2_WqanvanC6rBhn3OKPydiAQYmgrm8_ynYz4-tazqUMixv0TY_P-dePGdqCNe0F0qlGp_tyWcw0Hn92EY2cPUOr43RSXquI$. You are receiving this because you are subscribed to this thread.Message ID: @.***>