Commit bbe2eee6 authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

pyfabm: added updateTime

parent a2b2007a
......@@ -127,6 +127,8 @@ fabm.get_horizontal_diagnostic_data.restype = None
fabm.check_ready.argtypes = []
fabm.check_ready.restype = None
fabm.update_time.argtypes = [ctypes.c_double]
fabm.update_time.restype = None
# Routine for retrieving source-sink terms for the interior domain.
fabm.get_rates.argtypes = [numpy.ctypeslib.ndpointer(dtype=ctypes.c_double, ndim=1, flags=CONTIGUOUS), ctypes.c_int, ctypes.c_int]
......@@ -575,6 +577,9 @@ class Model(object):
fabm.check_ready()
return ready
def updateTime(self, nsec):
fabm.update_time(nsec)
def printInformation(self):
"""Show information about the model."""
def printArray(classname,array):
......
......@@ -121,7 +121,7 @@
end do
! Send information on spatial domain to FABM (this also allocates memory for diagnostics)
call fabm_set_domain(model)
call fabm_set_domain(model, 1._rk)
! Retrieve arrays to hold values for environmental variables and corresponding metadata.
call get_environment_metadata(model,environment_names,environment_units,index_column_depth)
......@@ -175,7 +175,7 @@
end do
! Send information on spatial domain to FABM (this also allocates memory for diagnostics)
call fabm_set_domain(model)
call fabm_set_domain(model, 1._rk)
! Retrieve arrays to hold values for environmental variables and corresponding metadata.
call get_environment_metadata(model,environment_names,environment_units,index_column_depth)
......@@ -189,6 +189,12 @@
call fabm_check_ready(model)
end subroutine check_ready
subroutine update_time(nsec) bind(c)
!DIR$ ATTRIBUTES DLLEXPORT :: update_time
real(rk), value, intent(in) :: nsec
call fabm_update_time(model, nsec)
end subroutine update_time
integer(c_int) function get_error_state() bind(c)
!DIR$ ATTRIBUTES DLLEXPORT :: get_error_state
get_error_state = logical2int(error_occurred)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment