Closed bch0w closed 2 years ago
The files changed do not require a buildbot test. The maintainers can commit these changes.
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: @.***>
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:
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).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:
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.
For reference here is a comparison of the forward wavefield image at time step 2000 (~72s). First for the updated model:
And for the original model: