One outer (slow) EVP call: evp_sub_steps subcycles advancing
ui/vi/str_d/str_t/str_s, plus the subcycle-averaged
ice->ocean stress fxoc/fyoc.
Thin public shim (test seam): unpacks the caller-supplied
evp_workspace_t slot’s components into the explicit-shape
flat-impl args of ice_evp_dynamics_impl — the outer-shim +
flat-impl pattern. NEVER read ws%component inside a
do concurrent (per-launch descriptor copies); the impl takes the
scratch as explicit-shape (nx,ny) dummies instead. ws must be
init+enter_data‘d for this (grid%nx_total, grid%ny_total)
(the driver does this in ocean_sea_ice_t%init/enter_data; tests
build a local evp_workspace_t).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_metrics_t), | intent(in) | :: | metrics | |||
| real(kind=wp), | intent(in) | :: | f_corner(:,:) | |||
| real(kind=wp), | intent(in) | :: | mis(:,:) | |||
| real(kind=wp), | intent(in) | :: | mice(:,:) | |||
| real(kind=wp), | intent(in) | :: | ci(:,:) | |||
| real(kind=wp), | intent(in) | :: | uo(:,:) | |||
| real(kind=wp), | intent(in) | :: | vo(:,:) | |||
| real(kind=wp), | intent(in) | :: | tau_ax(:,:) | |||
| real(kind=wp), | intent(in) | :: | tau_ay(:,:) | |||
| real(kind=wp), | intent(inout) | :: | ui(:,:) | |||
| real(kind=wp), | intent(inout) | :: | vi(:,:) | |||
| real(kind=wp), | intent(inout) | :: | str_d(:,:) | |||
| real(kind=wp), | intent(inout) | :: | str_t(:,:) | |||
| real(kind=wp), | intent(inout) | :: | str_s(:,:) | |||
| real(kind=wp), | intent(inout) | :: | fxoc(:,:) | |||
| real(kind=wp), | intent(inout) | :: | fyoc(:,:) | |||
| real(kind=wp), | intent(in) | :: | dt_slow | |||
| type(ice_evp_params_t), | intent(in) | :: | par | |||
| logical, | intent(in) | :: | periodic_x | |||
| logical, | intent(in) | :: | periodic_y | |||
| type(evp_workspace_t), | intent(inout) | :: | ws | |||
| real(kind=wp), | intent(in), | optional | :: | dt_transport |
PR 36: dt TRANSPORT will use for the CFL bound. Absent => |
|
| integer, | intent(out), | optional | :: | n_trunc |
PR 36: count of ice-bearing faces the final clip touched. |
|
| logical, | intent(in), | optional | :: | halo_x |
The x / y axis is split across ranks: exchange |
|
| logical, | intent(in), | optional | :: | halo_y |
The x / y axis is split across ranks: exchange |
|
| logical, | intent(in), | optional | :: | land_w |
Pin that ghost band of |
|
| logical, | intent(in), | optional | :: | land_e |
Pin that ghost band of |
|
| logical, | intent(in), | optional | :: | land_s |
Pin that ghost band of |
|
| logical, | intent(in), | optional | :: | land_n |
Pin that ghost band of |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | hx | ||||
| logical, | private | :: | hy | ||||
| logical, | private | :: | le | ||||
| logical, | private | :: | ln | ||||
| logical, | private | :: | ls | ||||
| logical, | private | :: | lw | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny |
subroutine ice_evp_dynamics(grid, metrics, f_corner, mis, mice, ci, uo, vo, & tau_ax, tau_ay, ui, vi, str_d, str_t, str_s, & fxoc, fyoc, dt_slow, par, periodic_x, periodic_y, ws, & dt_transport, n_trunc, halo_x, halo_y, & land_w, land_e, land_s, land_n) !! One outer (slow) EVP call: `evp_sub_steps` subcycles advancing !! `ui`/`vi`/`str_d`/`str_t`/`str_s`, plus the subcycle-averaged !! ice->ocean stress `fxoc`/`fyoc`. !! !! Thin public shim (test seam): unpacks the caller-supplied !! `evp_workspace_t` slot's components into the explicit-shape !! flat-impl args of `ice_evp_dynamics_impl` — the outer-shim + !! flat-impl pattern. NEVER read `ws%component` inside a !! `do concurrent` (per-launch descriptor copies); the impl takes the !! scratch as explicit-shape `(nx,ny)` dummies instead. `ws` must be !! `init`+`enter_data`'d for this `(grid%nx_total, grid%ny_total)` !! (the driver does this in `ocean_sea_ice_t%init`/`enter_data`; tests !! build a local `evp_workspace_t`). type(hgrid_t), intent(in) :: grid type(ocean_metrics_t), intent(in) :: metrics real(wp), intent(in) :: f_corner(:, :) real(wp), intent(in) :: mis(:, :), mice(:, :), ci(:, :) real(wp), intent(in) :: uo(:, :), vo(:, :) real(wp), intent(in) :: tau_ax(:, :), tau_ay(:, :) real(wp), intent(inout) :: ui(:, :), vi(:, :) real(wp), intent(inout) :: str_d(:, :), str_t(:, :), str_s(:, :) real(wp), intent(inout) :: fxoc(:, :), fyoc(:, :) real(wp), intent(in) :: dt_slow type(ice_evp_params_t), intent(in) :: par logical, intent(in) :: periodic_x, periodic_y type(evp_workspace_t), intent(inout) :: ws real(wp), intent(in), optional :: dt_transport !! PR 36: dt TRANSPORT will use for the CFL bound. Absent => `dt_slow`. integer, intent(out), optional :: n_trunc !! PR 36: count of ice-bearing faces the final clip touched. logical, intent(in), optional :: halo_x, halo_y !! The x / y axis is split across ranks: exchange `ui`/`vi` !! through the ocean halo and skip the local periodic wrap on that !! axis. Absent => `.false.` (single rank, the unit-test seam). logical, intent(in), optional :: land_w, land_e, land_s, land_n !! Pin that ghost band of `mask_t` to land (a physical, !! non-periodic edge). Absent => `.not. periodic_x` (W/E) / !! `.not. periodic_y` (S/N): the single-rank wall-or-wrap policy. integer :: nx, ny logical :: hx, hy, lw, le, ls, ln nx = grid%nx_total ny = grid%ny_total hx = .false. if (present(halo_x)) hx = halo_x hy = .false. if (present(halo_y)) hy = halo_y lw = .not. periodic_x if (present(land_w)) lw = land_w le = .not. periodic_x if (present(land_e)) le = land_e ls = .not. periodic_y if (present(land_s)) ls = land_s ln = .not. periodic_y if (present(land_n)) ln = land_n call ice_evp_dynamics_impl(grid, metrics, f_corner, mis, mice, ci, uo, vo, & tau_ax, tau_ay, ui, vi, str_d, str_t, str_s, & fxoc, fyoc, dt_slow, par, periodic_x, periodic_y, nx, ny, & ws%mis_w, ws%mice_w, ws%ci_w, ws%pres_mice_w, & ws%del_sh_min_pr_w, ws%sh_dd_w, ws%sh_dt_w, ws%zeta_w, & ws%del_sh_w, ws%mask_t_w, ws%mi_u_w, ws%mask_u_w, & ws%u_tmp_w, ws%mi_v_w, ws%mask_v_w, ws%a_u_w, ws%a_v_w, & ws%sh_ds_w, ws%mi_ratio_a_q_w, ws%q_w, ws%mask_q_w, & hx, hy, lw, le, ls, ln, dt_transport, n_trunc) end subroutine ice_evp_dynamics