ocean_obc_t Derived Type

type, public :: ocean_obc_t


Inherited by

type~~ocean_obc_t~~InheritedByGraph type~ocean_obc_t ocean_obc_t type~ocean_state_t ocean_state_t type~ocean_state_t->type~ocean_obc_t obc 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
logical, public :: clamp_tracers = .true.

Apply the FRS clamp to T, S (not just SSH/UV).

real(kind=wp), public :: dt_ingest = 3600.0_wp

Cadence at which the next parent slab is read (s).

logical, public :: enabled = .false.

Master OBC switch. Falls back to coastal BCs if false.

logical, public :: is_init = .false.

True between init and destroy (tracks GPU device attachment).

integer, public :: nrelax = 8

Width (in cells) of the Flow-Relaxation zone.

real(kind=wp), public, allocatable :: parent_S_east(:,:,:)
real(kind=wp), public, allocatable :: parent_S_north(:,:,:)
real(kind=wp), public, allocatable :: parent_S_south(:,:,:)
real(kind=wp), public, allocatable :: parent_S_west(:,:,:)
real(kind=wp), public, allocatable :: parent_T_east(:,:,:)
real(kind=wp), public, allocatable :: parent_T_north(:,:,:)
real(kind=wp), public, allocatable :: parent_T_south(:,:,:)
real(kind=wp), public, allocatable :: parent_T_west(:,:,:)
real(kind=wp), public, allocatable :: parent_eta_east(:,:)
real(kind=wp), public, allocatable :: parent_eta_north(:,:)
real(kind=wp), public, allocatable :: parent_eta_south(:,:)
real(kind=wp), public, allocatable :: parent_eta_west(:,:)
real(kind=wp), public, allocatable :: parent_u_east(:,:,:)
real(kind=wp), public, allocatable :: parent_u_west(:,:,:)
real(kind=wp), public, allocatable :: parent_v_north(:,:,:)
real(kind=wp), public, allocatable :: parent_v_south(:,:,:)
real(kind=wp), public :: relax_inner = 0.0_wp

Relaxation timescale (1/s) at the interior edge of FRS.

real(kind=wp), public :: relax_outer = 1.0_wp/600.0_wp

Relaxation timescale at the outer (boundary) edge.

real(kind=wp), public :: t_next_ingest = 0.0_wp

Type-Bound Procedures

procedure, public, non_overridable :: bytes => ocean_obc_bytes

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

    Counted allocatable footprint of the open boundary condition slot (0 when unallocated).

    Arguments

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

    Return Value integer(kind=int64)

procedure, public, non_overridable :: destroy => ocean_obc_destroy

procedure, public, non_overridable :: init => ocean_obc_init

  • private subroutine ocean_obc_init(this, grid)

    Arguments

    Type IntentOptional Attributes Name
    class(ocean_obc_t), intent(inout) :: this
    type(hgrid_t), intent(in) :: grid

Source Code

   type :: ocean_obc_t
      logical :: is_init = .false.
         !! True between `init` and `destroy` (tracks GPU device attachment).

      ! ---- Master switches ----
      logical :: enabled = .false.
         !! Master OBC switch.  Falls back to coastal BCs if false.
      logical :: clamp_tracers = .true.
         !! Apply the FRS clamp to T, S (not just SSH/UV).

      ! ---- FRS zone ----
      integer  :: nrelax = 8
         !! Width (in cells) of the Flow-Relaxation zone.
      real(wp) :: relax_inner = 0.0_wp
         !! Relaxation timescale (1/s) at the interior edge of FRS.
      real(wp) :: relax_outer = 1.0_wp/600.0_wp
         !! Relaxation timescale at the outer (boundary) edge.

      ! ---- Per-edge parent-state ring buffers ----
      ! Two-time-level buffers. Shape per edge:
      !   (nx, nz_ml [+1 for face arrays], 2 time levels)
      real(wp), allocatable :: parent_eta_west(:, :)
      real(wp), allocatable :: parent_eta_east(:, :)
      real(wp), allocatable :: parent_eta_south(:, :)
      real(wp), allocatable :: parent_eta_north(:, :)

      real(wp), allocatable :: parent_u_west(:, :, :)
      real(wp), allocatable :: parent_u_east(:, :, :)
      real(wp), allocatable :: parent_v_south(:, :, :)
      real(wp), allocatable :: parent_v_north(:, :, :)

      real(wp), allocatable :: parent_T_west(:, :, :)
      real(wp), allocatable :: parent_T_east(:, :, :)
      real(wp), allocatable :: parent_T_south(:, :, :)
      real(wp), allocatable :: parent_T_north(:, :, :)

      real(wp), allocatable :: parent_S_west(:, :, :)
      real(wp), allocatable :: parent_S_east(:, :, :)
      real(wp), allocatable :: parent_S_south(:, :, :)
      real(wp), allocatable :: parent_S_north(:, :, :)

      ! ---- Ingest timing ----
      real(wp) :: dt_ingest = 3600.0_wp
         !! Cadence at which the next parent slab is read (s).
      real(wp) :: t_next_ingest = 0.0_wp
   contains
      procedure, non_overridable :: init => ocean_obc_init
      procedure, non_overridable :: destroy => ocean_obc_destroy
      procedure, non_overridable :: bytes => ocean_obc_bytes
   end type ocean_obc_t