Generate NZCVM velocity model configurations from a realisation - #142
Draft
lispandfound wants to merge 1 commit into
Draft
Generate NZCVM velocity model configurations from a realisation#142lispandfound wants to merge 1 commit into
lispandfound wants to merge 1 commit into
Conversation
lispandfound
force-pushed
the
nzvm/nzcvm-config
branch
from
September 2, 2026 02:23
c38791a to
640c88d
Compare
lispandfound
force-pushed
the
nzvm/nzcvm-config
branch
from
September 2, 2026 02:52
640c88d to
70124e9
Compare
`create-nzvm-input` writes the config `nzcvm generate` consumes. One
realisation can produce several distinct velocity models, along two
independent axes:
--format sw4 | emod3d the grid the model is sampled onto: a
mesh-refined SW4 grid written as an sfile,
or a uniform EMOD3D binary grid
--layers full | tomography the layer stack queried to fill it: the
whole thing (basins, coastline, offshore,
Ely GTL taper) or just the background
tomography and the numerical clamps, which
is the reference no-bells-and-whistles model
Splitting those two axes is the point: comparing a full model against a
tomography-only one on the *same* grid is how a basin's contribution is
isolated, and it should not require hand-editing a config.
For SW4 the model is padded by more than the grid is -- one supergrid
width, as `create-sw4-input` uses, plus a few grid points of slack --
so SW4 never queries outside the sfile.
`test_model_padding_contains_the_padded_grid` asserts that ordering
directly, because if it ever inverts the symptom is a solver reading off
the end of the model rather than an error.
The `nzcvm` realisation section carries the layer stack as nzcvm's own
`LayerConfig` objects and the DEM surface as a `Path`, which is what the
`path_serialiser` added at the bottom of this stack exists to write.
The container image installs nzcvm explicitly. It is a bare requirement
resolved through `[tool.uv.sources]`, which pip does not read, so
`pip install workflow` alone cannot find it. The other git-sourced
dependencies are PEP 508 direct references in `dependencies` and pip
resolves those itself.
Blocked on an nzcvm release: this makes nzcvm a hard import of
`workflow.schemas`, so every workflow install pulls it in, not just the
SW4 path.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lispandfound
force-pushed
the
nzvm/nzcvm-config
branch
from
September 4, 2026 01:44
70124e9 to
eab1faf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create-nzvm-inputwrites the confignzcvm generateconsumes. Onerealisation can produce several distinct velocity models, along two
independent axes:
--format sw4 | emod3d the grid the model is sampled onto: a
mesh-refined SW4 grid written as an sfile,
or a uniform EMOD3D binary grid
--layers full | tomography the layer stack queried to fill it: the
whole thing (basins, coastline, offshore,
Ely GTL taper) or just the background
tomography and the numerical clamps, which
is the reference no-bells-and-whistles model
Splitting those two axes is the point: comparing a full model against a
tomography-only one on the same grid is how a basin's contribution is
isolated, and it should not require hand-editing a config.
For SW4 the model is padded by more than the grid is -- one supergrid
width, as
create-sw4-inputuses, plus a few grid points of slack --so SW4 never queries outside the sfile.
test_model_padding_contains_the_padded_gridasserts that orderingdirectly, because if it ever inverts the symptom is a solver reading off
the end of the model rather than an error.
The
nzcvmrealisation section carries the layer stack as nzcvm's ownLayerConfigobjects and the DEM surface as aPath, which is what thepath_serialiseradded at the bottom of this stack exists to write.The container image installs nzcvm explicitly. It is a bare requirement
resolved through
[tool.uv.sources], which pip does not read, sopip install workflowalone cannot find it. The other git-sourceddependencies are PEP 508 direct references in
dependenciesand pipresolves those itself.
Blocked on an nzcvm release: this makes nzcvm a hard import of
workflow.schemas, so every workflow install pulls it in, not just theSW4 path.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Stack created with GitHub Stacks CLI • Give Feedback 💬