Skip to content

Commit

Permalink
Merge pull request #1403 from Hallberg-NOAA/MOM_wave_rescale
Browse files Browse the repository at this point in the history
+Add dimensional rescaling of wave variables
  • Loading branch information
marshallward authored May 18, 2021
2 parents fff9d42 + ce7f217 commit 75a8549
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 173 deletions.
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

0 comments on commit 75a8549

Please sign in to comment.