pressure_above_x Function

public pure function pressure_above_x(nx, ny, nz, h_layer, ic, jc, ka, rho0) result(p)

Surface-relative hydrostatic pressure at the interface K straddled by layer ka (above, surface-side) and ka-1 (below): the interface sits at the BOTTOM of layer ka, so the water column above it is layers ka..nz (bottom-up, k=nz the surface). p = g·ρ₀·Σ_{k’=ka}^{nz} h(k’) — the sum INCLUDES ka (the layer directly above the interface); omitting it shorts the pressure by one layer (~5e5 Pa) and biases pressure-dependent EOS derivatives.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nx
integer, intent(in) :: ny
integer, intent(in) :: nz
real(kind=wp), intent(in) :: h_layer(nx,ny,nz)
integer, intent(in) :: ic
integer, intent(in) :: jc
integer, intent(in) :: ka
real(kind=wp), intent(in) :: rho0

Return Value real(kind=wp)


Called by

proc~~pressure_above_x~~CalledByGraph proc~pressure_above_x pressure_above_x proc~ocean_slopes_pass_x ocean_slopes_pass_x proc~ocean_slopes_pass_x->proc~pressure_above_x proc~ocean_slopes_pass_y ocean_slopes_pass_y proc~ocean_slopes_pass_y->proc~pressure_above_x proc~ocean_slopes_compute_impl ocean_slopes_compute_impl proc~ocean_slopes_compute_impl->proc~ocean_slopes_pass_x proc~ocean_slopes_compute_impl->proc~ocean_slopes_pass_y proc~ocean_slopes_compute ocean_slopes_compute proc~ocean_slopes_compute->proc~ocean_slopes_compute_impl proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~ocean_slopes_compute proc~run_stage run_stage proc~run_stage->proc~ocean_slopes_compute proc~engine_step engine_step proc~engine_step->proc~ocean_dyn_step_split proc~ocean_dyn_step ocean_dyn_step proc~ocean_dyn_step->proc~run_stage

Variables

Type Visibility Attributes Name Initial
integer, private :: kk

Source Code

   pure function pressure_above_x(nx, ny, nz, h_layer, ic, jc, ka, rho0) result(p)
      !! Surface-relative hydrostatic pressure at the interface K straddled
      !! by layer `ka` (above, surface-side) and `ka-1` (below): the
      !! interface sits at the BOTTOM of layer `ka`, so the water column
      !! above it is layers `ka..nz` (bottom-up, k=nz the surface).
      !! p = g·ρ₀·Σ_{k'=ka}^{nz} h(k') — the sum INCLUDES `ka` (the layer
      !! directly above the interface); omitting it shorts the pressure by
      !! one layer (~5e5 Pa) and biases pressure-dependent EOS derivatives.
      !$acc routine seq
      integer, intent(in) :: nx, ny, nz, ic, jc, ka
      real(wp), intent(in) :: h_layer(nx, ny, nz)
      real(wp), intent(in) :: rho0
      real(wp) :: p
      integer :: kk
      p = 0.0_wp
      do kk = nz, ka, -1
         p = p + GRAVITY*rho0*h_layer(ic, jc, kk)
      end do
   end function pressure_above_x