boole_dpa_intz_layer_wright Subroutine

public pure subroutine boole_dpa_intz_layer_wright(rho0, rho_ref, e_top, dz, t_t, t_b, t_mean, s_t, s_b, s_mean, parabolic, dpa, intz_dpa)

boole_dpa_intz_layer specialised to Wright (1997): the same five sub-points and weights, with the density written inline (wright_rho, the expression eos_density_point evaluates) – no eos_t handle, no per-point variant dispatch. The caller selects this twin ONCE, outside its loops.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: rho0

Pressure-estimate density / anomaly reference (kg/m^3).

real(kind=wp), intent(in) :: rho_ref

Pressure-estimate density / anomaly reference (kg/m^3).

real(kind=wp), intent(in) :: e_top

Shallower-interface height / layer thickness (m).

real(kind=wp), intent(in) :: dz

Shallower-interface height / layer thickness (m).

real(kind=wp), intent(in) :: t_t

T / S top edge, bottom edge, layer mean.

real(kind=wp), intent(in) :: t_b

T / S top edge, bottom edge, layer mean.

real(kind=wp), intent(in) :: t_mean

T / S top edge, bottom edge, layer mean.

real(kind=wp), intent(in) :: s_t

T / S top edge, bottom edge, layer mean.

real(kind=wp), intent(in) :: s_b

T / S top edge, bottom edge, layer mean.

real(kind=wp), intent(in) :: s_mean

T / S top edge, bottom edge, layer mean.

logical, intent(in) :: parabolic

.true. -> PPM curvature.

real(kind=wp), intent(out) :: dpa

As boole_dpa_intz_layer.

real(kind=wp), intent(out) :: intz_dpa

As boole_dpa_intz_layer.


Calls

proc~~boole_dpa_intz_layer_wright~~CallsGraph proc~boole_dpa_intz_layer_wright boole_dpa_intz_layer_wright proc~boole_layer_combine boole_layer_combine proc~boole_dpa_intz_layer_wright->proc~boole_layer_combine proc~boole_layer_points boole_layer_points proc~boole_dpa_intz_layer_wright->proc~boole_layer_points proc~wright_rho wright_rho proc~boole_dpa_intz_layer_wright->proc~wright_rho

Called by

proc~~boole_dpa_intz_layer_wright~~CalledByGraph proc~boole_dpa_intz_layer_wright boole_dpa_intz_layer_wright proc~boole_dpa_face_wright boole_dpa_face_wright proc~boole_dpa_face_wright->proc~boole_dpa_intz_layer_wright proc~compute_fv_mom6_reconstruct_impl compute_fv_mom6_reconstruct_impl proc~compute_fv_mom6_reconstruct_impl->proc~boole_dpa_intz_layer_wright proc~compute_fv_mom6_reconstruct_impl->proc~boole_dpa_face_wright proc~ocean_pressure_force_compute ocean_pressure_force_compute proc~ocean_pressure_force_compute->proc~compute_fv_mom6_reconstruct_impl proc~run_stage run_stage proc~run_stage->proc~ocean_pressure_force_compute proc~run_stage_split run_stage_split proc~run_stage_split->proc~ocean_pressure_force_compute 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 :: n
real(kind=wp), private :: p5(N_BOOLE)
real(kind=wp), private :: r5(N_BOOLE)
real(kind=wp), private :: s5(N_BOOLE)
real(kind=wp), private :: t5(N_BOOLE)

Source Code

   pure subroutine boole_dpa_intz_layer_wright(rho0, rho_ref, e_top, dz, &
                                               t_t, t_b, t_mean, s_t, s_b, s_mean, &
                                               parabolic, dpa, intz_dpa)
      !$acc routine seq
      !! `boole_dpa_intz_layer` specialised to Wright (1997): the same five
      !! sub-points and weights, with the density written inline
      !! (`wright_rho`, the expression `eos_density_point` evaluates) --
      !! no `eos_t` handle, no per-point variant dispatch.  The caller
      !! selects this twin ONCE, outside its loops.
      real(wp), intent(in)  :: rho0, rho_ref
         !! Pressure-estimate density / anomaly reference (kg/m^3).
      real(wp), intent(in)  :: e_top, dz
         !! Shallower-interface height / layer thickness (m).
      real(wp), intent(in)  :: t_t, t_b, t_mean, s_t, s_b, s_mean
         !! T / S top edge, bottom edge, layer mean.
      logical, intent(in)   :: parabolic
         !! .true. -> PPM curvature.
      real(wp), intent(out) :: dpa, intz_dpa
         !! As `boole_dpa_intz_layer`.

      real(wp) :: t5(N_BOOLE), s5(N_BOOLE), p5(N_BOOLE), r5(N_BOOLE)
      integer  :: n

      call boole_layer_points(rho0, e_top, dz, t_t, t_b, t_mean, s_t, s_b, s_mean, &
                              parabolic, t5, s5, p5)
      !GCC$ unroll 5
      do n = 1, N_BOOLE
         r5(n) = wright_rho(t5(n), s5(n), p5(n)) - rho_ref
      end do
      call boole_layer_combine(r5, dz, dpa, intz_dpa)
   end subroutine boole_dpa_intz_layer_wright