VIC Compile-Time Options - user_def.h File
The header file user_def.h defines some global parameters of the simulation (known as compile-time options, since changing their values requires recompiling the model). Other global parameters, known as run-time options, are defined in the global parameter file and take effect as soon as the model reads the global parameter file.
The order of the parameters in the file is not important, but the complete option name must be followed by the required option type information. To help in understanding this file, an example file has been attached at the bottom of this page.
Define Simulation Parameters
The following options determine the type of simulation that will be performed
Name |
Type |
Description |
|
VERBOSE |
TRUE or FALSE |
Option for controlling messages sent to the screen:
|
|
CLOSE_ENERGY |
TRUE or FALSE |
Option for handling energy fluxes between components of the land surface (canopy, snow pack, ground):
Note: both methods generally give similar results, but while setting CLOSE_ENERGY to FALSE improves speed, it results in energy balance errors. |
|
LINK_DEBUG |
TRUE or FALSE |
Option for printing debugging messages (values of components of water or energy balance, or other internal variables):
|
|
QUICK_FS |
TRUE or FALSE |
Option for speeding up frozen soil calculations:
Note: this method is not fully tested. |
|
QUICK_FS_TEMPS |
integer |
Number of terms to use in linearized maximum unfrozen water calcuation. This is only used if QUICK_FS is TRUE; otherwise it is ignored. |
|
LOW_RES_MOIST |
TRUE or FALSE |
Option for improving accuracy of soil moisture drainage calculations:
Note: this method is not fully tested. |
|
NO_REWIND |
TRUE or FALSE |
Option for controlling reading of parameter files:
|
|
OUTPUT_FORCE |
TRUE or FALSE |
Option to save VIC's internal, disaggregated forcings:
|
|
OUTPUT_FORCE_STATS |
TRUE or FALSE |
Option to compute the statistics of the forcings:
|
|
SPATIAL_FROST |
TRUE or FALSE |
Option to allow spatial heterogeneity in soil temperature:
|
|
FROST_SUBAREAS |
integer |
Number of discrete values in the soil temperature distribution. This is only used if SPATIAL_FROST is TRUE; otherwise it is ignored. |
|
SPATIAL_SNOW |
TRUE or FALSE |
Option to allow spatial heterogeneity in snow water equivalent (yielding partial snow coverage) when the snow pack is melting:
|
|
EXCESS_ICE |
TRUE or FALSE |
Optional permafrost behavior:
|
|
MAXIT_FE |
integer |
Maximum number of iterations to use in solving the surface energy balance |
|
LAI_WATER_FACTOR |
float |
Coefficient multiplied by the LAI to determine the amount of water that can be stored in the canopy. |
|
LWAVE_COR |
float |
Longwave correction factor, used to correct estimated incoming longwave radiation (use 1, unless measured longwave available for calibration) |
Define Data Dimensions
The following parameters define the dimensions of some of the data structures in the model. Note: these dimensions are simply maximum sizes, rather than the actual sizes that will be used in your simulations. This is used for certain memory allocation requirements. Therefore, the optimal values of these parameters should be equal to or slightly larger than the numbers that you think you will need.
Name |
Type |
Description |
|
MAX_VEG |
int |
Maximum number of vegetation tiles that can be defined within a grid cell (a good rule of thumb is to set this to the number of vegetation classes in your vegetation library file). |
|
MAX_LAYERS |
int |
Maximum number of soil layers that can be defined within a grid cell. |
|
MAX_NODES |
int |
Maximum number of soil thermal nodes that can be defined within a grid cell. |
|
MAX_BANDS |
int |
Maximum number of snow elevation bands that can be defined within a grid cell. |
|
MAX_FRONTS |
int |
Maximum number of soil freeze/thaw fronts that can be defined within a grid cell. |
|
MAX_LAKE_NODES |
int |
Maximum number of lake solution nodes that can be defined within a grid cell. |
Example user_def.h File
/**********************************************************************
This header file contains model parameters that can be modified by
the user to control model performance. When this file is modified
the model needs to be recompiled for the changes to take effect.
**********************************************************************/
/***** If TRUE include frozen soil algorithm in compiled code *****/
#define FROZEN TRUE
/***** If TRUE include all model messages to stdout, and stderr *****/
#define VERBOSE TRUE
/***** If TRUE limit output data to runoff and baseflow for optimization *****/
#define OPTIMIZE FALSE
/***** If TRUE include all debugging code - debugging options still
have to be activated to get extra output. When set to FALSE
all debugging if-then statements are removed from the compiled
code *****/
#define LINK_DEBUG TRUE
/***** If TRUE output will be in LDAS binary format, which is a single
file with limited variables, most of which are truncated to
conserve disk space *****/
#define LDAS_OUTPUT FALSE
/***** If TRUE VIC uses a system of linear equations defined in global.h
to estimate the maximum unfrozen water content equation. This
significantly reduces the run time with frozen soil, but may
introduce new errors (STILL UNDER TESTING) *****/
#define QUICK_FS FALSE
#define QUICK_FS_TEMPS 7
/***** If TRUE VIC uses the linear interpolation of the logarithm of the
matric potential from the two surrounding layers to estimate the
soil moisture drainage from each layer (Boone and Wetzel, 1996).
This should improve the soil moisture drainage predicted by the
low resolution solution computed by VIC. *****/
#define LOW_RES_MOIST FALSE
/***** If TRUE VIC code to save the model state is included in the
compiled code. If STATEYEAR, STATEMONTH and STATEDAY are
defined in the global control file the model state will
be written to a file. *****/
#define SAVE_STATE FALSE
/***** If TRUE VIC does not rewind the vegetation, state, and snow
band files before read data for each cell. This saves time
but requires that all grid cells are listed in the same
order as the soil parameter file *****/
#define NO_REWIND TRUE
/***** If TRUE VIC reads the model forcing files, and creates the full
internal forcing dataset (longwave, shortwave, humidity, etc.)
which is then written to a series of gridded output files for
later use. Gridded forcing files are written to the RESULTS
directory defined in the global control file, and are binary
or ASCII based on the BINARY_OUTPUT flag. *****/
#define OUTPUT_FORCE FALSE
/***** Define maximum array sizes for model source code *****/
#define MAX_VEG 8 /* maximum number of vegetation types per
cell */
#define MAX_LAYERS 3 /* maximum number of soil moisture layers */
#define MAX_NODES 18 /* maximum number of soil thermal nodes */
#define MAX_BANDS 2 /* maximum number of snow bands */
#define MAX_FRONTS 3 /* maximum number of freezing and thawing
front depths to store */
/***** Number of iterations to use in solving the surface energy balance.
The original VIC model uses only 1 iteration for speed. Increasing
the number of iterations improves precision, and is recommended
for single point comparisons with frozen soils *****/
#define MAXIT_FE 25
/***** Coefficient multiplied by the LAI to determine the amount of
water that can be stored in the canopy *****/
#define LAI_WATER_FACTOR 0.2
/***** Offset of shortwave measurement from model hour, used for
computation of longwave radiation from hourly shortwave
measurements *****/
#define SOLARTIMEOFFSET 0.0
/***** Longwave correction factor, used to correct estimated incoming
longwave radiation (use 1, unless measured longwave available for
calibration) *****/
#define LWAVE_COR 1.
/***** Snow albedo curve parameters. Defaults are from Bras p263.
Should not be changed except for serious problems with snow melt *****/
#define NEW_SNOW_ALB 0.85
#define SNOW_ALB_ACCUM_A 0.94
#define SNOW_ALB_ACCUM_B 0.58
#define SNOW_ALB_THAW_A 0.82
#define SNOW_ALB_THAW_B 0.46
VIC Administrator Last modified: Wed Aug 19 12:28:55 PDT 2009
