raw_sh_xx Function

private pure function raw_sh_xx(u_face, v_face, idxCu, idyCu, idxCv, dy_dxT, dx_dyT, i, j, k, nx, ny, nz) result(sh_xx)

Raw tension strain sh_xx = du/dx − dv/dy at T-cell (i,j), mirroring Phase-1’s gradient form (unmasked — used only by the anisotropic cross term where the all-wet reduction is exact). !$acc routine seq so the stress-assembly do concurrent can call it on-device.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: u_face(nx+1,ny,nz)
real(kind=wp), intent(in) :: v_face(nx,ny+1,nz)
real(kind=wp), intent(in) :: idxCu(nx+1,ny)
real(kind=wp), intent(in) :: idyCu(nx+1,ny)
real(kind=wp), intent(in) :: idxCv(nx,ny+1)
real(kind=wp), intent(in) :: dy_dxT(nx,ny)
real(kind=wp), intent(in) :: dx_dyT(nx,ny)
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: k
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz

Return Value real(kind=wp)


Called by

proc~~raw_sh_xx~~CalledByGraph proc~raw_sh_xx raw_sh_xx proc~hvisc_compute_stress hvisc_compute_stress proc~hvisc_compute_stress->proc~raw_sh_xx proc~ocean_horizontal_viscosity_compute_tendencies_on ocean_horizontal_viscosity_compute_tendencies_on proc~ocean_horizontal_viscosity_compute_tendencies_on->proc~hvisc_compute_stress 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

Source Code

   pure function raw_sh_xx(u_face, v_face, idxCu, idyCu, idxCv, dy_dxT, dx_dyT, &
                           i, j, k, nx, ny, nz) result(sh_xx)
      !! Raw tension strain `sh_xx = du/dx − dv/dy` at T-cell (i,j),
      !! mirroring Phase-1's gradient form (unmasked — used only by the
      !! anisotropic cross term where the all-wet reduction is exact).
      !! `!$acc routine seq` so the stress-assembly `do concurrent` can
      !! call it on-device.
      !$acc routine seq
      integer, intent(in) :: i, j, k, nx, ny, nz
      real(wp), intent(in) :: u_face(nx + 1, ny, nz), v_face(nx, ny + 1, nz)
      real(wp), intent(in) :: idxCu(nx + 1, ny), idyCu(nx + 1, ny), idxCv(nx, ny + 1)
      real(wp), intent(in) :: dy_dxT(nx, ny), dx_dyT(nx, ny)
      real(wp) :: sh_xx
      sh_xx = dy_dxT(i, j)*(idyCu(i + 1, j)*u_face(i + 1, j, k) - idyCu(i, j)*u_face(i, j, k)) &
              - dx_dyT(i, j)*(idxCv(i, j + 1)*v_face(i, j + 1, k) - idxCv(i, j)*v_face(i, j, k))
   end function raw_sh_xx