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 del2,del4 source terms to manufactured solution #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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