-
Aloha.
The latest roadblock is trying to read the sim in this way: sim = flopy.mf6.MFSimulation.load('Maui_fut_mf6') = RESTART: /Volumes/Pegasus32R6/Projects-300/Project-Water-Hawaii/Maui-Water-Balance/data/level1/USGS-Sutra-Data-Maui/Maui_fut_mf6/Maui/mf6/reader.py Any suggestions about how to proceed would be quite welcome. J. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I went through the process myself, and this is how it worked for me. Couple of points:
I was also able to run this:
and get this and a few other figures: |
Beta Was this translation helpful? Give feedback.
-
Just a heads up, we are working on a new (and improved) SeaWaterIntrusion (SWI) package for MF6, but this will take probably at least a year to finish. Initial results look great however, so stay tuned. |
Beta Was this translation helpful? Give feedback.
-
That's great. I'll try to reproduce what you did. Mahalo for responding.
J.
------------------------------------------------------------------------------------------------------------------------------------------------------------
John Helly / San Diego Supercomputer Center / Scripps Institution of Oceanography
https://www.sdsc.edu/~hellyj / 808 205 9882 / 760 8408660
On May 31, 2023, at 02:37, langevin-usgs ***@***.***> wrote:
I went through the process myself, and this is how it worked for me. Couple of points:
1. I ran this on a Mac
2. I did not run the mf6 model, though that should not matter
3. You probably need to specify the sim_ws argument to load and give it the path to the folder containing the model
4. FYI, mf6 does not have the SWI package, so the results from mf6 will be quite a bit different
(base) mycomputer:input.islandwide.modflow langevin$ mf5to6
Mf5to6 - Converter for MODFLOW (2005, NWT, LGR) to MODFLOW 6
Version 6.5.0 Release Candidate 12/09/2022
Usage: MF5to6 mf2005-name-file mf6-base-name
Or enter name-file and base-name in response to prompts:
Enter the name of a MODFLOW-2005, MODFLOW-LGR, or MODFLOW-NWT NAME file:
Maui_fut.nam
Enter the base-name for MODFLOW 6 input:
mf6
Converting model based on name file: Maui_fut.nam
Processing BAS package input...
Processing LPF package input...
Processing OC package input...
Processing GHB package input...
Processing RCH package input...
Processing WEL package input...
Processing DRN package input...
CONVERSION REPORT
Original name file: Maui_fut.nam
New name file: mf6.nam
-------------------------------------
Data New Volume Budget
Source Package Table Text
-------- ------- ----------------
LPF NPF [no entry]
GHB GHB HEAD DEP BOUNDS
RCH RCH RECHARGE
WEL WEL WELLS
DRN DRN DRAINS
-------------------------------------
NOTES:
1. In PCG package input, damping and/or relaxation is used. You may need to
use under relaxation in IMS input.
WARNINGS:
Conversion of file type SWI2 is not yet supported.
Program terminated normally, but see warning(s) above.
(base) mycomputer:input.islandwide.modflow langevin$ ls
Maui_fut.bas Maui_fut.rch mf6.drn mf6.tdis
Maui_fut.dis Maui_fut.swi2 mf6.ghb mf6.wel
Maui_fut.drn Maui_fut.wel mf6.ic mf6_conversion_messages.txt
Maui_fut.ghb RUN_MF2005.BAT mf6.ims mfsim.nam
Maui_fut.lpf fut_rch.dat mf6.nam usgs.model.reference
Maui_fut.nam maui_kani.dat mf6.npf
Maui_fut.oc maui_kh.dat mf6.oc
Maui_fut.pcg mf6.dis mf6.rch
(base) mycomputer:input.islandwide.modflow langevin$ ls
Maui_fut.bas Maui_fut.rch mf6.drn mf6.tdis
Maui_fut.dis Maui_fut.swi2 mf6.ghb mf6.wel
Maui_fut.drn Maui_fut.wel mf6.ic mf6_conversion_messages.txt
Maui_fut.ghb RUN_MF2005.BAT mf6.ims mfsim.nam
Maui_fut.lpf fut_rch.dat mf6.nam usgs.model.reference
Maui_fut.nam maui_kani.dat mf6.npf
Maui_fut.oc maui_kh.dat mf6.oc
Maui_fut.pcg mf6.dis mf6.rch
(base) mycomputer:input.islandwide.modflow langevin$ conda activate modflow6
(modflow6) mycomputer:input.islandwide.modflow langevin$ ipython
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:26:08) [Clang 14.0.6 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import flopy
In [2]: sim = flopy.mf6.MFSimulation.load(sim_ws='.')
loading simulation...
loading simulation name file...
loading tdis package...
loading model gwf6...
loading package dis...
loading package ic...
WARNING: Block "options" is not a valid block name for file type ic.
loading package npf...
loading package oc...
loading package ghb...
loading package rch...
loading package wel...
loading package drn...
loading solution package mf6...
In [3]:
I was also able to run this:
In [3]: sim.gwf[0].plot()
Out[3]:
[<Axes: title={'center': ' top'}>,
<Axes: title={'center': 'botm layer 1'}>,
<Axes: title={'center': 'idomain layer 1'}>,
<Axes: title={'center': 'strt layer 1'}>,
<Axes: title={'center': 'icelltype layer 1'}>,
<Axes: title={'center': 'k layer 1'}>,
<Axes: title={'center': ' ghb_0 location stress period 1 layer 1'}>,
<Axes: title={'center': 'RECHARGE stress period 1'}>,
<Axes: title={'center': ' wel_0 location stress period 1 layer 1'}>,
<Axes: title={'center': ' drn_0 location stress period 1 layer 1'}>]
In [4]: import matplotlib
In [5]: import matplotlib.pyplot as plt
In [6]: plt.show()
and get this and a few other figures:
[image]<https://urldefense.com/v3/__https://user-images.githubusercontent.com/3372403/242275658-258790ee-db89-4bf4-8b18-f7f9886b6dba.png__;!!Mih3wA!FXTfNqC3sM4ErHT9isgQCV7suoyT0RZy8UlblR-l7bW-5W7SUaNkpRdgHTZ1aANTofPUuCg6i4vofSuIEnilyI7p$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/modflowpy/flopy/discussions/1800*discussioncomment-6049532__;Iw!!Mih3wA!FXTfNqC3sM4ErHT9isgQCV7suoyT0RZy8UlblR-l7bW-5W7SUaNkpRdgHTZ1aANTofPUuCg6i4vofSuIEjb_UqOH$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AZ3YXQGJZQLMQ2MXW5YORLLXI43RJANCNFSM6AAAAAAYUT4JQ4__;!!Mih3wA!FXTfNqC3sM4ErHT9isgQCV7suoyT0RZy8UlblR-l7bW-5W7SUaNkpRdgHTZ1aANTofPUuCg6i4vofSuIEmju3bf-$>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Aloha. This quandry was solved with the help of Chris Langevin through the flopy Discussion page on github. cp Maui_fut_mf6.* ../mf6/. which only copied the originally-named model files to ./mf6 where I was then running python3 and, of course, that didn't work. ln -s ./Maui_fut_mf6.nam mfsim.nam Not realizing that there can be multiple *.nam files and that mf6 uses mfsim.nam as the top-level simulation file. |
Beta Was this translation helpful? Give feedback.
Aloha.
This quandry was solved with the help of Chris Langevin through the flopy Discussion page on github.
The cause was that I did not copy over the mfsim.nam file after running mf5to6. Once that was run, I did:
cp Maui_fut_mf6.* ../mf6/.
which only copied the originally-named model files to ./mf6 where I was then running python3 and, of course, that didn't work.
I was under the mis-apprehension that the Maui_fut_mf6.nam file was the only one needed and I was doing the following:
ln -s ./Maui_fut_mf6.nam mfsim.nam
Not realizing that there can be multiple *.nam files and that mf6 uses mfsim.nam as the top-level simulation file.
I don't know how I would have discovered this otherwise with…