pywfm.IWFMModel.get_current_date_and_time#
- IWFMModel.get_current_date_and_time()#
Return the current simulation date and time.
- Returns:
current date and time in IWFM date format i.e. MM/DD/YYYY_hh:mm
- Return type:
str
See also
IWFMModel.get_n_time_steps
Return the number of timesteps in an IWFM simulation
IWFMModel.get_time_specs
Return the IWFM simulation dates and time step
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
Examples
>>> from pywfm import IWFMModel >>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN' >>> sim_file = 'Simulation_MAIN.IN' >>> model = IWFMModel(pp_file, sim_file) >>> model.get_current_date_and_time() '09/30/1990_24:00' >>> model.kill() >>> model.close_log_file()
>>> from pywfm import IWFMModel >>> pp_file = '../Preprocessor/PreProcessor_MAIN.IN' >>> sim_file = 'Simulation_MAIN.IN' >>> model = IWFMModel(pp_file, sim_file, is_for_inquiry=0) >>> model.advance_time() >>> model.get_current_date_and_time() '10/01/1990_24:00' >>> model.kill() >>> model.close_log_file()
Note
1. the intent of this method is to retrieve information about the current time step when using the IWFM DLL to run a simulation. i.e. IWFMModel object is instantiated with is_for_inquiry=0
2. if this method is called when the IWFMModel object is instantiated with is_for_inquiry=1, it only returns the simulation begin date and time.