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

Improve timestep performance #52

Open
sjordan29 opened this issue Nov 30, 2023 · 0 comments
Open

Improve timestep performance #52

sjordan29 opened this issue Nov 30, 2023 · 0 comments
Assignees

Comments

@sjordan29
Copy link
Contributor

cProfile results (profile.prof), explored in SnakeViz identify bottlenecks in the code. For clearwater-riverine, the main bottleneck is in

clearwater_riverine\transport.py:159(update), and specifically within the code that updates the left hand side matrix to solve the transport equation. Within that function, time is primarily sent in xarray.

This issue can be closed when some low-hanging performance gains are made.

Hypothesis
Variables are read from RAS HDF output to an xarray, but then those values must be put into a numpy format for compatibility with the sparse matrix solver. I think these data could be stored outside of an xarray and only saved to the xarray if requested by the user, which would reduce conversion in and out of xarray format.

  • Explore how data is stored for variables in clearwater-modules and implement a similar approach.
  • Engage with #57 for clearwater-modules on skipping writing intermediate arrays to xarray since this will be a way to speed up both of these models.
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

No branches or pull requests

2 participants