Decoupling HDF5 to EMOD3D format conversion from from generate_velocity_model#101
Merged
sungeunbae merged 25 commits intopegasusfrom Apr 1, 2026
Merged
Conversation
…ommands Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/9633754d-83a7-4c4e-aafd-0714bd366c75 Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor run_nzcvm into separate commands for HDF5 generation
Split velocity model generation into separate checkpointed Cylc steps
Mar 31, 2026
Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/d3d34c6d-6b1e-4488-9140-71842281e8ad Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
Copilot
AI
changed the title
Split velocity model generation into separate checkpointed Cylc steps
Deduplicate realisation setup between generate_velocity_model and generate_velocity_model_hdf5
Mar 31, 2026
…_velocity_model_hdf5() Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/0734c2e6-6b40-4570-8e34-328c03f1fbb2 Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
Copilot
AI
changed the title
Deduplicate realisation setup between generate_velocity_model and generate_velocity_model_hdf5
Add Mar 31, 2026
emod3d_convert switch to run_nzcvm() to eliminate duplication with generate_velocity_model_hdf5()
…df5 CLI commands Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/6426afbd-1729-4121-ba7e-9b318ded0171 Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
Copilot
AI
changed the title
Add
Add Mar 31, 2026
emod3d_convert switch to run_nzcvm() to eliminate duplication with generate_velocity_model_hdf5()generate_velocity_model_hdf5() and convert-velocity-model-hdf5 CLI to expose HDF5→EMOD3D split to Singularity
…command reference Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/c68f4200-ca6d-432c-8d71-1b53fee120db Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
Copilot
AI
changed the title
Add
Expose HDF5→EMOD3D conversion as a standalone CLI command for Cylc split workflow
Mar 31, 2026
generate_velocity_model_hdf5() and convert-velocity-model-hdf5 CLI to expose HDF5→EMOD3D split to Singularity
Copilot
AI
changed the title
Split velocity model generation into HDF5 and EMOD3D conversion Cylc tasks
Remove emod3d_convert switch from generate_velocity_model — HDF5-only output
Mar 31, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated workflow/CLI step to convert NZCVM-produced velocity model HDF5 output into EMOD3D binary format, removing the embedded conversion logic from generate_velocity_model and updating workflow configuration accordingly.
Changes:
- Refactors
generate-velocity-modelto stop doing HDF5→EMOD3D conversion inline (intended to leave conversion to a new dedicated step). - Adds a new
convert-vm-hdf5-to-emod3dTyper CLI script and registers it as a project script entrypoint. - Updates the Cylc flow to run the new conversion step as a separate task.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
workflow/scripts/generate_velocity_model.py |
Removes inline HDF5→EMOD3D conversion/move behavior from the NZCVM path. |
workflow/scripts/convert_vm_hdf5_to_emod3d.py |
Adds a standalone CLI wrapper around velocity_modelling.tools.convert_hdf5_to_emod3d. |
pyproject.toml |
Registers the new CLI command entrypoint. |
cylc/flow.cylc |
Adds a new conversion task and changes the velocity model generation invocation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…tence check; fix nproc in cylc Agent-Logs-Url: https://github.com/ucgmsim/workflow/sessions/46e17c6d-85c9-4369-ba43-c3a94218ffd3 Co-authored-by: sungeunbae <466989+sungeunbae@users.noreply.github.com>
…:ucgmsim/workflow into copilot/refactor-run-nzcvm-into-commands
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…:ucgmsim/workflow into copilot/refactor-run-nzcvm-into-commands
lispandfound
approved these changes
Apr 1, 2026
lispandfound
requested changes
Apr 1, 2026
lispandfound
approved these changes
Apr 1, 2026
AndrewRidden-Harper
approved these changes
Apr 1, 2026
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.
This pull request introduces a new workflow step to convert velocity model HDF5 files to EMOD3D binary format, decoupling this conversion from the velocity model generation.
It also updates the workflow configuration and command-line interface to support this new step.
Additionally, the velocity model generation script is refactored to remove the embedded conversion logic, streamlining responsibilities and improving maintainability.
Workflow enhancements:
convert_vm_hdf5_to_emod3dworkflow step incylc/flow.cylcto convert HDF5 velocity models to EMOD3D format as a separate, parallelized step (using 4 threads)convert-vm-hdf5-to-emod3dcommand in the CLI by updatingpyproject.toml.New script and CLI command:
Introduced the
workflow/scripts/convert_vm_hdf5_to_emod3d.pyscript, providing a standalone CLI for converting HDF5 velocity models to EMOD3D binary files, with logging and documentation.Relaxed the existence check for the
velocity_model_outputargument ingenerate_velocity_modelto allow for pre-existing output directories.