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

+Add dimensional rescaling of wave variables #1403

Merged
merged 4 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,8 @@ subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFl
surfHu = surfHu + 0.5*US%L_T_to_m_s*(u(i,j,ktmp)+u(i-1,j,ktmp)) * delH
surfHv = surfHv + 0.5*US%L_T_to_m_s*(v(i,j,ktmp)+v(i,j-1,ktmp)) * delH
if (CS%Stokes_Mixing) then
surfHus = surfHus + 0.5*(WAVES%US_x(i,j,ktmp)+WAVES%US_x(i-1,j,ktmp)) * delH
surfHvs = surfHvs + 0.5*(WAVES%US_y(i,j,ktmp)+WAVES%US_y(i,j-1,ktmp)) * delH
surfHus = surfHus + 0.5*US%L_T_to_m_s*(WAVES%US_x(i,j,ktmp)+WAVES%US_x(i-1,j,ktmp)) * delH
surfHvs = surfHvs + 0.5*US%L_T_to_m_s*(WAVES%US_y(i,j,ktmp)+WAVES%US_y(i,j-1,ktmp)) * delH
endif

enddo
Expand All @@ -1078,8 +1078,8 @@ subroutine KPP_compute_BLD(CS, G, GV, US, h, Temp, Salt, u, v, tv, uStar, buoyFl
! If momentum is mixed down the Stokes drift gradient, then
! the Stokes drift must be included in the bulk Richardson number
! calculation.
Uk = Uk + (0.5*(Waves%Us_x(i,j,k)+Waves%US_x(i-1,j,k)) -surfUs )
Vk = Vk + (0.5*(Waves%Us_y(i,j,k)+Waves%Us_y(i,j-1,k)) -surfVs )
Uk = Uk + (0.5*US%L_T_to_m_s*(Waves%Us_x(i,j,k)+Waves%US_x(i-1,j,k)) - surfUs )
Vk = Vk + (0.5*US%L_T_to_m_s*(Waves%Us_y(i,j,k)+Waves%Us_y(i,j-1,k)) - surfVs )
endif

deltaU2(k) = Uk**2 + Vk**2
Expand Down
8 changes: 4 additions & 4 deletions src/parameterizations/vertical/MOM_vert_friction.F90
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &

! When mixing down Eulerian current + Stokes drift add before calling solver
if (DoStokesMixing) then ; do k=1,nz ; do I=Isq,Ieq
if (do_i(I)) u(I,j,k) = u(I,j,k) + US%m_s_to_L_T*Waves%Us_x(I,j,k)
if (do_i(I)) u(I,j,k) = u(I,j,k) + Waves%Us_x(I,j,k)
enddo ; enddo ; endif

if (associated(ADp%du_dt_visc)) then ; do k=1,nz ; do I=Isq,Ieq
Expand Down Expand Up @@ -347,7 +347,7 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &

! When mixing down Eulerian current + Stokes drift subtract after calling solver
if (DoStokesMixing) then ; do k=1,nz ; do I=Isq,Ieq
if (do_i(I)) u(I,j,k) = u(I,j,k) - US%m_s_to_L_T*Waves%Us_x(I,j,k)
if (do_i(I)) u(I,j,k) = u(I,j,k) - Waves%Us_x(I,j,k)
enddo ; enddo ; endif

enddo ! end u-component j loop
Expand All @@ -362,7 +362,7 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &

! When mixing down Eulerian current + Stokes drift add before calling solver
if (DoStokesMixing) then ; do k=1,nz ; do i=is,ie
if (do_i(i)) v(i,j,k) = v(i,j,k) + US%m_s_to_L_T*Waves%Us_y(i,j,k)
if (do_i(i)) v(i,j,k) = v(i,j,k) + Waves%Us_y(i,j,k)
enddo ; enddo ; endif

if (associated(ADp%dv_dt_visc)) then ; do k=1,nz ; do i=is,ie
Expand Down Expand Up @@ -428,7 +428,7 @@ subroutine vertvisc(u, v, h, forces, visc, dt, OBC, ADp, CDp, G, GV, US, CS, &

! When mixing down Eulerian current + Stokes drift subtract after calling solver
if (DoStokesMixing) then ; do k=1,nz ; do i=is,ie
if (do_i(i)) v(i,J,k) = v(i,J,k) - US%m_s_to_L_T*Waves%Us_y(i,J,k)
if (do_i(i)) v(i,J,k) = v(i,J,k) - Waves%Us_y(i,J,k)
enddo ; enddo ; endif

enddo ! end of v-component J loop
Expand Down
Loading