rdb_ocean_get_time Function

public function rdb_ocean_get_time(c_handle, t_out) result(status) bind(c, name="rdb_ocean_get_time")

Current simulation time (seconds).

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in), value :: c_handle
real(kind=c_double), intent(out) :: t_out

Return Value integer(kind=c_int)


Calls

proc~~rdb_ocean_get_time~~CallsGraph proc~rdb_ocean_get_time rdb_ocean_get_time proc~resolve_ocean resolve_ocean proc~rdb_ocean_get_time->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_time(c_handle, t_out) result(status) &
      bind(c, name="rdb_ocean_get_time")
      !! Current simulation time (seconds).
      type(c_ptr), intent(in), value :: c_handle
      real(c_double), intent(out) :: t_out
      integer(c_int) :: status

      type(ocean_handle_t), pointer :: h

      t_out = 0.0_c_double
      status = resolve_ocean(c_handle, h)
      if (status /= OCEAN_STATUS_OK) return
      t_out = real(h%t_current, c_double)
   end function rdb_ocean_get_time