Main algorithm sources are rewritten from TMOD9502.FOR. TMOD9502.FOR is available from http://www.es.lancs.ac.uk/hfdg/topmodel.html. Thanks to Keith Beven. [r.topmodel] simulates TOPMODEL which is a physically based hydrologic model. Parameters: (i) elevation: Rectangular elevation map (i) basin: Basin map created by r.water.outlet (o) depressionless: Depressionless elevation map This can be omitted if [elevation] map is already a depressionless map. If this is given, [depressionless] map will be used as [elevation] map. (o) direction: This should be given with the [depressionless] map. (o) belevation: Study basin extracted elevation map (o) topidx: Study basin extracted topographic index map (i) nidxclass: Number of topographic index classes (o/i) idxstats: Topographic index statistics file (i) parameters: TOPMODEL parameters file (i) input: Rainfall and potential evapotranspiration data file (o) output: Output file Qobs: Compare Qt with Qobs and calculate the model efficiency timestep: OPTIONAL output for the given time step idxclass: OPTIONAL output for the given topographic index class (i) means input (o) means output (o/i) means ouput or input with -i flag Flags: -i: r.topmodel requires at least idxstats, parameters, input, and output options. The -i flag means that the model doesn't need any input raster maps because the idxstats file is already ready for run. This also means that any other options are used only to create the idxstats file. -o: Overwrite outputs