Skip to content

Commit

Permalink
Corrected/added converted MKS units in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adcroft committed Dec 2, 2019
1 parent 9c4d22d commit 285273a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/parameterizations/lateral/MOM_MEKE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ subroutine step_forward_MEKE(MEKE, h, SN_u, SN_v, visc, dt, G, GV, US, CS, hu, h
do j=js-1,je+1
do i=is-1,ie+1 ; mass(i,j) = 0.0 ; enddo
do k=1,nz ; do i=is-1,ie+1
mass(i,j) = mass(i,j) + G%mask2dT(i,j) * (GV%H_to_RZ * h(i,j,k))
mass(i,j) = mass(i,j) + G%mask2dT(i,j) * (GV%H_to_RZ * h(i,j,k)) ! [R Z ~> kg m-2]
enddo ; enddo
do i=is-1,ie+1
I_mass(i,j) = 0.0
if (mass(i,j) > 0.0) I_mass(i,j) = 1.0 / mass(i,j) ! [m2 kg-1]
if (mass(i,j) > 0.0) I_mass(i,j) = 1.0 / mass(i,j) ! [R-1 Z-1 ~> m2 kg-1]
enddo
enddo

Expand Down Expand Up @@ -402,12 +402,12 @@ subroutine step_forward_MEKE(MEKE, h, SN_u, SN_v, visc, dt, G, GV, US, CS, hu, h
Inv_K4_max = 64.0 * sdt * ((G%dx_Cv(i,J)*G%IdyCv(i,J)) * max(G%IareaT(i,j), G%IareaT(i,j+1)))**2
if (K4_here*Inv_K4_max > 0.3) K4_here = 0.3 / Inv_K4_max

! Here the units of MEKE_vflux are [kg m-2 L4 T-3].
! Here the units of MEKE_vflux are [R Z L4 T-3].
MEKE_vflux(i,J) = ((K4_here * (G%dx_Cv(i,J)*G%IdyCv(i,J))) * &
((2.0*mass(i,j)*mass(i,j+1)) / ((mass(i,j)+mass(i,j+1)) + mass_neglect)) ) * &
(del2MEKE(i,j+1) - del2MEKE(i,j))
enddo ; enddo
! Store change in MEKE arising from the bi-harmonic in del4MEKE [L2 T-2].
! Store change in MEKE arising from the bi-harmonic in del4MEKE [L2 T-2 ~> m2 s-2].
!$OMP parallel do default(shared)
do j=js,je ; do i=is,ie
del4MEKE(i,j) = (sdt*(G%IareaT(i,j)*I_mass(i,j))) * &
Expand Down Expand Up @@ -454,7 +454,7 @@ subroutine step_forward_MEKE(MEKE, h, SN_u, SN_v, visc, dt, G, GV, US, CS, hu, h
(MEKE%MEKE(i,j) - MEKE%MEKE(i,j+1))
enddo ; enddo
if (CS%MEKE_advection_factor>0.) then
advFac = CS%MEKE_advection_factor / sdt ! [T-1]
advFac = CS%MEKE_advection_factor / sdt ! [T-1 ~> s-1]
!$OMP parallel do default(shared)
do j=js,je ; do I=is-1,ie
! Here the units of the quantities added to MEKE_uflux are [R Z L4 T-3 ~> kg m2 s-3].
Expand Down

0 comments on commit 285273a

Please sign in to comment.