rdb_ocean_get_diag_count Function

public function rdb_ocean_get_diag_count(c_handle, count_out) result(status) bind(c, name="rdb_ocean_get_diag_count")

Number of diagnostics REGISTERED on this live instance right now (canonical + derived + anything the &ocean_diag_nml diags token list added) — bounds for rdb_ocean_list_diags’s index argument. This is the “selected” set, as opposed to the two static “available” catalogs above.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in), value :: c_handle
integer(kind=c_int), intent(out) :: count_out

Return Value integer(kind=c_int)


Calls

proc~~rdb_ocean_get_diag_count~~CallsGraph proc~rdb_ocean_get_diag_count rdb_ocean_get_diag_count proc~resolve_ocean resolve_ocean proc~rdb_ocean_get_diag_count->proc~resolve_ocean proc~handle_check handle_check proc~resolve_ocean->proc~handle_check

Variables

Type Visibility Attributes Name Initial
type(ocean_handle_t), private, pointer :: h

Source Code

   function rdb_ocean_get_diag_count(c_handle, count_out) result(status) &
      bind(c, name="rdb_ocean_get_diag_count")
      !! Number of diagnostics REGISTERED on this live instance right
      !! now (canonical + derived + anything the `&ocean_diag_nml diags`
      !! token list added) — bounds for `rdb_ocean_list_diags`'s
      !! index argument. This is the "selected" set, as opposed to the
      !! two static "available" catalogs above.
      type(c_ptr), intent(in), value :: c_handle
      integer(c_int), intent(out) :: count_out
      integer(c_int) :: status

      type(ocean_handle_t), pointer :: h

      count_out = 0
      status = resolve_ocean(c_handle, h)
      if (status /= OCEAN_STATUS_OK) return
      count_out = int(h%state%diag%nvars, c_int)
   end function rdb_ocean_get_diag_count