Forward-Euler accumulation of the viscous tendency onto the
face velocities. Shim — hoists this%du_visc%data etc. to
the host before dispatching to the flat-impl. Explicit shape
dimensions are derived from ms here and passed as scalar
args.
no_wait (optional, default .false.): forwarded to the impl —
when .true. the apply DC loops run on OpenACC queue 1 and the
routine returns WITHOUT syncing, so the batched velocity-apply
chain in run_stage_split !$acc wait(1)s ONCE. Default ⇒
blocking. Not pure because of the async/wait directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_horizontal_viscosity_t), | intent(in) | :: | this | |||
| type(multilayer_state_t), | intent(inout) | :: | ms | |||
| real(kind=wp), | intent(in) | :: | dt | |||
| logical, | intent(in), | optional | :: | no_wait |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | lwait | ||||
| integer, | private | :: | nx_cells | ||||
| integer, | private | :: | ny_cells | ||||
| integer, | private | :: | nz |
subroutine ocean_horizontal_viscosity_apply_tendencies(this, ms, dt, no_wait) !! Forward-Euler accumulation of the viscous tendency onto the !! face velocities. Shim — hoists `this%du_visc%data` etc. to !! the host before dispatching to the flat-impl. Explicit shape !! dimensions are derived from `ms` here and passed as scalar !! args. !! `no_wait` (optional, default .false.): forwarded to the impl — !! when .true. the apply DC loops run on OpenACC queue 1 and the !! routine returns WITHOUT syncing, so the batched velocity-apply !! chain in `run_stage_split` `!$acc wait(1)`s ONCE. Default ⇒ !! blocking. Not `pure` because of the async/wait directives. type(ocean_horizontal_viscosity_t), intent(in) :: this type(multilayer_state_t), intent(inout) :: ms real(wp), intent(in) :: dt logical, intent(in), optional :: no_wait integer :: nx_cells, ny_cells, nz logical :: lwait lwait = .true. if (present(no_wait)) lwait = .not. no_wait nx_cells = size(ms%u_face_x_layer, 1) - 1 ny_cells = size(ms%v_face_y_layer, 2) - 1 nz = ms%nz_ml call hvisc_apply_impl(ms%u_face_x_layer, ms%v_face_y_layer, & this%du_visc%data, this%dv_visc%data, dt, & nx_cells, ny_cells, nz, lwait) end subroutine ocean_horizontal_viscosity_apply_tendencies