KR instructions on Subcatchment Buildup Pyswmm
Mon 1/9/2023 1:43 PM
Hi all,
Yes, my changes did get merged into pyswmm. Anne, I think the file you shared had an old structure with the buildup being reported as part of the stats, but they are now reported as a separate attribute. See here:
So, it should just be a minor tweak in the code to call the pollutant buildup directly and save it (assuming that's what you're hoping to accomplish). Let me know if you have any trouble figuring that out.
Hope that helps,
Katherine
Thu 1/5/2023 6:23 PM
Hi Anne,
I am not sure if we will need that functionality in this phase. So I would like to propose that we hold off on that switch for now. But it would be good to get an accurate picture of the branches etc. So we will be interested in Katherine's response. Thanks.
-Sudhir
Thu 1/5/2023 5:00 PM
Is it possible to use Katherine's version of pySWMM instead?
Katherine – I know you are out on leave this week, but when you are back in the office please refresh our memories if your work ever got truly merged into the official pySWMM release. Our recollection on the call was that it had, but maybe we are remembering incorrectly or maybe they have changed the variable names since you worked on it?
~Anne
Thu 1/5/2023 4:48 PM
Anne,
The python code that you gave us does not run in the version 1.2.0 that we are using. This is the latest version of PySWMM released on Aug. 21, 2022
The issue is that you are asking for the subcatchment.statistics['pollutant_buildup'][pollutant] and there is no subcatchment Statistics with the name buildup. This is causing an error.
The only statistics available are shown in the 1st image.

The error that is occurring is shown in the 2nd image.

Thanks,
Melissa