ocean_budgets_init_snapshot Subroutine

private subroutine ocean_budgets_init_snapshot(this, ms)

Snapshot values_init from the current state. Call once after the IC is set + the EOS has run, before stepping.

Type Bound

ocean_budgets_t

Arguments

Type IntentOptional Attributes Name
class(ocean_budgets_t), intent(inout) :: this
type(multilayer_state_t), intent(in) :: ms

Calls

proc~~ocean_budgets_init_snapshot~~CallsGraph proc~ocean_budgets_init_snapshot ocean_budgets_t%ocean_budgets_init_snapshot proc~diag_mask_global diag_mask_global proc~ocean_budgets_init_snapshot->proc~diag_mask_global proc~ocean_budgets_evaluate ocean_budgets_t%ocean_budgets_evaluate proc~ocean_budgets_init_snapshot->proc~ocean_budgets_evaluate proc~recompute_total_area recompute_total_area proc~diag_mask_global->proc~recompute_total_area proc~ocean_budgets_evaluate->proc~diag_mask_global proc~budget_area_field budget_area_field proc~ocean_budgets_evaluate->proc~budget_area_field proc~budget_total_ke budget_total_ke proc~ocean_budgets_evaluate->proc~budget_total_ke proc~budget_total_mass budget_total_mass proc~ocean_budgets_evaluate->proc~budget_total_mass proc~budget_total_tracer budget_total_tracer proc~ocean_budgets_evaluate->proc~budget_total_tracer

Source Code

   subroutine ocean_budgets_init_snapshot(this, ms)
      !! Snapshot `values_init` from the current state.  Call once
      !! after the IC is set + the EOS has run, before stepping.
      class(ocean_budgets_t), intent(inout) :: this
      type(multilayer_state_t), intent(in) :: ms
      if (.not. allocated(this%mask)) then
         allocate (this%mask, source=diag_mask_global(this%grid))
      end if
      call this%evaluate(ms)
      this%values_init = this%values
      this%has_snapshot = .true.
   end subroutine ocean_budgets_init_snapshot