Copy of gwf in same sim with slight variations? #1543
wkitlasten
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to load a a specific gwf model from a simulation and make changes and then save it as a new gwf model in the same simulation. I'm hoping there is a shortcut I am missing (something like gwf = gwf.copy(name) would be nice!)... but this is what I have so far:
So far so good... I have 2 identical gwf models, but I don't know how to change the model name, the external files the packages reference, or add gwf2 to the simulation.
The
sim.register_model()
method sounds like it does what I want, but the docs warn: "Add a model to the simulation. This is a call-back method made from the package and should not be called directly." Calling register_model did not do what I wanted (no surprise there).I tried making a new gwf object from scratch:
But then I need to add packages from gwf to gwf2, which theoretically would be done with something like
gwf2.register_package()
, but I can't (and shouldn't?) get that to do what I want.Another option might be to strip out all the package data and create new packages from scratch (e.g.
a = gwf.rcha.recharge.array
, edit, save as "rch2.txt") then make the new package, but I can't figure out an efficient way to add packages while loop through existing packages, where I somehow need to get the package namep
into the package call in place of***
:Any suggestions are appreciated! I'd hate to come this far and revert to parsing the input files myself.
Beta Was this translation helpful? Give feedback.
All reactions