Counted allocatable footprint of the split-RK2 driver (BT work state + wide-halo shadow state) slot (0 when unallocated).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ocean_dyn_t), | intent(in) | :: | this |
pure function ocean_dyn_bytes(this) result(nbytes) !! Counted allocatable footprint of the split-RK2 driver (BT work state !! + wide-halo shadow state) slot (0 when unallocated). class(ocean_dyn_t), intent(in) :: this integer(int64) :: nbytes nbytes = this%bt_work%bytes() ! accel_visc_rem stage-entry snapshots (allocated at setup when the ! knob is on; 0 on the default-off path where they stay unallocated). nbytes = nbytes + arr_bytes(this%avr_u0) + arr_bytes(this%avr_v0) ! Wide-halo BT march-in shadow state (`&ocean_bt_nml bt_halo > 0`). ! Allocated + device-mapped by `ocean_dyn_enable_bt_wide`, which the ! driver runs AFTER `ocean_state_enter_data`; the driver therefore ! latches `mem_set_counted_budget` after that call so this term is in ! the snapshot. Unallocated at bt_halo = 0 ⇒ 0. if (allocated(this%bt_wide)) nbytes = nbytes + this%bt_wide%bytes() end function ocean_dyn_bytes