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:

attr.Attribute

elevation

Surface elevation before erosion

Variable properties:

Type:

attr.Attribute

fs_context

Accessor to fastscapelib-fortran internal variables

Variable properties:

  • type : foreign

  • reference variable : FastscapelibContext.context

  • intent : in

Type:

attr.Attribute

stack

Dfs ordered grid node indices

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,)

Type:

attr.Attribute

nb_receivers

Number of flow receivers

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,)

Type:

attr.Attribute

receivers

Flow receiver node indices

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)

Type:

attr.Attribute

lengths

Out flow path length

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)

Type:

attr.Attribute

weights

Flow partition weights

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,) or (‘node’, ‘nb_rec_max’)

Type:

attr.Attribute

nb_donors

Number of flow donors

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’,)

Type:

attr.Attribute

donors

Flow donors node indices

Variable properties:

  • type : variable

  • intent : out

  • dimensions : (‘node’, ‘nb_don_max’)

Type:

attr.Attribute

basin

River catchments

Variable properties:

  • type : on_demand

  • intent : out

  • dimensions : (‘y’, ‘x’)

Type:

attr.Attribute

lake_depth

Lake depth

Variable properties:

  • type : on_demand

  • intent : out

  • dimensions : (‘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