Skip to content

Commit

Permalink
Bugfix in double diffusion
Browse files Browse the repository at this point in the history
In salt fingering case, I was setting Tdiff_out = 0.7*Sdiff_out for the entire
column rather than just the level where  the stratification parameter indicated
salt fingering. Easy fix: add (k) indices to the arrays.
  • Loading branch information
mnlevy1981 committed Oct 2, 2015
1 parent 493d354 commit 15bf182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/cvmix_ddiff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ subroutine cvmix_coeffs_ddiff_low(Tdiff_out, Sdiff_out, strat_param_num, &
CVmix_ddiff_params_in%ddiff_exp1)**CVmix_ddiff_params_in%ddiff_exp2
Sdiff_out(k) = CVmix_ddiff_params_in%kappa_ddiff_s*ddiff
end if
Tdiff_out = Sdiff_out*0.7_cvmix_r8
Tdiff_out(k) = Sdiff_out(k)*0.7_cvmix_r8
end if
if ((strat_param_num(k).ge.strat_param_denom(k)).and. &
(strat_param_num(k).lt.cvmix_zero)) then
Expand Down

0 comments on commit 15bf182

Please sign in to comment.