compute_bt_rem under &vcoord_nml zfixed_closed_faces: the
same H/(H + r·hbbl·dt_inner) with H = Σ_k h_face·open (the
OPEN-column centred face depth, the weight face_depth_mean_*
uses). A face whose every layer is closed has H = 0 and keeps
bt_rem = 1, exactly like a dry face on the original path (it
carries no barotropic transport: dy_cu_bt = 0 there).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | nx | |||
| integer, | intent(in) | :: | ny | |||
| integer, | intent(in) | :: | nz | |||
| real(kind=wp), | intent(in) | :: | h_layer(nx,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | open_u(nx+1,ny,nz) | |||
| real(kind=wp), | intent(in) | :: | open_v(nx,ny+1,nz) | |||
| real(kind=wp), | intent(in) | :: | drag_dt |
|
||
| real(kind=wp), | intent(inout) | :: | bt_rem_u(nx+1,ny) | |||
| real(kind=wp), | intent(inout) | :: | bt_rem_v(nx,ny+1) |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | htot_face | ||||
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | k |
pure subroutine bt_rem_open_impl(nx, ny, nz, h_layer, open_u, open_v, drag_dt, & bt_rem_u, bt_rem_v) !! `compute_bt_rem` under `&vcoord_nml zfixed_closed_faces`: the !! same `H/(H + r·hbbl·dt_inner)` with `H = Σ_k h_face·open` (the !! OPEN-column centred face depth, the weight `face_depth_mean_*` !! uses). A face whose every layer is closed has `H = 0` and keeps !! `bt_rem = 1`, exactly like a dry face on the original path (it !! carries no barotropic transport: `dy_cu_bt = 0` there). integer, intent(in) :: nx, ny, nz real(wp), intent(in) :: h_layer(nx, ny, nz) real(wp), intent(in) :: open_u(nx + 1, ny, nz), open_v(nx, ny + 1, nz) real(wp), intent(in) :: drag_dt !! `r_linear·hbbl·dt_inner` (m). real(wp), intent(inout) :: bt_rem_u(nx + 1, ny), bt_rem_v(nx, ny + 1) integer :: i, j, k real(wp) :: htot_face do concurrent(j=1:ny, i=2:nx) local(k, htot_face) htot_face = 0.0_wp do k = 1, nz htot_face = htot_face + & 0.5_wp*(h_layer(i - 1, j, k) + h_layer(i, j, k))*open_u(i, j, k) end do if (htot_face > 0.0_wp) then bt_rem_u(i, j) = htot_face/(htot_face + drag_dt) else bt_rem_u(i, j) = 1.0_wp end if end do do concurrent(j=1:ny) bt_rem_u(1, j) = 1.0_wp bt_rem_u(nx + 1, j) = 1.0_wp end do do concurrent(j=2:ny, i=1:nx) local(k, htot_face) htot_face = 0.0_wp do k = 1, nz htot_face = htot_face + & 0.5_wp*(h_layer(i, j - 1, k) + h_layer(i, j, k))*open_v(i, j, k) end do if (htot_face > 0.0_wp) then bt_rem_v(i, j) = htot_face/(htot_face + drag_dt) else bt_rem_v(i, j) = 1.0_wp end if end do do concurrent(i=1:nx) bt_rem_v(i, 1) = 1.0_wp bt_rem_v(i, ny + 1) = 1.0_wp end do end subroutine bt_rem_open_impl