Q21. I am attempting a dry run with my data. I started with a data set that ran OK. Then I added several V nodes to the HDR file. I added the same nodes to the HYD file. I dummied in the discharge and temperature data, based on upstream and downstream data, since at this point I dont care what the results are; I just want to get it running. Anyhow, the SNTEMP worked through the first few routines, and then blew up in the TRNSPT program. The KVREGTW file is attached. It has a mysterious message, which perhaps you have seen before about not being able to solve the regressions: $$$-FATAL ERROR! SMALL PIVOT DURING GAUSS-JORDAN REDUCTION ALGORITHM--MATRIX MAY BE SINGULAR.'
A21. - I have seen this before, but not often. My belief is that you dummied in data that was either (1) too much alike such that there was essentially no variation and the regression model couldnt resolve itself, or (2) too wildly unrealistic, i.e., no discernable pattern. My vote is for #1, but you tell me. [Added 12/2001]
Q68. My data files all check out OK with TDATCHK, but when I run SNTEMP it has problems putting the point sources into the stream geometry file. In the ADDHYD program I get the error message "end of file encountered on stream geometry file while hydrology node No. 1 was not yet located." This is the first P node in the hydrology node file.How does ADDHYD locate where to pit these nodes that are not in geometry file?Since I do not have the source code there is no way for me to figure it out except trial and error, which is so far not working.
A68. The problem appears to be the stream naming convention you have used. SNTEMP is quite picky, as you know already. It expects the stream name for the P nodes to be the same as the receiving stream, not the inflowing stream - - i.e., the node is on the C River, not the P WWTP. TDATDHK does not check for this because SNTEMP (in effect) does, even if the error messages leave much to be desired. [Added 12/2001]
Q81. I have unsuccessfully, been trying to get the SNTEMP model to work, for quite a few days now, with input files I have constructed from a small river network in the local region. I have downloaded SNTEMPX.EXE, SNTUTILS.EXE and SNTDATA.EXE files from the web page and managed to run the model, on my PC, using the Upper Colorado River Basin network files. However, when I open up SNTEMP.BAT and enter my own job control file name, the message that I receive is as follows:
The formatted (genesis) job control file has been updated. The unformatted (binary) job control file has been created. Exiting 'jbcnud' program>>>>>>>>>>>>>>>>>>>>>>>>Entering 'strgem' programprogram version 2.4 last modified 92/08/04Begin calculating 'M' nodes and average elev. and lat. run-time error F6103: read (internal)- invalid realFatal error sntemp run terminated
I have been through each input file a number of times and cannot find what is wrong. For your information, I have attached copies of the data files that I have constructed. I am trying to simulate a 6-day period in July from one year. Could this, very short time period, be the source of my problem?
A81. Before going much farther, it would be a good idea to double-check all the files with the pre-processor TDATCHK. I think if you poke around, you will find the documentation for it somewhere on the disk. Basically, this program reads all your data files and attempts to spot errors that throw SNTEMP for a loop. When I ran this utility on your files, it appeared that several errors might be related to missing H nodes for your River and other tributaries throughout your data files. Remember that after all B nodes must follow either an H or a S node to give the tributary some place to start. If you don't want to simulate the complete tributary, you can make them into P nodes for a point source. There may be other problems as well once these are cleaned up. [Added 12/2001]
Q85. I am developing another temperature TMDL with SNTEMP. However, I get the model crashing on me and wondered if you had any idea why. It crashes in the REGTWO program and gives me the error messages "run-time error M6201: Math sqrt: Domain error". Attached are my files.
A85. This is a rare, but not too rare problem, especially when one is just putting together a new model and there is just "test" data in the files. The regression model (which is called for some nodes, like H nodes, even if you have no missing data) blows up if there is not some small degree of variation in the observed data. In your case, most or all of the tributary H nodes had:1997 July .01 11.3 11.31998 July .01 11.3 11.3To get this to run, change one of the flow or stream temperature values just slightly, like to 11.301, and it should go OK. I did this, and it complained that X Creek had no observed data, so take care of that too and it should be a go. [Added 12/2001]
Q86. Using TDATCHK has helped - Thank you - however, now when I run my data - the program terminates on TRNSPT. The message that TDATCHK gives me for my hydrology data file is:
Checking Hydrology Data File ***********************Blank line required before each node. Please check file format.Check node type on line 5$$$-Warning!Transfer code indicated on illegal node type. Node: JULY23 1.204 14.220000 Blank line required before each node. Please check file format.Check node type on line 7$$$-Warning!Transfer code indicated on illegal node type. Node: JULY25 1.235 15.670000 Blank line required before each node. Please check file format.Check node type on line 9$$$-Warning!Transfer code indicated on illegal node type. Node: JULY27 1.207 15.500000 ETC...Successfully read 45 lines of 178 with 48 warnings.
I don't understand what it means by 'transfer code indicated on illegal node type' - as I don't even have any transfer codes in my file. I have attached a copy of my hydrology data file - if you have time to look at it.
Q86 (continued) Thank you very much for spending the time, going through my files. I have taken all your suggestions in to consideration, and made all the appropriate changes. However, when one problem seems to get solved - new ones always arise!There appears to be a problem with the hydrology data file - the output file from TDATCHK - indicates that I should check all temperatures at the tributaries. Originally, I had mean temperature values at the E-node - however, I thought that may be the problem with the temperatures upstream, was due to the fact that the tributary temperatures, in reality, would not end up at the final mean temperatures, I had recorded at the E-node. I have attached a copy of both hydrology data files: temperatures at E-node (HexehydE.dat), no-temps at E-node (Hexehyd.dat). The job control file includes HexehydE.dat.When running SNTEMP.BAT with my job control file - an error occurs during the Metrol program - a long list is written given of mismatching nodes from the composite stream identification and the different input files. I have gone through all the files to see whether I can see any discontinuity between the files - and can not.Have you any ideas what the problem could be?I have attached all my files again.
A86. Lots of mysteries here. I got different results on running TDATCHK than you did for some reason. Perhaps the e-mail system pads extra characters onto the ends of the text files. I have had similar, but not identical, problems in dealing with a couple of other people.First, I was getting errors in the stream geometry file. This seemed to be caused by blanks spaces on the supposedly blank lines. Not all of the blank lines were a problem, but maybe a third of them. This was easy to spot by reading the file into Word and turning on the option to show non-printing characters (Tools|Options|View|All non-printing characters).Second, the problem with the bad temperatures in the hydrology data file was that the flows you had for the tributaries when flows were less than 1 meter per second had 4 places after the decimal instead of three. This along with the leading zero pushed the last digit over the field width, making the program think that the next field, water temperature, was huge. I edited those flows by removing the leading zero.Third, the shade data file may have needed a blank line at the end. I have no idea why it seems to be different in that regard. Must have been an afterthought. More problematic were C nodes that were co-located with J nodes, both here and in the stream geometry file (done differently in both files). Since J nodes supply the appropriate information for the next downstream segment, there is no need for a redundant C node. I removed the extraneous ones and added one that was missing in the stream geometry file. Check the info on that C node at 4.83 on the Exe as I made it up from previous node. Then I adjusted the relevant node counts in the job control file. All very picky.Then the model ran fine! It looks like you are only getting output at the E node. You may want to add a V node immediately above the E node so the model will calculate goodness of fit statistics if you have measured data. This is where I think I told you to remove the O node. Sorry I didn't look further since you could just have swapped O to V. Remember to change the node counts in the job control file unless they are blank.
DATCHK Version 3.2 Results Nov 4 1999 10:56 Job Control File: hexejob.dat Checking Job Control File **************************Ending time period for output must equal total 'number of time periods in a year.Successfully read 21 lines of 21 with 1 warnings.
**This note says exactly what it means. Please see the Errata.txt file that came with sntemp when you read information paper 16. I changed it to 6
Checking Time Period File **************************Successfully read 7 lines of 7 with 0 warnings. **GoodChecking Meteorology File ************************** The number of lines read was less than the number of lines in the file.This may be caused by unnecessary or an inaccurate number of meteorologicaldata records.Successfully read 2 lines of 8 with 1 warnings.
**Looks like you just had an extra blank line. No harm, but I removed it. In fact, depending on which editor you use, it may sort of automatically append a blank line to the file, which in most cases doesn't matter.**I also changed the number of time periods in your job control file, which didn't match the number in your data file.
Checking Stream Geometry File ********************** The number of lines read was less than the number of lines in the file.This may be caused by unnecessary blank lines or a mismatch between the number of nodes specified in the job control file and the numberof actual nodes in the stream geometry file. Successfully read 88 lines of 89 with 1 warnings.
**DITTO
Checking Study File ******************************** ERROR - End-Of-File reading Study File Approximately at line 24 in HEXESTD.DAT
**Ditto. Note however that you really don't need the o node as it is collocated with the E node for which you can already get output. O nodes are really for when there is no other way to get output. This by itself however is not an error.
Checking Hydrology Node File *********************** ERROR - EOF reading Hydrology Node File ERROR: Invalid number of instruction lines for a validation node!Approximately at line 23 in HEXEHDR.DAT
**Beats me. File looks good. I messed around with it and finally worked but I'm not sure what I did!!
Checking Hydrology Data File *********************** Blank line required before each node.Please check file format.Check node type on line 5 $$$-Warning!Transfer code indicated on illegal node type. Node: JULY23 1.204 14.22000 ...
**Fixing the other errors seems to have pretty much cleared this mess up, but has brought up additional ones. You have many co-located nodes. Sometimes this is ok, sometimes not, and I can never remember which are which. I would recommend at least adding a meter here and there so that the only nodes that are collocated are B, T, and J nodes. Make all others distinct by at least a meter. Then double check that the study file, hydrology node file, and hydrology data file node names are all in the correct order. I did change your first node in the hydrology data file to an H to agree with all the other files. Perhaps it should be an S, but then must be so in all files consistently.**it also appears that you've got some bad flows at B, T, and/or J nodes. See the messages in EXE.OUT
Q113. Have I missed explanations of the error messages in the documentation? I cannot seem to find them. Any advice or tips you have are greatly appreciated!
A113. No, there is no good explanation of error messages for any of these programs. You will find, unfortunately, that the error messages can, in some instances, be little better than nothing, and occasionally misleading. Sorry, that's just the way it is until you get a working data set and then usually they disappear. Fortitude is required -- that's what will make you an expert when you are done :) [Added 6/2002]
Q114. I am trying to run my first SNTEMP model and I can't even get
to first base. The message I am getting is
$$$-EOF ENCOUNTERED ON 'KSTRMGM' FILE WHILE SEARCHING THE
HYDROLOGY NODE FILE
FOR STREAM NODE ( 1) :NOOKSACK RIVER H 23.1.
I have tried many things but I am at a loss. The TDATCHK program does not show any problems.
A114. The problem seems to be with the end-of-file marker on some of your data files. We have seen similar problems before, but never exactly this one, so I'm not sure how to generalize. It may have to do with what applications (word processors, editors) were used to create/edit these files. The confusing part is that the end of file is only critical for some, but not all, data files. In any event, for the HDR file, we have found that you must leave the editor with the cursor positioned at the end of the last line of data with nothing following it. That done, it all runs just fine. (Note: we have continued to upgrade TDATCHK to catch more and more of these problems.) [Added 6/2002]
Q190. I am a graduate student and I am trying to model the X. River for the summer of 2002 (June 15 - August 15). I have constructed all of my files necessary for SNTEMP. I have been working closely with C. K. and used this model while he was working on his graduate studies.
Between the two of us, we are having a difficult time troubleshooting my files. TDATCHK does not run, for whatever reason, on our computers (I am running Windows 2000), but I have looked over the files many times, and I do not think there are any errors. However, I may have easily overlooked something by now.
I am wondering if I could send you my files for you to look over. At this time when SNTEMP is run, I receive only 6 output files (KJOBCN1, KQSTATS, KSTRMGM, KVRHYDR, KVRJBCN, and KVRSTRG). KSTRMGM when opened is nothing but symbols, as is KQSTATS and KJOBCN1. The other 3 seem to be complete, and readable. The program shuts down at this point:
ENTERING 'HYDROL' PROGRAM
BEGIN CHECKING FOR MISSING DATA IN HYDROLOGY FILE.
forrt1: severe <24>: end-of-file during read, unit 32, file F:\SNTEMP\KVRFHYD.PRN
Then, under that are lists, including Image, PC, Routine, Line and Source. At the end it reads "FATAL ERROR - SNTEMP RUN TERMINATED"
If you have any information as to what this error is referring to, could you please let me know?
Later - When I try to run TDATCHK, a black screen with some writing quickly flashes on the screen and then disappears. I took a screen capture of it so that I could read it, and this is what is on the screen:
F:\SNTEMP\supplementals>echo off
DATCHK checks data files for the Stream Temperature Model.
syntax: TCATCHK JOBCON OUTPUT
where: JOBCON - JOB CONTROL FILE <input>
As for the actual modeling part...as I was looking through your suggestions, I noticed that I didn't have any flow or temperature data for my End node in the hydrology file. I then shortened my modeling distance to my last flow/temperature gage site and used that site as my new End node. After I changed that and altered my rkm's and other information in the job file to make sure it coordinated with my new End node, I got results!
I got 15 output files, however some of them are still scrambled with symbols (KHYDROL, KJOBCN1, KMERGE, KQSTATS, KSTRMGM, KVSTATS, AND KTRNSPT).
Files that turned out OK are: KVRTMP, KVRMETR, KVREGTW, KVRHYDR, KVRJBCN, KVRSTAT, KVRSTRG, KVRTRNS).
Unless I need the files that I listed as scrambled, I think I have it! I'll zip and attach my files anyways just so you can take a look at them if something doesn't sound quite right to you.
A190. I'd be happy to look at your files, but I'd also like to figure out why TDATCHK will not run on your computer. Can you tell me the message you get when running TDATCHK?
The message you are getting implies that SNTEMP thinks that the hydrology data file should have more lines in it than it does. That could mean several things: 1) your job control file says that you have more hydrology nodes than you have in your data file or expects more days to be there for each node, 2) your hydrology data file is missing some of the required blank lines, or 3) you have something else odd about that file, like bad record terminators. Do the output files that you can read look reasonable and complete? Do they report any errors?
Later- From your description, it sounds like you were trying to run TDATCHK out of Windows instead of from the command prompt. I recommend opening your DOS window and running from there. (This turned out to be true and solved the problem.) Alternately, or maybe also, you may have the command prompt set to automatically close on exiting the program. If you right click on the small icon in the upper left corner of the DOS window, you can control this feature and see if it helps. I'm not sure if it will or not.
I may all wrong and it is just that you were not using TDATCHK correctly. In your case, you should type 'TDATCHK KVRFJOB.PRN' for the program to show results on the screen. (and as you can see, this must be done from a DOS prompt window) Alternately, you could type something like 'TDATCHK KVRFJOB.PRN CHK.TXT' to have the output go to a text file that then you could read. I did that and the results are attached. It looks like the only real problem may be in your meteorological file, but I did not check it any further.
As for the unreadable files, they are normal. SNTEMP creates several so-called binary files that it uses to communicate between the various sub-programs. Only the files starting with KVR are expected to be readable. Assuming that you have the latest version of SNTEMP, I actually recommend that you use a slightly different initiation of SNTEMP, namely by typing 'SNTEMP KVRFJOB.PRN N TXT' which 1) initiates SNTEMP, 2) tells it what your job file name is, 3) says "No" to changes, and 4) creates readable names for the various output files with the extension 'TXT'.
Q191. I ran DATCHK and got no warnings. But in SNTEMP, I'm getting the warning:
"$$$-Mismatch between composite stream id <discharge P 103.5> and hydrology file node and distance <T 103.0>"
where the numbers in italic are my node descriptors (not necessarily the right count of spaces). I get this error message for sequential nodes - the lower 6 nodes on my 8 node model - 5 times- which corresponds to the number of time periods.
I have checked the "composite ids" in all my files and can't find a mismatch. I'm not sure where else to focus my search. Any suggestions? If this is not a quick "aha" for you, don't worry. I will keep looking.
A191. Unfortunately, SNTEMP error messages are rarely a quick aha.
The italics you had in your message (below) did not come through at least one of our mail systems properly, so I'm not quite sure what I'm looking at. But generally these sorts of errors relate to one of 3 things. (1) SNTEMP is very picky about spacing in all of the files. Please make sure that you are scrupulous about that. (2) Ditto spelling and distances. Each node name and distance must be identical among the files. Minor differences can occur in some of the node descriptors and 'flags', but not much. (3) Counts of node types in the job control file. These, oddly enough, can be blank in some instances without problem, but they cannot be wrong. Double-check them all.
Having said that, it is unusual that DATCHK did not pick up the problem(s). Are you sure you ran all the DATCHK options? It should be able to find all these errors and more. Since the error message seems to point towards the distance (though you cannot always assume that the message is entirely straightforward) I would certainly concentrate there first -- columns, decimal points, 1-to-1 correspondence.
Usually, once you have found the error, everything clears up and all runs fine. Don't despair.
Q192. Just wondered if you had an idea offhand about the “invalid real” message in SNTEMP. It is stopping me cold in the first stages of the SNTEMP program. Goes something like this:
Run time error f6103 : read (uhstrx.dat) - invalid real
(uhstrx.dat being my stream geometry file)
A192. My supposition is that you have a letter where a number was expected. This can often be the letter O instead of a zero. Have you run DATCHK?
Q193. I'm so close to finally getting my model to run I can taste it, but I can't make it through TDATCHK. I've been trying to figure out what I've done wrong for awhile and am hoping you might be able to pinpoint the problem.
First, I keep getting an End-of-File error with my meteorology file. I'm pretty sure I have the right number of lines. I am only running for the period from June through October for a single year so the meteorological file has the same number of time periods as the time period file, which had no errors in it. I've also made sure to have no extra empty lines after the last line with meteorological data on it.
Second, both my shade and hydrology data files are stopping on the second node in the files, with an "Error reading file" statement. In both files the error occurs on the line that has the river name, node type, distance from end point and remarks for the second node (for the shade file the second node is a C, and for the hydrology data file the second node is a P). I don't have any flags in either of the files, could that be my problem, can I just leave the flag fields empty or should I put some default values in?
A193. I sympathize with your frustration. SNTEMP's pickiness can be a real pain in the neck, but once you get the darn thing to run, it all gets much easier -- knock on wood.
With the meteorological file, I strongly suspect an issue with the last line. Go ahead and try just adding a "carriage return" at the bottom and see if that helps. The other possibility is that you don't have a return at the end of each line, but instead have spaces and a line wrap that makes it all look OK. One thing that I occasionally like to do is to read this (or any) file into Word and turn on the option to view all special characters. That way you can see all the returns, and look for inadvertent tabs, etc.
I'm not sure of the other problems you mentioned, but I believe I can comfortably say that it does not have to do with flags being present or not. I was not exactly clear what exact error messages you are getting. I assume you have the requisite blank lines dividing the nodes.
Keep trying different things, and if you get to a point where most of your hair has been pulled out, zip up the files and send them to me so I can have a look.
Q194. On another issue, I'm working with SSTEMP to try some scenarios with our air temperature, radiation, humidity, etc. and I noticed a bug in one of your output files. When I use an external file will multiple stream segments your output file which is created has a single quote (') instead of a comma (,) so the CSV file doesn't import smoothly. It is between the ID number and the Month in the CSV output file. I can fix it in WordPad but if you ever go back into the program it may be worth looking for.
A194. Lot's of water under the bridge on SSTEMP by now. I think it used to work OK with Lotus 1-2-3, but if it does not work with Excel I'll need to change it some day. You should also be able to set the proper delimiters in Excel when you convert text to columns.
Q195. Hi, I've gotten an error when experimenting with the errplot.exe file. It won't run due to a missing .DLL file: "olch2d32.dll". Any guidance you can offer is appreciated.
A195. We sent more up-to-date library file, which fixed the problem.
[Updated 5/2007]