Skip to content

Commit e7d0976

Browse files
gustavo-marquesDeniseWorthen
authored andcommitted
Fixes latent heat from fprec and frunoff
This patch fixes a sign bug, in both MCT and NUOPC, when accounting for the latent heat from fprec and frunnoff. Following MOM6's definition, both fprec and frunoff are > 0 into the ocean. Therefore, the latent heat associated with these terms should be negative.
1 parent 66ec49b commit e7d0976

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

config_src/mct_driver/mom_surface_forcing_mct.F90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,17 +486,17 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
486486

487487
! latent heat flux (W/m^2)
488488
fluxes%latent(i,j) = 0.0
489-
! contribution from frozen ppt
489+
! contribution from frozen ppt (notice minus sign since fprec is positive into the ocean)
490490
if (associated(IOB%fprec)) then
491-
fluxes%latent(i,j) = fluxes%latent(i,j) + &
491+
fluxes%latent(i,j) = fluxes%latent(i,j) - &
492492
IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
493-
fluxes%latent_fprec_diag(i,j) = G%mask2dT(i,j) * IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
493+
fluxes%latent_fprec_diag(i,j) = - G%mask2dT(i,j) * IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
494494
endif
495-
! contribution from frozen runoff
495+
! contribution from frozen runoff (notice minus sign since rofi_flux is positive into the ocean)
496496
if (associated(fluxes%frunoff)) then
497-
fluxes%latent(i,j) = fluxes%latent(i,j) + &
497+
fluxes%latent(i,j) = fluxes%latent(i,j) - &
498498
IOB%rofi_flux(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
499-
fluxes%latent_frunoff_diag(i,j) = G%mask2dT(i,j) * IOB%rofi_flux(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
499+
fluxes%latent_frunoff_diag(i,j) = - G%mask2dT(i,j) * IOB%rofi_flux(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
500500
endif
501501
! contribution from evaporation
502502
if (associated(IOB%q_flux)) then

config_src/nuopc_driver/mom_surface_forcing_nuopc.F90

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,15 +497,17 @@ subroutine convert_IOB_to_fluxes(IOB, fluxes, index_bounds, Time, valid_time, G,
497497
fluxes%seaice_melt(i,j) = kg_m2_s_conversion * G%mask2dT(i,j) * IOB%seaice_melt(i-i0,j-j0)
498498

499499
fluxes%latent(i,j) = 0.0
500+
! notice minus sign since fprec is positive into the ocean
500501
if (associated(IOB%fprec)) then
501-
fluxes%latent(i,j) = fluxes%latent(i,j) + &
502+
fluxes%latent(i,j) = fluxes%latent(i,j) - &
502503
IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
503-
fluxes%latent_fprec_diag(i,j) = G%mask2dT(i,j) * IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
504+
fluxes%latent_fprec_diag(i,j) = - G%mask2dT(i,j) * IOB%fprec(i-i0,j-j0)*US%W_m2_to_QRZ_T*CS%latent_heat_fusion
504505
endif
506+
! notice minus sign since frunoff is positive into the ocean
505507
if (associated(IOB%frunoff)) then
506-
fluxes%latent(i,j) = fluxes%latent(i,j) + &
508+
fluxes%latent(i,j) = fluxes%latent(i,j) - &
507509
IOB%frunoff(i-i0,j-j0) * US%W_m2_to_QRZ_T * CS%latent_heat_fusion
508-
fluxes%latent_frunoff_diag(i,j) = G%mask2dT(i,j) * &
510+
fluxes%latent_frunoff_diag(i,j) = - G%mask2dT(i,j) * &
509511
IOB%frunoff(i-i0,j-j0) * US%W_m2_to_QRZ_T * CS%latent_heat_fusion
510512
endif
511513
if (associated(IOB%q_flux)) then

0 commit comments

Comments
 (0)