ocean_budgets_set_mask Subroutine

private subroutine ocean_budgets_set_mask(this, mask)

Override the default global mask. Useful for regional conservation diagnostics — “mass north of 30°S stays at FP.”

Type Bound

ocean_budgets_t

Arguments

Type IntentOptional Attributes Name
class(ocean_budgets_t), intent(inout) :: this
type(diag_mask_t), intent(in) :: mask

Calls

proc~~ocean_budgets_set_mask~~CallsGraph proc~ocean_budgets_set_mask ocean_budgets_t%ocean_budgets_set_mask proc~diag_mask_destroy diag_mask_destroy proc~ocean_budgets_set_mask->proc~diag_mask_destroy

Source Code

   subroutine ocean_budgets_set_mask(this, mask)
      !! Override the default global mask.  Useful for regional
      !! conservation diagnostics — "mass north of 30°S stays at FP."
      class(ocean_budgets_t), intent(inout) :: this
      type(diag_mask_t), intent(in) :: mask
      if (allocated(this%mask)) then
         call diag_mask_destroy(this%mask)
         deallocate (this%mask)
      end if
      allocate (this%mask, source=mask)
   end subroutine ocean_budgets_set_mask