From efa503bd2753909530ec02e3a984f30d7fe58e7d Mon Sep 17 00:00:00 2001 From: Marshall Ward Date: Tue, 8 Mar 2022 13:12:41 -0500 Subject: [PATCH] bugfix: static h_new shape remaining_transport_sum This patch redefines `h_new` to match the shape of a center-point rather than a v-face point. Dynamic memory builds would have been unaffected by this, and older GCC (~7.3.0) compilers appear to have not objected to the shape mismatch, but this raised an error in newer GCCs (~9.3.0). Since this redefines `h_new` from zero-based to 1-based indexing in the y-axis, answer changes are very possible. --- src/tracer/MOM_offline_main.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracer/MOM_offline_main.F90 b/src/tracer/MOM_offline_main.F90 index d5b3f708a3..800523be2b 100644 --- a/src/tracer/MOM_offline_main.F90 +++ b/src/tracer/MOM_offline_main.F90 @@ -599,7 +599,7 @@ real function remaining_transport_sum(G, GV, US, uhtr, vhtr, h_new) intent(in ) :: uhtr !< Zonal mass transport [H L2 ~> m3 or kg] real, dimension(SZI_(G),SZJB_(G),SZK_(GV)), & intent(in ) :: vhtr !< Meridional mass transport [H L2 ~> m3 or kg] - real, dimension(SZI_(G),SZJB_(G),SZK_(GV)), & + real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), & intent(in ) :: h_new !< Layer thicknesses [H ~> m or kg m-2] ! Local variables