SCM uninitialized memory fixes #7888
Open
+8
−22
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 addresses an issue that arises when reading variables from an IOP file with fill_ends = false (the default for many fields). In these cases, values near the model top often remain uninitialized because the model only fills pressure levels for which data exist. To ensure consistent initialization, this PR explicitly zero-initializes all variables before reading each field where fill_ends are not applied. Required state variables (T, Q, U, and V) remain unchanged in behavior, as they always apply fill_ends automatically.
In addition, this PR removes the obsolete code block that computed large-scale vertical velocity on the interface grid. That logic was only needed for the Eulerian dy-core version of the SCM and is no longer required.
Also, fix a naming issue where q1obs was being read in where it should be q2obs. This bug has no effect on any of our cases since q2obs is only read in as a diagnostic.
Closes issue #6189