Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch processing multiple station files with R in windows #56

Closed
Wendso opened this issue Aug 1, 2018 · 4 comments
Closed

Batch processing multiple station files with R in windows #56

Wendso opened this issue Aug 1, 2018 · 4 comments

Comments

@Wendso
Copy link

Wendso commented Aug 1, 2018

Hello
I have 85 stations for which I want to use Climpact. The Rscript provided seems to be for Linux. Can you help me with tutorial on how to make it on Windows? I have prepared all the stations files and the metadata file is also okay. But I am stuck because on the section 5 of user guide it requires command line arguments to be passed on Linux. How do I do it if I have Windows? Please help me?
capture1

@heroldn
Copy link
Contributor

heroldn commented Aug 4, 2018

To run the batch script in Windows, once you have run the climpact2.batch.installer.r script:

  1. In climpact2.batch.stations.r, replace the line
    "foreach(file.number=1:length(metadata$station)) %dopar%"
    with
    "for (file.number in 1:length(metadata$station))"
    because of issue with parallel processing package in Windows.

  2. Open the command prompt by pressing the windows key, typing "cmd" and pressing Enter.

  3. Setting the PATH variable to see the Rscript.exe file by typing "PATH=%PATH%;C:\Program Files\R\R-3.5.1\bin" and pressing Enter. Use the directory path to your installation of R here.

  4. In the directory where you have installed climpact2, type, for example, "Rscript.exe climpact2.batch.stations.r D:/Downloads/Meteo/Processing/ D:/Downloads/Meteo/launch.txt 1980 1999 1". Replace the parameters with values appropriate for your file and directory etc. Make sure to use forward slash "/" otherwise your output will be created in the highest level directory.

@anuragsharma03
Copy link

capture2
Sir, I am also running the batch opeartion on windows. I am getting error"cant open file 'climpacr2.GUI.r' : No such file or directory".
I have attached the screenshot of cmd terminal. Please tell me where I am making error in giving directory address.

@Wendso
Copy link
Author

Wendso commented Feb 5, 2019 via email

@heroldn
Copy link
Contributor

heroldn commented Feb 10, 2019

Yes, you should try running the commands shown in your screenshot but from within the climpact2 directory (i.e. use the "cd" command as Wendso said).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants