chrisschuerz / SWATrunR

Running SWAT projects within R
https://chrisschuerz.github.io/SWATrunR/
GNU General Public License v3.0
72 stars 30 forks source link

Modified SWATplus version not working with SWATplusR #24

Closed florentpapini closed 3 years ago

florentpapini commented 4 years ago

Hi Christoph,

You asked me to to reopen the issue if I wanted to continue discuss it, so I will try to be more precise in my description as I still encounter this error.

I am currently developping a modified version of SWATplus with new water routing routines, so I have to use a modified SWATplus.exe file on SWATplusR.

It was working well until recently on both SWATplusR and my Visual Studio project. I did a lot of modifications inside SWATplus and it's still working on my Visual Studio project but not anymore on SWATplusR. Even double clicking on the .exe in TxtInOut works.

I can send you my .exe file if needed. Tell me if you need more details on my modified SWATplus.

Thanks, Florent

Here is the output while running run_swatplus function:

Building 1 thread in 'D:Path/Scenarios/Default/TxtInOut/.model_run': 
 Completed 1 thread in 2S                                                   
swat revision is  60.4 
Performing 1 simulation on 1 core: 
 Simulation 1 of 1   Time elapsed: 16S   Time remaining: 0S
Error in { : task 1 failed - "Zero-length begin and end specifications not supported"
4. stop(simpleError(msg, call = expr))
3. e$fun(obj, substitute(ex), parent.frame(), e$data)
2. foreach(i_run = 1:n_run, .packages = c("dplyr", "lubridate"), .options.snow = opts) %dopar% { worker_id <- paste(Sys.info()[["nodename"]], Sys.getpid(), sep = "-") ...
1. run_swatplus(project_path = project_path, run_path = project_path, output = define_output(file = "channel_sd", variable = "flo_out", unit = 2), start_date = "2007-3-1", end_date = "2017-9-30", years_skip = 2)
chrisschuerz commented 4 years ago

Hi Florent,

thanks for the update. Please send me your executable so I can see the differences between yours and the official exe. Could you also send me a demo project where I can run your exe?

I will have a look into it in the following days.

Best Christoph

chrisschuerz commented 3 years ago

@florentpapini I am not sure, but was this ever solved. Sorry to be so sloppy with some of the issues here. Again I would close this issue, to filter out the ones that are the current ones to solve now. If this is still an issue, please again address it.