Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output relevant fields when diff or visc < 0 #252

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,22 @@ subroutine KPP_calculate(CS, G, GV, US, h, uStar, buoyFlux, Kt, Ks, Kv, &
! safety check, Kviscosity and Kdiffusivity must be >= 0
do k=1, GV%ke+1
if (Kviscosity(k) < 0. .or. Kdiffusivity(k,1) < 0.) then
write(*,'(a,3i3)') 'interface, i, j, k = ',j, j, k
write(*,'(a,2f12.5)') 'lon,lat=', G%geoLonT(i,j), G%geoLatT(i,j)
write(*,'(a,es12.4)') 'depth, z_inter(k) =',z_inter(k)
write(*,'(a,es12.4)') 'Kviscosity(k) =',Kviscosity(k)
write(*,'(a,es12.4)') 'Kdiffusivity(k,1) =',Kdiffusivity(k,1)
write(*,'(a,es12.4)') 'Kdiffusivity(k,2) =',Kdiffusivity(k,2)
write(*,'(a,es12.4)') 'OBLdepth =',US%Z_to_m*CS%OBLdepth(i,j)
write(*,'(a,f8.4)') 'kOBL =',CS%kOBL(i,j)
write(*,'(a,es12.4)') 'u* =',surfFricVel
write(*,'(a,es12.4)') 'bottom, z_inter(GV%ke+1) =',z_inter(GV%ke+1)
write(*,'(a,es12.4)') 'CS%La_SL(i,j) =',CS%La_SL(i,j)
write(*,'(a,es12.4)') 'LangEnhK =',LangEnhK
if (present(lamult)) write(*,'(a,es12.4)') 'lamult(i,j) =',lamult(i,j)
write(*,*) 'Kviscosity(:) =',Kviscosity(:)
write(*,*) 'Kdiffusivity(:,1) =',Kdiffusivity(:,1)

call MOM_error(FATAL,"KPP_calculate, after CVMix_coeffs_kpp: "// &
"Negative vertical viscosity or diffusivity has been detected. " // &
"This is likely related to the choice of MATCH_TECHNIQUE and INTERP_TYPE2." //&
Expand Down
Loading