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

Use OC-package info in run-store function #57

Open
bdestombe opened this issue May 4, 2022 · 1 comment
Open

Use OC-package info in run-store function #57

bdestombe opened this issue May 4, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bdestombe
Copy link
Collaborator

I would be interested in an additional function in the util.py file or maybe it can be an extension of write_and_run_model. From the OC-package we know whether head and budget are stored. The function would read and store the outputs of the model in model_ds.

Additionally, I would like to see a option in the write_and_run_model function to run the model in a temporary directory. Thus within
a with statement.

with tempfile.TemporaryDirectory() as tmpdirname:
    # alter model_ws to tmpdirname
    # write packages
    # run model
    # read and store outputs in model_ds using info from the OC-package
    # revert model_ws
@dbrakenhoff
Copy link
Collaborator

The method get_heads_dataarray provides a heads DataArray, which can be stored in the model_ds. Also we can use the new output accessor in flopy: hobj = gwf.output.heads().

As for a temporary directory, I agree that would be a useful feature. We could add that to the write_and_run_model method I think? Shouldn't be very complicated as the flopy Simulation object has a method to change the working directory.

@dbrakenhoff dbrakenhoff added the enhancement New feature or request label Oct 27, 2022
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

No branches or pull requests

2 participants