boole_dpa_face (the reconstruct-for-pressure cross-face 5-point
Boole rule) with the Roquet vertical rule roquet_recon_dpa_intz at
the three interior sub-columns – identical sub-columns, weights and
summation order; the end points are the columns’ own dpa. 15
inlined Roquet evaluations per face per layer.
| Type | Intent | Optional | 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_l |
Left / right shallower-interface heights and thicknesses (m). |
||
| real(kind=wp), | intent(in) | :: | e_top_r |
Left / right shallower-interface heights and thicknesses (m). |
||
| real(kind=wp), | intent(in) | :: | dz_l |
Left / right shallower-interface heights and thicknesses (m). |
||
| real(kind=wp), | intent(in) | :: | dz_r |
Left / right shallower-interface heights and thicknesses (m). |
||
| real(kind=wp), | intent(in) | :: | t_t_l |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | t_b_l |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | t_m_l |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | t_t_r |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | t_b_r |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | t_m_r |
Left / right temperature triples (top, bottom, mean). |
||
| real(kind=wp), | intent(in) | :: | s_t_l |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | s_b_l |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | s_m_l |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | s_t_r |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | s_b_r |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | s_m_r |
Left / right salinity triples. |
||
| real(kind=wp), | intent(in) | :: | dpa_l |
The left / right columns’ own layer |
||
| real(kind=wp), | intent(in) | :: | dpa_r |
The left / right columns’ own layer |
||
| logical, | intent(in) | :: | parabolic |
.true. -> PPM curvature. |
||
| real(kind=wp), | intent(out) | :: | dpa_face |
Along-face mean of |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | parameter | :: | BOOLE_W(N_BOOLE) | = | [7.0_wp, 32.0_wp, 12.0_wp, 32.0_wp, 7.0_wp] | |
| real(kind=wp), | private | :: | acc | ||||
| real(kind=wp), | private | :: | dpa_m | ||||
| real(kind=wp), | private | :: | intz_m | ||||
| integer, | private | :: | m | ||||
| real(kind=wp), | private | :: | wl | ||||
| real(kind=wp), | private | :: | wr |
pure subroutine roquet_recon_dpa_face(rho0, rho_ref, & e_top_l, e_top_r, dz_l, dz_r, & t_t_l, t_b_l, t_m_l, t_t_r, t_b_r, t_m_r, & s_t_l, s_b_l, s_m_l, s_t_r, s_b_r, s_m_r, & dpa_l, dpa_r, parabolic, dpa_face) !$acc routine seq !! `boole_dpa_face` (the reconstruct-for-pressure cross-face 5-point !! Boole rule) with the Roquet vertical rule `roquet_recon_dpa_intz` at !! the three interior sub-columns -- identical sub-columns, weights and !! summation order; the end points are the columns' own `dpa`. 15 !! inlined Roquet evaluations per face per layer. real(wp), intent(in) :: rho0, rho_ref !! Pressure-estimate density / anomaly reference (kg/m^3). real(wp), intent(in) :: e_top_l, e_top_r, dz_l, dz_r !! Left / right shallower-interface heights and thicknesses (m). real(wp), intent(in) :: t_t_l, t_b_l, t_m_l, t_t_r, t_b_r, t_m_r !! Left / right temperature triples (top, bottom, mean). real(wp), intent(in) :: s_t_l, s_b_l, s_m_l, s_t_r, s_b_r, s_m_r !! Left / right salinity triples. real(wp), intent(in) :: dpa_l, dpa_r !! The left / right columns' own layer `dpa` (Pa), the end points. logical, intent(in) :: parabolic !! .true. -> PPM curvature. real(wp), intent(out) :: dpa_face !! Along-face mean of `g * int rho' dz` over the layer (Pa). real(wp) :: wr, wl, dpa_m, intz_m, acc integer :: m real(wp), parameter :: BOOLE_W(N_BOOLE) = & [7.0_wp, 32.0_wp, 12.0_wp, 32.0_wp, 7.0_wp] acc = BOOLE_W(1)*dpa_l + BOOLE_W(N_BOOLE)*dpa_r !GCC$ unroll 3 do m = 2, N_BOOLE - 1 wr = 0.25_wp*real(m - 1, wp) ! 0 at the left column .. 1 at the right wl = 1.0_wp - wr call roquet_recon_dpa_intz(rho0, rho_ref, & wl*e_top_l + wr*e_top_r, & wl*dz_l + wr*dz_r, & wl*t_t_l + wr*t_t_r, & wl*t_b_l + wr*t_b_r, & wl*t_m_l + wr*t_m_r, & wl*s_t_l + wr*s_t_r, & wl*s_b_l + wr*s_b_r, & wl*s_m_l + wr*s_m_r, & parabolic, dpa_m, intz_m) acc = acc + BOOLE_W(m)*dpa_m end do dpa_face = acc/90.0_wp end subroutine roquet_recon_dpa_face