MF6 Execution Error in FloPy

263 views
Skip to first unread message

Kamalakanta Sahu

unread,
Jun 14, 2022, 8:02:42 AM6/14/22
to MODFLOW Users Group
Dear All,

I'm trying to run my modflow model in Jupyter Notebook, however, it seems like it's not able to run the mf6 executable file (mf6.exe)

Problem: the program mf6 does not exist or is not executable.

If possible can anyone help me out.

Thanks and Regards
Kamalakanta Sahu

Angelo Breda

unread,
Jun 14, 2022, 11:29:55 PM6/14/22
to MODFLOW Users Group
Hello,

Have you set the right file path to the executable? Could you copy your code here, so it would be easier to identify the error?

Cheers,
Angelo.

Kamalakanta Sahu

unread,
Jun 15, 2022, 1:34:01 AM6/15/22
to mod...@googlegroups.com
Thank you Angelo for your response.

Code:
success, buff = sim.run_simulation()
if not success: 
   raise Exception("MODFLOW 6 did not terminate normally.")



--
You received this message because you are subscribed to a topic in the Google Groups "MODFLOW Users Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/modflow/OToD0E_MlxE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to modflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/modflow/096be41f-43c8-41f6-977e-c85fd3c59816n%40googlegroups.com.

Angelo Breda

unread,
Jun 15, 2022, 2:07:22 AM6/15/22
to MODFLOW Users Group
Hi Kamalakanta,

Way before calling the simulation, when you create the simulation object, like:

sim = flopy.mf6.MFSimulation( sim_name=name, exe_name="mf6", version="mf6", sim_ws="." )

You must have downloaded the MF6 executable from its webpage (https://www.usgs.gov/software/modflow-6-usgs-modular-hydrologic-model) and copy/move the .exe file into the same folder where you are running the code. You can also point to it by changing the location through exe_name. Let's say it is in C:/WRDAPP/mf6.3.0/bin/, so:

sim = flopy.mf6.MFSimulation( sim_name=name,  exe_name="C:/WRDAPP/mf6.3.0/bin/mf6.exe" , version="mf6", sim_ws="." )

Hope it helps you.
Reply all
Reply to author
Forward
0 new messages