Skip to content

Commit

Permalink
(*)Fix bug in h_neglect used to remap diags to rho
Browse files Browse the repository at this point in the history
  Added explicit names to the h_neglect and h_neglect_edge arguments in a call
to build_rho_column in diag_remap_update.  These were problematic because these
arguments were previously in the wrong positions and hence were being used for
the wrong variables inside of build_rho_column.  In Boussinesq mode, the results
will be the same as long as there is no dimensional rescaling being applied to
thicknesses, and it this were being tested it would have resulted in a
dimensional consistency test failure.  In non-Boussinesq mode, the values of
H_subroundoff as used for this coordinate will be off by a factor of
RHO_KV_CONVERT (usually 1035), but these thicknesses are so small that they do
not matter unless ANGSTROM is explicitly set to zero (when no dimensional
rescaling is being used).  To summarize, this fixes a bug that has been around
since 2017, and while this fix could slightly change some diagnostics that are
remapped to density, it only does so in circumstances that are unlikely to have
been realized.  No answer changes were detected in the MOM6-examples regression
suite, and almost certainly none ever would be in any existing use of MOM6.
  • Loading branch information
Hallberg-NOAA authored and marshallward committed Feb 28, 2024
1 parent f2e7abf commit 86c5ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/MOM_diag_remap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ subroutine diag_remap_update(remap_cs, G, GV, US, h, T, S, eqn_of_state, h_targe
elseif (remap_cs%vertical_coord == coordinateMode('RHO')) then
call build_rho_column(get_rho_CS(remap_cs%regrid_cs), GV%ke, &
GV%Z_to_H*(G%bathyT(i,j)+G%Z_ref), h(i,j,:), T(i,j,:), S(i,j,:), &
eqn_of_state, zInterfaces, h_neglect, h_neglect_edge)
eqn_of_state, zInterfaces, h_neglect=h_neglect, h_neglect_edge=h_neglect_edge)
elseif (remap_cs%vertical_coord == coordinateMode('HYCOM1')) then
! call build_hycom1_column(remap_cs%regrid_cs, nz, &
! GV%Z_to_H*(G%bathyT(i,j)+G%Z_ref), sum(h(i,j,:)), zInterfaces)
Expand Down

0 comments on commit 86c5ed9

Please sign in to comment.