bt_wide_copy_out_impl Subroutine

private subroutine bt_wide_copy_out_impl(this, grid, bt_eta, bt_ubt, bt_vbt, bt_uhbt, bt_vhbt, bt_eta_end, bt_ubt_end, bt_vbt_end)

Non-polymorphic copy_out body. X(i,j) = w_X(i+off, j+off) over the full normal index range. Outputs: time-mean eta/ubt/vbt, uhbt/vhbt, *_end snapshots.

Arguments

Type IntentOptional Attributes Name
type(bt_wide_t), intent(in) :: this
type(hgrid_t), intent(in) :: grid

Normal-width grid.

real(kind=wp), intent(out) :: bt_eta(grid%nx_total,grid%ny_total)

Time-mean barotropic SSH (output).

real(kind=wp), intent(out) :: bt_ubt(grid%nx_total+1,grid%ny_total)

Time-mean BT u (output).

real(kind=wp), intent(out) :: bt_vbt(grid%nx_total,grid%ny_total+1)

Time-mean BT v (output).

real(kind=wp), intent(out) :: bt_uhbt(grid%nx_total+1,grid%ny_total)

Time-mean depth-integrated u transport (output).

real(kind=wp), intent(out) :: bt_vhbt(grid%nx_total,grid%ny_total+1)

Time-mean depth-integrated v transport (output).

real(kind=wp), intent(out) :: bt_eta_end(grid%nx_total,grid%ny_total)

End-of-loop eta snapshot (output).

real(kind=wp), intent(out) :: bt_ubt_end(grid%nx_total+1,grid%ny_total)

End-of-loop u snapshot (output).

real(kind=wp), intent(out) :: bt_vbt_end(grid%nx_total,grid%ny_total+1)

End-of-loop v snapshot (output).


Called by

proc~~bt_wide_copy_out_impl~~CalledByGraph proc~bt_wide_copy_out_impl bt_wide_copy_out_impl proc~bt_wide_copy_out bt_wide_t%bt_wide_copy_out proc~bt_wide_copy_out->proc~bt_wide_copy_out_impl proc~run_stage_split run_stage_split proc~run_stage_split->proc~bt_wide_copy_out proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~run_stage_split proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step

Variables

Type Visibility Attributes Name Initial
integer, private :: i
integer, private :: j
integer, private :: nx
integer, private :: ny
integer, private :: off

Source Code

   subroutine bt_wide_copy_out_impl(this, grid, &
                                    bt_eta, bt_ubt, bt_vbt, &
                                    bt_uhbt, bt_vhbt, &
                                    bt_eta_end, bt_ubt_end, bt_vbt_end)
      !! Non-polymorphic copy_out body.  X(i,j) = w_X(i+off, j+off)
      !! over the full normal index range.  Outputs: time-mean eta/ubt/vbt,
      !! uhbt/vhbt, *_end snapshots.
      type(bt_wide_t), intent(in) :: this
      type(hgrid_t), intent(in) :: grid
         !! Normal-width grid.
      real(wp), intent(out) :: bt_eta(grid%nx_total, grid%ny_total)
         !! Time-mean barotropic SSH (output).
      real(wp), intent(out) :: bt_ubt(grid%nx_total + 1, grid%ny_total)
         !! Time-mean BT u (output).
      real(wp), intent(out) :: bt_vbt(grid%nx_total, grid%ny_total + 1)
         !! Time-mean BT v (output).
      real(wp), intent(out) :: bt_uhbt(grid%nx_total + 1, grid%ny_total)
         !! Time-mean depth-integrated u transport (output).
      real(wp), intent(out) :: bt_vhbt(grid%nx_total, grid%ny_total + 1)
         !! Time-mean depth-integrated v transport (output).
      real(wp), intent(out) :: bt_eta_end(grid%nx_total, grid%ny_total)
         !! End-of-loop eta snapshot (output).
      real(wp), intent(out) :: bt_ubt_end(grid%nx_total + 1, grid%ny_total)
         !! End-of-loop u snapshot (output).
      real(wp), intent(out) :: bt_vbt_end(grid%nx_total, grid%ny_total + 1)
         !! End-of-loop v snapshot (output).

      integer :: i, j, nx, ny, off
      off = this%bt_halo
      nx = grid%nx_total
      ny = grid%ny_total

      do concurrent(j=1:ny, i=1:nx)
         bt_eta(i, j) = this%w_eta(i + off, j + off)
         bt_eta_end(i, j) = this%w_eta_end(i + off, j + off)
      end do
      do concurrent(j=1:ny, i=1:nx + 1)
         bt_ubt(i, j) = this%w_ubt(i + off, j + off)
         bt_uhbt(i, j) = this%w_uhbt(i + off, j + off)
         bt_ubt_end(i, j) = this%w_ubt_end(i + off, j + off)
      end do
      do concurrent(j=1:ny + 1, i=1:nx)
         bt_vbt(i, j) = this%w_vbt(i + off, j + off)
         bt_vhbt(i, j) = this%w_vhbt(i + off, j + off)
         bt_vbt_end(i, j) = this%w_vbt_end(i + off, j + off)
      end do
   end subroutine bt_wide_copy_out_impl