ppm_edge_two_cell Subroutine

private pure subroutine ppm_edge_two_cell(h_l, h_r, q_l, q_r, edge)

Thickness-weighted two-cell interface value — the non-uniform generalisation of 0.5*(q_l + q_r).

For a profile linear in z the cell means sit at the cell CENTRES, which are (h_l + h_r)/2 apart, and the shared interface is h_l/2 above the left centre; the weights h_r/(h_l+h_r), h_l/(h_l+h_r) are exactly that interpolation. Used where CW84 (1.6) has no stencil — the 1|2 and (nz-1)|nz edges.

Arguments

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

Thickness of the cell below the interface.

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

Thickness of the cell above the interface.

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

Cell mean below.

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

Cell mean above.

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

Interface value.


Called by

proc~~ppm_edge_two_cell~~CalledByGraph proc~ppm_edge_two_cell ppm_edge_two_cell proc~remap_column_ppm remap_column_ppm proc~remap_column_ppm->proc~ppm_edge_two_cell proc~remap_column remap_column proc~remap_column->proc~remap_column_ppm proc~remap_column_pqm remap_column_pqm proc~remap_column->proc~remap_column_pqm proc~remap_column_pqm->proc~remap_column_ppm proc~ocean_remap_tracer_column ocean_remap_tracer_column proc~ocean_remap_tracer_column->proc~remap_column proc~ocean_remap_tracer_field ocean_remap_tracer_field proc~ocean_remap_tracer_field->proc~remap_column proc~remap_layer_to_density_impl remap_layer_to_density_impl proc~remap_layer_to_density_impl->proc~remap_column proc~remap_layer_to_vcoord_impl remap_layer_to_vcoord_impl proc~remap_layer_to_vcoord_impl->proc~remap_column proc~remap_tracer_grounded remap_tracer_grounded proc~remap_tracer_grounded->proc~remap_column proc~remap_x_face_grounded remap_x_face_grounded proc~remap_x_face_grounded->proc~remap_column proc~remap_x_face_velocity remap_x_face_velocity proc~remap_x_face_velocity->proc~remap_column proc~remap_y_face_grounded remap_y_face_grounded proc~remap_y_face_grounded->proc~remap_column proc~remap_y_face_velocity remap_y_face_velocity proc~remap_y_face_velocity->proc~remap_column proc~ocean_apply_ale_remap_centres ocean_apply_ale_remap_centres proc~ocean_apply_ale_remap_centres->proc~ocean_remap_tracer_field proc~ocean_apply_ale_remap_faces ocean_apply_ale_remap_faces proc~ocean_apply_ale_remap_faces->proc~remap_x_face_velocity proc~ocean_apply_ale_remap_faces->proc~remap_y_face_velocity proc~ocean_apply_ale_remap_step ocean_apply_ale_remap_step proc~ocean_apply_ale_remap_step->proc~ocean_remap_tracer_field proc~ocean_apply_ale_remap_step->proc~remap_x_face_velocity proc~ocean_apply_ale_remap_step->proc~remap_y_face_velocity proc~ocean_apply_conservative_min_thickness ocean_apply_conservative_min_thickness proc~ocean_apply_conservative_min_thickness->proc~remap_tracer_grounded proc~ocean_apply_conservative_min_thickness->proc~remap_x_face_grounded proc~ocean_apply_conservative_min_thickness->proc~remap_y_face_grounded proc~remap_layer_to_density remap_layer_to_density proc~remap_layer_to_density->proc~remap_layer_to_density_impl proc~remap_layer_to_sigma remap_layer_to_sigma proc~remap_layer_to_sigma->proc~remap_layer_to_vcoord_impl proc~remap_layer_to_z remap_layer_to_z proc~remap_layer_to_z->proc~remap_layer_to_vcoord_impl proc~remap_layer_to_zstar remap_layer_to_zstar proc~remap_layer_to_zstar->proc~remap_layer_to_vcoord_impl proc~ocean_dyn_step_split ocean_dyn_step_split proc~ocean_dyn_step_split->proc~ocean_apply_ale_remap_step proc~run_continuity_chain run_continuity_chain proc~run_continuity_chain->proc~ocean_apply_conservative_min_thickness

Source Code

   pure subroutine ppm_edge_two_cell(h_l, h_r, q_l, q_r, edge)
      !$acc routine seq
      !! Thickness-weighted two-cell interface value — the non-uniform
      !! generalisation of `0.5*(q_l + q_r)`.
      !!
      !! For a profile linear in `z` the cell means sit at the cell CENTRES,
      !! which are `(h_l + h_r)/2` apart, and the shared interface is `h_l/2`
      !! above the left centre; the weights `h_r/(h_l+h_r)`, `h_l/(h_l+h_r)`
      !! are exactly that interpolation.  Used where CW84 (1.6) has no
      !! stencil — the `1|2` and `(nz-1)|nz` edges.
      real(wp), intent(in) :: h_l
         !! Thickness of the cell below the interface.
      real(wp), intent(in) :: h_r
         !! Thickness of the cell above the interface.
      real(wp), intent(in) :: q_l
         !! Cell mean below.
      real(wp), intent(in) :: q_r
         !! Cell mean above.
      real(wp), intent(out) :: edge
         !! Interface value.

      edge = (q_l*h_r + q_r*h_l)/(h_l + h_r + H_DIV_EPS)
   end subroutine ppm_edge_two_cell