VIC Frozen Soils Model File Types


All input files, and variables described below are for the VIC-2L water balance model as modified by Dag Lohman. This version of the VIC model uses snow melt and temperature variables computed off-line, and stored in a separate file

Global Parameters:

Global parameters are read from a single line input file in the format shown below. Values are stored in struct global_param_struct.
Column
Variable Type
Variable Name
Description
1
integer
model_typeType of VIC model to run
2
float
resolutionGrid resolution
3
integer
startyearYear to start simulation
4
integer
startmonthMonth to start model
5
integer
startdayDay to start model
6
double
wind_hHeight of wind measurements
7
double
measure_hHeight of measurements


Soil Parameters:

Soil parameters are read from the soil parameter data file using the formats shown below. All values are read into struct soil_con_struct.
Column
Variable Type
Variable Name
Description
1
integer
flagflag (1=run model)
2
integer
gridcellgrid cell number
3
float
latlatitude of cell
4
float
lnglongitude of cell
5
double
b_infiltinfiltration parameter
6
double
max_moist_totmaximum moisture allowed in layer
7
double
DsSubsurface flow rate
8
double
DsmaxMaximum subsurface flow rate
9
double
WsSoil moisture content
10
double
cc
11
double
maxsoilmoist2factorMaximum soil moisture of layer 2
12
double
exptexpt
13
double
KsatSaturated Hydrologic Conductivity
14
double
init_top_moistInitial moisture for top layer
15
double
init_bottom_moistInitial moisture for bottom layer
16
float
elevationElevation


Vegitation Parameters:

Vegitation parameters are read from an input file in the format shown below. Each grid cell can contain multiple types of vegetation, so each line of the input file contains information about all vegetation types within a grid cell. Data is stored in struct veg_con_struct.
Column
Variable Type
Variable Name
Description
1
integer
vegcelGrid cell number of current record
2
integer
vegtat_type_numNumber of vegetation types in grid cell
3 …
See Below
Individual vegetation type records

Individual vegetation type records:
Column
Variable Type
Variable Name
Description
1
integer
veg_classClass number of vegetation
2
double
CvSpecific heat of vegetation type
3
double
rarcArchitectual Resistance
4
double
rsMinimum Stomatal Resistance
5
double
root1Percent of roots in layer 1
6
double
root2Percent of roots in layer 2
7-18
12 * double
LAI[]Monthly Leaf Area Index
19
double
roughroughness of vegetation
20
double
displacementdisplacement


Atmospheric Variables:

Atmospheric variables are read from two files, the first contains atmospheric or weather data, the second contains information on the snow pack. Snow pack data is determined outside of the VIC model using SnowTherm. All variables are read in as strings and converted to the types listed below. Atmospheric variables are stored in struct atmos_data_struct.

Variables Read from Atmospheric Data File (n lines in file, 1 per time step):
Column
Variable Type
Variable Name
Description
1
float
meltSnow melt flux
2
float
precPrecipitation
3
float
air_tempAir temperature
4
float
pan_evapPan evaporation
5
float
rain_plus_snowRain plus Snow input
6
Unused
7
float
rainonlyAmount of rain
8
Unused
9
Unused
10
Unused
11
float
albedoSurface albedo

Wind is initialized to 8.0.

Variable Read from Snow Data File:
ColumnVariable Type Variable NameDescription
1 Unused
2doubletmax Maximum Daily Temperature
3doubletmin Minimum Daily Temperature


VIC-2L Program Files

The following is a summary of the files and subroutines included in Dag Lohman's cleaned version of the VIC Two Layer model.

Model Main Subroutines:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
vic2l.cmainParameter, Data and Output File Names NoneThis program monitors file I/O and runs model.
cmd_proc.ccmd_procCommand Line Arguments Filename StructExtracts filenames and other info from command line arguments.
aurad.cfltradsehortz, swhortz, slat, jday, tranday Short Wave RaditationComputes net shortwave radiation using sun-earth geometry, and transmissivity.
shradasp, dslop, slat, sehorz, swhorz, jday, tranday Short Wave RadiationComputes net shortwave radiation as above, but including surface characteristics.
rad_and_vpd.crad_and_vpd Atmos Data Struct, Soil Data Struct, Number of Records Array of DMY StructsCalculates daily evaporation, and radiation balance.
calc_netshort.ccalc_netshort Net Short Wave Radiation Calculates the short wave radiation.
calc_trans.ccalc_trans Delta T, Elevationtrans Computes transmissity???
long_shortwave.cin_shortwave Latitude, Day, TransmissivityIncoming Solar Radiation Computes incoming solar radiation, based on time of year, latitude, and clarity of atmosphere.
net_out_longwaveTransmissivity, Trans of Clear Air, Air Temp, Vapor Net Outgoing Longwave RadiationComputes outgoing longwave radiation.
twolayer_vic_roff.ctwolayer_vic_roff Soil Data Struct, PPTSoil Struct Computes runoff from grid cell.
arno_evap.carno_evap Atmos Data Struct, Soil Data Struct, Global Struct Soil StructComputes evaportation of an area as a percentage based on saturation.
canopy_evap.ccanopy_evap Atmos Data Struct, Soil Data Struct, Veg Data Struct, Global Struct Soil Struct, Veg StructComputes evaporation from canopy using penman equations.
priestley.cpriestley Air Temp, Net RadiationPotential Evaporation Computes potential evaporation using Priestley-Taylor.
penman.cpenmanNet Radiation, Vapor Pressure Deficit, Aerodynamical Resistance, Minimum Stomatal Resistance, Architectural Resistance
svp.csvpTemp svp
svp_slopeTemp svp_slope


Model Input and Output:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
get_global_param.cget_global_param Global Parameter FileGlobal Struct Reads in global parameters from global input file.
read_soilparam.cread_soilparam Soil Parameter FileSoil Struct Reads soil parameters from soil input file
read_vegparam.cread_vegparam Vegitation Parameter File, Grid CellVegitation Struct Reads vegetation parameters from vegetation input file.
read_atmosdata.cread_atmosdata Atmos Data File, Snow Data FileAtmos Data Struct, Number of Records Reads atmospheric and snow data from input files.
write_vegparam.cwrite_vegparam Vegitation StructNone Writes values of vegetation parameters to stdout
write_atmosdata.cwrite_atmosdata Atmos Data Struct, Number of RecordsNone Writes atmospheric data values to stdout.
write_data.cwrite_data Array of Out Data, Outfile Struct, Number of Records NoneWrites output for all time steps in simulation.
make_infiles.cmake_infiles Soil StructInput File Pointers, Output File Pointers, Filename Struct Creates input and output filenames using current grid cell lat and lng.
make_outfiles.cmake_outfiles Input File Pointer StructOutput File Pointer Struct Creates and opens output files.
check_files.ccheck_files Filename StructFile Pointer Struct Opens soil, vegetation, and global parameter files.
open_file.copen_file Filename, FiletypeFile Pointer Checks and opens File.
close_files.cclose_files Infile Struct, Outfile StructNone Closes all files.

Data Array Controls:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
make_dmy.cmake_dmyGlobal Struct Array of DMY StructCreates Day, Month, Year records for each time step.
make_veg_var.cmake_veg_var Number of Vegitation TypesArray of Vegitation Structs Creates vegetation records for each vegetation type.
make_soil_var.cmake_soil_var Number of Vegitation TypesArray of Soil Structs Creates soil records for each vegetation type.
make_out_data.cmake_out_data Number of RecordsArray of Out Data Structs Creates out data records for each time step.
put_data.cput_dataSoil Struct, Vegitation Struct, Vegitation Data Struct Output StructSums contributions from all vegetation types, and computes final grid values for output.

Initialization Routines:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
initialize_soil.cinitialize_soil Soil Data Struct, Number of Vegitation Types Soil StructInitializes upper and lower soil layers using initial moisture values.
initialize_veg.cinitialize_veg Vegitation Data Struct, Global Struct Vegitation StructInitializes vegetation with dew levels half maximum.

Data Structures

All data structures are identified in the header file vic2l_def.h. The following tables detail the structures, and the variables they contain.

struct infiles_struct:
Variable TypeVariable Name Description
FILE *soilparamSoil parameters file.
FILE *vegparamVegitation parameters file.
FILE *snowoutSnow model output file.
FILE *snowinSnow model input file.
FILE *globalparamGlobal parameters file.

struct outfiles_struct:
Variable TypeVariable Name Description
FILE *moist1Moisture content for first layer
FILE *moist2Moisture content for second layer
FILE *evapEvaporation output file.
FILE *runoffRunoff output file.
FILE *baseflowBaseflow output file.

struct filenames_struct:
Variable TypeVariable Name Description
char *snowoutFilename for snow model output file.
char *snowinFilename for snow model input file.
char *globalFilename for global parameter input file.
char *soilFilename for soil input file.
char *vegFilename for vegetation input file
char *result_dirPathname for result files.
char *moist1Filename for first layer output file
char *moist2Filename for second layer output file.
char *evapFilename for evaporation output file.
char *runoffFilename for runoff output file.
char *baseflowFilename for baseflow output file.

struct global_param_struct:
Variable TypeVariable Name Description
intmodel_typeUnused at this time
floatresolutionGrid cell resolution in degrees.
intstartyearYear of start of simulation
intstartmonthMonth of start of simulation.
intstartdayDay of start of simulation
intnrecsNumber of records (or time steps) in simulation.
doublewind_hHeight at which wind was measured
doublemeasure_hHeight of surface measurements

struct soil_con_struct:
Variable TypeVariable Name Description
intgridcelGrid cell number
floatlatLatitude of current grid cell.
floatlngLongitude of current grid cell.
doubleb_infiltInfiltration parameter
doublemax_moist_tot Maximum total moisture content.
doubleDsSubsurface flow rate
doubleDsmaxMaximum subsurface flow rate
doubleWsSoil moisture content
doublec
doublemaxsoilmoist2factor Maximum soil moisture content of layer 2
doubleexptExponent
doubleKsatSaturated hydraulic conductivity
doubleinit_top_moist Initial moisture content of top layer
doubleinit_bottom_moist Initial moisture content of bottom layer
doubleevapfactorEvaporation factor
floatelevationElevation of grid cell
doublemax_moist1Maximum moisture content of layer 1
doublemax_moist2Maximum moisture content of layer 2
doublemax_infilMaximum infiltration rate
doubleWcr1Critical moisture content of first layer
doubleWcr2Critical moisture content of second layer
double Wpwp1
doubleWpwp2
doubleroughRoughness

struct veg_con_struct:
Variable TypeVariable Name Description
intvegetat_type_num Number of vegetation types in grid cell
intveg_classVegitation class number
doubleCvSpecific heat of plant
doubleCv_sum
doublerarcArchitectual roughness
double rsStomatal roughness
doubleroot1Percentage of roots in first layer
doubleroot2Percentage of roots in second layer
doubleLAI[12]Monthly leaf area index for vegetation type
doubleroughRoughness
double displacement
doubleWdmax[12]

struct atmos_data_struct:
Variable TypeVariable Name Description
doublemeltAmount of snow melt in grid cell
doubleprecAmount of precipitation in grid cell
doubleair_tempCurrent air temperature in grid cell
doublepan_evapPan evaporation rate in grid cell
doublerain_plus_snow
doublerainonly
doublewindCurrent wind
doublesun_hrSolar hour, for use in computing incoming solar radiation
doubleradCurrent radiation
doublevpdVapor pressure deficit
doublepressureAtmospheric pressure at surface
doublerel_humidRelative humidity
doubletminMinimum daily temperature
doubletmaxMaximum daily temperature
doublepriestEvaporation calculated by preistly method
doubletransAtmospheric transmissivity
doubleshortwaveIncoming shortwave radiation calculated using aurad subroutine (Used for calculation of vpd)
double shortwave2Incoming shortwave radiation used for energy balance (more believable than shortwave)
doublelongwaveNet longwave radiation
doublenet_shortNet shortwave radiation
double albedoSurface albedo

struct dmy_struct:
Variable TypeVariable Name Description
intdayDay of current time step
intmonthMonth of current time step
intyearYear of current time step
int day_in_monthYearly Julian date (1-365/366)

struct soil_var_struct:
Variable TypeVariable Name Description
doublemoist1[2]Moisture layer 1
doublemoist2[2]Moisture layer 2
doublebaseflowComputed baseflow within grid cell
doubleQ12Infiltration from first to second layer
doublerunoffCalculated runoff from grid cell
doubleevap1Calculated evaporation from first layer
doubleevap2Calculated evaporation from second layer

struct veg_var_struct:
Variable TypeVariable Name Description
doublecanopyevapCalculated canopy evaporation
doubleWdew[2]Calculated amount of dew trapped on plants
doublethroughfallCalculated amount of water that falls through vegetation

struct out_data_struct:
Variable TypeVariable Name Description
double evapFinal calculated evaporation
doublerunoffFinal calculated runoff
doublebaseflowFinal calculated baseflow
doublemoist1Final calculated moisture content of first layer
double moist2Final calculated moisture content of second layer


Hydrology Homepage / University of Washington / VIC Administrator