Refresh the combined seam field eta_seam for the current outer
step from the assembled total surface pressure p_surf (read-only;
see the module header for where the assembly happens): fold
eta_ib = -p_surf/(rho0 g_bt) into eta_seam = eta_ib [+ eta_tide].
g_bt is the barotropic-substep gravity (bt_work%g_bt), passed in
at call time so the seam scales with the ocean’s own dynamics.
eta_tide (optional) is the equilibrium-tide + scalar-SAL seam,
added when the tide is on. Host does one reciprocal; the fill is a
single explicit-shape do concurrent. p_surf is the
device-resident ocean_surface_flux_t%p_surf component array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_p_surf_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | p_surf(:,:) | |||
| real(kind=wp), | intent(in) | :: | g_bt | |||
| real(kind=wp), | intent(in), | optional | :: | eta_tide(:,:) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | i_rho0_g | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny |
subroutine p_surf_update_seam(this, p_surf, g_bt, eta_tide) !! Refresh the combined seam field `eta_seam` for the current outer !! step from the assembled total surface pressure `p_surf` (read-only; !! see the module header for where the assembly happens): fold !! `eta_ib = -p_surf/(rho0 g_bt)` into `eta_seam = eta_ib [+ eta_tide]`. !! `g_bt` is the barotropic-substep gravity (`bt_work%g_bt`), passed in !! at call time so the seam scales with the ocean's own dynamics. !! `eta_tide` (optional) is the equilibrium-tide + scalar-SAL seam, !! added when the tide is on. Host does one reciprocal; the fill is a !! single explicit-shape `do concurrent`. `p_surf` is the !! device-resident `ocean_surface_flux_t%p_surf` component array. class(ocean_p_surf_t), intent(inout) :: this real(wp), intent(in) :: p_surf(:, :) real(wp), intent(in) :: g_bt real(wp), intent(in), optional :: eta_tide(:, :) real(wp) :: i_rho0_g integer :: nx, ny nx = size(this%eta_ib, 1) ny = size(this%eta_ib, 2) i_rho0_g = 1.0_wp/(this%rho0*g_bt) if (present(eta_tide)) then call p_surf_update_seam_impl(nx, ny, i_rho0_g, p_surf, & this%eta_ib, this%eta_seam, & use_tide=.true., eta_tide=eta_tide) else call p_surf_update_seam_impl(nx, ny, i_rho0_g, p_surf, & this%eta_ib, this%eta_seam, & use_tide=.false.) end if end subroutine p_surf_update_seam