Freshwater-Initiative / NooksackWaterBudget

Water data and models to support water resource professionals and their salmon recovery partners working with the WRIA 1 Joint Board on water supply planning and instream flow negotiations.
MIT License
0 stars 2 forks source link

C++ debugging #11

Open ChristinaB opened 6 years ago

ChristinaB commented 6 years ago

Use modelspc.dat from https://www.hydroshare.org/resource/fb5e45f7bfea4765a445a190b809cbdb/

Error: neq or nout more than maxresponse 28 28 6

ChristinaB commented 6 years ago

Here is an error I get for Test5 for the Bertrand Creek Model- note- to run, change the name of topinp to topinp.da image

ChristinaB commented 6 years ago

Here is the error I get for the WRIA1 folder image

ChristinaB commented 6 years ago

I got an error from mddata.cpp line 1130.

No 'modelcon.dat' file found

I made a blank one and it worked - but this code can be deleted.

ChristinaB commented 6 years ago

Not sure why this one is happening in Test 5 image

ChristinaB commented 6 years ago
  1. I updated this and it did fix the nbout error: Yeah! else if (testStr.compare("Following identifies the reaches to be used as response time series and output time series") == 0) {

in the code, but then when the same line in the version I ran was

else if (testStr.compare(0,90,"Following identifies the reaches to be used as response time series and output time series") == 0) {

  1. I got a new error in both my test folders

    topinp.dat opened for reading in inputT() modelspc.dat opened for reading in inputT() too many points in ln(a/tanb) distbn, maxA = 0

I think this is also a toplim error - and this entire file is for an outdated optimization scheme called nlfit. I think we may be able to remove this entirely?

  1. I got an error from mddata.cpp line 1130.

    No 'modelcon.dat' file found

I made a blank one and it ran. This is what made me think we can delete everything to do with nlfit.

ChristinaB commented 5 years ago

@brubash I am unclear what is causing this issue, but I would like to run both models for a longer run starting 1931-2016.
The model will start at 1931, but only if the total length of runs is less than the original model length in topinput.dat - around 21000 days.

Could you try running bertrand creek model with the attached topinp.dat and tell me if you get this error? image

This topinp doesn't runs - showing first four lines: 19310101 230000 86400 31234

This topinp DOES run 19310101 200000 86400 20000

This is the topinp.dat that we want: 19310101 230000 86400 31234

ChristinaB commented 5 years ago

I got the new code. HEre is the BertrandCreek model file error image with a crash before reading all the files.

Here is the WRIA1 model file error with a crash at the first timestep. image

Looking up, I realize that the hour was wrong in the test above it should be 240000 for the second line variable. I am going to keep testing different setups.

ChristinaB commented 5 years ago

I can get the old version of the code to run both models with these first four lines of topinput.dat

19551001 240000 86400 20089

but when I go to longer timesteps I get the segmentation fault error above. Do you get that? If you trip with my topinp, and then extend the files beyond 22000 timesteps?

ChristinaB commented 5 years ago

Latest code has new start date issue: Bertrand Creek image

WRIA1 image