Indian Forum for Water Adroit

Materials and Methods => Models => Topic started by: nsalimian on January 05, 2017, 07:23:52 PM

Title: VIC hydrological model- sample data
Post by: nsalimian on January 05, 2017, 07:23:52 PM
Hi everybody
I have downloaded VIC 5.0.0 and I want to work with Stehekin sample data for starting. I created the vic_classic.exe file. what command should I exactly use to read the global parameter file? I know about vic_classic.exe -g global_param.STEHE but I don't know exactly how to use it because the exe file and the global parameter file are in two different folders. I tried moving the exe to the folder that the global parameter file exists but I get this error: "[ERROR] ../shared_all/src/open_file.c:61: errno: No such file or directory: Unable to open File ${VIC_SAMPLE_DATA}/classic/Stehekin/Stehekin_soil.txt".
Title: Re: VIC hydrological model- sample data
Post by: Sat Kumar Tomer on January 06, 2017, 10:07:47 PM
HI,

Which operating system you are using?

Please attach the screenshot of command you used.
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 07, 2017, 11:52:39 AM
I'm using ubuntu. the screen shot is attached. tnx
Title: Re: VIC hydrological model- sample data
Post by: thiyaku on January 09, 2017, 05:41:39 PM
HI,
I feel no need to move the *.exe file. One can run run vic from anydirectory. Try like this /path/to/vic_classic.exe_folder/vic_classic.exe -g /path/to/global_param_folder/global_param.STEHE
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 09, 2017, 10:38:16 PM
Dear salimian
Pls Check the directory for soil parameter file in the Global parameter
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 10, 2017, 02:22:56 PM
Dear thiyaku, Dear Diwan
I still get this error.At first I had kept the directory of parameter files the same as they were when downloaded. so the "Stehekin_soil.txt" was in the parameters folder. But when I run the vic_classic.exe, the error says "No such file or directory: Unable to open File ${VIC_SAMPLE_DATA}/classic/Stehekin/Stehekin_soil.txt". I copied the soil.txt file and put in this directory, but again I get this error. I even tried changing this part in the global_param_file, but it did not work. If anyone has worked with this sample data, I will be grateful if they could tell me what steps did they do exactly. Thank you
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 10, 2017, 05:35:44 PM
Pls attach the command and global parameter file you used
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 10, 2017, 08:01:09 PM
Dear Diwan
I solved the problem. I did not enter the correct directory of files in the global parameter file. thank you so much. but now I have a new problem with routing. "niloo@niloo-EP43T-USB3:~/Desktop/route_1.0/src$ make
g77 -O -C -ffixed-line-length-none  -c -o rout.o rout.f
make: g77: Command not found
make: *** [rout.o] Error 127"
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 10, 2017, 10:57:11 PM
Good to know your problem fixed..
Pls check the required FORTRAN compiler installed in your machine
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 11, 2017, 07:28:50 PM
It seems that the g77 compiler is not installed. I tried "sudo apt-get install g77" but it did not work. and I get "E: Package 'g77' has no installation candidate".
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 12, 2017, 02:35:47 PM
Try for offline installation... g77 is old compiler which may not be available for repository.. 
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 12, 2017, 03:02:48 PM
I have searched so much for installing g77, but I could not do anything. Could you give me more details about offline installation?
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 12, 2017, 07:07:54 PM
I could finally install g77, but when I try to run "make", I get this error:"/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make: *** [exe] Error 1"
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 13, 2017, 06:45:51 AM
Find those location and make a link to it.  Usually the location will be usr/lib/gcc .. If you are not able to link then copy the location to flag in make file provided with model source code .. hope this will work
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 14, 2017, 06:56:35 PM
Dear Diwan
I tried making the link to those files but it didn't work. I tried this command:

LIBRARY_PATH=/usr/libx32:$LIBRARY_PATH
export LIBRARY_PATH

It seems that the problem with crt1.o and crti.o is solved but it says:" /usr/bin/ld: skipping incompatible /usr/libx32/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/libx32/libm.a when searching for -lm
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/libx32/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/libx32/libc.a when searching for -lc
collect2: ld returned 1 exit status
make: *** [exe] Error 1"
Title: Re: VIC hydrological model- sample data
Post by: Diwan on January 14, 2017, 07:59:25 PM
It looks the essential libraries are not installed in your machine.. update your machine and do it again
Title: Re: VIC hydrological model- sample data
Post by: nsalimian on January 22, 2017, 11:29:27 AM
Hi
I could finally make the exe file for routing. now I have a problem with data preparation for vegetation parameter file. I want to use the global vegetation file from the VIC website. Can any one explain how I use it and how should I find the gridcel number for my basin?
Thank you inadvance
Title: Re: VIC hydrological model- sample data
Post by: 619neha on December 12, 2017, 06:06:37 PM
Hello Sir/Ma'am,

I was running the VIC routing model for Gandak basin in Nepal area from 1979 to 2006. I got the 64 flux files for the basin to run the routing model (input). But when I ran, it showed the error:

NDAY =        10227  NMONTHS =          336
 1  NEPAL                   5   1
 Routing station: NEPAL               
 searching catchment...
 Number of grid cells upstream of present station          35
 reading grid_UH...
 making grid UH...
 reading UH_S grid from file
 making convolution...
           1  of          35 : /home/neha/Stehekin/stehekin/My_Results/fluxez_28.25_85.50
 Error reading time-series data, insufficient data or missing input file/home/neha/Stehekin/stehekin/My_Results/fluxez_28.25_85.50
 writing data...
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_UNDERFLOW_FLAG

What can be the reason for this error?
I have attached the flow direction, flow fraction and input files.

Thank you
Title: Re: VIC hydrological model- sample data
Post by: Diwan on December 13, 2017, 12:40:04 PM
Hi
Pls Check the spelling in rout file... fluxez_ or fluxes_
Title: Re: VIC hydrological model- sample data
Post by: 619neha on December 27, 2017, 03:02:24 PM
Thank you sir.
There was actually a problem in the format of the input file to the routing model (fluxez file).