FlowRouter
- class fastscape.processes.FlowRouter(*, shape, elevation, fs_context)
Base process class to route flow on the topographic surface.
Do not use this base class directly in a model! Use one of its subclasses instead.
However, if you need one or several of the variables declared here in another process, it is preferable to pass this base class in
xsimlab.foreign().- shape
Nb. of grid nodes in (y, x)
Variable properties:
type :
foreignreference variable :
UniformRectilinearGrid2D.shapeintent :
indimensions : (‘shape_yx’,)
- Type:
attr.Attribute
- elevation
Surface elevation before erosion
Variable properties:
type :
foreignreference variable :
SurfaceToErode.elevationintent :
indimensions : (‘y’, ‘x’)
- Type:
attr.Attribute
- fs_context
Accessor to fastscapelib-fortran internal variables
Variable properties:
type :
foreignreference variable :
FastscapelibContext.contextintent :
in
- Type:
attr.Attribute
- stack
Dfs ordered grid node indices
Variable properties:
type :
variableintent :
outdimensions : (‘node’,)
- Type:
attr.Attribute
- nb_receivers
Number of flow receivers
Variable properties:
type :
variableintent :
outdimensions : (‘node’,)
- Type:
attr.Attribute
- receivers
Flow receiver node indices
Variable properties:
type :
variableintent :
outdimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)
- Type:
attr.Attribute
- lengths
Out flow path length
Variable properties:
type :
variableintent :
outdimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)
- Type:
attr.Attribute
- weights
Flow partition weights
Variable properties:
type :
variableintent :
outdimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)
- Type:
attr.Attribute
- nb_donors
Number of flow donors
Variable properties:
type :
variableintent :
outdimensions : (‘node’,)
- Type:
attr.Attribute
- donors
Flow donors node indices
Variable properties:
type :
variableintent :
outdimensions : (‘node’, ‘nb_don_max’)
- Type:
attr.Attribute
- basin
River catchments
Variable properties:
type :
on_demandintent :
outdimensions : (‘y’, ‘x’)
- Type:
attr.Attribute
- lake_depth
Lake depth
Variable properties:
type :
on_demandintent :
outdimensions : (‘y’, ‘x’)
- Type:
attr.Attribute
Methods
__init__(*, shape, elevation, fs_context)Method generated by attrs for class FlowRouter.
route_flow()run_step()
Output of process info:
In [1]: import xsimlab as xs
In [2]: from fastscape.processes import FlowRouter
In [3]: xs.process_info(FlowRouter)
<FlowRouter (xsimlab process)>
Variables:
shape [in] <--- UniformRectilinearGrid2D.shape
elevation [in] <--- SurfaceToErode.elevation
fs_context [in] <--- FastscapelibContext.context
stack [out] ('node',) DFS ordered grid node indices
nb_receivers [out] ('node',) number of flow receivers
receivers [out] ('node',) or ('node', 'nb_rec_max') flow ...
lengths [out] ('node',) or ('node', 'nb_rec_max') out f...
weights [out] ('node',) or ('node', 'nb_rec_max') flow ...
nb_donors [out] ('node',) number of flow donors
donors [out] ('node', 'nb_don_max') flow donors node i...
basin [out] ('y', 'x') river catchments
lake_depth [out] ('y', 'x') lake depth
Simulation stages:
run_step