Bake the C3 nodal/astronomical correction into one OBC edge, then
fail loud (rank-0 error + error stop) if any of the edge’s
constituent frequencies matches no tide-catalog entry, else log the
resolved constituent → (name, f_c, V_c+u_c) map on rank 0. Host-side
setup wrapper around the pure obc_tide_nodal_fill — the pure
helper signals the failure via fill_ierr; the loud policy lives
here.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(ocean_bc_face_tag_t), | intent(inout) | :: | face | |||
| real(kind=wp), | intent(in) | :: | f_all(TIDES_CATALOG_SIZE) | |||
| real(kind=wp), | intent(in) | :: | u_all(TIDES_CATALOG_SIZE) | |||
| real(kind=wp), | intent(in) | :: | v_all(TIDES_CATALOG_SIZE) | |||
| character(len=*), | intent(in) | :: | edge_name | |||
| integer, | intent(in) | :: | compute_rank | |||
| integer, | intent(out), | optional | :: | ierr |
Non-zero when an OBC tidal constituent matches no tide-catalog
entry, when present; absent behaves as today ( |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private | :: | fill_ierr | ||||
| integer, | private | :: | ic | ||||
| integer, | private | :: | nc |
subroutine configure_obc_edge_nodal(face, f_all, u_all, v_all, edge_name, compute_rank, ierr) !! Bake the C3 nodal/astronomical correction into one OBC edge, then !! fail loud (rank-0 error + `error stop`) if any of the edge's !! constituent frequencies matches no tide-catalog entry, else log the !! resolved constituent → (name, f_c, V_c+u_c) map on rank 0. Host-side !! setup wrapper around the `pure` `obc_tide_nodal_fill` — the pure !! helper signals the failure via `fill_ierr`; the loud policy lives !! here. type(ocean_bc_face_tag_t), intent(inout) :: face real(wp), intent(in) :: f_all(TIDES_CATALOG_SIZE) real(wp), intent(in) :: u_all(TIDES_CATALOG_SIZE) real(wp), intent(in) :: v_all(TIDES_CATALOG_SIZE) character(len=*), intent(in) :: edge_name integer, intent(in) :: compute_rank integer, intent(out), optional :: ierr !! Non-zero when an OBC tidal constituent matches no tide-catalog !! entry, when present; absent behaves as today (`error stop`). integer :: fill_ierr, nc, ic call obc_tide_nodal_fill(face, f_all, u_all, v_all, fill_ierr) if (fill_ierr /= 0) then call fail("OBC tides: "//trim(edge_name)//" edge constituent " & //to_string(fill_ierr)//" omega="//to_string(face%tidal_omega(fill_ierr)) & //" rad/s matches no tide-catalog entry (rel tol 1e-4)", ierr, OCEAN_STATUS_ERR_SETUP) return end if if (compute_rank == 0) then do nc = 1, face%n_tidal_constituents ic = obc_match_constituent(face%tidal_omega(nc)) call logger%info("OBC tide nodal ["//trim(edge_name)//"]: "//TIDE_NAME(ic) & //" f="//to_string(face%tidal_fnodal(nc)) & //" V+u="//to_string(face%tidal_arg(nc))//" rad") end do end if if (present(ierr)) ierr = OCEAN_STATUS_OK end subroutine configure_obc_edge_nodal