Fold the static land face masks into the BT-substep damping factor
(bt_rem_u(land)=0 ⇒ no velocity across a land face). Runs every outer
step AFTER compute_bt_rem (which resets bt_rem each step, so the mask
must be re-applied). All-wet ⇒ wet_u/v≡1 ⇒ no-op (bit-identical).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(hgrid_t), | intent(in) | :: | grid | |||
| type(ocean_metrics_t), | intent(in) | :: | metrics | |||
| type(barotropic_workstate_t), | intent(inout) | :: | bt_work |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j | ||||
| integer, | private | :: | nx | ||||
| integer, | private | :: | ny |
pure subroutine mask_bt_rem(grid, metrics, bt_work) !! Fold the static land face masks into the BT-substep damping factor !! (bt_rem_u(land)=0 ⇒ no velocity across a land face). Runs every outer !! step AFTER `compute_bt_rem` (which resets bt_rem each step, so the mask !! must be re-applied). All-wet ⇒ wet_u/v≡1 ⇒ no-op (bit-identical). type(hgrid_t), intent(in) :: grid type(ocean_metrics_t), intent(in) :: metrics type(barotropic_workstate_t), intent(inout) :: bt_work integer :: i, j, nx, ny nx = grid%nx_total ny = grid%ny_total do concurrent(j=1:ny, i=1:nx + 1) bt_work%bt_rem_u(i, j) = metrics%wet_u(i, j)*bt_work%bt_rem_u(i, j) end do do concurrent(j=1:ny + 1, i=1:nx) bt_work%bt_rem_v(i, j) = metrics%wet_v(i, j)*bt_work%bt_rem_v(i, j) end do end subroutine mask_bt_rem