Per-cell T-area (m²) for physical integrals: cached metrics areaT
once set_area has run, else uniform grid%dx·grid%dy.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_budgets_t), | intent(in) | :: | this | |||
| real(kind=wp), | intent(out), | allocatable | :: | areaT(:,:) |
subroutine budget_area_field(this, areaT) !! Per-cell T-area (m²) for physical integrals: cached metrics `areaT` !! once `set_area` has run, else uniform `grid%dx·grid%dy`. type(ocean_budgets_t), intent(in) :: this real(wp), allocatable, intent(out) :: areaT(:, :) if (allocated(this%areaT)) then areaT = this%areaT else allocate (areaT(this%grid%nx_total, this%grid%ny_total), & source=this%grid%dx*this%grid%dy) end if end subroutine budget_area_field