diag_mask_t Derived Type

type, public :: diag_mask_t


Inherited by

type~~diag_mask_t~~InheritedByGraph type~diag_mask_t diag_mask_t type~diag_var_t diag_var_t type~diag_var_t->type~diag_mask_t mask type~ocean_budgets_t ocean_budgets_t type~ocean_budgets_t->type~diag_mask_t mask type~ocean_diag_t ocean_diag_t type~ocean_diag_t->type~diag_var_t vars type~ocean_state_t ocean_state_t type~ocean_state_t->type~ocean_diag_t diag 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
character(len=64), public :: name = ""

Human-readable identifier (“global”, “tasman_box”, …).

integer, public :: nx = 0

Mask shape — matches the grid’s total extent.

integer, public :: ny = 0

Mask shape — matches the grid’s total extent.

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

Cached nominal Σ weight · dx · dy.

real(kind=wp), public, allocatable :: weight(:,:)

Per-cell weight in [0, 1]. 0 = excluded, 1 = full, fractional = partial coverage.


Type-Bound Procedures

procedure, public, non_overridable :: bytes => diag_mask_bytes

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

    Counted allocatable footprint of one region mask (0 when unallocated). weight is device-mapped by ocean_diag_enter_data_impl, so it must carry a term — see diag_var_bytes, which folds this in per masked diagnostic.

    Arguments

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

    Return Value integer(kind=int64)

Source Code

   type :: diag_mask_t
      character(len=64) :: name = ""
         !! Human-readable identifier ("global", "tasman_box", ...).
      integer :: nx = 0, ny = 0
         !! Mask shape — matches the grid's total extent.
      real(wp), allocatable :: weight(:, :)
         !! Per-cell weight in `[0, 1]`. 0 = excluded, 1 = full,
         !! fractional = partial coverage.
      real(wp) :: total_area = 0.0_wp
         !! Cached nominal `Σ weight · dx · dy`.
   contains
      procedure, non_overridable :: bytes => diag_mask_bytes
   end type diag_mask_t