Copy a tile’s storage window (ghosts included) out of the
undecomposed array: tile(i, j) = whole(i + io, j + jo). The
stagger is carried by the shapes — a face/corner array is one
wider on both sides, so the same offsets address it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | tile(:,:) | |||
| real(kind=wp), | intent(in) | :: | whole(:,:) | |||
| integer, | intent(in) | :: | io |
Global i / j offsets of the tile ( |
||
| integer, | intent(in) | :: | jo |
Global i / j offsets of the tile ( |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
subroutine metrics_window_2d(tile, whole, io, jo) !! Copy a tile's storage window (ghosts included) out of the !! undecomposed array: `tile(i, j) = whole(i + io, j + jo)`. The !! stagger is carried by the shapes — a face/corner array is one !! wider on both sides, so the same offsets address it. real(wp), intent(inout) :: tile(:, :) real(wp), intent(in) :: whole(:, :) integer, intent(in) :: io, jo !! Global i / j offsets of the tile (`grid%i/j_offset_global`). integer :: i, j do j = 1, size(tile, 2) do i = 1, size(tile, 1) tile(i, j) = whole(i + io, j + jo) end do end do end subroutine metrics_window_2d