fill_ghost_west_sign Subroutine

private pure subroutine fill_ghost_west_sign(hTr, h_layer, u_layer, nx_total, ny_total, nz, i_w, j0, j1, nghost, clamped_tr_w)

Sign-switch ghost fill for the west edge.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(inout) :: hTr(nx_total,ny_total,nz)
real(kind=wp), intent(in) :: h_layer(nx_total,ny_total,nz)
real(kind=wp), intent(in) :: u_layer(nx_total+1,ny_total,nz)
integer, intent(in) :: nx_total
integer, intent(in) :: ny_total
integer, intent(in) :: nz
integer, intent(in) :: i_w
integer, intent(in) :: j0
integer, intent(in) :: j1
integer, intent(in) :: nghost
real(kind=wp), intent(in) :: clamped_tr_w

Calls

proc~~fill_ghost_west_sign~~CallsGraph proc~fill_ghost_west_sign fill_ghost_west_sign local local proc~fill_ghost_west_sign->local

Called by

proc~~fill_ghost_west_sign~~CalledByGraph proc~fill_ghost_west_sign fill_ghost_west_sign proc~ocean_obc_fill_ghosts ocean_obc_fill_ghosts proc~ocean_obc_fill_ghosts->proc~fill_ghost_west_sign proc~run_continuity_chain run_continuity_chain proc~run_continuity_chain->proc~ocean_obc_fill_ghosts proc~run_stage_split run_stage_split proc~run_stage_split->proc~run_continuity_chain 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

Variables

Type Visibility Attributes Name Initial
integer, private :: g
real(kind=wp), private :: hTr_bc
real(kind=wp), private :: hTr_int
integer, private :: j
integer, private :: k

Source Code

   pure subroutine fill_ghost_west_sign(hTr, h_layer, u_layer, &
                                        nx_total, ny_total, nz, &
                                        i_w, j0, j1, nghost, clamped_tr_w)
      !! Sign-switch ghost fill for the west edge.
      integer, intent(in) :: nx_total, ny_total, nz, nghost
      real(wp), intent(inout) :: hTr(nx_total, ny_total, nz)
      real(wp), intent(in)    :: h_layer(nx_total, ny_total, nz)
      real(wp), intent(in)    :: u_layer(nx_total + 1, ny_total, nz)
      integer, intent(in) :: i_w, j0, j1
      real(wp), intent(in) :: clamped_tr_w
      integer :: j, k, g
      real(wp) :: hTr_bc, hTr_int
      do concurrent(k=1:nz, j=j0:j1, g=1:nghost) local(hTr_bc, hTr_int)
         if (u_layer(i_w, j, k) > 0.0_wp) then
            hTr_bc = clamped_tr_w*h_layer(g, j, k)
            hTr(g, j, k) = hTr_bc
         else
            hTr_int = hTr(i_w, j, k)
            hTr(g, j, k) = hTr_int
         end if
      end do
   end subroutine fill_ghost_west_sign