Skip to content

Existing VIC workflow

bartnijssen edited this page Feb 5, 2014 · 7 revisions

The workflow in all VIC versions up to 4.2.X has essentially remained unchanged. The model uses a nested loop to simulate the hydrology for each model grid cell:

initialize global run settings
foreach gridcell:
    initialize grid cell model parameters
    process meteorological forcings for the entire model period
    initialize model state
    foreach timestep:
        run vic model
        write output
    save model state
cleanup

The reasons to use time as the variable in the inner loop ( VIC classic ) rather than the outer loop ( VIC image mode ) are mainly historic and stem mostly from the fact that VIC has been used predominantly in uncoupled mode, that is with specified atmospheric boundary conditions. Running all times for a single grid cell meant that the entire meteorological record for that grid cell was available and could be manipulated in memory before the model was run. VIC simulations require only limited meteorological inputs (at a minimum daily precipitation, daily minimum temperature, daily maximum temperature, and daily mean wind speed) and can estimate the other required meteorological forcings using the MTCLIM algorithms that are integrated in the VIC code. This generally meant that we did not have to save large and extensive forcings datasets at a time when storage was much more limited (1990s). The latter is less of a concern these days. In addition, because each cell is run independently, it is easy to take advantage of distributed computing environments, because every single grid cell can be run on a different core by subsetting the overall domain.

This page simply documents the order of the computations in the existing (4.2.X and older) VIC implementations. Although the VIC function names may have changed (here they are based on 4.1.2), the procedure is generally the same in older versions of VIC.

Note that in the current VIC versions, all code is stored in a single directory. In the following, not all function call are mentioned, only the top level calls.

  • vicNl.c:main()

    • Initialize global run settings

      • initialize_global.c:initialize_global()

        Initialize options and param_set structures with default values

      • cmd_proc.c:cmd_proc()

        Parse command line options and display runtime settings or get the name of the global parameter file.

      • get_global_param.c:get_global_param()

        Process the global parameter file and populate global options and param_set structures. Initialize global variables NF and NR. The latter two variables are used for indexing the atmos struct.

Clone this wiki locally