@@ -2193,7 +2193,7 @@ subroutine propagate(En, cn, freq, dt, G, GV, US, CS, NAngle, test, halo_size, r
2193
2193
! Apply propagation in the first direction (reflection included)
2194
2194
LB% jsh = jsh ; LB% jeh = jeh ; LB% ish = ish ; LB% ieh = ieh
2195
2195
if (x_first) then
2196
- call propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, CS% nAngle, CS, LB, residual_loss)
2196
+ call propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, CS% nAngle, CS, LB, residual_loss, freq2 )
2197
2197
else
2198
2198
call propagate_y(En, speed_y, Cgy_av, dCgy, dt, G, US, CS% nAngle, CS, LB, residual_loss, freq2)
2199
2199
endif
@@ -2226,7 +2226,7 @@ subroutine propagate(En, cn, freq, dt, G, GV, US, CS, NAngle, test, halo_size, r
2226
2226
if (x_first) then
2227
2227
call propagate_y(En, speed_y, Cgy_av, dCgy, dt, G, US, CS% nAngle, CS, LB, residual_loss, freq2)
2228
2228
else
2229
- call propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, CS% nAngle, CS, LB, residual_loss)
2229
+ call propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, CS% nAngle, CS, LB, residual_loss, freq2 )
2230
2230
endif
2231
2231
2232
2232
! fix underflows
@@ -2248,7 +2248,7 @@ end subroutine propagate
2248
2248
2249
2249
2250
2250
! > Propagates the internal wave energy in the logical x-direction.
2251
- subroutine propagate_x (En , speed_x , Cgx_av , dCgx , dt , G , US , Nangle , CS , LB , residual_loss )
2251
+ subroutine propagate_x (En , speed_x , Cgx_av , dCgx , dt , G , US , Nangle , CS , LB , residual_loss , freq2 )
2252
2252
type (ocean_grid_type), intent (in ) :: G ! < The ocean's grid structure.
2253
2253
integer , intent (in ) :: NAngle ! < The number of wave orientations in the
2254
2254
! ! discretized wave energy spectrum.
@@ -2268,6 +2268,8 @@ subroutine propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, Nangle, CS, LB, res
2268
2268
real , dimension (G% isd:G% ied,G% jsd:G% jed,Nangle), &
2269
2269
intent (inout ) :: residual_loss ! < internal tide energy loss due
2270
2270
! ! to the residual at slopes [H Z2 T-3 ~> m3 s-3 or W m-2].
2271
+ real , intent (in ) :: freq2 ! < The square of internal tides frequency [T-2 ~> s-2].
2272
+
2271
2273
! Local variables
2272
2274
real , dimension (SZI_(G),SZJ_(G)) :: &
2273
2275
EnL, EnR ! Left and right face energy densities [H Z2 T-2 ~> m3 s-2 or J m-2].
@@ -2327,6 +2329,11 @@ subroutine propagate_x(En, speed_x, Cgx_av, dCgx, dt, G, US, Nangle, CS, LB, res
2327
2329
En(i,j,a) = En(i,j,a) + (G% IareaT(i,j)* (Fdt_m(i,j,a) + Fdt_p(i,j,a)))
2328
2330
enddo ; enddo ; enddo
2329
2331
2332
+ ! existing energy at turning latitude should reflect away
2333
+ if (CS% turn_critical_lat ) then
2334
+ call turning_latitude(En, NAngle, freq2, CS, G, LB)
2335
+ endif
2336
+
2330
2337
end subroutine propagate_x
2331
2338
2332
2339
! > Propagates the internal wave energy in the logical y-direction.
0 commit comments