Author Topic: I need help to run Skehekin sample with VIC 5.0  (Read 4329 times)

giaMSU

  • Team tributary
  • *
  • Karma: +0/-0
    • View Profile
  • Institute : Montclair state university
  • Programming language : Python
I need help to run Skehekin sample with VIC 5.0
« on: June 23, 2017, 11:21:00 PM »
Hi everyone,
I want to use VIC 5.0. Then, I start with running Skehekin sample.
I installed VIC.5.0 (I have the file vic_classic.exe at the classic directory). I downloaded Skehekin sample data by using command " git clone https://github.com/UW-Hydro/VIC_sample_data.git" as instruction at Github.
I tried to run VIC with command
" ./vic_classic.exe -g /home/giamsu/VIC_sample_data/classic/Skehekin/parameters/global_param.STEHE.txt"
It doesn't work at all.
I attached here a screenshot of my Linux screen.
Could anyone help me to fix the error?
Thank you
giaMSU

Karthikeyan L

  • Administrator
  • Team river
  • *****
  • Karma: +34/-0
  • Research Scholar
    • View Profile
  • Institute : Indian Institute of Science, Bangalore
  • Programming language : Matlab, R
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #1 on: June 24, 2017, 05:34:05 PM »
You will have to compile the model first. You can find detailed explanations regarding setting up the VIC model in the following links:
https://vic.readthedocs.io/en/master/
http://www.hydro.washington.edu/Lettenmaier/Models/VIC/Overview/ModelOverview.shtml

Karthikeyan L

  • Administrator
  • Team river
  • *****
  • Karma: +34/-0
  • Research Scholar
    • View Profile
  • Institute : Indian Institute of Science, Bangalore
  • Programming language : Matlab, R
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #2 on: June 24, 2017, 05:36:34 PM »
Also, please look into the other threads posted in this forum regarding the VIC model. To avoid redundancy, start new thread only when you are not able to find answer to your question in our older threads.

Cheers!

giaMSU

  • Team tributary
  • *
  • Karma: +0/-0
    • View Profile
  • Institute : Montclair state university
  • Programming language : Python
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #3 on: June 26, 2017, 09:43:19 PM »
Dear Karthikeyan,
Thank you for giving your suggestion!
I already compiled VIC5.0 by using a command "make" in the classic directory. I had vic_classic.exe file.
For VIC 4x, the instruction request to change all "./Skehekin" in global_param.STEHE.txt file  to the absolute path. However, in VIC 5x, there is no request like that for the file. I am not sure that should I change the path. If yes, where should I replace them?
I have tried by replace "${VIC_SAMPLE_DATA}/classic/Stehekin/forcing/full_data_/" by "/home/giamsu/VIC_SAMPLE_DATA/classic/Stehekin/Stehekin/forcing/full_data_". I did the same to all other places in the file. However, it is still not working.

I have read the older threads but they didn't fix my problems, that's why I need to specify my question.
Since people do not upload the solutions on the threads, it is hard to fix the error without making another thread.
Thank you so much.
Best,
Gia Nguyen


ASHWATHI V K

  • Team river
  • ***
  • Karma: +1/-0
    • View Profile
  • Institute : Ashoka Trust for research in Ecology and Environment
  • Programming language : Matlab
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #4 on: June 29, 2017, 10:59:18 AM »
Hai,

I had same problem. Error is due to the difference in the path of input file in global parameter file from actual path.

With Regards
Ashwathi

Hemant Kumar

  • Team tributary
  • *
  • Karma: +0/-0
    • View Profile
  • Institute : IIT Delhi
  • Programming language : Matlab
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #5 on: December 06, 2017, 05:20:53 PM »
I, Hemant, am working with VIC 5.0.1. I am getting the same error posted in these threads
http://wateradroit.com/forum/index.php/topic,1264.0.html
http://wateradroit.com/forum/index.php/topic,1145.msg2778.html#msg2778
However, both users have not posted the solution of the problem.
I have modified the file paths in the global_param.STEHE file as per the old VIC documentation available on the website. But when I run vic_classic.exe with the global_param file I get the following error:
Code: [Select]
[ERROR] ../shared_all/src/open_file.c:61: errno: No such file or directory: Unable to open File /home/VIC_sample_data/classic/Stehekin/parameters/Stehekin_soil.txt
You can see from the attached screenshot that the path is correct and I am able to open the file with gedit using the same path. I am running Ubuntu 16.04 LTS on a dual boot laptop (Ubuntu+Windows 10). I have downloaded VIC and VIC_sample_data from github. The compilation of VIC executed properly. (apparent from -v command)
Code: [Select]
hemant@hemant-ubuntu:~$ ~/VIC/vic/drivers/classic/vic_classic.exe -v
VIC Driver  : Classic
VIC Version : 5.0.1 February 1, 2017
VIC Git Tag : VIC.5.0.1-18-g59b9
Compiled    : by hemant on hemant-ubuntu (LINUX) Dec  5 2017 17:14:30
Compiler    : gcc
 version    : 5.4.0

I want to know how to specify path in the global param file (syntax)
I have tried replacing ${VIC_sample_data} with the followings and they are not working:
/home/VIC_sample_data/classic/...
~/VIC_sample_data/classic/...
${VIC_sample_data}


Is there some other syntax for specifying file path in global parameter file? If possible, can someone post a global param file which is running with VIC?

I am attaching the global_param file, if needed, along with a screenshot of the error.

Hemant Kumar

  • Team tributary
  • *
  • Karma: +0/-0
    • View Profile
  • Institute : IIT Delhi
  • Programming language : Matlab
Re: I need help to run Skehekin sample with VIC 5.0
« Reply #6 on: December 06, 2017, 05:55:40 PM »
I have solved the problem. I was writing the directory path from home directory when it should have been written from root directory.

The following directory format will work in both Ubuntu and VIC (notice /home/hemant/)
Code: [Select]
/home/hemant/VIC_sample_data/The following one will work in Ubuntu terminal but won't work with VIC (notice ~/)
Code: [Select]
~/VIC_sample_data/
Best way to find the find the full path name of a file is to
  • Open a browser (Chrome in my case)
  • Type file:/// in the URL field
  • Now browse for your file
  • Full path will be the title (name) of the tab. [I am attaching an image for reference.]