How to Run flopy-modflow6 day by day in a loop instead of all at once #1832
-
I want to change the daily recharge value based on the daily water head, so, I'm wondering if there is a way to run the program in a loop so I could change the intermediate model states, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@qiyang77, you can do this using the modflowapi python library. The modflowapi python library is on github here: https://github.com/MODFLOW-USGS/modflowapi The Modflowapi library provides python access to the MODFLOW API. "The MODFLOW [API] allows other programs to control MODFLOW and interactively change variables without having to modify the source code." (Hughes, 2022). I recommend reading the article I just quoted, cited at the bottom of the modflowapi github page, and then look through the notebooks in the examples folder. The "Head_Monitor_Example" notebook includes code that gets an array of current heads, and the "MODFLOW-API_extension_objects" notebook "Create a callback function for adjusting model data" section includes code that dynamically adjusts recharge. |
Beta Was this translation helpful? Give feedback.
@qiyang77, you can do this using the modflowapi python library. The modflowapi python library is on github here:
https://github.com/MODFLOW-USGS/modflowapi
The Modflowapi library provides python access to the MODFLOW API. "The MODFLOW [API] allows other programs to control MODFLOW and interactively change variables without having to modify the source code." (Hughes, 2022). I recommend reading the article I just quoted, cited at the bottom of the modflowapi github page, and then look through the notebooks in the examples folder. The "Head_Monitor_Example" notebook includes code that gets an array of current heads, and the "MODFLOW-API_extension_objects" notebook "Create a callback function…