-
Notifications
You must be signed in to change notification settings - Fork 17
Description
This is not really a bug but more a usage question.
I'm trying to run a "simple" MF6 simulation composed of a GWF + GWT model. I'm trying to get access to the concentration in the GWT model to then update a well concentration. Thing is, I cant seem to find the way to retrieve the GWT model.
In the initialize step I do the usual:
if callback_step == Callbacks.initialize:
print(f"\nInitializing simulation...")
print(f"Models: {sim.model_names}")
Which prints:
Initializing simulation...
Models: ['gwf', 'gwt']
But then I use the Callback stress_period_start to retrieve the transport model like
elif callback_step == Callbacks.stress_period_start:
gwt_model = sim.get_model("gwt")
And I get an error:
KeyError: 'Model name gwt is invalid'
I realized that sim.model_names in the Callbacks.stress_period_start now only yields ['gwf'] as a possible option.
So at this stage I'm pretty convinced the api gets access to the models in the order they are run, so at stress_period_start only the flow model is meant to be modified (?), but this begs the question, how, or with what callback function can I access the stress_period_start state of the transport model?
There is no examples that I could find that uses the API with more than one model in a simulation so I'm pretty lost.
I tried both with modflowapi 0.3.0.dev0 and the official 0.2 release.