Skip to content

+Save tv%p_surf to some restart files#499

Merged
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:tv_psurf_restart
Nov 1, 2023
Merged

+Save tv%p_surf to some restart files#499
marshallward merged 2 commits into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:tv_psurf_restart

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Save tv%p_surf in the restart file when USE_PSURF_IN_EOS is true so that the diagnosed potential energy written to the ocean.stats files after a restart matches the energy written at the end of the previous run-segment in certain non-Boussinesq configurations, including the Baltic test case. Because p_surf_EOS is a non-mandatory restart field, there is no problem restarting the run from a restart file created by an older version of the model. The solutions themselves are bitwise identical. This change requires that tv%p_surf is treated as an allocatable pointer to its own array rather than being used as a pointer to the p_surf element of the fluxes or forces structures so that it can be registered as a restart field. At some point tv%p_surf could be converted into an allocatable array instead of a pointer, but this would require more extensive code refactoring. All answers are bitwise identical.

  Save tv%p_surf in the restart file when USE_PSURF_IN_EOS is true so that the
diagnosed potential energy written to the ocean.stats files after a restart
matches the energy written at the end of the previous run-segment in certain
non-Boussinesq configurations, including the Baltic test case.  Because
p_surf_EOS is a non-mandatory restart field, there is no problem restarting the
run from a restart file created by an older version of the model. The solutions
themselves are bitwise identical. This change requires that tv%p_surf is treated
as an allocatable pointer to its own array rather than being used as a pointer
to the p_surf element of the fluxes or forces structures so that it can be
registered as a restart field.  At some point tv%p_surf could be converted into
an allocatable array instead of a pointer, but this would require more extensive
code refactoring.  All answers are bitwise identical.
@Hallberg-NOAA Hallberg-NOAA added the enhancement New feature or request label Oct 11, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 11, 2023

Codecov Report

Merging #499 (a50c774) into dev/gfdl (ffa6af6) will decrease coverage by 0.01%.
The diff coverage is 9.09%.

❗ Current head a50c774 differs from pull request most recent head ce4baff. Consider uploading reports for the commit ce4baff to get more accurate results

@@             Coverage Diff              @@
##           dev/gfdl     #499      +/-   ##
============================================
- Coverage     37.52%   37.52%   -0.01%     
============================================
  Files           270      270              
  Lines         79064    79067       +3     
  Branches      14630    14634       +4     
============================================
  Hits          29671    29671              
+ Misses        43928    43926       -2     
- Partials       5465     5470       +5     
Files Coverage Δ
src/core/MOM.F90 50.67% <9.09%> (-0.16%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marshallward
Copy link
Copy Markdown
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/21195 ✔️

@marshallward marshallward merged commit 11c3f56 into NOAA-GFDL:dev/gfdl Nov 1, 2023
@Hallberg-NOAA Hallberg-NOAA deleted the tv_psurf_restart branch November 8, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants