Semi-automated run of SHETRAN using R

197 views
Skip to first unread message

felix...@googlemail.com

unread,
Sep 14, 2016, 5:20:13 AM9/14/16
to Shetran
Dear user community,
when I was doing my calibration I was always a bit annoyed that I couldn't really used the night to let run SHETRAN over several iterations without starting it myself over and over again. I fixed this problem by using R and wanted to share it with. I attache the code for R and I hope my comments help you to understand the code and enables you to use it.

If you need help let me know.
Best regards
Felix
R_code_semiauto.txt

Steve Birkinshaw

unread,
Sep 15, 2016, 7:58:15 AM9/15/16
to Shetran
Thanks, Felix. This looks good.


jz1...@bristol.ac.uk

unread,
Oct 28, 2016, 6:53:12 AM10/28/16
to Shetran
Hi Felix,

Thanks for your kindly sharing of the code. However, when I tried to run it in Rstudio of the last line 'system(''sv.4.4.4x65.exe -c'', wait= TRUE)', it didn't call the .exe successfully without any action or error message. I didn't find the function 'system' in the Rstudio as well. Do I have to install any package to active the function? Sorry if the question is stupid, I am quite new to R...

Best regards
Jun

felix...@googlemail.com

unread,
Oct 31, 2016, 11:34:06 AM10/31/16
to Shetran
Dear Jun,
don't worry there are no stupid questions:) Normally you don't need to install an additional package since the system command is already installed. I assume that you modified the code already. Can you send me this code via email (feli...@uni-bonn.de)?

Best regards
Felix

Sreedevi S

unread,
Oct 16, 2017, 1:27:14 AM10/16/17
to Shetran


Hi Felix,
I used R code for running SHETRAN.
But i get 
ERROR OPENING FILE G:\shetranruns\basin\Run_01\rundata_basin.txt   
How can i rectify this?

regards,
Sreedevi.S
 

felix...@googlemail.com

unread,
Oct 25, 2017, 5:38:14 AM10/25/17
to Shetran
Hi Sreedi,
sorry for the very late response!
Can you provide me with all necessary files to run the model including the R code you used?
Best regards
Felix

Setya Drana

unread,
Feb 25, 2018, 3:11:39 AM2/25/18
to Shetran
Dear Felix,
Thank you very much for sharing with us your R code.
I am currently undertaking a research on hydrological modeling, part of which will require multiple consecutive SHETRAN runs similar to your case.
In my case however, I am attempting to implement a similar code in Matlab, but have not succeeded in this matter.
If you are familiar with Matlab, could you provide suggestion on how to convert your code into one based on it?

Cheers,

Setya

felix...@googlemail.com

unread,
Feb 25, 2018, 9:50:11 AM2/25/18
to Shetran
Hi setya,
I am sorry but I dont know Matlab very well. But as the coding is similiar to R I am sure it is possible. May be you should google how to start a Software with Matlab as the code does this in principle. Or you switch to R... It is not top late;) and free!

Best regards
Felix

Reply all
Reply to author
Forward
0 new messages