Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Simplify the calculator logic and de-couple from input data structures #12

Open
gassc opened this issue Apr 30, 2019 · 1 comment
Open

Comments

@gassc
Copy link
Member

gassc commented Apr 30, 2019

Currently the calculator expects a 1D array of precip estimates values and a corresponding header array of the same length, where the array position in each corresponds (among other things). The values are read into a NumPy array and all subsequent calculations are effectively batched over each value in the array. This is a holdover from the original codebase and perhaps a bit more complicated than necessary. It makes running an individual calculation needlessly compex.

The core calculator logic should operate just on

  • a precip value,
  • a flow length
  • an average slope
  • a basin area.

To run on multiple storm event frequencies, we run the calculation in a loop. It's not a complicated or long running equation--just some pretty basic math--so efficiency isn't really an issue here.

Anything related to data structures, reading/writing to a table, etc., should be handled outside of the core script.

@gassc
Copy link
Member Author

gassc commented Apr 30, 2019

Started to address in 39162ba

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant