Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOM6: +(*)Add option to use time-integrated barotropic continuity #1161

Merged
merged 10 commits into from
Jul 23, 2020

Conversation

Hallberg-NOAA
Copy link
Collaborator

MOM6: +(*)Add option to use time-integrated barotropic continuity

This PR includes a set of changes that introduce the new option to use the
time integrated barotropic velocities to determine the time integrated
barotropic transports that update the sea surface height or bottom pressure
directly from their initial condition. This should give better behavior in
certain cases with vigorous gravity waves impinging on topography, and it should
improve the consistency between split and unsplit solutions. This new option is
enabled when the new runtime parameter INTEGRAL_BT_CONTINUITY=True, SPLIT=True
and USE_BT_CONT_TYPE=True. All of the test cases with a split time stepping
scheme give altered but qualitatively similar answers when the new option is
enabled.

In addition there is one change setting a maximum value to the viscous
coupling coefficients so that they will always be representable as 32-bit
floating point numbers in diagnostics; this could conceivably change answers in
some cases, but it does not in the MOM6-examples test suite and I think such
changes to be very unlikely in practice. With this change, some configurations
and diag_tables that were failing before now work again as intended.

By default all answers in all tested cases are bitwise identical, but there
are changes to the entries in the MOM_parameter_doc files. The commits in this
PR include:

  Set a hard-coded maximum value of CS%a_u and CS%a_v of 1e37 m s-1 so that
these can be represented in diagnostics that are written with 32-bit floating
point numbers.  These values are so large that all answers are bitwise identical
in the MOM6-examples test cases, but it is possible that answers could change.
  Eliminated the unused variables CS%uhbt_IC and CS%vhbt_IC from the barotropic
control structure and from the MOM6 restart files.  Also placed a logical test
for CS%Gradual_BT_ICs around all references to CS%ubt_IC and CS%vbt_IC and
eliminated these variables from the restart files when they would not be used.
Additionally some unused arguments were removed from internal subroutines and
some spelling or index case errors were corrected.  All answers are bitwise
identical, but the MOM6 restart files have fewer variables and some unused
entries in the MOM_parameter_doc files have changed.
  Add the new runtime parameter INTEGRAL_BT_CONTINUITY which enables the use of
the time-integrated barotropic velocity to determine the cumulative transport
since the start of the barotropic stepping.  This new option works in all of the
MOM6-examples test cases with a SPLIT=True and USE_BT_CONT_TYPE=True.  By
default all answers are bitwise identical, but there are changes to the entries
in the MOM_parameter_doc files.
  Added the new subroutines find_duhbt_dubt_int and find_dvhbt_dvbt_int, and use
the time-integrated forms to set the inverse face area, the transport correction
for consistency between the transport from the initial barotropic velocity and
the summed layer transports, and the maximum corrective mass source when
INTEGRAL_BT_CONT=True.  Also only log BT_CONT_CORR_BOUNDS when BOUND_BT_CORR is
set to true.  By default, all answers are bitwise identical, but there are minor
changes to the entries in the MOM_parameter_doc files.
  Added code to implement new integral_BT_cont options within the barotropic
open boundary condition code.  A number of new arguments were added to
apply_velocity_OBCS.  In addition, the handling of updates to ubt_sum, uhbt_sum
and ubt_wtd with open boundary conditions were simplified.  There are minor
answer changes if INTEGRAL_BT_CONTINUITY=True, but all answers in the existing
MOM6-examples tess cases are bitwise identical.
  Revised the dimensions of the entries in the local_BT_Cont types when
INTEGRAL_BT_CONT=True for efficiency and to enable find_uhbt and other routines
to be used regardless of the value of INTEGRAL_BT_CONT.  Some arguments that are
no longer needed have been removed from some subroutines. All answers are
bitwise identical in the MOM6-examples test suite, but changes to the order of
arithmetic leads to changes from the previous version when
INTEGRAL_BT_CONT=True, and the rescaling is controlled via new optional
arguments to internal routines.
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2020

Codecov Report

Merging #1161 into dev/gfdl will decrease coverage by 0.27%.
The diff coverage is 32.22%.

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1161      +/-   ##
============================================
- Coverage     46.08%   45.81%   -0.28%     
============================================
  Files           214      224      +10     
  Lines         69399    70244     +845     
============================================
+ Hits          31984    32179     +195     
- Misses        37415    38065     +650     
Impacted Files Coverage Δ
...g_src/external/GFDL_ocean_BGC/FMS_coupler_util.F90 0.00% <0.00%> (ø)
...fig_src/external/GFDL_ocean_BGC/generic_tracer.F90 0.00% <0.00%> (ø)
...c/external/GFDL_ocean_BGC/generic_tracer_utils.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/kdtree.f90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_core.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/ocean_da_types.F90 0.00% <0.00%> (ø)
config_src/external/ODA_hooks/write_ocean_obs.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MESO_surface_forcing.F90 0.00% <0.00%> (ø)
config_src/solo_driver/MOM_driver.F90 68.72% <ø> (ø)
config_src/solo_driver/user_surface_forcing.F90 0.00% <0.00%> (ø)
... and 144 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e55ef75...3c92d4c. Read the comment docs.

  Modified recent additions to avoid using uninitialized arrays.  This was not
detected in tests of the previous PR because the arrays that were created from
uninitialized arrays were themselves never used, so there are no answer changes
but there were errors with intolerant compiler settings.  Also corrected the
dOxygen syntax in a comment and corrected some openMP directives that had been
triggering warnings or errors.  All answers are bitwise identical.
  Added some missing openMP directives that had been triggering warnings or
errors, and could have created problems with more extensive testing.  Also set
some unset array bounds in the ice_shelf_dynamics code.  All answers are bitwise
identical in all working test cases.
Copy link
Collaborator

@adcroft adcroft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adcroft
Copy link
Collaborator

adcroft commented Jul 23, 2020

doc files were changed - needs handling on the command line

@adcroft adcroft self-assigned this Jul 23, 2020
@adcroft adcroft merged commit edc674c into mom-ocean:dev/gfdl Jul 23, 2020
@Hallberg-NOAA Hallberg-NOAA deleted the integral_bt_solver branch July 30, 2021 18:14
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.

3 participants