Skip to content

Commit

Permalink
Updated mixing coeff. due to convection
Browse files Browse the repository at this point in the history
Vertical diff. is updated via Kd_int, but I could not find an
equivalent for viscosity. I am also updating visc%Kv_turb and visc%Kv_turb,
but I am not sure if this is correct. Further checking is needed!
  • Loading branch information
gustavo-marques committed Mar 15, 2018
1 parent ba2a0a4 commit 941bfb6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,11 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, G, G
fluxes%ustar, CS%KPP_buoy_flux, Kd_heat, Kd_salt, visc%Kv_turb, CS%KPP_NLTheat, CS%KPP_NLTscalar)
!$OMP parallel default(none) shared(is,ie,js,je,nz,Kd_salt,Kd_int,visc,CS,Kd_heat)

! If visc%MLD exists, copy the KPP BLD into it
if (associated(visc%MLD)) then
call KPP_get_BLD(CS%KPP_CSp, visc%MLD(:,:), G)
call pass_var(visc%MLD, G%domain, halo=1)
Hml(:,:) = visc%MLD(:,:)
if (associated(Hml)) then
call KPP_get_BLD(CS%KPP_CSp, Hml(:,:), G)
call pass_var(Hml, G%domain, halo=1)
endif


if (.not. CS%KPPisPassive) then
!$OMP do
do k=1,nz+1 ; do j=js,je ; do i=is,ie
Expand Down Expand Up @@ -676,12 +673,16 @@ subroutine diabatic(u, v, h, tv, Hml, fluxes, visc, ADp, CDp, dt, Time_end, G, G

! Add diffusivity due to convection (computed via CVMix)
if (CS%use_cvmix_conv) then
call calculate_cvmix_conv(h, tv, G, GV, Hml, CS%cvmix_conv_csp)
call calculate_cvmix_conv(h, tv, G, GV, CS%cvmix_conv_csp, Hml)

!!!!!!!! GMM, the following needs to be checked !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
do k=1,nz ; do j=js,je ; do i=is,ie
visc%Kd_turb(i,j,k) = visc%Kd_turb(i,j,k) + CS%cvmix_conv_csp%kd_conv_3d(i,j,k)
Kd_int(i,j,k) = Kd_int(i,j,k) + CS%cvmix_conv_csp%kd_conv_3d(i,j,k)
! GMM, I am not sure if Kv_turb is the right place to add kv_conv_3d
visc%Kv_turb(i,j,k) = visc%Kv_turb(i,j,k) + CS%cvmix_conv_csp%kv_conv_3d(i,j,k)
visc%Kd_turb(i,j,k) = visc%Kd_turb(i,j,k) + CS%cvmix_conv_csp%kd_conv_3d(i,j,k)
enddo ; enddo ; enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

endif

Expand Down

0 comments on commit 941bfb6

Please sign in to comment.