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

New fix reflect tides #1431

Merged
merged 5 commits into from
Jun 21, 2021
Merged
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
17 changes: 12 additions & 5 deletions src/parameterizations/lateral/MOM_internal_tides.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ subroutine propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, Nangle, CS, LB)
real, dimension(SZIB_(G)) :: &
cg_p, cg_m, flux1, flux2
!real, dimension(SZI_(G),SZJB_(G),Nangle) :: En_m, En_p
real, dimension(SZI_(G),SZJB_(G),Nangle) :: &
real, dimension(G%isd:G%ied,G%jsd:G%jed,Nangle) :: &
Fdt_m, Fdt_p! Left and right energy fluxes [J]
integer :: i, j, k, ish, ieh, jsh, jeh, a

Expand Down Expand Up @@ -1464,7 +1464,7 @@ subroutine propagate_y(En, speed_y, Cgy_av, dCgy, dt, G, US, Nangle, CS, LB)
real, dimension(SZI_(G)) :: &
cg_p, cg_m, flux1, flux2
!real, dimension(SZI_(G),SZJB_(G),Nangle) :: En_m, En_p
real, dimension(SZI_(G),SZJB_(G),Nangle) :: &
real, dimension(G%isd:G%ied,G%jsd:G%jed,Nangle) :: &
Fdt_m, Fdt_p! South and north energy fluxes [J]
character(len=160) :: mesg ! The text of an error message
integer :: i, j, k, ish, ieh, jsh, jeh, a
Expand Down Expand Up @@ -1653,9 +1653,16 @@ subroutine reflect(En, NAngle, CS, G, LB)
angle_i(a) = Angle_size * real(a - 1) ! for a=1 aligned with x-axis
enddo

angle_c = CS%refl_angle
part_refl = CS%refl_pref
ridge = CS%refl_dbl
! init local arrays
angle_c(:,:) = CS%nullangle
part_refl(:,:) = 0.
ridge(:,:) = .false.

do j=jsh,jeh ; do i=ish,ieh
angle_c(i,j) = CS%refl_angle(i,j)
part_refl(i,j) = CS%refl_pref(i,j)
ridge(i,j) = CS%refl_dbl(i,j)
enddo ; enddo
En_reflected(:) = 0.0

do j=jsh,jeh ; do i=ish,ieh
Expand Down