Index: wflow-py/wflow/wf_DynamicFramework.py =================================================================== diff -u -r4387689dba010ab5cbef829ed21e8ffedbfd5fc3 -raba4cec62e3f0bc669cb65425e579d5fea6a5656 --- wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision 4387689dba010ab5cbef829ed21e8ffedbfd5fc3) +++ wflow-py/wflow/wf_DynamicFramework.py (.../wf_DynamicFramework.py) (revision aba4cec62e3f0bc669cb65425e579d5fea6a5656) @@ -391,7 +391,10 @@ in the staticmaps directory. next try to read a tbl file to match a landuse, catchment and soil map. Returns the default value if the tbl file is not found. - + + Finally check of a tbl file exists with a .mult postfix (e.g. Cmax.tbl.mult) and apply the + multiplication to the loaded data. + Input: - pathtotbl: full path to table file - landuse: landuse map @@ -431,10 +434,18 @@ if resttotal[0,0] < totalzeromap[0,0]: self.logger.warn("Not all catchment cells have a value for [" + pathtotbl + "] : " + str(resttotal[0,0]) + "!=" + str(totalzeromap[0,0])) - + + # Apply multiplication table if present + multname = os.path.dirname(pathtotbl) + ".mult" + if os.path.exists(multname): + multfac=lookupscalar(multname,landuse,subcatch,soil) + rest = rest * multfac + self.logger.info("Applying multiplication from table: " + multname) + return rest - def createRunId(self,intbl="intbl",logfname="wflow.log",NoOverWrite=True,model="model",modelVersion="no version",level=pcrut.logging.DEBUG): + + def createRunId(self,intbl="intbl",logfname="wflow.log",NoOverWrite=True,model="model",modelVersion="no version",level=pcrut.logging.DEBUG): """ Create runId dir and copy table files to it Also changes the working dir to the case/runid directory