MODFLOW, ModelMuse and pumping rates in .wel

63 Views Asked by At

I have a MODFLOW model built in ModelMuse. With ModelMuse closed, I changed the pumping rates using a Flopy script, so the .wel file reflects the changes I made with Flopy. When I open the model again with ModelMuse, the changes made to the .wel file are not loaded.

Do you know of a way to tell ModelMuse to load the .wel file even though it has not been modified from ModelMuse?

2

There are 2 best solutions below

0
On BEST ANSWER

Thank you for your suggestion, Robin:

This is what I have found out about this topic.

When you save a model in ModelMuse that you are working on, all the files required to run MODFLOW from the command line outside of ModelMuse are created. In my particular case, among others, the .wel file is created.

I can update this .wel file using Flopy. The problem is that if I run MODFLOW from ModelMuse, the MODFLOW's own files are not read, they are only written. ModelMuse saves all its configuration and model data in a single .gpt file.

Therefore, the only way to update the model data using a Python script and run the program from ModelMuse is to update the .gpt file.

In conclusion, you cannot use Flopy to update the data of your MODFLOW model if you run it from ModelMuse because ModelMuse does not read MODFLOW's files, it only writes them.

0
On

It would be helpful to see your script to modify the pumping rate, but I will assume you forgot one step:

After updating the pumping rates in your .wel file with Flopy, just add model.write_input() to your script. This line ensures that all the changes you've made are saved properly.

So, your script would look something like this after you've made your changes to the pumping rates:

# your code for changing pumping rates
...
model.write_input()

Make sure to replace model with the name of your MODFLOW model. Once you do this, your changes should show up when you open the model in ModelMuse.