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:
| vic2l.c | main | Parameter, Data and Output File Names | None | This program monitors file I/O and runs model. |
| cmd_proc.c | cmd_proc | Command Line Arguments | Filename Struct | Extracts filenames and other info from command line arguments. |
| aurad.c | fltrad | sehortz, swhortz, slat, jday, tranday | Short Wave Raditation | Computes net shortwave radiation using sun-earth geometry, and transmissivity. |
| shrad | asp, dslop, slat, sehorz, swhorz, jday, tranday | Short Wave Radiation | Computes net shortwave radiation as above, but including surface characteristics. | |
| rad_and_vpd.c | rad_and_vpd | Atmos Data Struct, Soil Data Struct, Number of Records | Array of DMY Structs | Calculates daily evaporation, and radiation balance. |
| calc_netshort.c | calc_netshort | Net Short Wave Radiation | Calculates the short wave radiation. | |
| calc_trans.c | calc_trans | Delta T, Elevation | trans | Computes transmissity??? |
| long_shortwave.c | in_shortwave | Latitude, Day, Transmissivity | Incoming Solar Radiation | Computes incoming solar radiation, based on time of year, latitude, and clarity of atmosphere. |
| net_out_longwave | Transmissivity, Trans of Clear Air, Air Temp, Vapor | Net Outgoing Longwave Radiation | Computes outgoing longwave radiation. | |
| twolayer_vic_roff.c | twolayer_vic_roff | Soil Data Struct, PPT | Soil Struct | Computes runoff from grid cell. |
| arno_evap.c | arno_evap | Atmos Data Struct, Soil Data Struct, Global Struct | Soil Struct | Computes evaportation of an area as a percentage based on saturation. |
| canopy_evap.c | canopy_evap | Atmos Data Struct, Soil Data Struct, Veg Data Struct, Global Struct | Soil Struct, Veg Struct | Computes evaporation from canopy using penman equations. |
| priestley.c | priestley | Air Temp, Net Radiation | Potential Evaporation | Computes potential evaporation using Priestley-Taylor. |
| penman.c | penman | Net Radiation, Vapor Pressure Deficit, Aerodynamical Resistance, Minimum Stomatal Resistance, Architectural Resistance | ||
| svp.c | svp | Temp | svp | |
| svp_slope | Temp | svp_slope |
Model Input and Output:
| get_global_param.c | get_global_param | Global Parameter File | Global Struct | Reads in global parameters from global input file. |
| read_soilparam.c | read_soilparam | Soil Parameter File | Soil Struct | Reads soil parameters from soil input file |
| read_vegparam.c | read_vegparam | Vegitation Parameter File, Grid Cell | Vegitation Struct | Reads vegetation parameters from vegetation input file. |
| read_atmosdata.c | read_atmosdata | Atmos Data File, Snow Data File | Atmos Data Struct, Number of Records | Reads atmospheric and snow data from input files. |
| write_vegparam.c | write_vegparam | Vegitation Struct | None | Writes values of vegetation parameters to stdout |
| write_atmosdata.c | write_atmosdata | Atmos Data Struct, Number of Records | None | Writes atmospheric data values to stdout. |
| write_data.c | write_data | Array of Out Data, Outfile Struct, Number of Records | None | Writes output for all time steps in simulation. |
| make_infiles.c | make_infiles | Soil Struct | Input File Pointers, Output File Pointers, Filename Struct | Creates input and output filenames using current grid cell lat and lng. |
| make_outfiles.c | make_outfiles | Input File Pointer Struct | Output File Pointer Struct | Creates and opens output files. |
| check_files.c | check_files | Filename Struct | File Pointer Struct | Opens soil, vegetation, and global parameter files. |
| open_file.c | open_file | Filename, Filetype | File Pointer | Checks and opens File. |
| close_files.c | close_files | Infile Struct, Outfile Struct | None | Closes all files. |
Data Array Controls:
| make_dmy.c | make_dmy | Global Struct | Array of DMY Struct | Creates Day, Month, Year records for each time step. |
| make_veg_var.c | make_veg_var | Number of Vegitation Types | Array of Vegitation Structs | Creates vegetation records for each vegetation type. |
| make_soil_var.c | make_soil_var | Number of Vegitation Types | Array of Soil Structs | Creates soil records for each vegetation type. |
| make_out_data.c | make_out_data | Number of Records | Array of Out Data Structs | Creates out data records for each time step. |
| put_data.c | put_data | Soil Struct, Vegitation Struct, Vegitation Data Struct | Output Struct | Sums contributions from all vegetation types, and computes final grid values for output. |
Initialization Routines:
| initialize_soil.c | initialize_soil | Soil Data Struct, Number of Vegitation Types | Soil Struct | Initializes upper and lower soil layers using initial moisture values. |
| initialize_veg.c | initialize_veg | Vegitation Data Struct, Global Struct | Vegitation Struct | Initializes vegetation with dew levels half maximum. |