metrics_window_2d Subroutine

private 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.

Arguments

Type IntentOptional 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 (grid%i/j_offset_global).

integer, intent(in) :: jo

Global i / j offsets of the tile (grid%i/j_offset_global).


Called by

proc~~metrics_window_2d~~CalledByGraph proc~metrics_window_2d metrics_window_2d proc~metrics_window_all metrics_window_all proc~metrics_window_all->proc~metrics_window_2d proc~metrics_fill_from_supergrid metrics_fill_from_supergrid proc~metrics_fill_from_supergrid->proc~metrics_window_all proc~metrics_fill_tripolar metrics_fill_tripolar proc~metrics_fill_tripolar->proc~metrics_window_all proc~configure_ocean_metrics configure_ocean_metrics proc~configure_ocean_metrics->proc~metrics_fill_from_supergrid proc~configure_ocean_metrics->proc~metrics_fill_tripolar proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_metrics proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j

Source Code

   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