Why does the simuation file have to be "mfsim.nam"?

111 views
Skip to first unread message

Wes Kitlasten

unread,
Sep 21, 2022, 1:20:25 AM9/21/22
to MODFLOW Users Group
I would like to run several different models from the same directory to test a series of inptus for two main reasons:

1) they are big models and copying all the data for each model is not efficient
2) I want to ensure consistent inputs between variations (i.e. the exact same files, aside from the few I change)

Issue 1: Apparently MODFLOW does not like to have two versions of the same file open during a simulation (e.g. model.npf). So having the following in mfsim.nam does not work if model1 and model2 share such files:

gwf6 model1.nam model1
gwf6 model2.nam model2

Issue 2: According to the manual, the simulation file must be named mfsim.nam. So I cannot use multiple simuation files to get around the above issue (e.g. model1_sim.nam referencing model1.nam, etc).

Locking files during a simulation (issue 1) makes sense. Can someone explain the logic behind Issue 2? Why doesn't something like mf6.exe model1_sim.nam open and run simulation "model1_sim.nam"? Or does it... and I am just missing something?

From my list file (emphasis added):

System command used to initiate simulation:
mf6.exe  hb_Current_Ann_sim.nam

MODFLOW was compiled using uniform precision.

Real Variables
  KIND: 8
  TINY (smallest non-zero value):    2.225074-308
  HUGE (largest value):    1.797693+308
  PRECISION: 15
  BIT SIZE: 64

Integer Variables
  KIND: 4
  HUGE (largest value): 2147483647
  BIT SIZE: 32

Long Integer Variables
  KIND: 8
  HUGE (largest value): 9223372036854775807
  BIT SIZE: 64

Logical Variables
  KIND: 4
  BIT SIZE: 32

OPENED mfsim.nam
FILE TYPE:NAM   UNIT 1001   STATUS:OLD                 
FORMAT:FORMATTED              ACCESS:SEQUENTIAL          
ACTION:READ               


From the manual (emphasis added):
"MODFLOW 6 requires that a simulation name file (described in a subsequent section titled “Simulation Name File”) be present in the working directory. This simulation name file must be named “mfsim.nam”

Richard B. Winston

unread,
Sep 21, 2022, 5:12:39 AM9/21/22
to MODFLOW Google Group
I won't address why the simulation file must be named mfsim.nam but I will suggest a couple of ways to deal with the issue.
1. Use copy commands (with the /Y option) to copy another file to mfsim.nam before running each simulation.
copy /Y sim1.nam mfsim.nam
mf6.exe
copy /Y sim2.nam mfsim.nam
mf6.exe
2. Put each mfsim.nam file in a separate directory but have them refer to files in your main directory. Many of the solute transport examples for MODFLOW use a variation of this stategy.
Reply all
Reply to author
Forward
0 new messages