Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check need for interpolation to compare results #109

Conversation

barneydobson
Copy link
Collaborator

@barneydobson barneydobson commented Mar 21, 2024

Description

@cheginit I've pulled out a sample synthetic results timeseries and compared with a real one. We see that the time indices perfectly align less than 1% of the time, so I think we are going to have to interpolate to make NSE comparisons.

Fixes #76

@barneydobson barneydobson self-assigned this Mar 21, 2024
@barneydobson barneydobson changed the title Create debug_interpolation.py Check need for interpolation to compare results Mar 21, 2024
@cheginit
Copy link
Collaborator

Since I cannot reproduce this, I cannot get into specifics. But I am guessing that you're running SWMM at variable time steps and its output does not match the observed streamflow. I haven't used SWMM a lot, but I am wondering if you can set up reporting time at intervals in a such a way that resampling gets you exactly the same date as of the observations. For example, if the observation is hourly, you would report at, for example, 15 min, and just do df.resample("1H").mean() to get the result at the observation dates. This way, you let SWMM take care of setting time steps correctly without the need for interpolation during the post-processing.

@barneydobson
Copy link
Collaborator Author

barneydobson commented May 13, 2024

I've had a look at the option to use swmm_stride which lets you control the timesteps more carefully in pyswmm, but, while it changes the reporting to be precise and uniform, it seems to produce confusing simulation datapoints (at least in my initial test). As far as I can tell it is more intended for custom control structures and not simulation reporting. I will leave this for now - though in checking it has revealed a bug in the interpolation code, so still helpful ;). Possibly when swmmanywhere is made open source, if we explore some collaboration with the pyswmm people I am sure they will have a better idea for how to pre-specify reporting timesteps.

@barneydobson
Copy link
Collaborator Author

barneydobson commented Aug 22, 2024

Closing this as this branch is way out of date - will reopen the issue if anyone wants to discuss #262

@barneydobson barneydobson deleted the 76-use-of-interpolation-in-comparing-realsynthetic-simulation-timeseries branch August 22, 2024 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of interpolation in comparing real/synthetic simulation timeseries
2 participants