-
Notifications
You must be signed in to change notification settings - Fork 309
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
fix(simulation packages): *** Breaks interface *** #1394
Conversation
… generic packages
…models in a simulation. Includes example of how to connect sub-packages to a exchange package.
How to upgrade your code to work with the new flopy interfaceThis Pull Request breaks the interface for creating the following packages: ATS To fix your python code you will need to do the following:
Example code fixes for each package type:ATS Package• Remove ats_filerecord from tdis constructor Previous codetdis = flopy.mf6.ModflowTdis(sim, ats_filerecord=ats_fr, …) New codetdis = flopy.mf6.ModflowTdis(sim, …) GNC Package• This PR only breaks across model “simulation level” GNC packages. Model level GNC packages do not have a parent package and therefore function the same as before. Previous codeexg = ModflowGwfgwf(sim, gnc_filerecord=gnc_path, …) New codeexg = ModflowGwfgwf(sim, …) MVR Package• This PR only breaks across model “simulation level” MVR packages. Model level MVR packages do not have a parent package and therefore function the same as before. Previous codeexg = ModflowGwfgwf (sim, mvr_filerecord=mvr_path, …) New codeexg = ModflowGwfgwf(sim, …) MVT Package• This PR only breaks across model “simulation level” MVT packages. Model level MVT packages do not have a parent package and therefore function the same as before. Previous codeexg = ModflowGwtgwt (sim, mvt_filerecord=mvt_path, …) New codeexg = ModflowGwtgwt(sim, …) TVK Package• Remove TVK_filerecord from npf constructor Previous codenpf = flopy.mf6.Modflownpf(model, tvk_filerecord=tvk_fr, …) New codenpf = flopy.mf6.Modflownpf(model, …) TVS Package• Remove tvs_filerecord from sto constructor Previous codesto = flopy.mf6.Modflowsto (model, tvs_filerecord=tvs_fr, …) New codesto = flopy.mf6.Modflowsto(model, …) |
Codecov Report
@@ Coverage Diff @@
## develop #1394 +/- ##
==============================================
- Coverage 74.810% 30.047% -44.763%
==============================================
Files 249 249
Lines 53573 52077 -1496
==============================================
- Hits 40078 15648 -24430
- Misses 13495 36429 +22934
|
*** Breaks interface ***
Adding different types of mvr packages will no longer require modifying flopy code. Flopy code updated to better support generic child packages. The mvr and gnc packages are now sub-packages like the obs/ts/tas packages and uses the sub-package interface
(this breaks the existing interface and may require minor modifications to end-user code). Additionally, mvt, ats, tvk, and tvs all are now sub-packages and use the sub-package interface. This could potentially break end-user code as well, though these packages are so new the impact will likely be minimal. Documentation added for adding new packages and models to flopy. Tutorial added for demonstrating a simulation with multiple models.
*** Breaks interface ***