From 111b3e7e66690627c231725399d144d30930fdd7 Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Sun, 28 Nov 2021 10:45:12 -0500 Subject: [PATCH] +Eliminate forcing%netSalt Eliminated the no-longer used and previously improperly rescaled netSalt element from the forcing type. Also added the missing deallocate statements for fluxes%netMassOut and fluxes%netMassIn in deallocate_forcing_type(). All answers and output are bitwise identical, although an element has been removed from a transparent type. --- src/core/MOM_forcing_type.F90 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/core/MOM_forcing_type.F90 b/src/core/MOM_forcing_type.F90 index dced9537d9..62b69994dd 100644 --- a/src/core/MOM_forcing_type.F90 +++ b/src/core/MOM_forcing_type.F90 @@ -103,10 +103,12 @@ module MOM_forcing_type vprec => NULL(), & !< virtual liquid precip associated w/ SSS restoring [R Z T-1 ~> kg m-2 s-1] lrunoff => NULL(), & !< liquid river runoff entering ocean [R Z T-1 ~> kg m-2 s-1] frunoff => NULL(), & !< frozen river runoff (calving) entering ocean [R Z T-1 ~> kg m-2 s-1] - seaice_melt => NULL(), & !< snow/seaice melt (positive) or formation (negative) [R Z T-1 ~> kg m-2 s-1] + seaice_melt => NULL() !< snow/seaice melt (positive) or formation (negative) [R Z T-1 ~> kg m-2 s-1] + + ! Aggregated water mass fluxes into the ocean, used for passive tracer sources [R Z T-1 ~> kg m-2 s-1] + real, pointer, dimension(:,:) :: & netMassIn => NULL(), & !< Sum of water mass flux out of the ocean [kg m-2 s-1] - netMassOut => NULL(), & !< Net water mass flux into of the ocean [kg m-2 s-1] - netSalt => NULL() !< Net salt entering the ocean [kgSalt m-2 s-1] + netMassOut => NULL() !< Net water mass flux into of the ocean [kg m-2 s-1] ! heat associated with water crossing ocean surface real, pointer, dimension(:,:) :: & @@ -730,12 +732,6 @@ subroutine extractFluxes1d(G, GV, US, fluxes, optics, nsw, j, dt, & ! Diagnostics follow... if (calculate_diags) then - ! Store Net_salt for unknown reason? - if (associated(fluxes%salt_flux)) then - ! This seems like a bad idea to me. -RWH - if (calculate_diags) fluxes%netSalt(i,j) = US%kg_m2s_to_RZ_T*Net_salt(i) - endif - ! Initialize heat_content_massin that is diagnosed in mixedlayer_convection or ! applyBoundaryFluxes such that the meaning is as the sum of all incoming components. if (associated(fluxes%heat_content_massin)) then @@ -2976,7 +2972,6 @@ subroutine allocate_forcing_by_group(G, fluxes, water, heat, ustar, press, & call myAlloc(fluxes%seaice_melt,isd,ied,jsd,jed, water) call myAlloc(fluxes%netMassOut,isd,ied,jsd,jed, water) call myAlloc(fluxes%netMassIn,isd,ied,jsd,jed, water) - call myAlloc(fluxes%netSalt,isd,ied,jsd,jed, water) call myAlloc(fluxes%seaice_melt_heat,isd,ied,jsd,jed, heat) call myAlloc(fluxes%sw,isd,ied,jsd,jed, heat) call myAlloc(fluxes%lw,isd,ied,jsd,jed, heat) @@ -3263,6 +3258,8 @@ subroutine deallocate_forcing_type(fluxes) if (associated(fluxes%lrunoff)) deallocate(fluxes%lrunoff) if (associated(fluxes%frunoff)) deallocate(fluxes%frunoff) if (associated(fluxes%seaice_melt)) deallocate(fluxes%seaice_melt) + if (associated(fluxes%netMassOut)) deallocate(fluxes%netMassOut) + if (associated(fluxes%netMassIn)) deallocate(fluxes%netMassIn) if (associated(fluxes%salt_flux)) deallocate(fluxes%salt_flux) if (associated(fluxes%p_surf_full)) deallocate(fluxes%p_surf_full) if (associated(fluxes%p_surf)) deallocate(fluxes%p_surf) @@ -3331,7 +3328,6 @@ subroutine rotate_forcing(fluxes_in, fluxes, turns) call rotate_array(fluxes_in%seaice_melt, turns, fluxes%seaice_melt) call rotate_array(fluxes_in%netMassOut, turns, fluxes%netMassOut) call rotate_array(fluxes_in%netMassIn, turns, fluxes%netMassIn) - call rotate_array(fluxes_in%netSalt, turns, fluxes%netSalt) endif if (do_heat) then