ice_gather_flux_y_impl Subroutine

private pure subroutine ice_gather_flux_y_impl(vh, val, tr_flux_y_work, ncat, nx, ny)

Meridional twin of ice_gather_flux_x_impl.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: vh(nx,ny+1,ncat)
real(kind=wp), intent(in) :: val(nx,ny,ncat)
real(kind=wp), intent(out) :: tr_flux_y_work(nx,ny+1,ncat)
integer, intent(in) :: ncat
integer, intent(in) :: nx
integer, intent(in) :: ny

Called by

proc~~ice_gather_flux_y_impl~~CalledByGraph proc~ice_gather_flux_y_impl ice_gather_flux_y_impl proc~ice_pass_y ice_pass_y proc~ice_pass_y->proc~ice_gather_flux_y_impl proc~ice_transport_step ice_transport_step proc~ice_transport_step->proc~ice_pass_y proc~engine_step_ice engine_step_ice proc~engine_step_ice->proc~ice_transport_step proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_step_ice proc~rdb_ocean_step rdb_ocean_step proc~rdb_ocean_step->proc~engine_step_ice proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean

Variables

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

Source Code

   pure subroutine ice_gather_flux_y_impl(vh, val, tr_flux_y_work, ncat, nx, ny)
      !! Meridional twin of `ice_gather_flux_x_impl`.
      integer, intent(in) :: ncat, nx, ny
      real(wp), intent(in) :: vh(nx, ny + 1, ncat)
      real(wp), intent(in) :: val(nx, ny, ncat)
      real(wp), intent(out) :: tr_flux_y_work(nx, ny + 1, ncat)
      integer :: i, j, c

      do concurrent(j=1:ny + 1, i=1:nx, c=1:ncat)
         if (j == 1) then
            tr_flux_y_work(i, j, c) = val(i, 1, c)
         else if (j == ny + 1) then
            tr_flux_y_work(i, j, c) = val(i, ny, c)
         else if (vh(i, j, c) >= 0.0_wp) then
            tr_flux_y_work(i, j, c) = val(i, j - 1, c)
         else
            tr_flux_y_work(i, j, c) = val(i, j, c)
         end if
      end do
   end subroutine ice_gather_flux_y_impl