Closed CrayonAki closed 1 year ago
Hi @CrayonAki , many thanks for sharing the detailed steps in reproducing the issue and sharing the workaround!
Could you please share your input files of v2017b so I can fix the issue the next supy release?
Stale issue message
Describe the bug When I used the command "suews-convert" in order to make the input files for SUEWS v2017b compatible for SUEWS v2020a (which I knew I should not do so because v2017b was not included in the version options for this command but I just tried), an error occurred during the process "2019b --> 2020a" as the following:
To Reproduce
Expected behavior There seems to be some problems related to path_dst.rename(path_src) in supy/util/_converter.py
I saw someone reported that "os.rename only works if source and destination are on the same file system. You should use shutil.move instead." when I was looking for solution.
So I opened site-packages/supy/util/_converter.py and added
import shutil
at the beginning to shutil which is already in the python standard library, and I modified line 478 from "path_dst.rename()" toshutil.move(path_dst, path_src)
This seems working and I obtained the new converted .nml files, and initial condition and site description .txt files to my specified repository.
However, a new problem arose which was reported in problems.txt as the following:
There seems to be something to do with the RunControl.nml. Next, I checked this file, and compared it with the converted RunControl.nml file with the template RunControl.nml presented in SUEWS_2020a. They actually differed in content and indentation.
Anyway, I just tried to force SUEWS v2020a with the replacement of forcing meteorological data, and it worked. Later, I just modified the initial data, parameters and the RunControl.nml files based on the template files one by one, which worked efficiently in this situation where I was trying to run SUEWS v2020a with SUEWS v2017b data.
Version and platform (please complete the following information):
Additional context Just sharing my experience in case someone encounters the "Invalid cross-device link" error. And in case someone's trying to convert the SUEWS v2017b to SUEWS v2020a with "suews-convert" commad, this seems not working.