hvisc_fill_A_scalar Subroutine

private pure subroutine hvisc_fill_A_scalar(ah_t, ah_q, nu_h, nx, ny, nz)

Fill the T-cell and corner harmonic-viscosity fields with the scalar nu_h (no flow-aware closure active). Constant ⇒ the T/corner averaging is exact, so the all-wet uniform-h reduction to the velocity Laplacian holds bit-for-bit.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(out) :: ah_t(nx,ny,nz)
real(kind=wp), intent(out) :: ah_q(nx+1,ny+1,nz)
real(kind=wp), intent(in) :: nu_h
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz

Called by

proc~~hvisc_fill_a_scalar~~CalledByGraph proc~hvisc_fill_a_scalar hvisc_fill_A_scalar proc~ocean_horizontal_viscosity_compute_tendencies_on ocean_horizontal_viscosity_compute_tendencies_on proc~ocean_horizontal_viscosity_compute_tendencies_on->proc~hvisc_fill_a_scalar proc~ocean_horizontal_viscosity_compute_tendencies ocean_horizontal_viscosity_compute_tendencies proc~ocean_horizontal_viscosity_compute_tendencies->proc~ocean_horizontal_viscosity_compute_tendencies_on proc~run_stage run_stage proc~run_stage->proc~ocean_horizontal_viscosity_compute_tendencies proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_horizontal_viscosity_compute_tendencies proc~ocean_dyn_step ocean_dyn_step proc~ocean_dyn_step->proc~run_stage 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 proc~engine_step->proc~ocean_dyn_step_split

Variables

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

Source Code

   pure subroutine hvisc_fill_A_scalar(ah_t, ah_q, nu_h, nx, ny, nz)
      !! Fill the T-cell and corner harmonic-viscosity fields with the
      !! scalar `nu_h` (no flow-aware closure active).  Constant ⇒ the
      !! T/corner averaging is exact, so the all-wet uniform-h reduction
      !! to the velocity Laplacian holds bit-for-bit.
      integer, intent(in)  :: nx, ny, nz
      real(wp), intent(out) :: ah_t(nx, ny, nz), ah_q(nx + 1, ny + 1, nz)
      real(wp), intent(in)  :: nu_h
      integer :: i, j, k
      do concurrent(k=1:nz, j=1:ny, i=1:nx)
         ah_t(i, j, k) = nu_h
      end do
      do concurrent(k=1:nz, j=1:ny + 1, i=1:nx + 1)
         ah_q(i, j, k) = nu_h
      end do
   end subroutine hvisc_fill_A_scalar