-
Notifications
You must be signed in to change notification settings - Fork 320
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
feat(sim options block packages): Support for packages declared in simulation name file's options block #2164
Conversation
Support for simulation options block packages added including the hpc package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @spaulins-usgs, this all seems to look okay. Would you mind writing in the github PR description how this works and how someone can add a new package? You've added support for the HPC package, but would this same pattern also work for a model name file? Also, I notice that the dfn's have some new flopy tags that would be good to describe somewhere.
@langevin-usgs, I added a text explaining how to use this to the github PR description. Currently, the same pattern is not supported in the model name file. Adding support for the model name file should be straightforward, but at this time I did not implement that feature since I have no packages to test it with. I used the "subpackage" flopy tags in the dfns, which are already documented in the MODFLOW-6 repository under the "Creating a New Subpackage Definition File" section here: https://github.com/MODFLOW-USGS/modflow6/blob/develop/doc/mf6io/mf6ivar/readme.md |
This reverts commit 0b753ac.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2164 +/- ##
==========================================
- Coverage 68.3% 35.0% -33.4%
==========================================
Files 260 260
Lines 57947 58031 +84
==========================================
- Hits 39611 20333 -19278
- Misses 18336 37698 +19362
|
Hi @spaulins-usgs , do you have an idea why that documentation check is still failing on macos-latest? And is there anything I can do to bring this to completion? (CC @langevin-usgs) |
@mjr-deltares @spaulins-usgs I ran into the same issue, it's fixed by #2171 if you want to rebase. |
@wpbonelli should our single OS jobs use the oldest python version (3.8) or the latest (3.12)? |
Thanks @wpbonelli. @spaulins-usgs : can you update the branch? |
@jdhughes-usgs I think there's a case for both. My reasoning for going with the oldest is
|
Added support for declaring packages in the simulation name file's options block using the FILEIN keyword. Currently the only package that can be defined in the name file's options block is the HPC package, which is included in this pull request.
When creating packages that can be declared in the simulation name file's options block follow the same procedure for creating the dfn as you would for other subpackages, but make sure to set the parent package type to MFSimulation and add the filein record to the simulation name file dfn.
Adding and removing these packages in flopy is similar to how packages are added and removed from a model. Just create the HPC package object passing in the MFSimulation object and flopy will take care of updating the namefile for you. For example:
To get the package object use the MFSimulation object's get_package method.
The MFSimulation object's remove_package method allows you to remove the package (updating the namefile for you):