bt_wide_bytes Function

private pure function bt_wide_bytes(this) result(nbytes)

Counted allocatable footprint of the wide-halo BT shadow state (0 when unallocated, i.e. whenever &ocean_bt_nml bt_halo = 0).

Every term here is device-mapped by bt_wide_enter_data_impl and was previously counted by nothing — ocean_dyn_bytes omitted the slot entirely because this function did not exist. ~436 MB at 1000x800 with bt_halo = 10, nghost = 4. One arr_bytes term per array: add one here when a new allocatable joins the type.

Type Bound

bt_wide_t

Arguments

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

Return Value integer(kind=int64)


Calls

proc~~bt_wide_bytes~~CallsGraph proc~bt_wide_bytes bt_wide_t%bt_wide_bytes interface~arr_bytes arr_bytes proc~bt_wide_bytes->interface~arr_bytes proc~ocean_metrics_bytes ocean_metrics_t%ocean_metrics_bytes proc~bt_wide_bytes->proc~ocean_metrics_bytes proc~arr_bytes_i1 arr_bytes_i1 interface~arr_bytes->proc~arr_bytes_i1 proc~arr_bytes_i2 arr_bytes_i2 interface~arr_bytes->proc~arr_bytes_i2 proc~arr_bytes_i3 arr_bytes_i3 interface~arr_bytes->proc~arr_bytes_i3 proc~arr_bytes_l1 arr_bytes_l1 interface~arr_bytes->proc~arr_bytes_l1 proc~arr_bytes_l2 arr_bytes_l2 interface~arr_bytes->proc~arr_bytes_l2 proc~arr_bytes_l3 arr_bytes_l3 interface~arr_bytes->proc~arr_bytes_l3 proc~arr_bytes_r1 arr_bytes_r1 interface~arr_bytes->proc~arr_bytes_r1 proc~arr_bytes_r2 arr_bytes_r2 interface~arr_bytes->proc~arr_bytes_r2 proc~arr_bytes_r3 arr_bytes_r3 interface~arr_bytes->proc~arr_bytes_r3 proc~arr_bytes_r4 arr_bytes_r4 interface~arr_bytes->proc~arr_bytes_r4 proc~ocean_metrics_bytes->interface~arr_bytes

Source Code

   pure function bt_wide_bytes(this) result(nbytes)
      !! Counted allocatable footprint of the wide-halo BT shadow state
      !! (0 when unallocated, i.e. whenever `&ocean_bt_nml bt_halo = 0`).
      !!
      !! Every term here is device-mapped by `bt_wide_enter_data_impl` and
      !! was previously counted by nothing — `ocean_dyn_bytes` omitted the
      !! slot entirely because this function did not exist.  ~436 MB at
      !! 1000x800 with `bt_halo = 10, nghost = 4`.  One `arr_bytes` term
      !! per array: add one here when a new allocatable joins the type.
      class(bt_wide_t), intent(in) :: this
      integer(int64) :: nbytes
      nbytes = this%metrics_w%bytes() &
               + arr_bytes(this%f_corner_w) &
               + arr_bytes(this%w_eta) &
               + arr_bytes(this%w_H_ref) &
               + arr_bytes(this%w_eta_new) &
               + arr_bytes(this%w_ke) &
               + arr_bytes(this%w_eta_sum) &
               + arr_bytes(this%w_eta_end) &
               + arr_bytes(this%w_ubt) &
               + arr_bytes(this%w_ubt_prev) &
               + arr_bytes(this%w_rem_u) &
               + arr_bytes(this%w_ubt_sum) &
               + arr_bytes(this%w_uhbt_sum) &
               + arr_bytes(this%w_uhbt) &
               + arr_bytes(this%w_ubt_end) &
               + arr_bytes(this%w_vbt) &
               + arr_bytes(this%w_vbt_prev) &
               + arr_bytes(this%w_rem_v) &
               + arr_bytes(this%w_vbt_sum) &
               + arr_bytes(this%w_vhbt_sum) &
               + arr_bytes(this%w_vhbt) &
               + arr_bytes(this%w_vbt_end) &
               + arr_bytes(this%w_zeta) &
               + arr_bytes(this%w_force_u) &
               + arr_bytes(this%w_force_v)
   end function bt_wide_bytes