-
class
UniformPrecipitator¶
UniformPrecipitator¶
terrainbento UniformPrecipitator.
-
class
UniformPrecipitator(grid, rainfall_flux=1.0)[source]¶ Bases:
objectGenerate uniform precipitation.
UniformPrecipitator populates the at-node field “rainfall__flux” with a value provided by the keyword argument
rainfall_flux.To make discharge proprortional to drainage area, use the default value of 1.
Examples
>>> from landlab import RasterModelGrid >>> from terrainbento import UniformPrecipitator >>> grid = RasterModelGrid((5,5)) >>> precipitator = UniformPrecipitator(grid, rainfall_flux=3.4) >>> grid.at_node["rainfall__flux"].reshape(grid.shape) array([[ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4]]) >>> precipitator.run_one_step(10) >>> grid.at_node["rainfall__flux"].reshape(grid.shape) array([[ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4], [ 3.4, 3.4, 3.4, 3.4, 3.4]])