Pre-size the buffers for the largest group of the run, in
(row x layer) slabs summed over its fields — e.g. the
ml_state group is (3 + ntracer)*nz fields of at most ng+1
rows — so no device reallocation fires mid-run. No-op when
inactive or already large enough.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nslab |
Total (rows x layers) over the fields of the largest group. |
subroutine ocean_fold_exchange_reserve(nslab) !! Pre-size the buffers for the largest group of the run, in !! (row x layer) slabs summed over its fields — e.g. the !! `ml_state` group is `(3 + ntracer)*nz` fields of at most `ng+1` !! rows — so no device reallocation fires mid-run. No-op when !! inactive or already large enough. integer, intent(in) :: nslab !! Total (rows x layers) over the fields of the largest group. if (.not. fx_active) return if (nslab > fx_slab_cap) call grow_buffers(nslab) end subroutine ocean_fold_exchange_reserve