Add ndrop nsubmix diagnostics - #8645
Draft
susburrows wants to merge 1 commit into
Draft
Conversation
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.
Add exact ndrop explicit mixing count diagnostics without changing the physics.
Summary
Add three per-column EAMxx output fields:
ndrop_nsubmix: count used by the most recent MAMAci call.ndrop_sum_nsubmix: sum across MAMAci calls in the enclosing physics step.ndrop_max_nsubmix: maximum across those calls.MAM4xx returns the integer that directly controls the existing explicit mixing loop. EAMxx records the latest value and physics-step summaries within the existing device kernel, without a per-call host copy, MPI reduction, or separate reset kernel.
All three fields are initialized to zero. Before the first ACI call, zero means that the count has not yet been calculated.
Exactness and failure behavior
Atmospheric history output defaults to single precision, including for double-precision model builds. An always-active check therefore limits each count and accumulated sum to 16,777,216 (2^24) in all builds. Every accepted integer remains exact both in the model's
Realfields and in default history output. Invalid nonpositive counts and aggregates above the exact limit fail loudly.Dependency
Depends on eagles-project/mam4xx#577, which exposes the exact loop count without changing MAM4xx physics.
Validation
Scope
This diagnostic-only change does not alter the computed substep count, loop bounds, equations, limiters, process ordering, state updates, or production physics.