Count ice-covered WET columns sitting at exactly f = 0 — the
configure-time domain check for exchange_law = "hj99".
Exactly zero, not “small”: the law’s failure at f = 0 is a
division and a logarithm, not a loss of accuracy, and a small
|f| is a legitimate (if strongly suppressed) answer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | f_cor(nx,ny) |
Cell-centred Coriolis parameter (1/s). |
||
| real(kind=wp), | intent(in) | :: | cover_frac(nx,ny) |
Ice-cover fraction. |
||
| real(kind=wp), | intent(in) | :: | wet_mask(nx,ny) |
Static wet/land mask. |
||
| integer, | intent(in) | :: | nx |
First dimension. |
||
| integer, | intent(in) | :: | ny |
Second dimension. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | i | ||||
| integer, | private | :: | j |
pure function cavity_count_zero_f(f_cor, cover_frac, wet_mask, nx, ny) result(n_zero) !! Count ice-covered WET columns sitting at exactly `f = 0` — the !! configure-time domain check for `exchange_law = "hj99"`. !! !! Exactly zero, not "small": the law's failure at `f = 0` is a !! division and a logarithm, not a loss of accuracy, and a small !! `|f|` is a legitimate (if strongly suppressed) answer. integer, intent(in) :: nx !! First dimension. integer, intent(in) :: ny !! Second dimension. real(wp), intent(in) :: f_cor(nx, ny) !! Cell-centred Coriolis parameter (1/s). real(wp), intent(in) :: cover_frac(nx, ny) !! Ice-cover fraction. real(wp), intent(in) :: wet_mask(nx, ny) !! Static wet/land mask. integer :: n_zero integer :: i, j n_zero = 0 do j = 1, ny do i = 1, nx if (cover_frac(i, j) > 0.5_wp .and. wet_mask(i, j) > 0.5_wp) then if (f_cor(i, j) == 0.0_wp) n_zero = n_zero + 1 end if end do end do end function cavity_count_zero_f