Incorrect error message in MWT package
Describe the bug When running a model containing the MWT package, the following error message is displayed. ERROR REPORT:
- Itemno must be > 0 and <= 0
UNIT ERROR REPORT:
- Error occurred while reading file 'C:\ModelingTools\ModelMuse\PracticeModels\MwtBug2\MwtBug.Chem.mwt'
To reproduce Steps to reproduce the behavior: run the attached flow and transport models using RunModel.bat
Expected behavior No error report should be needed for this model.
Environment
- Windows 10
- MODFLOW 6 nightly build from May 13, 2024. MwtBug2.zip
I just ran this model with our develop version, and it seems to run fine. This is what I see at the end of mfsim.lst.
Run end date and time (yyyy/mm/dd hh:mm:ss): 2024/05/15 20:16:05
Elapsed run time: 1.015 Seconds
WARNING REPORT:
1. The well bottoms in multi-aquifer well package MAW-1 were reset to the
bottom of the connected cell 1 times.
Normal termination of simulation.
Can you double check this? Perhaps you were running with 6.4.4? Thanks.
Yes. I'm sure.
VERSION 6.5.0.dev2 (preliminary) 05/15/2024
Are you using a different mfsim.nam than the one in the file? Maybe this batch file swaps it out?
On Mac
On Windows
The batch file first copies and runs a mfsim.nam file for a flow model and then does the same for a transport model. The error occurs in the transport model.
Looks like the problem is in your MAW input file. You repeat the "BUDGET FILEOUT" record. I think the second one should be "BUDGETCSV FILEOUT". The binary data gets written to the CSV file instead of the intended file, so the transport simulation finds an empty budget file for MAW. We probably shouldn't allow two entries of "BUDGET FILEOUT". That would have helped. Might be something for the Input Data Processor at some point, @mjreno?
You're right. My mistake.
Agree @langevin-usgs. This type of checking is already being supported for FILEIN tags as certain tags can be read more than once (TS6) but not most. FILEOUT tags are treated as just a string type currently but we could use the same approach as FILEIN- read them all and throw an error when multiple uses of the tag aren't supported. It will depend somewhat on upcoming changes to the memory manager- if the memory manager throws an error when a particular mempath is attempted to be allocated more than once that would do it as well. The IDM solution is dependent on MAW/MWT being updated for IDM.