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

+Make 37 optional arguments in src/core mandatory #1523

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

Hallberg-NOAA
Copy link
Collaborator

Made 37 optional arguments that are always present in calls into non-optional
arguments to routines in the src/core directory. Many of these are pointer
arguments related to things like open boundary conditions, so if these types are
not to be used, they are simply not allocated. In several cases, this required
the order of the arguments to be shifted around, but the various types of the
arguments should prevent the model from compiling if the calls (e.g., in
user-modified code that is not in the github repository) are not changed
equivalently. Also eliminated 3 internal arguments in MOM_barotropic.F90 that
are always hard-coded to the same values (the maximize argument to
BT_cont_to_face_areas()) or are never used (the guess arguments to uhbt_to_ubt()
and vhbt_to_vbt()), along with the code that they would exercise. All answers
and output are bitwise identical.

  Made 37 optional arguments that are always present in calls into non-optional
arguments to routines in the src/core directory.  Many of these are pointer
arguments related to things like open boundary conditions, so if these types are
not to be used, they are simply not allocated.  In several cases, this required
the order of the arguments to be shifted around, but the various types of the
arguments should prevent the model from compiling if the calls (e.g., in
user-modified code that is not in the github repository) are not changed
equivalently.  Also eliminated 3 internal arguments in MOM_barotropic.F90 that
are always hard-coded to the same values (the maximize argument to
BT_cont_to_face_areas()) or are never used (the guess arguments to uhbt_to_ubt()
and vhbt_to_vbt()), along with the code that they would exercise.  All answers
and output are bitwise identical.
@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #1523 (1fb283b) into dev/gfdl (39c0c34) will increase coverage by 0.00%.
The diff coverage is 59.55%.

Impacted file tree graph

@@            Coverage Diff            @@
##           dev/gfdl    #1523   +/-   ##
=========================================
  Coverage     29.07%   29.07%           
=========================================
  Files           239      239           
  Lines         71699    71661   -38     
=========================================
- Hits          20845    20837    -8     
+ Misses        50854    50824   -30     
Impacted Files Coverage Δ
src/core/MOM_PressureForce.F90 62.50% <ø> (+1.63%) ⬆️
src/core/MOM_PressureForce_Montgomery.F90 6.41% <0.00%> (+0.04%) ⬆️
src/core/MOM_open_boundary.F90 20.08% <ø> (ø)
src/core/MOM_transcribe_grid.F90 24.63% <0.00%> (ø)
src/core/MOM_barotropic.F90 37.51% <47.50%> (+0.25%) ⬆️
src/core/MOM.F90 59.01% <50.00%> (+0.04%) ⬆️
src/core/MOM_dynamics_split_RK2.F90 61.08% <50.00%> (ø)
src/core/MOM_PressureForce_FV.F90 32.81% <66.66%> (-0.32%) ⬇️
src/core/MOM_continuity_PPM.F90 39.98% <82.60%> (-0.12%) ⬇️
src/core/MOM_continuity.F90 75.00% <100.00%> (ø)
... and 4 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 39c0c34...1fb283b. Read the comment docs.

@marshallward
Copy link
Collaborator

marshallward commented Oct 19, 2021

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

(Took about 5 attempts, but it eventually passed...)

@marshallward marshallward merged commit e291d32 into mom-ocean:dev/gfdl Oct 20, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the opt_args_in_core branch November 22, 2021 09:08
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