Skip to content

Commit

Permalink
Add del2,del4 source terms to manufactured soln
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Sep 17, 2024
1 parent 9986482 commit 948241d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions components/mpas-ocean/src/shared/mpas_ocn_manufactured_solution.F
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module ocn_manufactured_solution
real (kind=RKIND) :: kx, ky
real (kind=RKIND) :: ang_freq
real (kind=RKIND) :: eta0
real (kind=RKIND) :: viscDel2, viscDel4
real (kind=RKIND) :: H0

!***********************************************************************
Expand Down Expand Up @@ -183,6 +184,19 @@ subroutine ocn_manufactured_solution_tend_vel(tend, err)!{{{
+ ang_freq*sin(phase) &
- 0.5_RKIND*eta0*(kx + ky)*sin(2.0_RKIND*(phase)))

if (.not. config_disable_vel_hmix) then
if (config_use_mom_del2) then
viscDel2 = config_mom_del2
u = u + viscDel2 * eta0 * kx**2 * cos(phase)
v = v + viscDel2 * eta0 * ky**2 * cos(phase)
endif
if (config_use_mom_del4) then
viscDel4 = config_mom_del4
u = u - viscDel4 * eta0 * (kx**4 * cos(phase) + kx**2 * ky**2 * cos(phase))
v = v - viscDel4 * eta0 * (ky**4 * cos(phase) + kx**2 * ky**2 * cos(phase))
endif
endif

tend(k,iEdge) = tend(k,iEdge) + u*cos(angleEdge(iEdge)) + v*sin(angleEdge(iEdge))
enddo

Expand Down

0 comments on commit 948241d

Please sign in to comment.