Skip to content

Commit

Permalink
Avoid NaNs when computing stratification parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed May 18, 2018
1 parent 05daede commit d5ce7a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/parameterizations/vertical/MOM_cvmix_ddiff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ subroutine compute_ddiff_coeffs(h, tv, G, GV, j, Kd_T, Kd_S, CS)
if (CS%id_R_rho > 0.0) then
do k=1,G%ke
CS%R_rho(i,j,k) = alpha_dT(k)/beta_dS(k)
! avoid NaN's
if(CS%R_rho(i,j,k) /= CS%R_rho(i,j,k)) CS%R_rho(i,j,k) = 0.0
enddo
endif

Expand Down

0 comments on commit d5ce7a4

Please sign in to comment.