Running the VIC Image Driver¶
The Image Driver has three dependencies:
A C compiler. We routinely test VIC using the following compilers:
VIC has also been compiled using these compilers:
MPI. We have tested VIC with the following MPI implementations:
In most cases, you will need to edit the
MPI_PATH variables in the
If you want to use a compiler other than
mpicc, either edit the Makefile or set the
MPICC environment variable, e.g.
The flags and libraries required to compile VIC with netCDF are automatically determined in the
Makefile. They can be overwritten by setting the following two environment variables. These variables can be determined by running
NC_LIBS="-L/path/to/libs ..." NC_CFLAGS="-I/path/to/includes -your_c_flags ..."
In some versions of the MPI library (e.g. OPEN-MPI with Intel), you may also need to set the environment variable
MX_RCACHE=2 prior to compiling.
cd, to the "Image Driver" source code directory and type
cd vic/drivers/image make
If this completes without errors, you will now see a file called
vic_image.exein this directory.
vic_image.exeis the executable file for the model.
At the command prompt, type:
vic_image.exe -g global_parameter_filename.txt
global_parameter_filename = name of the global parameter file corresponding to your project.
To run VIC image driver using multiple processors, type the following instead:
mpiexec -np n_proc vic_image.exe -g global_parameter_filename.txt
n_proc = number of processors to be used
Other Command Line Options¶
VIC has a few other command line options:
vic_image.exe -v: says which version of VIC this is
vic_image.exe -h: prints a list of all the VIC command-line options
vic_image.exe -o: prints a list of all of the current compile-time settings in this executable; to change these settings, you must edit the appropriate header files (e.g.
vic_driver_shared.h) and recompile using