VIC-2L Full Energy Balance Model

Main Subroutines:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
aero_flux_pilp_gra.caero_flux_pilp_gra
twolayer_vic_roff.ctwolayer_vic_roff Computes runoff from VIC grid cells.
melt_2.cmelt_2 Calculates snow accumulation and melt using an energy balance.
snow_met.csnow_metair_temperature, ppt, cold_content, snow_table snow_albedo, isnow, last_snowComputes meteorological variables and snow albedo for snow accumulation and melt computations
snow_table_albedo.csnow_table_albedo nonesnow_tableCreates table for snow albedos with snow age
long_c.clong_crhm, temp, cloud_cover long_waveComputes long wave radiation using relative humidity, temperature, and cloud cover.
rad_c.crad_clat, lon, elev, ntime, julian, cloud_cover short_waveComputes short wave radiation.
met_inline.cmet_inline Calculates meteorological variables from base weather station data.
flux_rtsafe_pilp.cflux_rtsafe_pilp x1 ,x2, i, layer, Tsur0, krts ???
flux_Tsur_fun_pilp.cflux_Tsur_fun_pilp Tsur, i, layer, Tsur0, kf, df ???
evap_coef_pilp_snow.cevap_coef_pilp_snow Compute evaporation for snow??
evap_coef_pilp_gra_Ts.cevap_coef_pilp_gra_Ts Compute surface temperature and evaporation from grass??
evap_coef_pilp_gra.cevap_coef_pilp_gra Compute evaporation from grass

Utility Subroutines:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
end_of_month.cend_of_month day, month, yearTRUE or FALSE Determines whether the end of the month has been reached.


Input and Output Subroutines:
Filename
Subroutine Name
Input Variables
Returned Variables
Description
read_pilp_data.cread_pilp_data Reads in PILPs forcing data

Data Structures

Snow Melt Subroutine:

Variables:
Variable TypeVariable Name Description
doubleRsIncoming shortwave radiation at snow surface
doubleLsDownward longwave radiation from the sky
doubleaero_condAerodynamic conductance over snow
doubleair_temperature Air temperature
doubleair_densDensity of air
doublegammaPsychometric constant
doublepptPrecipitation depth after interception
doublepack_temp_min Minimum allowable snow pack temperature
doublevel_2mWind velocity at 2 m above the surface
doubleair_pressureAir pressure
doubleair_vpAir vapor pressure
doublesnow_coeffCoefficient used in determining snow_temp (value 0.0 - 1,0)
double *swqSnow water equivalent
double *snow_vapor_flux Depth of water evaporation, sublimation, or condensation
double *pack_waterLiquid water content of the snow pack
double *cold_content Cold content of the snow pack (<= 0C)
double *snow_balSum of mass balance errors
double *QsSensible heat transfer
double *QeLatent heat transfer
double *snow_meltAmount of snow melted in depth
double *snow_tempTemperature of the snow surface
double *net_radNet radiation exchange at the snow surface

Called Subroutines: NONE

Met Inline Subroutine:

Variables:
Variable TypeVariable Name Description
doublePPTBase station precipitation
doubledew_tempBase station dew point temperature
doubleqhSpecific humidity
doubleair_temperature Air temperature
doubleair_pressureAir pressure
double *gammaPsychometric constant
doublehvLatent heat of vaporization
double *air_densAir density
double *air_vpAir vapor density

Called Subroutines: NONE

Read PILP Subroutine:

Variables:
Variable TypeVariable Name Description
intnum_recsNumber of records to be read
double *prec1hr1 hour precipitation in mm/hr
double *soldnSolar radiation???
double *lwdnLong wave radiation ???
double *windWind
double *pressureAir pressure
double *specific_humid Specific humidity
double *air_tempAir temperature
double *penman_temp Temperature for evaporation ??? (penmen eqn)

Called Subroutines: NONE

Snow Met Subroutine:

Variables:
Variable TypeVariable Name Description
doubleair_temperature Air temperature above snow pack
doublepptDepth of precipitation reaching snow pack
doublecold_contentCold content of snow pack
double **snow_table Look-up table of snow albedo based on age and season
int *isnowSnow cover flag ( 1 = snow cover, 0 = no snow)
double *snow_albedo albedo of the snow surface
int *last_snowNumber of days since last snow

Called Subroutines: NONE

Evaporation Coefficients for PILP Snow Subroutine:

Variables:
Variable TypeVariable Name Description
intnum_recsNumber of records
double *soldn??
double *lwdn
double *pan_evap1hr 1 hour pan evaporation rate?, amount?
double *aero_resist Aerodynamic resistance
double *windWind
double *specific_humid Specific humidity
double *pressureAir pressure
double *air_tempAir temperature
double *penman_temp Evaporation temperature
doublehour_coef[25]

Called Subroutines: NONE

Evapoartion Coefficients for PILP grass Ts Subroutine:

Variables:
Variable TypeVariable Name Description
intnum_recsNumber of records
intiglobal??
intiyear
intvegetat_type_num
int *month
double *rhumRelative humidity
double *soldnSolar downwelling radiation??
double *lwdnLong wave downwelling radiation??
double *pan_evap1hr 1 hour pan evaporation
double *windWind
double *specific_humid Specific humidity
double *pressureAir pressure
double *penman_temp Temperature
double *vege_parVegitation parameter?
double **ratio_archi_to_aero Ratio of architectural resistance to aerodynamic resistance
double **ratio_canop_to_aero Ratio of canopy resistance to aerodynamic resistance
double **groot_percent1 Percent of roots in layer 1?
double **groot_percent2 Percent of roots in layer 2?
double **CvSpecific heat
double **LAILeaf Area Index
double FractionFraction of vegetiation type coverage?
double **z0
double **d0
double **raphAverage albedo?
double **z2
double **Cv_aero_resist
double **Cv_mod_Tsur
double *g_Cv_aero_resist
double *g_wind_z2_vege
double *g_wind_z2_soil

Called Subroutines: NONE

Evapoartion Coefficients for PILP grass Subroutine:

Seems to be variation of previous subroutine.

Variables:
Variable TypeVariable Name Description
intnum_recsNumber of records
intiglobal??
intiyear
intvegetat_type_num
int *month
double *rhumRelative humidity
double *soldnSolar downwelling radiation??
double *lwdnLong wave downwelling radiation??
double *pan_evap1hr 1 hour pan evaporation
double **xrnetWrites net radiation
double *windWind
double *specific_humid Specific humidity
double *pressureAir pressure
double *penman_temp Temperature
double *vege_parVegitation parameter?
double **ratio_archi_to_aero Ratio of architectural resistance to aerodynamic resistance
double **ratio_canop_to_aero Ratio of canopy resistance to aerodynamic resistance
double **groot_percent1 Percent of roots in layer 1?
double **groot_percent2 Percent of roots in layer 2?
double **CvSpecific heat
double **LAILeaf Area Index
double FractionFraction of vegetiation type coverage?
double **z0
double **d0
double **raphAverage albedo?
double **z2
double **Cv_aero_resist
double **Cv_mod_Tsur
double *g_Cv_aero_resist
double *g_wind_z2_vege
double *g_wind_z2_soil

Called Subroutines: NONE

Aerodynamic flux for PILP grass Subroutine:

Variables:
Variable TypeVariable Name Description
intitry
intnum_recsNumber of records
intiglobal??
intiyear
intvegetat_type_num
int *day
int *month
int *snow_index
double *soldnSolar downwelling radiation??
double *lwdnLong wave downwelling radiation??
doubleprec1hrPrecipitation per time step
double *evap1hrEvaporation per time step
double CHeat capacity of air (1204.8 Jm-3K-1)
double *KSaturated soil conductivity? (0.866 for trees, 1.03 for grass)
doubleDDepth of lower soil layer
double ZaHeight of the air layer in the energy balance equation
double DTTime step? (set to 3600*TS)
doubleavg_soil_temp Average soil temperature at depth D
doublemixalbedo
double *air_tempAir temperature
double **Cv_aero_resist
double **Cv_mod_Tsur
double **Cv_mod_sensible
double **Cv_mod_grnd
double *mod_sensible
double *mod_grnd
double *mod_Tsur
double **raphAverage albedo?
double **Cv
double **const_kconst_k[k]=Cs/2/DT
double *pilp_rnet
FILE *out_flux
doublesum_year_rnet
doublesum_year_evap
doublesum_year_sensible
doublesum_year_grnd
doublesum_year_rnet1
doublesum_year_evap1
doublesum_year_sensible1
doublesum_year_grnd1

Called Subroutines: flux_rtsafe_pilp

Flux RTSAFE PILP Subroutine:

Variables:
Variable TypeVariable Name Description
doublex1270.0
doublex2315.0
inti??
intlayerlayer = 1: assume there is an air-layer in the energy balance

layer = 0: assume an ideal energy balance equation applies

doubleTsur0Surface temperature for vegetation type
intkvegetation type

Called Subroutines: flux_Tsur_fun_pilp, nrerror

Flux Tsur fun PILP Subroutine:

Variables:
Variable TypeVariable Name Description
doubleTsurSurface temperature??
double *f??
double *df??
inti??
intlayer??
doubleTsur0??
intk??
intmonth??
doubleCHeat capacity of air (1204.8 Jm-3K-1)
doubleK[8]
doubleDDepth of the lower layer
doubleZa
doubleDT
doubleavg_soil_temp Average soil temperature at depth D
double **Cv_evap1hr
double **Cv_mod_Tsur
double *soldn
double *lwdn
double *air_temp
double **Cv_aero_resist
doubleraph[13][8]Average albedo
doubleconst_k[8]

Called Subroutines: NONE

Read PET Data Subroutine:

Variables:
Variable TypeVariable Name Description
intnum_recsNumber of records
double *soldnShort wave radiation
double *lwdnLong wave radiation
double *prec1hrPrecipitation on bare ground (plus melt)?
double *windWind
double *air_tempAir temperature
double *penman_temp Penman temperature
double *meltSnow melt
double *rhumRelative humidity
double *tskcTotal cloud cover percentage
char **date
int *julian_dayJulian day of year
char *infileInput data file
char *infile_saSurface airways input data file

Called Subroutines: NONE

Snow Melt Subroutine:

Variables:
Variable TypeVariable Name Description
doubleRsIncoming shortwave radiation at snow surface
doubleLsDownward longwave radiation from the sky

Called Subroutines: NONE


Hydrology Homepage / University of Washington / VIC Administrator