You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm currently working on a project where we have some ancient models lying around using a custom version of MF2K. This custom version of MF2K uses the SWI1 package and a specially developed unsaturated zone package. I wrote custom flopy package classes to read/write these two special packages, and I wanted to extend flopy with those custom packages so I could use all of flopy's wonderful functionality to load/post-process these models.
Now I realize that development on MF2k and Modflow2005 stuff is probably well past its due date... But, with a very minor change, the supported package list in flopy.modflow.Modflow could be exposed allowing users like me to inject custom package definition classes 😇.
Describe the solution you'd like
By moving self.mfnam_packages to a separate function with a keyword argument that allows specification of custom packages, and adding an extra_pkgs argument to the class constructor and load methods, custom classes can easily be supported.
importflopyfrommy_flopy_additionsimportModflowSwi1, ModflowUnsaturatedZonecustom_pkgs= {
"SWI1": ModflowSwi1,
"UZR": ModflowUnsaturatedZone,
}
ml=flopy.modflow.Modflow.load("namfile.nam", extra_pkgs=custom_pkgs)
# the Modflow.mfnam_packages is updated with the extra_pkgs kwarg in the class constructor.
Is this something you guys would consider changing? Let me know.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I'm currently working on a project where we have some ancient models lying around using a custom version of MF2K. This custom version of MF2K uses the SWI1 package and a specially developed unsaturated zone package. I wrote custom flopy package classes to read/write these two special packages, and I wanted to extend flopy with those custom packages so I could use all of flopy's wonderful functionality to load/post-process these models.
Now I realize that development on MF2k and Modflow2005 stuff is probably well past its due date... But, with a very minor change, the supported package list in
flopy.modflow.Modflow
could be exposed allowing users like me to inject custom package definition classes 😇.Describe the solution you'd like
By moving
self.mfnam_packages
to a separate function with a keyword argument that allows specification of custom packages, and adding anextra_pkgs
argument to the class constructor and load methods, custom classes can easily be supported.Is this something you guys would consider changing? Let me know.
The text was updated successfully, but these errors were encountered: