Skip to content

35docs(examples): add LOH1 DRM example and refresh validation figures - #39

Open
ppalacios92 wants to merge 3 commits into
jaabell:masterfrom
ppalacios92:pr-35-loh1-validation
Open

35docs(examples): add LOH1 DRM example and refresh validation figures#39
ppalacios92 wants to merge 3 commits into
jaabell:masterfrom
ppalacios92:pr-35-loh1-validation

Conversation

@ppalacios92

Copy link
Copy Markdown
Contributor

Summary

Adds a runnable DRM script for the SCEC LOH.1 benchmark under
examples/08_drm, regenerates the three LOH1 validation notebooks together
with their committed figures so the stored output matches what the current code
produces, and adds a .gitignore rule for the simulation outputs these runs
write.

Dependencies

Prerequisite Why
pr-30-examples Required. Introduces the numbered topic layout, including examples/08_drm/ and examples/12_validation/notebooks/. Every file this PR modifies is added by that PR; without it this branch has nothing to apply to.

One related-but-not-blocking note: drm_loh1.py writes H5DRM through
DRMHDF5StationListWriter, which already exists upstream, so the example runs
against current master. pr-14b-drm-hdf5-writer refines that same writer.
The two do not conflict, but if pr-14b lands first the regenerated H5DRM
output is the better one to compare against.

Everything else the example imports is already merged: Gaussian
(pr-07-gaussian), DRMBox (pr-06a-drmbox), SourcePlot
(pr-06b-plotting), Station (pr-02-station), CrustModel (pr-04-crust).

What changed

New: examples/08_drm/drm_loh1.py

An end-to-end DRM run on the LOH.1 layer-over-half-space benchmark: builds the
two-layer crust, places the point source with a Gaussian STF, then loops over
the selected stations running a DRMBox at each and writing its own H5DRM
through DRMHDF5StationListWriter. MPI-aware through mpi4py, so it runs
serially or under mpirun unchanged. This gives 08_drm a worked example
against a published benchmark rather than only synthetic geometry.

Refreshed: LOH1 validation notebooks

LOH1_validation.ipynb, LOH1_greens_functions.ipynb and
example_LOH1_gf.ipynb re-executed against current master. The committed
outputs had drifted from what the code now produces, so a reader running them
saw figures that did not match the ones in the repository.

Refreshed: 17 figures

Regenerated from those notebook runs — crust layers and velocity profiles,
source geometry and STF, Green's function components and tensor, responses,
convolution check, manual seismograms, and the LOH1 validation comparison
itself. Four under examples/08_drm/notebooks/, thirteen under
examples/12_validation/notebooks/.

Note these are committed with their executed outputs embedded, matching how the
rest of examples/ already stores its notebooks.

.gitignore: simulation outputs

*.h5drm
*.h5drm.vmax.json
examples/**/drm_*_output/

A single LOH1 DRM run writes roughly 2.7 GB across two .h5drm files and their
Green's function databases. It is fully reproducible by running the example, so
it does not belong in the repository. The pattern is scoped to examples/ for
the output directories so it cannot silently swallow a user's own results
elsewhere in a working tree.

How to verify

python examples/08_drm/drm_loh1.py            # serial
mpirun -n 4 python examples/08_drm/drm_loh1.py  # parallel

Then re-run the notebooks under examples/12_validation/notebooks/ and confirm
the regenerated figures match the committed ones. git status should stay
clean afterwards — that is the point of the .gitignore rule.

Scope

Examples, notebooks and figures only. No library code is touched.

Move flat examples into numbered folders (01_crustmodel..14_SFSI), archive originals under legacy_examples/, add run_all_smoke.py, drop obsolete example6/view-dk/example0_fig1.
The example DRM runs write multi-gigabyte .h5drm files and companion
output folders that are fully reproducible from the example scripts.
Keep them out of the repository.
Adds a runnable LOH1 DRM script under examples/08_drm and regenerates
the LOH1 validation notebooks together with their crust, source and
seismogram figures so the committed output matches the current code.
@ppalacios92 ppalacios92 changed the title Pr 35 loh1 validation 35docs(examples): add LOH1 DRM example and refresh validation figures Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant