RHESSysWorkflows  1.33
Namespaces | Variables
CreateFlowtable.py File Reference

Namespaces

 CreateFlowtable
 Create RHESSys flowtable.
 

Variables

tuple CreateFlowtable.parser = argparse.ArgumentParser(description='Create RHESSys flowtable using GRASS GIS data and createflowpaths utility')
 
string CreateFlowtable.help = 'The configuration file. Must define section "GRASS" and option "GISBASE"'
 
tuple CreateFlowtable.args = parser.parse_args()
 
tuple CreateFlowtable.cmdline = RHESSysMetadata.getCommandLine()
 
 CreateFlowtable.configFile = None
 
tuple CreateFlowtable.context = Context(args.projectDir, configFile)
 
tuple CreateFlowtable.studyArea = RHESSysMetadata.readStudyAreaEntries(context)
 
tuple CreateFlowtable.grassMetadata = RHESSysMetadata.readGRASSEntries(context)
 
tuple CreateFlowtable.metadata = RHESSysMetadata.readRHESSysEntries(context)
 
tuple CreateFlowtable.demResX = float(studyArea['dem_res_x'])
 
tuple CreateFlowtable.demResY = float(studyArea['dem_res_y'])
 
list CreateFlowtable.demRast = grassMetadata['dem_rast']
 
list CreateFlowtable.rhessysDir = metadata['rhessys_dir']
 
tuple CreateFlowtable.paths = RHESSysPaths(args.projectDir, rhessysDir)
 
tuple CreateFlowtable.grassDbase = os.path.join(context.projectDir, metadata['grass_dbase'])
 
tuple CreateFlowtable.grassConfig = GRASSConfig(context, grassDbase, metadata['grass_location'], metadata['grass_mapset'])
 
tuple CreateFlowtable.grassLib = GRASSLib(grassConfig=grassConfig)
 
tuple CreateFlowtable.result = grassLib.script.run_command('g.region', rast=demRast)
 
list CreateFlowtable.basinRast = grassMetadata['basin_rast']
 
tuple CreateFlowtable.cfPath = os.path.join(context.projectDir, metadata['cf_bin'])
 
tuple CreateFlowtable.templatePath = os.path.join(context.projectDir, metadata['template'])
 
tuple CreateFlowtable.flowTableNameBase = os.path.basename(metadata['worldfile_zero'])
 
tuple CreateFlowtable.flowOutpath = os.path.join(paths.RHESSYS_FLOW, flowTableNameBase)
 
tuple CreateFlowtable.cfOutpath = os.path.join(paths.RHESSYS_FLOW, 'cf.out')
 
 CreateFlowtable.roads = None
 
 CreateFlowtable.roofs = None
 
 CreateFlowtable.impervious = None
 
string CreateFlowtable.surfaceFlowtable = "%s_surface.flow"
 
string CreateFlowtable.subsurfaceFlowtable = "%s_subsurface.flow"
 
tuple CreateFlowtable.p
 
tuple CreateFlowtable.cfOut = open(cfOutpath, 'w')
 
string CreateFlowtable.cfCmd = "%s out=%s template=%s dem=%s slope=%s stream=%s road=%s roof=%s impervious=%s cellsize=%s"