ocean_dyn_init Subroutine

private subroutine ocean_dyn_init(this, grid, nz_ml)

Initialise the barotropic working-state slot. Pass nz_ml to also allocate the split-driver slow-tendency accumulators (F_slow_u/v, F_bt_u/v, ubt_at_n/vbt_at_n). Barotropic-substep unit tests can skip the optional argument since they don’t exercise the split-driver coupling.

Type Bound

ocean_dyn_t

Arguments

Type IntentOptional Attributes Name
class(ocean_dyn_t), intent(inout) :: this
type(hgrid_t), intent(in) :: grid
integer, intent(in), optional :: nz_ml

Calls

proc~~ocean_dyn_init~~CallsGraph proc~ocean_dyn_init ocean_dyn_t%ocean_dyn_init proc~barotropic_workstate_init barotropic_workstate_t%barotropic_workstate_init proc~ocean_dyn_init->proc~barotropic_workstate_init

Source Code

   subroutine ocean_dyn_init(this, grid, nz_ml)
      !! Initialise the barotropic working-state slot.  Pass `nz_ml`
      !! to also allocate the split-driver slow-tendency
      !! accumulators (`F_slow_u/v`, `F_bt_u/v`, `ubt_at_n/vbt_at_n`).
      !! Barotropic-substep unit tests can skip the optional argument since
      !! they don't exercise the split-driver coupling.
      class(ocean_dyn_t), intent(inout) :: this
      type(hgrid_t), intent(in) :: grid
      integer, intent(in), optional :: nz_ml
      if (present(nz_ml)) then
         call this%bt_work%init(grid, nz_ml=nz_ml)
      else
         call this%bt_work%init(grid)
      end if
      this%is_init = .true.
   end subroutine ocean_dyn_init