Atmosphere/package eval order#1473
Draft
mgduda wants to merge 3 commits into
Draft
Conversation
…l others This commit moves the call to atm_setup_packages_when (i.e., to the call to setup registry-defined packages) to the end of the atmosphere core's atm_setup_packages routine. This allows any modifications to namelist variables that are applied by earlier package setup logic to be visible to the registry-defined package logic. In particular, this allows changes to physics namelist options for physics suites and physics schemes to be visible to the registry-defined packages. At present, the only registry-defined package in the atmosphere core that references physics namelist options is the 'sfclayer' package, and the conversion of suite-defined physics options (e.g., config_sfclayer_scheme) to the actual names of physics options will not alter the logic of the 'sfclayer' package. Accordingly, the changes in this commit will have no impact on the model.
…package This commit simplifies the logic defined by the 'active_when' attribute for the atmosphere core's 'sfclayer' registry-defined package. Since registry-defined packages are set up after the call to physics_namelist_check, which happens as part of the broader physics package setup, the 'config_sfclayer_scheme' namelist option can be assumed to be any of the valid surface layer schemes, or 'off', and there is no need to consider the possibility that 'config_sfclayer_scheme' is set to 'suite'.
… defined Since the 'sfclayer' package refers to physics namelist options that only exist if MPAS-A is being compiled with it's stand-alone physics options, the 'sfclayer' package should only be defined in the Registry.xml file for the atmosphere core when DO_PHYSICS is defined.
abishekg7
reviewed
Jun 16, 2026
|
|
||
| #endif | ||
|
|
||
| ierr = atm_setup_packages_when(configs, packages) |
Collaborator
There was a problem hiding this comment.
Not sure if users/community are expected to add new logic in this function, but adding a brief comment about this call needing to follow any new logic might be useful.
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 PR incorporates several small modifications to the registry-defined package logic processing in the atmosphere core, especially concerning the
sfclayerpackage, ultimately allowing for improved evaluation of physics namelist options in package logic.