Index: examples/openstreams_w3ra_usa/wflow_W3RA.ini =================================================================== diff -u -r46a00d19e5088c712abe2ee5ddc9d5cd32bc4387 -r368a19849555f5d349fdb349010530b3e7207d95 --- examples/openstreams_w3ra_usa/wflow_W3RA.ini (.../wflow_W3RA.ini) (revision 46a00d19e5088c712abe2ee5ddc9d5cd32bc4387) +++ examples/openstreams_w3ra_usa/wflow_W3RA.ini (.../wflow_W3RA.ini) (revision 368a19849555f5d349fdb349010530b3e7207d95) @@ -69,6 +69,8 @@ #ALBEDO=/inmaps/ALBEDO + + # Model parameters and settings [model] AnnualDischarge=2290 Index: wflow-py/make_wflow_exe.py =================================================================== diff -u -r11b21eb75041e382f55243d65b2bc55a16fed27e -r368a19849555f5d349fdb349010530b3e7207d95 --- wflow-py/make_wflow_exe.py (.../make_wflow_exe.py) (revision 11b21eb75041e382f55243d65b2bc55a16fed27e) +++ wflow-py/make_wflow_exe.py (.../make_wflow_exe.py) (revision 368a19849555f5d349fdb349010530b3e7207d95) @@ -1,17 +1,19 @@ from distutils.core import setup from bbfreeze import Freezer from _version import * -import ctypes +import ctypes,glob,os,shutil +import matplotlib def dependencies_for_freeezing(): import netCDF4_utils nrbits = str(ctypes.sizeof(ctypes.c_voidp) * 8) +data_files=matplotlib.get_py2exe_datafiles() - - +thename = "Wflow"+MVERSION+'-'+nrbits f = Freezer("Wflow"+MVERSION+'-'+nrbits) f.addScript("wflow/__init__.py") +f.addScript("wflow/wflow_topoflex.py") f.addScript("wflow/wflow_sbm.py") f.addScript("wflow/wflow_hbv.py") f.addScript("wflow/wflow_adapt.py") @@ -29,3 +31,21 @@ f.addScript("Scripts/pcr2netcdf.py") #f.addScript("wflow/wflow_fit.py") # Does not work becuse of QT f() # starts the freezing process + + +ddir = "c:/pcraster4-64/lib/" +data_files.append((".", glob.glob(ddir + "/*.dll"))) +print data_files +gdaldata = os.getenv("GDAL_DATA") +data_files.append(("./gdal-data", glob.glob(gdaldata + "/*.*"))) + +print data_files +print "Copying extra data files..." +for dirr in data_files: + timake = os.path.join(thename ,dirr[0]) + print timake + if not os.path.exists(timake): + os.makedirs(timake) + for tocp in dirr[1]: + print tocp + shutil.copy(tocp,timake) Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -rbce0093e4087a483692dcc0d52b0b7840e535684 -r368a19849555f5d349fdb349010530b3e7207d95 --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision bce0093e4087a483692dcc0d52b0b7840e535684) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 368a19849555f5d349fdb349010530b3e7207d95) @@ -1873,7 +1873,7 @@ self._incrementIndentLevel() self._atStartOfTimeStep(step) - # TODO: Check why the timestep setting doesn't not work..... + # TODO: Check why the timestep setting doesn't work..... self._userModel()._setCurrentTimeStep(step) if hasattr(self._userModel(), 'dynamic'): @@ -2186,7 +2186,7 @@ timestep = self._userModel().currentTimeStep() newName = generateNameT(name, timestep) - if style == 1: # Normal reading of mapstack from DISK + if style == 1: # Normal reading of mapstack from DISK per via or via netcdf path = os.path.join(directoryPrefix, newName) assert path is not "" Index: wflow-py/wflow/wflow_W3RA.py =================================================================== diff -u -r46a00d19e5088c712abe2ee5ddc9d5cd32bc4387 -r368a19849555f5d349fdb349010530b3e7207d95 --- wflow-py/wflow/wflow_W3RA.py (.../wflow_W3RA.py) (revision 46a00d19e5088c712abe2ee5ddc9d5cd32bc4387) +++ wflow-py/wflow/wflow_W3RA.py (.../wflow_W3RA.py) (revision 368a19849555f5d349fdb349010530b3e7207d95) @@ -274,6 +274,36 @@ """ return [] + def parameters(self): + """ + Define all model parameters here that the framework should handle for the model + See wf_updateparameters and the parameters section of the ini file + If you use this make sure to all wf_updateparameters at the start of the dynamic section + and at the start/end of the initial section + """ + modelparameters = [] + + #Static model parameters e.g. + #modelparameters.append(self.ParamType(name="RunoffGeneratingGWPerc",stack="intbl/RunoffGeneratingGWPerc.tbl",type="static",default=0.1)) + # 3: Input time series ################################################### + #self.P_mapstack = self.Dir + configget(self.config, "inputmapstacks", "Precipitation", + # "/inmaps/P") # timeseries for rainfall + #self.PET_mapstack = self.Dir + configget(self.config, "inputmapstacks", "EvapoTranspiration", + # "/inmaps/PET") # timeseries for rainfall"/inmaps/PET" # potential evapotranspiration + #self.TEMP_mapstack = self.Dir + configget(self.config, "inputmapstacks", "Temperature", + # "/inmaps/TEMP") # timeseries for rainfall "/inmaps/TEMP" # global radiation + #self.Inflow_mapstack = self.Dir + configget(self.config, "inputmapstacks", "Inflow", + # "/inmaps/IF") # timeseries for rainfall "/inmaps/IF" # in/outflow locations (abstractions) + + # Meteo and other forcing + #modelparameters.append(self.ParamType(name="Precipitation",stack=self.P_mapstack,type="timeseries",default=0.0,verbose=True,lookupmaps=[])) + #modelparameters.append(self.ParamType(name="PotenEvap",stack=self.PET_mapstack,type="timeseries",default=0.0,verbose=True,lookupmaps=[])) + #modelparameters.append(self.ParamType(name="Temperature",stack=self.TEMP_mapstack,type="timeseries",default=10.0,verbose=True,lookupmaps=[])) + #modelparameters.append(self.ParamType(name="Inflow",stack=self.Inflow_mapstack,type="timeseries",default=0.0,verbose=False,lookupmaps=[])) + + + + def dynamic(self): """ *Required*