Closed jdhughes-usgs closed 9 years ago
I had some people asking about this too. I added a generic Package__setattr__()
to help with resetting util_3d
, util_2d
, transient_2d
and mflist
attributes. For example:
lpf = ModflowLpf(model,hk=1.0)
To reset the util_3d
attribute named hk
, you just access as you normally would:
lpf.hk = 2.0
and __setattr__()
finds an existing attribute named hk
and uses it to instantiate a new util_3d
object and resets the hk
attribute with it. Note that this will not help users reset more complex attributes like the SWI2's zeta
.
Added logic to work with lists composed of util_2d
and util_3d
objects. So __setattr__()
now works with SWI2's zeta.
Those setters and getters are pretty cool, guys.
It feels like the next MODFLOW conference (not the one coming up) it may be time to teach a FloPy course. Just a thought. For whomever has time. Or a strong urge.
Mark
On Mon, Mar 23, 2015 at 10:54 PM, Hughes, J.D. notifications@github.com wrote:
Closed #19 https://github.com/modflowpy/flopy/issues/19.
— Reply to this email directly or view it on GitHub https://github.com/modflowpy/flopy/issues/19#event-262867859.
It might be time to consider including set and get methods to redefine variables now that the load methods are working.