Skip to content

Make uhtr_resolved allocatable#430

Open
Hallberg-NOAA wants to merge 1 commit into
NCAR:dev/ncarfrom
Hallberg-NOAA:allocatable_uhtr_resolved
Open

Make uhtr_resolved allocatable#430
Hallberg-NOAA wants to merge 1 commit into
NCAR:dev/ncarfrom
Hallberg-NOAA:allocatable_uhtr_resolved

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown

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.

  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 gustavo-marques self-requested a review May 12, 2026 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants