ocean_vcoord_compute_target_h_rho Subroutine

private 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).

Type Bound

ocean_vcoord_t

Arguments

Type IntentOptional 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 .false. = pure RHO).


Calls

proc~~ocean_vcoord_compute_target_h_rho~~CallsGraph proc~ocean_vcoord_compute_target_h_rho ocean_vcoord_t%ocean_vcoord_compute_target_h_rho proc~ocean_vcoord_compute_target_h_rho_impl ocean_vcoord_compute_target_h_rho_impl proc~ocean_vcoord_compute_target_h_rho->proc~ocean_vcoord_compute_target_h_rho_impl proc~ocean_vcoord_rho_target ocean_vcoord_rho_target proc~ocean_vcoord_compute_target_h_rho_impl->proc~ocean_vcoord_rho_target proc~ocean_vcoord_rho_target_column ocean_vcoord_rho_target_column proc~ocean_vcoord_rho_target->proc~ocean_vcoord_rho_target_column proc~eos_density_point eos_density_point proc~ocean_vcoord_rho_target_column->proc~eos_density_point proc~invert_density_targets invert_density_targets proc~ocean_vcoord_rho_target_column->proc~invert_density_targets proc~roquet_spv_value roquet_spv_value proc~eos_density_point->proc~roquet_spv_value

Called by

proc~~ocean_vcoord_compute_target_h_rho~~CalledByGraph proc~ocean_vcoord_compute_target_h_rho ocean_vcoord_t%ocean_vcoord_compute_target_h_rho proc~ocean_apply_ale_remap_centres ocean_apply_ale_remap_centres proc~ocean_apply_ale_remap_centres->proc~ocean_vcoord_compute_target_h_rho proc~ocean_apply_ale_remap_step ocean_apply_ale_remap_step proc~ocean_apply_ale_remap_step->proc~ocean_vcoord_compute_target_h_rho proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~ocean_apply_ale_remap_step proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

Type Visibility Attributes Name Initial
logical, private :: hybrid_loc

Source Code

   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