Heads from a previous run #543
Unanswered
DStrom1987
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Hmm. In an ensemble setting, you'd need initial heads that are coherent with each realization, which is tricky. I guess you could use the state estimation machinery in pestpp-da to do this within the par-obs processes. You'd have to read the simulated heads from a model run for each model cell as "obs" and set a par for each model cells initial head. Then you could tell pestpp-da to transfer those simulated head obs to the initial head pars between cycles and just use a single iter for each cycle. But that's not smooth or easy... |
Beta Was this translation helpful? Give feedback.
1 reply
-
I always update my MODFLOW initial heads before starting the PEST process.
If you use flopy and external files, something like this (using your own
dir/naming conventions of course):
sim = flopy.mf6.MFSimulation.load(sim_ws=sim_ws,
sim_name=sim_name,
load_only=['ic'])
for m in sim.model_dict:
gwf = sim.get_model(m)
hdfile = f"{m}.hds"
hdobj = bf.HeadFile(os.path.join(sim_ws, hdfile),
precision='double')
hdobj.list_records()
rec = hdobj.get_data(kstpkper=(0, 0))
for k in range(0, rec.shape[0]):
outfile = '{}.ic_head_layer{}.arr'.format(gwf.name, k + 1) #
could get slick and read this from the IC package
np.savetxt(os.path.join(sim_ws, outfile), rec[k])
gwf.ic.strt.set_data(outfile, layer=k)
gwf.ic.write()
hdobj.close()
I didn't have much luck trying to get simulated head "observations" from
previous runs into initial heads for the next run, but my attempts were
pre-pestpp-da. This one time, at modelling camp, I used all my initial
heads as parameters and "informed them" with simulation performance metrics
as "observations" like number of inner and outer iterations, percent
discrepancy, simulation time.
…On Sat, Oct 12, 2024 at 10:28 AM DStrom1987 ***@***.***> wrote:
I see... I was thinking more of a static initial head from the first run
of the model. Even though it wouldn't progressively update through the
iterations, it would still provide a baseline closer to my results rather
than just using the model's top or something similar.
Currently it seems to dislike the initial heads entered in the GUI.
—
Reply to this email directly, view it on GitHub
<#543 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSJXRATAE6SFSN77UMKSADZ3A7GVAVCNFSM6AAAAABPZSBD7WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOJRHE2DEMA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
"Perfect spheres are pointless."
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was wondering if theres a pestpp_option or some other smooth ways of making my pest-ies cycle use the initial heads from a previous run?
When i set it up through model muse it gives me an error and will not proceed. However, the model im running should take around 1 minute to finish with the heads from a successful run as starting heads. With model top it takes roughly 6 minutes which increase when I run 25 models in paralell.
Any advice?
David
Beta Was this translation helpful? Give feedback.
All reactions