Fold the tidal diffusivity into the vmix interface fields,
ADDITIVELY (interior-diffusivity semantics; St Laurent tidal
mixing is an interior source like kappa-shear). Called EVERY
stage (PP81 rewrites kv/kt each stage; kd_int itself refreshes
at thermo cadence). Interior interfaces only — K=1 (bed) and
K=nzp1 (surface) stay zero in both source and target.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_tidal_mixing_t), | intent(in) | :: | this | |||
| integer, | intent(in) | :: | nx |
Interface-field extents (explicit shape: assumed-shape
dummies in a |
||
| integer, | intent(in) | :: | ny |
Interface-field extents (explicit shape: assumed-shape
dummies in a |
||
| integer, | intent(in) | :: | nzp1 |
Interface-field extents (explicit shape: assumed-shape
dummies in a |
||
| real(kind=wp), | intent(inout) | :: | kv(nx,ny,nzp1) |
Momentum viscosity at interfaces; gets prandtl_tidal*kd. |
||
| real(kind=wp), | intent(inout) | :: | kt(nx,ny,nzp1) |
Tracer diffusivity at interfaces; gets kd. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | k |
pure subroutine tidal_mixing_merge_into_kt(this, nx, ny, nzp1, kv, kt) !! Fold the tidal diffusivity into the vmix interface fields, !! ADDITIVELY (interior-diffusivity semantics; St Laurent tidal !! mixing is an interior source like kappa-shear). Called EVERY !! stage (PP81 rewrites kv/kt each stage; `kd_int` itself refreshes !! at thermo cadence). Interior interfaces only — K=1 (bed) and !! K=nzp1 (surface) stay zero in both source and target. type(ocean_tidal_mixing_t), intent(in) :: this integer, intent(in) :: nx, ny, nzp1 !! Interface-field extents (explicit shape: assumed-shape !! dummies in a `do concurrent` kernel make NVHPC walk the !! descriptor with per-launch memcpys — this runs every stage). real(wp), intent(inout) :: kv(nx, ny, nzp1) !! Momentum viscosity at interfaces; gets prandtl_tidal*kd. real(wp), intent(inout) :: kt(nx, ny, nzp1) !! Tracer diffusivity at interfaces; gets kd. integer :: i, j, k do concurrent(k=2:nzp1 - 1, j=1:ny, i=1:nx) kt(i, j, k) = kt(i, j, k) + this%kd_int(i, j, k) kv(i, j, k) = kv(i, j, k) + this%prandtl_tidal*this%kd_int(i, j, k) end do end subroutine tidal_mixing_merge_into_kt