You are here

Bathymetry/Control file conflict

I'm having a very odd (in my opinion) error pop up when I run the preprocessor. The program reads the control file fine, then gets to the bathymetry file and shows an error. After some research and fooling around, I found that the preprocessor was reading the bth.npt file expecting 20 segments, though in the w2_con file I have IMX and KMX at 56 and 10, respectively. This meant that it ran fine for a little while until the sequencing got off to the point where it hit a letter expecting a number. Any idea as to what could be causing this?
Forums: 

When the control file is read the IMX and KMX values are used to then allocate arrays for reading in the bathymetry file (among other things). It's possible that you were missing a carriage return in the bathymetry file or have tabs in the file and this could cause the model to read through it incorrectly. If the preprocessor reads in successfully the IMX and KMX values then it should be allocating arrays properly to read the bath file. If the preprocessor is getting to the end of the bath file too soon then either there are errors in bath file causing the preprocessor to skip too much information or the IMX and KM were not read in correctly. Hopefully this helps. If not go ahead and package your files and send them to me. Rob

The BS and BE options in the LOCATION card were screwed up, so I fixed those and now the model's running. Thanks for all the help! I do have another question about the model display. In the AV Viewer every block surrounding the model area displays itself at a continuous temperature of -2. Is this just to enhance the display or is there something wrong? I ask because the temperature seems pretty low in the summer time, when a 90*+ outside temperature only results in a maximum 66* lake top temperature.

The default color/temp outside of the active grid is designed to be -2 or some value outside the expected range so it contrasts with the changing temp (or water quality) values simulated, but I don't think the color can be changed to say white. I hope this helps. Sound slike ht emodel is up and running. Yeah.

NM, got everything figured out. Excellent model, thanks! I can send you a copy if you're interested in just checking it out.

Sure. That would be great.

Rob, Could I get an e-mail address or a filedump that you prefer me to send it to? I tried to get the program to run through a 50-year file over the weekend and hit another problem. Since the code deals with the Julian date as F8.3 (as is easily seen in the Julian date output in the Compaq Array Viewer title bar) when the date hit 10000.00 the program died, as it could not read that as F8.3 since adding another decimal place for 10000.000 would give it 9 places. A friend working on the code went into the screenoutput.f90 file to change line 300 to make this possible, but now the code will not recompile. Could this be due to our using Lahey Fortran 95 (which we've compiled the preprocessor with) or is it an inability of the program? Any help would be greatly appreciated. In addition, if I want a pump to run continuously how would I set up the pump starting and stopping elevations? I'm a little confused as to what exactly the starting and stopping elevations are. Right now I have set them up as if the pump starts when the water elevation is above a certain point at the intake and stops when it goes below another point. Final problem for right now: Some of the flags in the control file, such as LATPUC and LATGTC have been replaced with WTHLC flags in the sample file, which is stopping me from running the simulation. I continuously get a "Please assign a variable to LATPUC" error, even if I try to write over WTFLTC with LATPUC and enter a variable.

I think that if you need the model to read in f9.3 or something larger then the model source code w2_cvf.f90 or w2.f90 need to be modified as well, not just the array visualizer screenoutput.f90. There are differences between the Lahrey Fortran95 conpiler and the compiler we use, Compaq Fortran Compiler. I do not have much experience with Lahey so I can not address what the differences are. If you are interested in having our group work with the code to modify it for you we can do that but this would be more time consuming and we might want to make other arrangements. Your interpretation of the pump control is correct. Think of the pump control as a water level control. When the water level rises above a specified height the pumps are turned and run until the water level is below a second specified height (usually lower). The last issue is a little confusing. Three are some variable name chanes from Version 3.2 to Version 3.5. I am assuming you are using version 3.5 The preprocessor and model exectuabel need to be both from Version 3.5. Compare your control to the Degray Reservoir control file in the example with Version3.5 download package. If these suggestions don't help then it sounds like something I can look at. I can use your login email to the forum and send you my email address and an ftp site where you could upload the your package of model files.

I just redownloaded both the v35.zip and v35 manual and there's a discrepancy. The DeGray control file has WTHLC where the LAT... flags should be. The program's not reading anything under the WTHLC's as if they were for the LAT... flags either. As for the files, that would be great. Do you need my e-mail or can you get it from the forum?

Rob, I've uploaded my files for a 61 day case with the cooling flow from the power plant. There are still some kinks (check the pre.err and .wrn for the details, especially the pump location confusion) but it's going pretty well. I don't have hard data for the plant inlet and outlet flows yet, so my estimated data is heat soaking the portion of the lake I modeled. Still, amazing program once you start working out the kinks.

There are 2 bugs with the preprocessor. The preprocessor for reading the variable from the control file on the wrong line I confirmed this is a bug in the preprocessor). The other errors you were getting regarding the pumps “Upstream pump segment [IUPU=30] is located in a boundary segment for pump 1” can be ignored because there is small bug in the logic of the code where the code checks the upstream segment for the pump is in a boundary segment. Both bugs will be fixed and an update will be posted on the web in the days to come. The model code is correct and there are no issues with it. TMSTRT should start on Jday 1since there are no Jday values less than 1.000. Older versions of the model (2.0) used to use Jday 0 to 1.0. Check your segment orientation in the W2 GUI. Given the Google map you provided under a different thread it looks like the orientation angles for the side branches are off by 180 degrees. Hopefully this helps.

Thanks a lot for the help Rob. Now I have a possibly theoretical question for you. Below is a link to a plot of the temperature profile roughly in the center of the large waterbody: http://img505.imageshack.us/img505/1272/tempprofilehl7.jpg For some reason the bottom layer temperature stays roughly constant for ~11 days, then spikes up while everything else drops down to its temperature. Do you know what could be causing this, or is it a natural occurence?

The temperature may be staying constant for several reasons such as there is limited flow circulation at that depth and location such that a cold water "pocket" stay there. This could be due to changes in flow, or lack of flos, wind, or other reasons. And then after 11 days the pocket is disurbed and a new regime takes over. I would look at the abthymetry in that area, the flows in and out fo the lake, the winds on that day, and also how the temperature were monitored. Was the thermistor array on a buoy that goes up and down with the water level, or was it a fixed elevation. Things to consider. Cheers, Rob

Rob, Thanks for the explanation. Now on to the next problem, naturally. I've added another waterbody connecting branches 2 and 3, representing the power plant. However, even with a depth of 6 meters and the same water surface elevation as the other water body, I am getting a warning that the water surface elevation is below the bottom surface elevation. I'm also continuously having problems with branch 4 not having any active segments. Thanks for anything you can help with. ED: Alright, figured it out. The wording in the manual confused me. Here's why: One of my waterbodies goes from 152m at the water surface to 141m at the lake floor. The other goes from 152m to 148m. To satisfy the program both had 17 layers in their bathymetry files, though most in the second waterbody's were 0's. When specifying ebot I thought that since the lower layers in the second waterbody were inactive, I should specify this ebot at 148m, the lowest active layer. Since the layers were still there though they were counted as active so far as I can tell, thus I had to specify ebot as 141m for both.

You are correct with your solution. Each waterbody can have its own EBOT but if they are connected as lake/reservoir then they should be the same (and no slope). Certianly for river system EBOT can vary a lot.

Ayyy, I really need to learn how to time it so I solve these problems BEFORE I post here. It seems as if your board is perfect for kick-starting my logical reasoning skills after many hours of trying to figure out the problem with no success.

Hello, I've started using the model recently, and now I'm still trying to adjust the bathymetry of my reservoir. It is very simple, having no branches, but i cannot save the file. I open the control file and I correct the bathymetry, because the file imported from Excel is not perfect, but when I try to save it, there comes an error, saying the script is out of range and them it closes all, so I lose all I've done. Has anyone gone through this? How do I correct it? Sofia