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

Closed
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
15 changes: 15 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
cbegeman marked this conversation as resolved.
Show resolved Hide resolved
real (kind=RKIND) :: H0

!***********************************************************************
Expand Down Expand Up @@ -201,6 +202,17 @@ subroutine ocn_manufactured_solution_tend_vel(forcingPool, 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
u = u + viscDel2 * eta0 * (kx**2 + ky**2) * cos(phase)
v = v + viscDel2 * eta0 * (kx**2 + ky**2) * cos(phase)
endif
if (config_use_mom_del4) then
u = u - viscDel4 * eta0 * ((kx**4 + ky**4 + kx**2 * ky**2) * cos(phase))
v = v - viscDel4 * eta0 * ((kx**4 + ky**4 + 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 Expand Up @@ -235,6 +247,9 @@ subroutine ocn_manufactured_solution_init(domain, err)!{{{

if (.not. config_use_manufactured_solution) return

viscDel2 = config_mom_del2
viscDel4 = config_mom_del4

kx = 2.0_RKIND*pi / config_manufactured_solution_wavelength_x
ky = 2.0_RKIND*pi / config_manufactured_solution_wavelength_y

Expand Down
Loading