pywatershed.prms_channel_flow_graph_postprocess#
- pywatershed.prms_channel_flow_graph_postprocess(control, input_dir, prms_channel_dis, prms_channel_params, new_nodes_maker_dict, new_nodes_maker_names, new_nodes_maker_indices, new_nodes_maker_ids, new_nodes_flow_to_nhm_seg, addtl_output_vars=None, allow_disconnected_nodes=False, imbalance_behavior='defer', prms_channel_node_maker_name='prms_channel', type_check_nodes=False)[source]#
Add nodes to a PRMSChannel-based FlowGraph to run from known inputs.
This function helps construct a
FlowGraphstarting from existing data for aPRMSChannelsimulation. The resulting FlowGraph is meant to run by itself, forced by known input flows.One limitation is that this FlowGraph currently has no-inflow to non-PRMSChannel nodes (but this could be added/accomodated).
Note that if you want to run a
FlowGraphalong with otherProcesses in aModel, then the helper functionprms_channel_flow_graph_to_model_dict()is for you.See
FlowGraphfor additional details and discussion.Please see the example notebook examples/06_flow_graph_starfit.ipynb which highlights both this helper function and
prms_channel_flow_graph_to_model_dict().- Parameters:
control (
Control) – The control object for the runinput_dir (
Union[str,Path]) – the directory where the input files are foundprms_channel_dis (
Parameters) – the PRMSChannel discretization objectprms_channel_params (
Parameters) – the PRMSChannel parameters object.new_nodes_maker_dict (
dict) – a dictionary of key/name and and instantiated NodeMakers.new_nodes_maker_names (
list) – collated list of what node makers to use.new_nodes_maker_indices (
list) – collated list of indices relative to each NodeMaker.new_nodes_maker_ids (
list) – Collated list of ids relative to each NodeMaker.new_nodes_flow_to_nhm_seg (
list) – collated list describing the nhm_segs to which the new nodes will flow. Use of non-positive entries specifies the zero-based index for flowing to nodes specified in these collated parameters, allowing these new nodes to be added in groups, in series to the existing NHM FlowGraph. Note that a new node may not be placed below any outflow point of the domain.imbalance_behavior (
Literal['defer',None,'warn','error']) – one of [“defer”, None, “warn”, “error”] with “defer” being the default and defering to control.options[“imbalance_behavior”] when available. When control.options[“imbalance_behavior”] is not avaiable, imbalance_behavior is set to “warn”.
- Return type:
- Returns:
An instantiated FlowGraph object.