From 36be39a6b88ef151b3c9bbf06a2328f60b423f0d Mon Sep 17 00:00:00 2001 From: Gustavo Marques Date: Tue, 28 Nov 2017 11:35:24 -0700 Subject: [PATCH] Adds bug fix in net_FW reported by travissluka See following PR: https://github.com/NOAA-GFDL/MOM6/pull/664 Some of the code in ocn_comp_mct was copied from MOM_surface_forcing. Therefore this bug also affects dev/ncar. Since dev/ncar does not use MOM_surface_forcing, this fix should also be applied in ocn_comp_mct. --- config_src/mct_driver/ocn_comp_mct.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config_src/mct_driver/ocn_comp_mct.F90 b/config_src/mct_driver/ocn_comp_mct.F90 index 75a5457598..50e35cd7ab 100644 --- a/config_src/mct_driver/ocn_comp_mct.F90 +++ b/config_src/mct_driver/ocn_comp_mct.F90 @@ -2198,15 +2198,15 @@ subroutine ocn_import(forces, fluxes, Time, G, CS, state, x2o_o, ind, sw_decomp, ! is constant. ! To do this correctly we will need a sea-ice melt field added to IOB. -AJA if (ASSOCIATED(fluxes%salt_flux) .and. (CS%ice_salt_concentration>0.0)) & - net_FW(i,j) = net_FW(i,j) - G%areaT(i,j) * & + net_FW(i,j) = net_FW(i,j) + G%areaT(i,j) * & (fluxes%salt_flux(i,j) / CS%ice_salt_concentration) - net_FW2(i,j) = net_FW(i,j) + net_FW2(i,j) = net_FW(i,j)/G%areaT(i,j) enddo ; enddo if (CS%adjust_net_fresh_water_by_scaling) then call adjust_area_mean_to_zero(net_FW2, G, fluxes%netFWGlobalScl) do j=js,je ; do i=is,ie - fluxes%vprec(i,j) = fluxes%vprec(i,j) + (net_FW2(i,j) - net_FW(i,j)) * G%mask2dT(i,j) + fluxes%vprec(i,j) = fluxes%vprec(i,j) + (net_FW2(i,j) - net_FW(i,j)/G%areaT(i,j)) * G%mask2dT(i,j) enddo; enddo else fluxes%netFWGlobalAdj = reproducing_sum(net_FW(:,:), isr, ier, jsr, jer) / CS%area_surf