adjtomo / seisflows

An automated workflow tool for full waveform inversion and adjoint tomography
http://seisflows.readthedocs.org
BSD 2-Clause "Simplified" License
172 stars 122 forks source link

Hotfix: Fixing incompatibility with updated SPECFEM2D parameter file #197

Closed bch0w closed 4 months ago

bch0w commented 4 months ago

Issue

An update to the SPECFEM2D parameter file (dev branch) broke the function that gets and sets velocity model parameters in the Par_file. Previously this function relied on looking for parameters above and below the model (since the model did not follow the standard key=val structure), however the parameter below the model changed so the function no longer worked. Anyways this was pretty hardcoded so was in need of an update.

Solution

Function has been updated to now look for file lines matching the structure of the SPECFEM2D velocity model. An internal function _getidx_vel_model was written to be used by both getter and setter. The SeisFlows command line tool as updated accordingly and this was tested on both master and devel branches of SPECFEM2D and retains the same behavior as before. This should work fine until SPECFEM decides to change the structure of those lines!

Relevant Issues/PRs

194 #196

ChangeLog