biopsichas / SWATprepR

SWAT+ model input data preparation helper
https://biopsichas.github.io/SWATprepR/
MIT License
7 stars 2 forks source link

Strange behavior of `load_swat_weather()` fixed by `gc()` #5

Closed moritzshore closed 6 months ago

moritzshore commented 7 months ago

Hey,

Just wanted to let you know that I was having trouble using load_swat_weather() and prepare_climate() right after each other in a function. Also trying to delete a SWAT+ setup using windows explorer after using load_swat_weather() was not possible since the climate files were being "held" by Rstudio.

I managed to fix this by running gc() after load_swat_weather() -- so some reading of the file is probably not properly closed in load_swat_weather() ?

Thats all I got -- maybe you know whats wrong? not a big deal for now.

Maybe not a real issue and just something very strange with my Virtual Machine... possible -- feel free to close+ignojre

biopsichas commented 7 months ago

Hi Moritz, thanks for the issue and the solution too. I didn't face this, but will include gc() in the end of function. Hope will work for you after update.

biopsichas commented 7 months ago

Hi Moritz, I did integrate this gc() into the function. Please let me know, if this helped you. Of course when you get some time :)