Make uhtr_resolved allocatable#430
Open
Hallberg-NOAA wants to merge 1 commit into
Open
Conversation
Changed the recently added `uhtr_resolved` and `vhtr_resolved` arrays in the MOM_control_struct from `ALLOCABLE_` arrays into allocatable arrays, and changed the allocate and deallocate calls for these arrays accordingly. In dynamic memory mode, the macros that were being used resolve to the revised code and there is essentially no difference. However, in static memory mode this change will prevent memory from being assigned to these arrays when the diagnostics they enable are not being used. All answers and diagnostics are bitwise identical, but this commit will reduce the memory footprint of MOM6 in static memory mode for most cases.
gustavo-marques
approved these changes
May 12, 2026
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.
Changed the recently added
uhtr_resolvedandvhtr_resolvedarrays in the MOM_control_struct fromALLOCABLE_arrays into allocatable arrays, and changed the allocate and deallocate calls for these arrays accordingly. In dynamic memory mode, the macros that were being used resolve to the revised code and there is essentially no difference. However, in static memory mode this change will prevent memory from being assigned to these arrays when the diagnostics they enable are not being used. All answers and diagnostics are bitwise identical, but this commit will reduce the memory footprint of MOM6 in static memory mode for most cases.