The Regional Hydro-Ecologic Simulation System
naomitague resolved issues with accumulation for yearly canopy stratum output su…
…ch that if both print_yearly_on and print_yearly_growth_on are called reset happens too soon and some output variables are 0
Latest commit e815509 Nov 16, 2018

RHESSys - The Regional Hydro-Ecologic Simulation System

Github is the new home for the RHESSys code repository.

The project homepage is at

The old SVN repository was at


The "develop" branch should be used for day-to-day development, with RHESSys releases pushed to the "master" branch periodically (for example yearly).

Continuous Build and Test

We are using Travis-CI ( to host our continuous integration efforts. Continuous integration helps us run our test suite upon every commit to this repository and let us know if and when we break the build.

The current build status is: Build Status

The above icon should be clickable and point to the latest build at Travis-CI:

The .travis.yml configuration file defines how this project is hooked to Travis-CI. Github has a post-commit hook that is fired upon every commit to this repository. This post-commit hook uses an authentication token to login to Travis-CI and run the configured steps on a virtual machine. A return value of 0 means success and generates a 'green' status indicator (hopefully illustrated in the previous paragraph).

While the code is successfully compiling and running, there are a significant number of compiler warnings at this time:

$ GISBASE=/usr/lib/grass64 make 2>&1 | grep warning | wc -l


The Create Flowpaths subproject has a growing suite of tests that can be run via make test. Tests are defined as .c files in the cf/test/src directory and will automatically get compiled and run by the make test target.

Code Coverage

The Create Flowpaths subproject also has a code coverage script. This script will use gcov and lcov to generate an HTML coverage report and show where more tests are needed by illustrating which lines of code are not being exercised by the existing tests.

Run the code coverage script:

cd cf/

This will generate an HTML report in the newly formed cf/coverage_report/ directory. This new directory can be copied to a webserver or opened directly in your web browser.

Static Analysis

RHESSys can be analyzed by cppcheck in a few seconds with the following command:

cppcheck . --quiet

OR to see the output, and save the errors out to a textfile:

cppcheck . 2> err.txt
cat err.txt

$ wc -l err.txt

Static analysis will show things like memory leaks, out-of-bound references, and null pointers. It is generally assumed a good thing to have your code be "static analysis clean".