Refresh eta_eq(x,y) for the current outer-step time t (s).
Host recomputes the nconst amplitude scalars, pushes them to
the device, then a do concurrent fills eta_eq with no
per-cell trig and no reduction. Held static across the inner
barotropic substep loop.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_tides_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | t |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | ang | ||||
| integer, | private | :: | c | ||||
| real(kind=wp), | private | :: | now | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny | ||||
| real(kind=wp), | private | :: | pre |
subroutine tides_update_eta_eq(this, t) !! Refresh `eta_eq(x,y)` for the current outer-step time `t` (s). !! Host recomputes the `nconst` amplitude scalars, pushes them to !! the device, then a `do concurrent` fills `eta_eq` with no !! per-cell trig and no reduction. Held static across the inner !! barotropic substep loop. type(ocean_tides_t), intent(inout) :: this real(wp), intent(in) :: t real(wp) :: now, ang, pre integer :: c, nx, ny now = t + this%t_epoch do c = 1, this%nconst ang = this%omega_c(c)*now + this%phase0(c) + this%u_nodal(c) pre = this%amp_c(c)*this%love_c(c)*this%f_nodal(c) this%amp_cos(c) = pre*cos(ang) this%amp_sin(c) = pre*sin(ang) end do !$acc update device(this%amp_cos, this%amp_sin) nx = size(this%eta_eq, 1) ny = size(this%eta_eq, 2) call tides_update_eta_eq_impl(nx, ny, this%nconst, this%species_c, & this%amp_cos, this%amp_sin, & this%cos_struct, this%sin_struct, this%eta_eq) end subroutine tides_update_eta_eq