Split horizontal mesh and initial state inputs for ocean tasks#544
Draft
xylar wants to merge 39 commits intoE3SM-Project:mainfrom
Draft
Split horizontal mesh and initial state inputs for ocean tasks#544xylar wants to merge 39 commits intoE3SM-Project:mainfrom
xylar wants to merge 39 commits intoE3SM-Project:mainfrom
Conversation
Collaborator
Author
|
This replaces #527 |
xylar
commented
Apr 18, 2026
Comment on lines
+12
to
+13
| InitialVertCoord: | ||
| Filename: {{ init_filename }} |
Collaborator
Author
There was a problem hiding this comment.
For now at least, we don't attempt to separate the vertical coordinate into its own file because:
- it's dynamic in time and
- MPAS-Ocean doesn't support this
4fe1a4a to
9daf3e9
Compare
Add config-driven local filenames for the horizontal mesh and initial condition, plus helper methods for staging them in OceanModelStep. Also centralize MPAS/Omega stream filename updates, expand MPAS-to-Omega horizontal mesh mappings, and add a helper for writing state files without horizontal mesh fields.
Cover placeholder filename resolution for model inputs, shared stream filename replacements, and writing Omega initial-state files without horizontal mesh variables.
Write the initial-state file without horizontal mesh variables and stage the culled mesh explicitly for forward runs. This keeps the family aligned with the shared split mesh/init model without changing its analysis and viz workflows.
Stage the culled mesh and initial state as separate model inputs and stop writing horizontal mesh fields into the initial-state file. This also removes the old OmegaMesh symlink workaround for this family.
Write the gyre initial state without horizontal mesh fields, stage the culled mesh explicitly for the forward step, and drop the old OmegaMesh compatibility symlink while keeping the coeffs input for Omega runs.
Write cosine-bell initial states without horizontal mesh fields and remove the old OmegaMesh symlink workaround from forward runs. The family still stages reconstruction coeffs for Omega, but now relies on the shared explicit mesh input path.
Write the geostrophic initial-state file without horizontal mesh variables so the family can rely on the shared explicit mesh input path during forward runs and visualization.
Pass the culled mesh explicitly through the shared ice-shelf ssh-adjustment workflow, write the initial state without horizontal mesh variables, and stage separate mesh/init inputs for the forward step. This keeps the iterative ssh-adjustment path aligned with the split mesh/init model.
Write the inertial-gravity-wave initial-state file without horizontal mesh variables so the family can use the shared explicit mesh staging path cleanly.
Write the internal-wave initial state without horizontal mesh fields, stage the culled mesh explicitly for forward runs, and update visualization to read mesh geometry from the dedicated mesh file instead of the initial state.
7af28c7 to
e5cb093
Compare
Write the manufactured-solution initial state without horizontal mesh variables and remove the old OmegaMesh symlink workaround from forward runs while keeping the Omega coeffs input.
Write merry-go-round initial states without horizontal mesh variables and remove the old OmegaMesh symlink workaround from forward runs while preserving the Omega coeffs input.
Write the overflow initial state without horizontal mesh variables and stage the culled mesh explicitly for forward runs so the family follows the shared split mesh/init workflow.
Write the seamount initial state without horizontal mesh variables and stage the culled mesh explicitly for forward runs so the family uses separate mesh and init inputs.
Write the single-column initial state without horizontal mesh variables, stage the culled mesh explicitly for forward runs, and update the Ekman analysis to read edge geometry from the dedicated mesh file.
Write sphere-transport initial states without horizontal mesh variables and remove the old OmegaMesh symlink workaround from forward runs while preserving the Omega coeffs input.
Write the initial state without horizontal mesh variables, stage the base mesh explicitly for forward runs, and rework the local-time-step path so LTS region labeling reads mesh and state separately. The LTS input stream now follows the configured init filename instead of relying on the old combined file convention.
Expose the new public helper methods in the autosummary source so the generated developer API includes the mesh/state split support. - add Ocean initial-state helper entries - add OceanIOStep and OceanModelStep split-input helpers
Explain the staged ocean-model input filenames from a user perspective and document the new [ocean_model_files] config section. - add the default mesh/init filenames to config-file docs - note when users may want to override them for model-specific workflows
Refresh the framework guidance and examples so new ocean tasks follow the split mesh/init pattern consistently. - document OceanIOStep.write_initial_state_dataset() - document OceanModelStep helpers for staging mesh and init files - update YAML and code examples to use mesh.nc separately from init.nc
This module enables various types of computations of the Coriolis paramers at cells, edges and vertices.
Write the baroclinic_channel Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the barotropic_channel Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the barotropic_gyre beta-plane Coriolis fields to culled_mesh.nc instead of keeping them only on the initial-state dataset.
Write a task-local base_mesh.nc with Coriolis fields in cosine_bell and stage that mesh from the init step in forward runs.
Write task-local runtime meshes for external_gravity_wave and stage the correct mesh input in both global and local time-stepping flows.
Write a task-local base_mesh.nc with rotated-sphere Coriolis fields in geostrophic and stage that mesh from the init step in forward runs.
Write the ice_shelf_2d Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the inertial_gravity_wave Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the internal_wave Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the manufactured_solution Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write zero Coriolis fields to culled_mesh.nc in merry_go_round instead of carrying them only in the initial-state dataset.
Write zero Coriolis fields to culled_mesh.nc in overflow instead of carrying them only in the initial-state dataset.
Write the seamount Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write the single_column Coriolis fields to culled_mesh.nc instead of carrying them only in the initial-state dataset.
Write a task-local base_mesh.nc with Coriolis fields in sphere_transport and stage that mesh from the init step in forward runs.
ca5044b to
a07e33e
Compare
4 tasks
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.
Summary
This PR refactors Polaris ocean tasks to stage the horizontal mesh and initial-state files separately, rather than relying on a single combined input file. It also makes the runtime horizontal mesh the canonical home for the Coriolis fields
fCell,fEdge, andfVertex, which are required by both MPAS-Ocean and newer Omega workflows.This work is needed to support the
HorzMeshInstream E3SM-Project/Omega#382, where the horizontal mesh filename can be configured independently and must include the expected mesh-side Coriolis fields.What Changed
OceanModelStepfCell,fEdge, andfVertexon mesh datasetsbase_mesh.nc,culled_mesh.nc, orlts_mesh.nc, depending on the task) instead of existing only on the in-memory initial-state datasetOmegaMesh.ncOceanIOStepOmega Motivation
With E3SM-Project/Omega#382, Omega can now read the horizontal mesh from a configurable NetCDF file via
HorzMeshIn. This PR updates Polaris so it can take advantage of that capability by:fCell,fEdge, andfVertex, which Omega expects as horizontal-mesh inputsOmegaMesh.ncfilenameCoriolis Motivation
Both MPAS-Ocean and Omega expect
fCell,fEdge, andfVertexto be present on the horizontal mesh. In Polaris, tasks previously added these fields to the initial condition. However, with the new approach of splitting the horizontal-mesh variables from the initial condition, they need to live in the horizontal mesh and not the initial condition.This PR fixes that by moving these fields to the mesh file used in forward runs. The implementation preserves each task's existing Coriolis semantics, including:
f-plane casesbeta-plane casesNotes
The refactor preserves each task's existing choice of mesh source (e.g.
base_mesh.ncvs.culled_mesh.ncvs.lts_mesh.nc), so periodic vs. non-periodic mesh selection remains task-specific and is not changed by this PR.The Coriolis update also preserves each task's existing Coriolis definition; this PR changes where those fields are written, not the physics each task uses.
Omega still defaults
HorzMeshIn,InitialVertCoord, andInitialStatetoOmegaMesh.ncinDefault.yml, and several Omega tests/docs still assume that filename. Polaris now overrides the filenames explicitly, but broader Omega testing (especially CTests) may still benefit from exercising truly separate mesh and init files. It probably makes sense to make this split when we renameLayerThicknesstoPseudoThickness, since new meshes and initial conditions will be needed in any case.Validation
pre-commiton the changed filesChecklist
api.md) has any new or modified class, method and/or functions listedTestingcomment in the PR documents testing used to verify the changes