Skip to Main Content U.S. Department of Energy
Distributed Hydrology Soil Vegetation Model (DHSVM)


As a research model, documentation for DHSVM is limited and subject to change. However, the goal is to make the documentation complete enough to enable users to implement their model without direct assistance from us. If you find any mismatch between the document and what the model actually does, if certain features are undocumented, or if you would like to add documentation based on your own experience, we would like to hear from you, and please feel free to contact us.

For a detailed introduction to principle concepts and components that lie under the framework of DHSVM, please refer to the document 'The distributed hydrology soil vegetation model' (download) This document can also be viewed through this Google Book page. Note that this document applies to DHSVM version 2.0 and was last updated in 2002.


This page is intended to provide scripts, programs and extra documentation related to processing input files, output files, create maps, etc. Please, consider submitting your scripts, programs, and helpful documents to us so that all DHSVM users can benefit from them. These programs are intended to help DHSVM users. We are not responsible for them in any way and you should always read the code before using them.

Many programs are available in the tutorial for the dhsvm 2.0.1 version. The programs for input processing haven't changed for the dhsvm 3.0 version in this tutorial. However the output processing programs have and will be available soon.

Processing of input files

rmhdr.scr C shell script, UNIX Remove header of ArcInfo ascii files for DEM, MASK, SOIL and VEG
Apply only once
myconvert.c ANSI C gcc -o myconvert -lm convert.c
usage: myconvert source_format(ASCII/BINARY) target_format(char, float, etc) source_file target_file number_rows number_cols
Makefile.ModelState ANSI C and C Shell Script Get it from tutorial for now, prepare an initial state.
WARNING, a spinup period is still necessary
make -f Makefile.ModelState
MakeModelStateBin InitialState.txt

MakeChannelState.c ANSI C gcc -o MakeChannelState MakeChannelState.c
Usage: MakeChannelState StreamNetworkFile stream_classR file InitialDepth Output_DateR_ String:

Creates Initial Channel State. This is an updated version of the C shell script formerly provided and it does not required any editing anymore. (Previously requiring to manually edit the width of the channels). (Nathalie Voisin 08/2006)
Sample Initial Channel State: (Channel.State.10.01.1990.03.00.00)
Add road layers Word Doc Describes steps to create road layers for your model.
Contributed by Chris Surfleet, OSU.(06/2006)
Set up of DHSVM input grids Word Doc Explain and detail set up of DHSVM input grids :
  • Watershed mask and DEM grid
  • Land cover grid
  • Soil texture grid
  • Soil depth and stream network grid
  • Contributed by Robert Mitchell and Matt Wiley. Robert Mitchell used "ArcGIS 9 on a PC which includes ArcMap and ArcInfo." He also used a " Sun workstation to compile java and C codes (and run C codes)." (07/2006)

Processing of input files and running DHSVM 3.0 on a PC

Please remember that we do not support any DHSVM version on Windows machines. This version might help you set up DHSVM on your machine, no guarantee.

Everything tar file (java, AML, C, cpp, txt, Doc) Adapted AML and java scrips and .cpp (instead of C shell scripts) for input processing and adapted C files for running DHSVM model on a PC, along with instructions and details of the changes Contributed by Charlie Luce (USDA Forest Service) (07/2006)
Details of changes in input processing scripts Word Document Contributed by Charlie Luce (USDA Forest Service).
Download the "Everything" tar file above to obtain the changed files. (07/2006)
Details of the changes in DHSVM 3.0 source code Text document Contributed by Charlie Luce (USDA Forest Service).
Download the "Everything" tar file above to obtain the changed files. (07/2006)
Instructions when using a PC Word Document Contributed by Charlie Luce (USDA Forest Service) (07/2006)
Executable files for input files processing link to ftp site, .exe Set up C++ library and executables files. Contributed by Charlie Luce (USDA Forest Service) (07/2006)

Plot GMT maps

plot_modelmap.scr C shell script, UNIX Process the MAPS output files using myconvert.c and adding the previously saved header file (tutorial), then use GMT commands to plot the map

Create GIS maps

UNIX commands UNIX ./programs/myconvert float ascii mapfile junk.asc ROW COL
cat ./arcinfo/rainyhdr.txt junk.asc > arcinformat.txt

modify the path of the files as necessary

Model Operation

Describes how to compile the source code, input requirements, and miscellaneous issues related to running the model

Model Input

The following input files are part of a DHSVM application. Note that many input files are created using GIS and advanced skills are required. Some files are always required, but additional files may be needed depending on the options specified in the configuration file. This is specified in the description below:

To initialize the model, a number of model state files are required as well:

Input Files Processing

Model Output

There are a number of different types of output that the model can produce. In short, the following possibilities are available:

DHSVM hydrologic output

Sediment Module output

Unless you change the code, in very brief the ASCII output files will contain (Check the above link for more details about the variables) :

(default output file)
Date HasSnow OverSnow LastSnow Swq Melt PackWater TPack SurfWater TSurf
ColdContent EvapTot EPot0 EPot1 EPot2 EAct0 EAct1 EAct2 EInt0 EInt1
ESoil00 ESoil01 ESoil02 ESoil10 ESoil11 ESoil12 ESoil Precip IntRain0 IntRain1
IntSnow0 IntSnow1 RadBeam RadDiff SoilMoist0 SoilMoist1 SoilMoist2 Perc0 Perc1
Perc2 TableDepth SatFlow Runoff SoilTemp Qnet Qs Qe Qg Qst Ra IExcess (InfiltAcc)
(default output file)
Date IExcess CanopyWater SoilWater Snow.Swq Soil.SatFlow ChannelInt RoadInt
CulvertReturnFlow Evap.ETot Precip Snow.VaporMassFlux Snow.CanopyVaporMassFlux
OldWaterStorage CulvertToChannel RunoffToChannel MassError
(network output file )
Date Discharge_for_station1 Discharge_for_station2 etc (each columns corresponds to the "SAVE" markers in the
(network output file )
Date Discharge_for_segment1 etc (each columns is the discharge at the culvert with a "SAVE" marker in the file.)
Streamflow.Only and Road.Only
(network output file )
the first column is the date, and then each columns is the discharge at all the station or road segment where you wrote "SAVE" in the row
(mass wasting model output file )
Date SatThick DeltaDepth Probability TotMassWasting TotMassDeposition TotSedToChannel Erosion
SedFluxOut OverlandInflow RdErosion RdSedToHill OverroadInflow
(mass wasting model output file )
Date MassWasting SedimentToChannel MassDeposition MWMMassError Sediment.Erosion
Road.Erosion RoadSed DebrisInflow SedimentOverlandInflow SedimentOverroadInflow
SedimentOutflow CulvertReturnSedFlow CulvertSedToChannel LastChannelSedimentStorage
(mass wasting model output file )
Date avgnumfailures avgpixperfailure numlikelyfailedpixels which correspond to
"For each date that the mwm algorithm is run" "ave. no. of failures" "ave. no. of pixels per failure"
"total number of failed pixels with probability of failure greater than failure_threshold"
Sed.Stream.Flow and Sed.Road.Flow
(mass wasting model output file )
Date ChannelID TotalMass TotalOutflowConcentration SegmentID
Sed.Streamflow.Only and Sed.Roadflow.Only
(mass wasting model output file )
Date TotalOutflowConcentration_for_each_segment_with_a_marker_"SAVE"
(DHSVM output file )
Date Sat
The file is intended to screen for Mass Wasting dates to insert in the MWM configuration file
Saturation extent is the percentage of the number of pixels with a water table that is at least MTHRESH of soil depth