Import results of Kineros to AGWA

69 views
Skip to first unread message

Amit Kallush

unread,
Jun 12, 2022, 3:23:15 PM6/12/22
to AGWA Support
Hi all,
Did anyone know how to import Kineros results into AGWA without running the actual model from the AGWA tool?
I'm writing the model input files with AGWA. afterwards I doing some manipulations on the Parameter file in Matlab, and runs the model through the regular Kineors K2.exe file.
Now If I'm trying to load the results to AGWA get the following error:
result_error.png

I will be glad for any advise about it...
Thanks
Amit

Shea

unread,
Jun 13, 2022, 1:00:50 PM6/13/22
to AGWA Support
Hi Amit,
Were you able to view the results successfully on a simulation that was not modified with Matlab? Can you compare the .OUT file from the unmodified simulation to the modified simulation to make the they are equal in length and are complete? Near the bottom of the file, check that "Event Volume Summary:" appears and after those results "Tabular Summary of Element Hydrologic Components" should also be present. In the tabular summary, see if there are any asterisks or results with no numbers.

If you'd like to attach those .OUT files (and/or the simulations input files including the kin.fil, precip file, and parameter file) here, I will also take a look.

Shea

Amit Kallush

unread,
Jan 22, 2023, 2:40:18 AM1/22/23
to AGWA Support
Sorry for cross--posting, I guess I mistakenly send other messages privately.
The results are showing fine while I'm keeping the simulation within AGWA. Once I'm using MATLAB to change the .par file for example, AGWA can no longer show the result and showing the above error. There is no problem though to keep running the simulation with k2.exe and view the results externally (Like using MATLAB for that purpose).
The .OUT seems ok and conation the statements that you mentioned near the end of the file.
I'm adding here the simulation files, maybe you can figure out what's wrong with them.
Thanks!
Amit

ב-יום שני, 13 ביוני 2022 בשעה 20:00:50 UTC+3, Shea כתב/ה:
c.out
20210120_rain.pre
tmp.par
kin.fil

Shea

unread,
Feb 7, 2023, 12:31:21 PM2/7/23
to AGWA Support
Can you also include the original .par file and .out file from the simulation that was written by AGWA and not modified by MATLAB?

Thanks
Shea

Shea

unread,
Feb 7, 2023, 12:47:19 PM2/7/23
to AGWA Support
I looked at your .out and the .par file from the MATLAB simulation and noticed one issue that is contributing to the problem. After fixing it, you'll have to see if it resolves the entire problem or if there's another issue as well.

The issue is that AGWA is expecting the output in the .out file to reflect the PRINT = 3 option for each element in the parameter file. You probably changed this to PRINT = 0 to speed up your MATLAB simulations, but you should change it back to PRINT = 3 once you have your final simulation and before you try importing the results into AGWA. So take your final simulation after you're finished in MATLAB, and edit the .PAR file in a text editor to find and replace PRINT = 0 with PRINT = 3 and then try importing the results.

Shea

Message has been deleted
Message has been deleted

Amit Kallush

unread,
Feb 9, 2023, 11:50:30 AM2/9/23
to AGWA Support
Thanks Shea,
I will try the PRINT suggestion! I am having some trouble with it because now AGWA don't let me upload results from simulation directory that isn't created through it. So I tried to create new simulation with AGWA, and transfer the new .par file (after I changed all the PRINT values to 3) to it, but from some reason I get an error trying to run it:

 Processing PLANE        211
 unable to resolv small th in RECTR with 10 time step cuts

Plane 211 is the first plane on the list, maybe you know why it is not working? when I run in in the original folder there is no problem... I'm adding the .par file after the change, is named "Agwa_Test.par".

I'm adding here the original par file (OriginalFromAGWA.par) and Sim.out. 
I run it and tried to load this result to AGWA, and I get some of them, but there is still error and part of the watershed is missing at the top:
Screenshot 2023-02-09 184036.png

Agwa_test.par
OriginalFromAGWA.par
Sim.out

Shea

unread,
Feb 14, 2023, 2:07:43 PM2/14/23
to AGWA Support
I was able to run both parameter files, AGWA_test.par and OriginalFromAGWA.par. I used the 20210120_rain.pre as the precip file, and I ran K2 in batch mode using the runtime inputs from your earlier post. K2 in batch mode versus interactive mode shouldn't affect whether or not the simulation runs however. Batch mode is used when you run K2 by executing "K2 -b" with a kin.fil file in the simulation directory containing the runtime inputs for any simulations to run (1 per line). I've attached the kin.fil file I used (notice it is different than the kin.fil file you uploaded previously, which was a record of the runtime inputs selected in interactive mode, because all the inputs appear on a single line for a single simulation, versus each input on it's own line in the record of the interactive mode).

Anyway, because I don't think the problem is whether it's batch mode versus interactive mode (though it could be, try batch mode to make sure), I wonder if the problem might be with using different versions of the K2 model. The one I have, which is included in the download of the AGWA package on our website, is dated April 10, 2019. What is the date stamp on your executable?

Shea

kin.fil

Amit Kallush

unread,
Feb 15, 2023, 3:44:55 AM2/15/23
to AGWA Support
HI Shea!
OK so I checked and you are absolutely right, I had a mess with my K2 versions, I replaced the old 2017 version with the new April 10, 2019 and now the simulation works, but unfortunately, even after changing all the PRINT values to 3 AGWA has still unable to display the result, and I get the same error as before.
I tried to run the simulation in batch mode with the kin.fil file you have attached, but I guess I didn't understand how to do it, where I should run the "K2 -b" command? when I'm trying to run the simulation regularly with your kin.fil file it's failing. 
Thanks again for the support and for your patient to answer all of those basic questions..
Amit
Screenshot 2023-02-15 102017.png
Screenshot 2023-02-15 103722.png


ב-יום שלישי, 14 בפברואר 2023 בשעה 21:07:43 UTC+2, Shea כתב/ה:

Shea

unread,
Feb 16, 2023, 5:13:53 PM2/16/23
to AGWA Support
In the Simulations tab of the AGWA Results form, did you import the simulation again? If not, make sure to do that before trying to visualize the results.

Using your screenshot, to run K2 in batch mode, instead of running the command "cmd /k k2.exe" you would run "cmd /k k2.exe -b" (if you're already at the command prompt, you should simply be able to run it using "k2.exe -b"). It's important when using batch mode that the kin.fil file is in the single line format. An alternative to using the kin.fil file is to follow the -b with the name of the run file containing the runtime inputs in the same format as the single line kin.fil file, e.g. "cmd /k k2.exe -b runtime_inputs.txt" (the name of the run file can be anything as long as you specify it). Essentially, batch mode will use the specified file as input, or if it's not specified it will use the "kin.fil" file.

Shea

Amit Kallush

unread,
Feb 19, 2023, 2:35:40 PM2/19/23
to AGWA Support
Yes I import the result again after each execution of the model. AGWA did recognized that there is new simulations files and painted the simulation yellow, and after I import the new once it turned green.
I succeeded to run Kineros in batch mode using  "cmd /k k2.exe -b", it seems like the result are OK, but AGWA still unable to read them, and pops the same error:


Screenshot 2023-02-19 213324.png
Maybe you have other Idea why does it happens?
Thanks,
Amit
ב-יום שישי, 17 בפברואר 2023 בשעה 00:13:53 UTC+2, Shea כתב/ה:

Shea

unread,
Feb 21, 2023, 1:45:15 PM2/21/23
to AGWA Support
If you open the DBF files in the simulation folder, are they populated? If not, there's an issue that's occurring when importing the new results. To investigate that, post the .OUT file here and also look at and/or post the errors.txt file located in the same directory as the MXD project file.

Shea

Amit Kallush

unread,
Feb 24, 2023, 1:38:06 PM2/24/23
to AGWA Support
Hi Shea,
Indeed the DBF files are empty. I'm posting the error.txt and the .OUT file. I will be glad if tou could take a look at them and see if something is worng.
Thanks you very much,
Amit

ב-יום שלישי, 21 בפברואר 2023 בשעה 20:45:15 UTC+2, Shea כתב/ה:
Agwa_test.out
errors.txt

Shea

unread,
Apr 6, 2023, 5:13:25 PM4/6/23
to AGWA Support
My apologies, I missed your response. Your .OUT file shows the simulation completed, but it shows that Simulate Sed. Transport was turned off so there are no sediment results. AGWA expects sediment results to be present in the output file, so when they're not there it causes an error in the import. You don't need to have it on for all of the simulations, but for the final simulation turn the sediment flag back on in the kin.fil file and try importing the results again.

Shea

Reply all
Reply to author
Forward
0 new messages