Inp Manage Package

Submodules

inp_manage.inp module

class rcg.inp_manage.inp.BuildCatchments(file_path: str)[source]

Bases: object

BuildCatchments is a class for creating and managing catchment areas in a SWMM model.

This class uses the swmmio library to load and manipulate SWMM models. It provides methods to generate new subcatchment IDs, add new subcatchments, and manage the subcatchments in the model.

Attributes

file_pathstr

The file path of the SWMM input file.

modelswmmio.Model

The SWMM model object loaded from the input file.

add_subcatchment() None[source]

Adds a new subcatchment to the project, including its subarea, coordinates, and infiltration parameters.

Returns

None

add_subcatchment_form_gui(area: float, land_form: str, land_cover: str) None[source]

Adds a new subcatchment to the project, including its subarea, coordinates, and infiltration parameters.

Returns

None

get_subcatchment_name(name: str) DataFrame[source]

Takes a subcatchment id (name) and returns the subcatchment dataframe row with that name (index).

Parameters

namestr

The name of the subcatchment.

Returns

pd.DataFrame

The dataframe row of the subcatchment with the given name.

Raises

KeyError

If the subcatchment with the given name doesn’t exist in the model.

Module contents