Thin polymorphic wrapper for the isopycnal (VCOORD_RHO) and
hybrid z*/isopycnal (VCOORD_HYCOM) target-grid build. Mirrors
ocean_vcoord_compute_target_h (resolves the concrete type so
the do concurrent kernel runs on type(ocean_vcoord_t), never
a polymorphic list item). Separate from compute_target_h
because the RHO/HYCOM branch needs the per-layer T/S
concentrations and the device-resident EOS coefficients, which
the shared pure (total_h, eta) TBP cannot carry.
hybrid selects the variant: .false. (default) = pure
VCOORD_RHO (bit-identical with the P2 kernel); .true. =
VCOORD_HYCOM (adds the bottom-up density monotonize and the
z* nominal-floor sweep inside the same column kernel).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_vcoord_t), | intent(inout) | :: | this | |||
| real(kind=wp), | intent(in) | :: | total_h(:,:) | |||
| real(kind=wp), | intent(in) | :: | eta(:,:) | |||
| real(kind=wp), | intent(in) | :: | T(:,:,:) | |||
| real(kind=wp), | intent(in) | :: | S(:,:,:) | |||
| type(eos_t), | intent(in) | :: | eos | |||
| logical, | intent(in), | optional | :: | hybrid |
Enable the HYCOM hybrid deltas (default |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | private | :: | hybrid_loc |
pure subroutine ocean_vcoord_compute_target_h_rho(this, total_h, eta, T, S, eos, hybrid) !! Thin polymorphic wrapper for the isopycnal (`VCOORD_RHO`) and !! hybrid z*/isopycnal (`VCOORD_HYCOM`) target-grid build. Mirrors !! `ocean_vcoord_compute_target_h` (resolves the concrete type so !! the `do concurrent` kernel runs on `type(ocean_vcoord_t)`, never !! a polymorphic list item). Separate from `compute_target_h` !! because the RHO/HYCOM branch needs the per-layer T/S !! concentrations and the device-resident EOS coefficients, which !! the shared `pure (total_h, eta)` TBP cannot carry. !! !! `hybrid` selects the variant: `.false.` (default) = pure !! `VCOORD_RHO` (bit-identical with the P2 kernel); `.true.` = !! `VCOORD_HYCOM` (adds the bottom-up density monotonize and the !! z* nominal-floor sweep inside the same column kernel). class(ocean_vcoord_t), intent(inout) :: this real(wp), intent(in) :: total_h(:, :) ! assumed-shape-ok: thin TBP wrapper, no kernel real(wp), intent(in) :: eta(:, :) ! assumed-shape-ok: thin TBP wrapper, no kernel real(wp), intent(in) :: T(:, :, :) ! assumed-shape-ok: thin TBP wrapper, no kernel real(wp), intent(in) :: S(:, :, :) ! assumed-shape-ok: thin TBP wrapper, no kernel type(eos_t), intent(in) :: eos logical, intent(in), optional :: hybrid !! Enable the HYCOM hybrid deltas (default `.false.` = pure RHO). logical :: hybrid_loc hybrid_loc = .false. if (present(hybrid)) hybrid_loc = hybrid select type (this) type is (ocean_vcoord_t) call ocean_vcoord_compute_target_h_rho_impl(this, total_h, eta, T, S, eos, hybrid_loc) end select end subroutine ocean_vcoord_compute_target_h_rho