SWR Surface Water Routing Process -structure problem

83 views
Skip to first unread message

Althea Walker-Hallam

unread,
May 22, 2025, 3:00:15 AMMay 22
to MODFLOW Users Group
Hi all,

I would be very grateful for advice on troubleshooting problems when I try to add structures to my SWR file. Apologies for what may be a very basic issue, I'm very new to MODFLOW.

I have a pre-existing mf2005 regional groundwater model that I have been given the task of adding an SWR package to. I have created a channel reach network over a small sub-region as a test. I have had no trouble running the model with its SWR file (using FloPy) with added lateral inflows. It is only running as a surface water model currently. I can successfully add a weir or a type -2 structure to the most downstream reach, but when I attempt to  add more structures, it fails to run and does not produce a list file. Similarly, if I attempt to add any other types of structures, it won't run.

I have compared my SWR file to the 2016 Miami-Dade model SWR file and the example files provided with SWR and I can't see any obvious errors in the way I have entered my structures, but I have attempted to open it in Model Muse and the model loads but the SWR file is not recognised so I assume the setup of my file may be the (an)? issue.

As some other people here have, I also had 'floating point divide by zero' errors which were removed when I changed to the pcg solver.

I would be deeply grateful for any advice.

Regards,

Althea

Althea Walker-Hallam

unread,
Jun 9, 2025, 12:47:49 AMJun 9
to MODFLOW Users Group
If I may refine my unhelpfully general question above,  I have imported my working regional groundwater model into Model Muse and built a small network of SWR reaches on top of it within Model Muse.

I have added most of the control structures I need to, but I begin to suspect my issue with getting my model to run with structures might relate to getting my reach connections correctly assigned.

I have been assigning connections either through the steady-state dialogue or using the 'link streams' tool. More than once, I have placed a structure and  the reach connection in data visualisation has indicated that it is connected to a reach at the opposite end of my reach network, and looking at my SWR file Dataset 4b, I can see that two reaches have been assigned four connections (there's only three places where there is a three way junction, nothing with four), two of which are some distance away, one reach that is a dead end has been assigned three connections. 

I have included an example below, 33 and 35 are several km away from 26, and 33 is a dead end. These connections were not intentionally defined by me, don't appear in the steady state dialogue and I'm not sure how to correct them

26     4    25    27    33    35 # Data Set 4B: IRCH4B NCONN ICONN(1)...ICONN(NCONN)
33     4    27    26    28    34 # Data Set 4B: IRCH4B NCONN ICONN(1)...ICONN(NCONN)

Can I please ask what is the best way to ensure my connections are correct, and what do I need to do to properly represent a dead end?

Regards,

Althea 

Richard Winston

unread,
Jun 10, 2025, 9:19:36 AMJun 10
to mod...@googlegroups.com

In ModelMuse, the upstream end of a stream segment is at the first vertex. If a connection is being made at the wrong end of a segment, that suggests that the first vertex is at the downstream end. To fix this, you can select the object, and reverse the order of the vertices with the command "Object|Edit|Reverse selected object."


--
This group was created in 2004 by Mr. C. P. Kumar, Former Scientist 'G', National Institute of Hydrology, Roorkee. Please visit his webpage at https://www.angelfire.com/nh/cpkumar/
---
You received this message because you are subscribed to the Google Groups "MODFLOW Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modflow+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/modflow/ae3cb3ca-b260-4438-96a8-17e37448586dn%40googlegroups.com.

Althea Walker-Hallam

unread,
Jun 11, 2025, 7:18:46 AMJun 11
to mod...@googlegroups.com
That worked. Many thanks!

Regards,

Althea

Althea Walker-Hallam

unread,
Jun 16, 2025, 4:32:06 AMJun 16
to MODFLOW Users Group
Hi all,

I was able to build an SWR reach network overcome reach direction issues, add structures and run it successfully with constant stage reaches, but when I tried to switch it to active reaches, the model fails and I get the error:

‘Could not read from unit Iu’. 

The list file  finishes at "reading SWR1 process dataset 4D". Running it in Flopy it says that the SWR file does not load.

Can I please ask for advice on this problem?

Thanks in advance,

Althea 

Althea Walker-Hallam

unread,
Jul 7, 2025, 1:05:59 AMJul 7
to MODFLOW Users Group
Hi everyone,

I am struggling with the lateral inflow text file used for my SWR channel model. When I add one, I get a forrtl: severe (24): end-of-file during read error.
I have tried several formats of text file including one modified from the SWR Sample4 example model and I get the same error. 
If I delete the tabfile, Model Muse does not allow me to remove the entry from the tabfile form, and then shows the error 'could not read from unit Iu' (the listing file suggests it is failing when it gets to the tabfile definition section of the .SWR file, 4D).
The only way I can get the model to run again is to delete all reference to the .tab file in the .swr file and the .nam file and run it using the batch file. 

When I ran my model using Flopy, I got the error forrtl: severe (59): list-directed I/O syntax error.

I'm using the latest version of Model muse and Modflow. Am I creating my text files incorrectly?  I would appreciate any advice.

Regards,

Althea


Reply all
Reply to author
Forward
0 new messages