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

Add helper functions to get stressmodels from pastastore #134

Merged
merged 12 commits into from
Aug 14, 2024

Conversation

dbrakenhoff
Copy link
Member

@dbrakenhoff dbrakenhoff commented Aug 9, 2024

Make it even easier to build Pastas models! As suggested by @FransSchaars.

Build stressmodels from stored stress time series with pstore.get_stressmodels()

sm = pstore.get_stressmodel("well1", rfunc=ps.Hantush, up=False)

Methods support nearest option when x and y-coordinates are stored for all stresses and oseries! Add them directly to pastas models with pstore.add_stressmodel()

ml = ps.Model(oseries)  # or use `pstore.create_model(oseries_name)`
pstore.add_stressmodel(ml, stresses=["nearest prec", "nearest evap"], stressmodel=ps.RechargeModel)

+ some other clean up and improvements

@dbrakenhoff dbrakenhoff requested a review from martinvonk August 9, 2024 15:19
@dbrakenhoff dbrakenhoff self-assigned this Aug 9, 2024
@dbrakenhoff dbrakenhoff added the enhancement New feature or request label Aug 9, 2024
@dbrakenhoff
Copy link
Member Author

Test fail is because i annoyed the KNMI api, so all good to go after review.

pastastore/store.py Outdated Show resolved Hide resolved
@martinvonk
Copy link
Contributor

Maybe we can separate the deletion of the arctic and pystore to another pr such that @FransSchaars can review and test this?

@dbrakenhoff
Copy link
Member Author

Maybe we can separate the deletion of the arctic and pystore to another pr such that @FransSchaars can review and test this?

Just ignore the deletions? It should work fine. (I'm a bit lazy and don't feel like separating the two :).)

@dbrakenhoff dbrakenhoff merged commit a08166b into dev Aug 14, 2024
22 checks passed
@dbrakenhoff dbrakenhoff deleted the add_stressmodels branch August 14, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants