This is a course on hydrological modelling using a R software package. Part 1 presumes that you have at least a basic knowledge of hydrology and ideally some experience of R. Part 2 requires a more detailed knowledge of R along with some knowledge of the git version control system.

Useful primers for R can be found on multiple websites such as that of Hadley Wickham or on CRAN but complete knowledge of their contents is not expected.

Software

Part 1

To make use of the examples on which Part 1 of the course is based requires

An installation of R 4.4.0 or above

Installation instructions for R are available from CRAN for Linux, Windows and Mac. Full details of the R version and packages used in building this version of the training material can be found here.

A suitable text editor for altering the R scripts.

While it is possible to complete the course using the built in R GUI’s for Windows and Mac it is recommended to install an editor with syntax highlighting. Popular choices include the Rstudio IDE, VSCode (Instructions here) or Emacs with ESS all of which provide an integrated development environment.

Installed copies of dynatop and dynatopGIS

These and there dependencies can be install in the standard way for R packages. At the R command prompt type

install.packages('dynatop', repos =c('https://waternumbers.r-universe.dev','https://cloud.r-project.org'))
install.packages('dynatopGIS', repos = c('https://waternumbers.r-universe.dev', 'https://cloud.r-project.org'))

Part 2

For completing Part 2 of the course which focuses on developing dynatop further software is required.

An installation of the git version control system

Details on installing git can be found on the software’s webpage. It is presumed that git is available from the command line.

An installation of the pandoc universal document converter

Pandoc provides installation instructions.

Tools for building R packages which include source code

The most efficient method of installing the tools required for building R packages depends upon the platform:

  • Windows: a single tool chain Rtools is available.
  • Mac: requires Apple Xcode and GNU Fortran compiler. Details of the GNU Fortran compiler version and other libraries that may be required are provided on CRAN
  • Linux: ensure that gcc and gcc-c++ compilers are installed.

An account on github

This is required to fork and alter the source code.

Data and Scripts

Download the data for the examples as a zip file. Extracting this should give a directory “eden_data” with four subdirectories. In the code provided is is presumed that the working directory of the R session is “eden_data”.

To save copying and pasting from the web pages the R code used in the training course is available. These scripts should be used alongside the course material.