pywfm.IWFMModel.get_time_specs#

IWFMModel.get_time_specs()#

Return the IWFM simulation dates and time step

Returns:

index 0 - (list) simulation dates; index 1 - (str) simulation time step

Return type:

tuple (length=2)

See also

IWFMModel.get_current_date_and_time

Return the current simulation date and time

IWFMModel.get_n_time_steps

Return the number of timesteps in an IWFM simulation

IWFMModel.get_n_intervals

Return the number of time intervals between a provided start date and end date

IWFMModel.get_output_interval

Return a list of the possible time intervals a selected time-series data can be retrieved at.

IWFMModel.is_date_greater

Return True if first_date is greater than comparison_date

IWFMModel.increment_time

increments the date provided by the specified time interval

Example

>>> from pywfm import IWFMModel
>>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN'
>>> sim_file = 'Simulation_MAIN.IN'
>>> model = IWFMModel(pp_file, sim_file)
>>> time_stamps, time_interval = model.get_time_specs()
>>> time_stamps
['10/01/1990_24:00',
 '10/02/1990_24:00',
 '10/03/1990_24:00',
 '10/04/1990_24:00',
 '10/05/1990_24:00',
 '10/06/1990_24:00',
 '10/07/1990_24:00',
 ...
 '09/29/2000_24:00'
 '09/30/2000_24:00'
 '10/01/2000_24:00']
>>> time_interval
'1DAY'
>>> model.kill()
>>> model.close_log_file()