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

Fixing loop bound error in MOM_PressureForce_Montgomery.F90 #1169

Merged

Conversation

breichl
Copy link
Collaborator

@breichl breichl commented Jul 27, 2020

The "for" loop at L510 should be to nz instead of nz+1. Due to array allocation sizes, this loop was extending beyond the shape of the argument arrays.

I checked a couple of ocean_only test cases (e.g., global_ALE, but I'm not 100% sure it uses this part of the code) and this did not change answers. But that could be sensitive to which compiler is used, etc.

The "for" loop at L510 should be to nz instead of nz+1.  Due to array allocation sizes, this loop was extending beyond the shope of the argument arrays.
@codecov-commenter
Copy link

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff              @@
##           dev/gfdl    #1169      +/-   ##
============================================
- 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 edc674c...5680fe5. Read the comment docs.

Copy link
Collaborator

@marshallward marshallward left a comment

Choose a reason for hiding this comment

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

rho_star is not defined beyond 1:nz so looks very straightforward.

@marshallward
Copy link
Collaborator

marshallward commented Jul 27, 2020

Gaea regression test: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/10884

Test has passed; no regressions.

@marshallward marshallward merged commit df33724 into mom-ocean:dev/gfdl Jul 27, 2020
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