ocean_vertical_advection_t Derived Type

type, public :: ocean_vertical_advection_t


Inherits

type~~ocean_vertical_advection_t~~InheritsGraph type~ocean_vertical_advection_t ocean_vertical_advection_t type~scratch_3d_buffer_t scratch_3d_buffer_t type~ocean_vertical_advection_t->type~scratch_3d_buffer_t F_face

Inherited by

type~~ocean_vertical_advection_t~~InheritedByGraph type~ocean_vertical_advection_t ocean_vertical_advection_t type~ocean_state_t ocean_state_t type~ocean_state_t->type~ocean_vertical_advection_t vert_advect type~ocean_engine_t ocean_engine_t type~ocean_engine_t->type~ocean_state_t state type~ocean_handle_t ocean_handle_t type~ocean_handle_t->type~ocean_state_t state type~ocean_handle_t->type~ocean_engine_t engine

Components

Type Visibility Attributes Name Initial
type(scratch_3d_buffer_t), public :: F_face

Per-step vertical tracer-flux at interfaces. Shape (nx, ny, nz_ml+1). Two-pass design: tracer impl first fills F_face from hTr + w_interface (read-only), then applies the divergence onto hTr. This avoids the do-concurrent race that a single-pass version would have (each layer reads its neighbour’s hTr while another iteration writes it). Reused across all tracers in one call.

logical, public :: enforce_bed_bc = .true.

When true the bed interface w is forced to zero before integration regardless of what compute_w_from_continuity is handed. Disable only when the caller wants to inject a sub-bed flow source (test instrumentation).

logical, public :: is_init = .false.

True between init and destroy.


Type-Bound Procedures

procedure, public, non_overridable :: bytes => ocean_vertical_advection_bytes

  • private pure function ocean_vertical_advection_bytes(this) result(nbytes)

    Counted allocatable footprint of the vertical advection slot (0 when unallocated).

    Arguments

    Type IntentOptional Attributes Name
    class(ocean_vertical_advection_t), intent(in) :: this

    Return Value integer(kind=int64)

procedure, public, non_overridable :: destroy => ocean_vert_adv_destroy

procedure, public, non_overridable :: enter_data => ocean_vert_adv_enter_data

  • private subroutine ocean_vert_adv_enter_data(this)

    Type-bound wrapper — delegates to the non-polymorphic impl so the device-attach map base is the heap object, not a polymorphic stack box (AMD libomptarget cross-slot-overlap fix).

    Arguments

    Type IntentOptional Attributes Name
    class(ocean_vertical_advection_t), intent(inout) :: this

procedure, public, non_overridable :: exit_data => ocean_vert_adv_exit_data

procedure, public, non_overridable :: init => ocean_vert_adv_init

Source Code

   type :: ocean_vertical_advection_t
      logical :: is_init = .false.
         !! True between `init` and `destroy`.
      logical :: enforce_bed_bc = .true.
         !! When true the bed interface w is forced to zero before
         !! integration regardless of what `compute_w_from_continuity`
         !! is handed.  Disable only when the caller wants to inject
         !! a sub-bed flow source (test instrumentation).
      type(scratch_3d_buffer_t) :: F_face
         !! Per-step vertical tracer-flux at interfaces.  Shape
         !! (nx, ny, nz_ml+1).  Two-pass design: tracer impl first
         !! fills `F_face` from `hTr` + `w_interface` (read-only),
         !! then applies the divergence onto `hTr`.  This avoids
         !! the do-concurrent race that a single-pass version would
         !! have (each layer reads its neighbour's hTr while
         !! another iteration writes it).  Reused across all
         !! tracers in one call.
   contains
      procedure, non_overridable :: init => ocean_vert_adv_init
      procedure, non_overridable :: destroy => ocean_vert_adv_destroy
      procedure, non_overridable :: enter_data => ocean_vert_adv_enter_data
      procedure, non_overridable :: exit_data => ocean_vert_adv_exit_data
      procedure, non_overridable :: bytes => ocean_vertical_advection_bytes
   end type ocean_vertical_advection_t