Outer-shim — flattens the derived-type derefs before the
do concurrent body sees them. Explicit-shape dimensions
derived from ms and passed to the impl as scalar args.
no_wait (optional, default .false.): forwarded to the impl —
when .true. the apply DC loops run on OpenACC queue 1 without a
trailing sync, 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_surface_stress_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_surface_stress_apply_tendencies(this, ms, dt, no_wait) !! Outer-shim — flattens the derived-type derefs before the !! `do concurrent` body sees them. Explicit-shape dimensions !! derived from `ms` and passed to the impl as scalar args. !! `no_wait` (optional, default .false.): forwarded to the impl — !! when .true. the apply DC loops run on OpenACC queue 1 without a !! trailing sync, 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_surface_stress_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 surfstress_apply_impl(ms%u_face_x_layer, ms%v_face_y_layer, & this%du_stress%data, this%dv_stress%data, & dt, nx_cells, ny_cells, nz, lwait) end subroutine ocean_surface_stress_apply_tendencies