I am working on inverting SWAP model (http://www.swap.alterra.nl) using satellite soil moisture to upscale soil hydraulic parameters and want to use hydroPSO for model inversion.
I have developed a wrapper function in R for updating and running the SWAP parameters and use the "hydromodInR" option to link with hydroPSO. However, when I use the option "write2disk=TRUE" the optimization stops at the next iteration and I receive the following error (no parameters are saved on disk).
Error in writeLines(as.character(c(iter, j, formatC(GoF, format = "E", : invalid connection
The code otherwise works fine if I use "write2disk=FALSE".
How can I save the optimized parameters for each iteration to extract 95% CI of the optimized params?
I am working on inverting SWAP model (http://www.swap.alterra.nl) using satellite soil moisture to upscale soil hydraulic parameters and want to use hydroPSO for model inversion.
I have developed a wrapper function in R for updating and running the SWAP parameters and use the "hydromodInR" option to link with hydroPSO. However, when I use the option "write2disk=TRUE" the optimization stops at the next iteration and I receive the following error (no parameters are saved on disk).
Error in writeLines(as.character(c(iter, j, formatC(GoF, format = "E", : invalid connection
The code otherwise works fine if I use "write2disk=FALSE". How can I save the optimized parameters for each iteration to extract 95% CI of the optimized params?