Skip to content

Commit

Permalink
Bug from removing cvmix_kpp_compute_nonlocal
Browse files Browse the repository at this point in the history
I looked for a parameter in CVmix_kpp_params_user when I should have been
looking in CVmix_kpp_params_in... was causing a seg fault in some POP testing.
I don't know why the regression test suite didn't catch this...
  • Loading branch information
mnlevy1981 committed May 19, 2015
1 parent 809fffa commit 493d354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shared/cvmix_kpp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,9 @@ subroutine cvmix_coeffs_kpp_low(Mdiff_out, Tdiff_out, Sdiff_out, zw, zt, &
! (3c) Compute nonlocal term at each cell interface
if ((.not.lstable).and.(kw.le.kwup)) then
GAtS = cvmix_math_evaluate_cubic(Tshape2, sigma(kw))
Tnonlocal(kw) = CVmix_kpp_params_user%nonlocal_coeff*GAtS
Tnonlocal(kw) = CVmix_kpp_params_in%nonlocal_coeff*GAtS
GAtS = cvmix_math_evaluate_cubic(Sshape2, sigma(kw))
Snonlocal(kw) = CVmix_kpp_params_user%nonlocal_coeff*GAtS
Snonlocal(kw) = CVmix_kpp_params_in%nonlocal_coeff*GAtS
end if

! (3d) Diffusivity = OBL_depth * (turbulent scale) * G(sigma)
Expand Down

2 comments on commit 493d354

@adcroft
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good timing! I was just encountering a SIGSEGV when trying commit da007a6.

@mnlevy1981
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think my KPP regression test specifies CVmix_kpp_params_user for all the different cases... but POP uses CVmix_kpp_params_saved so params_user isn't present. Issue #14 will basically be "compute diffusivities based on the first step of a WSwPSBF test" and I'll make sure it uses the module parameters - that should avoid reintroducing this issue.

Please sign in to comment.