-
Notifications
You must be signed in to change notification settings - Fork 244
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
MOM6: +(*)Add option to use time-integrated barotropic continuity #1161
Conversation
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 Report
@@ 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
Continue to review full report at Codecov.
|
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.
21099a0
to
535b43c
Compare
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc files were changed - needs handling on the command line |
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: