SPECFEM / specfem3d_globe

SPECFEM3D_GLOBE simulates global and regional (continental-scale) seismic wave propagation.
GNU General Public License v3.0
90 stars 95 forks source link

UNDO_ATTENUATION could be changed to avoid having to round the number of time steps to the next multiple #239

Closed komatits closed 9 years ago

komatits commented 9 years ago

UNDO_ATTENUATION needs the total number of time steps to be a multiple of NT_DUMP_ATTENUATION, and NT_DUMP_ATTENUATION is computed by the code from MEMORY_INSTALLED_PER_CORE_IN_GB (which is defined in DATA/Par_file).

Thus, if one changes MEMORY_INSTALLED_PER_CORE_IN_GB in the Par_file, UNDO_ATT will slightly change the total number of time steps to round it to the next multiple of the new value of NT_DUMP_ATTENUATION that it will compute.

If needed it would not be too difficult to allow for cases in which NSTEP is not a multiple of NT_DUMP_ATTENUATION, it would just mean handling a different (smaller) number of time steps for the last time slice to handle at the end of the simulation (i.e. also the beginning of the time-reversed simulation) because the last slice would have fewer time steps.

Feasible, not too difficult, but not done yet. For now the code instead increases the number of time steps to the next multiple of NT_DUMP_ATTENUATION so that all time slices to handle have the exact same length.

komatits commented 9 years ago

Done by Daniel Peter @danielpeter in pull request https://github.com/geodynamics/specfem3d_globe/pull/354 : "updates UNDO_ATTENUATION to handle arbitrary NSTEP lengths; uses same NSTEP length for undoing/non-undoing attenuation simulations"