Index: wflow-py/wflow/wflow_bmi.py =================================================================== diff -u -r33871015ad959ac7b7956233337cd77fe46973d2 -r9913c5fd4ec8e66529bd2e35dde17f43acb6a223 --- wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 33871015ad959ac7b7956233337cd77fe46973d2) +++ wflow-py/wflow/wflow_bmi.py (.../wflow_bmi.py) (revision 9913c5fd4ec8e66529bd2e35dde17f43acb6a223) @@ -233,23 +233,16 @@ self.myModel = None self.dynModel = None - def initialize(self, filename,loglevel=logging.DEBUG): + + def initialize_config(self, filename, loglevel=logging.DEBUG): """ - Initialise the model. Should be call before any other method. + see initialize - :var filename: full path to the wflow ini file - :var loglevel: optional loglevel (default == DEBUG) - - Assumptions for now: - - - the configfile wih be a full path - - we define the case from the basedir of the configfile - - .. todo:: - - Get name of module from ini file name - + :param filename: + :param loglevel: + :return: nothing """ + self.currenttimestep = 1 wflow_cloneMap = 'wflow_subcatch.map' datadir = os.path.dirname(filename) @@ -279,9 +272,42 @@ self.dynModel = wf.wf_DynamicFramework(self.myModel, maxNrSteps, firstTimestep = 1) self.dynModel.createRunId(NoOverWrite=0,level=loglevel,model=os.path.basename(filename)) + + + def initialize_state(self): + """ + see initialize + + :param self: + :return: nothing + """ self.dynModel._runInitial() self.dynModel._runResume() + + def initialize(self, filename,loglevel=logging.DEBUG): + """ + Initialise the model. Should be call before any other method. + + :var filename: full path to the wflow ini file + :var loglevel: optional loglevel (default == DEBUG) + + Assumptions for now: + + - the configfile wih be a full path + - we define the case from the basedir of the configfile + + .. todo:: + + Get name of module from ini file name + + """ + + self.initialize_config(filename,loglevel=loglevel) + self.initialize_state() + + + def update(self): """ Propagate the model to the next model timestep