Пример #1
0
        [0, 1, None],  # P and T go to the snow reservoir
        [2, None, None]  # PET goes to the transparent element
    ],
    weight=[[1.0, 1.0, 0.0], [0.0, 0.0, 1.0]],
    id='upper-splitter')

snow = SnowReservoir(parameters={
    't0': 0.0,
    'k': 0.01,
    'm': 2.0
},
                     states={'S0': 0.0},
                     approximation=approximator,
                     id='snow')

upper_transparent = Transparent(id='upper-transparent')

upper_junction = Junction(direction=[[0, None], [None, 0]],
                          id='upper-junction')

unsaturated = UnsaturatedReservoir(parameters={
    'Smax': 50.0,
    'Ce': 1.0,
    'm': 0.01,
    'beta': 2.0
},
                                   states={'S0': 10.0},
                                   approximation=approximator,
                                   id='unsaturated')

lower_splitter = Splitter(
Пример #2
0
                                    approximation=numerical_approximation,
                                    id='cr1')

channel_routing_2 = LinearReservoir(parameters={'k': 0.1},
                                    states={'S0': 10.0},
                                    approximation=numerical_approximation,
                                    id='cr2')

channel_routing_3 = LinearReservoir(parameters={'k': 0.1},
                                    states={'S0': 10.0},
                                    approximation=numerical_approximation,
                                    id='cr3')

lower_zone = LinearReservoir(parameters={'k': 0.1},
                             states={'S0': 10.0},
                             approximation=numerical_approximation,
                             id='lz')

transparent_1 = Transparent(id='tr1')

transparent_2 = Transparent(id='tr2')

junction = Junction(
    direction=[[0, 0]],  # First output
    id='jun')

model = Unit(layers=[[upper_zone], [splitter], [channel_routing_1, lower_zone],
                     [channel_routing_2, transparent_1],
                     [channel_routing_3, transparent_2], [junction]],
             id='model')
Пример #3
0
unit_hydrograph_1 = UnitHydrograph1(parameters={'lag-time': x4},
                                    states={'lag': None},
                                    id='uh1')

unit_hydrograph_2 = UnitHydrograph2(parameters={'lag-time': 2*x4},
                                    states={'lag': None},
                                    id='uh2')

routing_store = RoutingStore(parameters={'x2': x2, 'x3': x3,
                                         'gamma': 5.0, 'omega': 3.5},
                             states={'S0': 10.0},
                             approximation=numerical_approximation,
                             id='rs')

transparent = Transparent(id='tr')

junction = Junction(direction=[[0, None],   # First output
                               [1, None],   # Second output
                               [None, 0]],  # Third output
                    id='jun')

flux_aggregator = FluxAggregator(id='fa')

model = Unit(layers=[[interception_filter],
                     [production_store],
                     [splitter],
                     [unit_hydrograph_1, unit_hydrograph_2],
                     [routing_store, transparent],
                     [junction],
                     [flux_aggregator]],