Index: examples/wflow_rhine_sbm/wflow_sbm.ini =================================================================== diff -u -r0a7244d3fd5a8ff367e028431f5c372bd6643b4a -r54d5ebe9f713a1e1647a642ca924e17c98523693 --- examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision 0a7244d3fd5a8ff367e028431f5c372bd6643b4a) +++ examples/wflow_rhine_sbm/wflow_sbm.ini (.../wflow_sbm.ini) (revision 54d5ebe9f713a1e1647a642ca924e17c98523693) @@ -29,8 +29,8 @@ [run] # either a runinfo file or a start and end-time are required #runinfo=runinfo.xml -starttime= 1995-01-31 00:00:00 -endtime= 1995-02-28 00:00:00 +starttime= 1995-01-31 00:00:00 GMT +endtime= 1995-02-28 00:00:00 GMT # required, base timestep of the model timestepsecs = 86400 #start model with cold state Index: wflow-py/notebooks/BMI-Test.ipynb =================================================================== diff -u -rc95c3dacc1ec27b93f99809af8275caa5c93cb1d -r54d5ebe9f713a1e1647a642ca924e17c98523693 --- wflow-py/notebooks/BMI-Test.ipynb (.../BMI-Test.ipynb) (revision c95c3dacc1ec27b93f99809af8275caa5c93cb1d) +++ wflow-py/notebooks/BMI-Test.ipynb (.../BMI-Test.ipynb) (revision 54d5ebe9f713a1e1647a642ca924e17c98523693) @@ -9,11 +9,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Populating the interactive namespace from numpy and matplotlib\n" + ] + } + ], "source": [ "import wflow.wflow_bmi as bmi\n", "import logging\n", @@ -36,7 +44,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": { "collapsed": false }, @@ -60,13 +68,23 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": { "collapsed": false }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "86400\n", + "791506800.0\n" + ] + } + ], "source": [ - "print(LA_model.get_value(\"timestepsecs\"))\n" + "print(LA_model.get_value(\"timestepsecs\"))\n", + "print LA_model.get_start_time()" ] }, { Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -rc95c3dacc1ec27b93f99809af8275caa5c93cb1d -r54d5ebe9f713a1e1647a642ca924e17c98523693 --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision c95c3dacc1ec27b93f99809af8275caa5c93cb1d) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 54d5ebe9f713a1e1647a642ca924e17c98523693) @@ -584,11 +584,14 @@ else: self.logger.warn("Not enough information in the [run] section. Need start and end time or a runinfo.xml file.... Reverting to default date/time") else: - self.datetime_firststep=datetime.datetime.strptime(st, "%Y-%m-%d %H:%M:%S") + from dateutil import parser + #self.datetime_firststep=datetime.datetime.strptime(st, "%Y-%m-%d %H:%M:%S") + self.datetime_firststep=parser.parse(st) self.currentdatetime = self.datetime_firststep self._userModel().currentdatetime = self.currentdatetime ed = configget(self._userModel().config,'run','endtime',"None") - self.datetime_laststep = datetime.datetime.strptime(ed, "%Y-%m-%d %H:%M:%S") + #self.datetime_laststep = datetime.datetime.strptime(ed, "%Y-%m-%d %H:%M:%S") + self.datetime_laststep=parser.parse(ed) self.timestepsecs = int(configget(self._userModel().config,'run','timestepsecs',"86400")) self._userModel().timestepsecs = self.timestepsecs duration = self.datetime_laststep - self.datetime_firststep