Skip to content

Refactor ensemble generator for flexibility#940

Open
matthewhoffman wants to merge 8 commits intoMPAS-Dev:mainfrom
matthewhoffman:landice/ensemble-gen-refactor
Open

Refactor ensemble generator for flexibility#940
matthewhoffman wants to merge 8 commits intoMPAS-Dev:mainfrom
matthewhoffman:landice/ensemble-gen-refactor

Conversation

@matthewhoffman
Copy link
Member

@matthewhoffman matthewhoffman commented Mar 8, 2026

This PR refactors the landice/ensemble_generator test case to support two new major enhancements:

  • support for multiple 'ensemble_templates' that contain the cfg, namelist, streams, and albany input files for different studies. This allows us to keep the configuration files for multiple studies in compass without conflicting with each other.
  • the ability to make any MALI namelist option a perturbed parameter without any compass code modifications. This is accompanied by an overhaul of how parameters are specified and a general refresh of the cfg files. Details of the new format are in the docs.

Checklist

  • User's Guide has been updated
  • Developer's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

Generalize ensemble generator to support multiple model configurations used
for different studies.
* Introduced a new configuration module to handle model configurations
  for ensemble generation.
* Updated `BranchRun` and `EnsembleMember` classes to accept a
  `resource_module` parameter for dynamic configuration loading.
* Created default configuration files for branch and spinup ensembles,
  including necessary namelists and stream definitions.
* Modified the main ensemble generator configuration to streamline the
  setup process and improve clarity.
* Enhanced error handling for missing configuration sections and
  options.
* Updated the `SpinupEnsemble` class to utilize the new configuration
  methods for improved modularity and maintainability.
Variations on the word configuration are already too widespread
so this change should reduce confusion.
The primary new functionality is the ability to support any
namelist option as a parameter rather than only pre-defined
parameters.  The refactor also simplifies how parameter values
are specified and puts all parameters in a dedicated cfg section.
More details on the format are included in the updated docs.
Remove unnecessary extra section level,
Separate spinup_ensemble options from options
general to the whole test group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant