Skip to content

replace_inp_section method #140

Answered by aerispaha
BuczynskiRafal asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @BuczynskiRafal,

One way you can accomplish overwriting / editing N-Imperv, N-Perv etc. columns is by using the swmmio.Model.inp API. Note that the inp API provides lower-level access to sections of the INP file with getters / setters, whereas the Model.subcatchments aggregates multiple subcacthment-related sections of the INP file into one dataframe.

The columns you'd like to overwrite exist in the SUBAREAS section of the inp file. So, as an example, you could modify parameters in your model by doing something like this:

model = swmmio.Model('example_copy.inp')

# extract the subareas section of the INP file
subareas = model.inp.subareas 

# apply whatever modifications you need to th…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BuczynskiRafal
Comment options

Answer selected by BuczynskiRafal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants