modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
517 stars 313 forks source link

Error in command window #1514

Closed hjia1005 closed 5 months ago

hjia1005 commented 2 years ago

I use time series for both rch and evt packages. Below is how I created them

rch=flopy.mf6.modflow.mfgwfrch.ModflowGwfrch(gwf,
                                filename='model.rch',
                                pname='rch',
                                timeseries=ts,
                                stress_period_data=rch_spd_ts) 
rch.ts.initialize(filename="model.rch.ts",
                  timeseries=ts,
                  time_series_namerecord=ts_namerecord,
                  interpolation_methodrecord=["linearend"]*13)
rch.ts.write()
rch.write()
evt=flopy.mf6.modflow.mfgwfevt.ModflowGwfevt(gwf,
                                filename='model.evt',
                                pname='evt',
                                nseg=1,
                                timeseries=ts,
                                stress_period_data=evt_spd_ts) 
evt.ts.initialize(
    filename="model.evt.ts",
    timeseries=ts,
    time_series_namerecord=ts_namerecord,
    interpolation_methodrecord=["linearend"]*13
)
evt.ts.write()
evt.write()

This is how my model packages look like. image

They work fine when I run them block by block on a platform (Spyder). But I need it to be run as a stand-alone script for PEST. If I run it in that way, I get the following error:

image

If I only update one package (RCH or EVT) other than both, then the script also works fine. But I need to calibrate both. I guess there are some conflicts among the child packages with the package name of 'TS_x'. How can I fix it?

wpbonelli commented 5 months ago

@hjia1005 apologies for the late reply here. I tried modifying a test case to remove two different packages both of which were initialized with timeseries, and could not reproduce this. Could you confirm the latest flopy still raises the error? I wonder if it may have been addressed by https://github.com/modflowpy/flopy/commit/8b03916b55fb7a923d13648237147124d77f09f5, which came out with 3.4.2.

If you are still seeing this issue, could you share the full script producing it? That will help get to the bottom of this quickly.

wpbonelli commented 5 months ago

Tentatively closing but please reopen if premature