Flat-impl Phase-A v-face kernel — mirror of _x with v-stagger
(js=j-1 south, j north), loop j=2..ny, open window vKb..vKt.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| integer, | intent(in) | :: | ns | |||
| type(eos_t), | intent(in) | :: | eos | |||
| real(kind=wp), | intent(in) | :: | h_layer(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | t_htr(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | s_htr(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | wet_v(nx,ny+1) | |||
| integer, | intent(in) | :: | vKb(nx,ny+1) |
Per-face open window (native layers). |
||
| integer, | intent(in) | :: | vKt(nx,ny+1) |
Per-face open window (native layers). |
||
| real(kind=wp), | intent(out) | :: | vPoL(nx,ny+1,ns) | |||
| real(kind=wp), | intent(out) | :: | vPoR(nx,ny+1,ns) | |||
| integer, | intent(out) | :: | vKoL(nx,ny+1,ns) | |||
| integer, | intent(out) | :: | vKoR(nx,ny+1,ns) | |||
| real(kind=wp), | intent(out) | :: | vhEff(nx,ny+1,ns-1) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | KoLc(2*NZ_STACK_MAX+2) | ||||
| integer, | private | :: | KoRc(2*NZ_STACK_MAX+2) | ||||
| real(kind=wp), | private | :: | PoLc(2*NZ_STACK_MAX+2) | ||||
| real(kind=wp), | private | :: | PoRc(2*NZ_STACK_MAX+2) | ||||
| real(kind=wp), | private | :: | hEc(2*NZ_STACK_MAX+1) | ||||
| real(kind=wp), | private | :: | hL(NZ_STACK_MAX) | ||||
| real(kind=wp), | private | :: | hR(NZ_STACK_MAX) | ||||
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | k | ||||
| integer, | private | :: | kb | ||||
| integer, | private | :: | kt | ||||
| integer, | private | :: | s | ||||
| real(kind=wp), | private | :: | scL(NZ_STACK_MAX) | ||||
| real(kind=wp), | private | :: | scR(NZ_STACK_MAX) | ||||
| real(kind=wp), | private | :: | tcL(NZ_STACK_MAX) | ||||
| real(kind=wp), | private | :: | tcR(NZ_STACK_MAX) |
subroutine redi_calc_coeffs_y(nx, ny, nz, ns, eos, h_layer, & t_htr, s_htr, wet_v, vKb, vKt, & vPoL, vPoR, vKoL, vKoR, vhEff) !! Flat-impl Phase-A v-face kernel — mirror of `_x` with v-stagger !! (js=j-1 south, j north), loop j=2..ny, open window `vKb..vKt`. integer, intent(in) :: nx, ny, nz, ns type(eos_t), intent(in) :: eos real(wp), intent(in) :: h_layer(nx, ny, nz) real(wp), intent(in) :: t_htr(nx, ny, nz) real(wp), intent(in) :: s_htr(nx, ny, nz) real(wp), intent(in) :: wet_v(nx, ny + 1) integer, intent(in) :: vKb(nx, ny + 1), vKt(nx, ny + 1) !! Per-face open window (native layers). real(wp), intent(out) :: vPoL(nx, ny + 1, ns) real(wp), intent(out) :: vPoR(nx, ny + 1, ns) integer, intent(out) :: vKoL(nx, ny + 1, ns) integer, intent(out) :: vKoR(nx, ny + 1, ns) real(wp), intent(out) :: vhEff(nx, ny + 1, ns - 1) integer :: i, j, k, s, kb, kt real(wp) :: hL(NZ_STACK_MAX), tcL(NZ_STACK_MAX), scL(NZ_STACK_MAX) real(wp) :: hR(NZ_STACK_MAX), tcR(NZ_STACK_MAX), scR(NZ_STACK_MAX) real(wp) :: PoLc(2*NZ_STACK_MAX + 2), PoRc(2*NZ_STACK_MAX + 2) integer :: KoLc(2*NZ_STACK_MAX + 2), KoRc(2*NZ_STACK_MAX + 2) real(wp) :: hEc(2*NZ_STACK_MAX + 1) do concurrent(j=2:ny, i=1:nx) & local(k, s, kb, kt, hL, tcL, scL, hR, tcR, scR, PoLc, PoRc, KoLc, KoRc, hEc) do s = 1, ns vPoL(i, j, s) = 0.0_wp vPoR(i, j, s) = 0.0_wp vKoL(i, j, s) = 1 vKoR(i, j, s) = 1 end do do s = 1, ns - 1 vhEff(i, j, s) = 0.0_wp end do kb = vKb(i, j) kt = vKt(i, j) if (wet_v(i, j) > 0.0_wp .and. kt >= kb) then do k = 1, nz hL(k) = h_layer(i, j - 1, k) tcL(k) = t_htr(i, j - 1, k) scL(k) = s_htr(i, j - 1, k) hR(k) = h_layer(i, j, k) tcR(k) = t_htr(i, j, k) scR(k) = s_htr(i, j, k) end do call redi_face_coeffs(nz, ns, kb, kt, hL, tcL, scL, hR, tcR, scR, eos, & PoLc, PoRc, KoLc, KoRc, hEc) do s = 1, ns vPoL(i, j, s) = PoLc(s) vPoR(i, j, s) = PoRc(s) vKoL(i, j, s) = KoLc(s) vKoR(i, j, s) = KoRc(s) end do do s = 1, ns - 1 vhEff(i, j, s) = hEc(s) end do end if end do end subroutine redi_calc_coeffs_y