Skip to content

Commit

Permalink
add temperature limiter for SPPT in MOM_diabatic_driver
Browse files Browse the repository at this point in the history
  • Loading branch information
jiandewang committed Jul 18, 2022
1 parent 182b917 commit a249742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, &
! These stochastic perturbations do not conserve heat, salt or mass.
do k=1,nz ; do j=js,je ; do i=is,ie
h(i,j,k) = max(h_in(i,j,k) + (h(i,j,k)-h_in(i,j,k)) * stoch_CS%sppt_wts(i,j), GV%Angstrom_H)
tv%T(i,j,k) = t_in(i,j,k) + (tv%T(i,j,k)-t_in(i,j,k)) * stoch_CS%sppt_wts(i,j)
tv%S(i,j,k) = max(s_in(i,j,k) + (tv%S(i,j,k)-s_in(i,j,k)) * stoch_CS%sppt_wts(i,j), 0.0)
tv%T(i,j,k) = max(t_in(i,j,k) + (tv%T(i,j,k)-t_in(i,j,k)) * stoch_CS%sppt_wts(i,j), -0.054*tv%S(i,j,k))
enddo ; enddo ; enddo
deallocate(h_in, t_in, s_in)
endif
Expand Down

0 comments on commit a249742

Please sign in to comment.