Skip to content

aat669/rapid

 
 

Repository files navigation

RAPID

DOI

License (3-Clause BSD)

Build Status

The Routing Application for Parallel computatIon of Discharge (RAPID) is a river network routing model. Given surface and groundwater inflow to rivers, this model can compute flow and volume of water everywhere in river networks made out of many thousands of reaches.

For further information on RAPID including peer-reviewed publications, tutorials, sample input/output data, sample processing scripts and animations of model results, please go to: http://rapid-hub.org/.

Installation on Ubuntu

This document was written and tested on a machine with a clean image of Ubuntu 14.04.0 Desktop 64-bit installed, i.e. no update was performed, and no upgrade either.

Note that the experienced users may find more up-to-date installation instructions in .travis.yml.

Download RAPID

First, make sure that git is installed:

$ sudo apt-get install -y git

Then download RAPID:

$ git clone https://github.com/c-h-david/rapid

Finally, enter the rapid directory:

$ cd rapid/

Install APT packages

Software packages for the Advanced Packaging Tool (APT) are summarized in requirements.apt and can be installed with apt-get. All packages can be installed at once using:

$ sudo apt-get install -y $(grep -v -E '(^#|^$)' requirements.apt)

Alternatively, one may install the APT packages listed in requirements.apt one by one, for example:

$ sudo apt-get install -y gfortran

Install netCDF

The Network Common Data Form (NetCDF) can be installed using:

$ mkdir $HOME/installz
$ cd $HOME/installz
$ wget "http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-3.6.3.tar.gz"
$ mkdir netcdf-3.6.3-install
$ tar -xzf netcdf-3.6.3.tar.gz 
$ cd netcdf-3.6.3
$ ./configure CC=gcc CXX=g++ FC=gfortran --prefix=$HOME/installz/netcdf-3.6.3-install
$ make check > check.log
$ make install > install.log

Then, the environment should be updated using:

$ export TACC_NETCDF_DIR=$HOME/installz/netcdf-3.6.3-install
$ export TACC_NETCDF_LIB=$TACC_NETCDF_DIR/lib
$ export TACC_NETCDF_INC=$TACC_NETCDF_DIR/include
$ export PATH=$PATH:$TACC_NETCDF_DIR/bin

Note that these four lines can also be added in ~/.bash_aliases so that the environment variables persist.

Install PETSc

The Portable, Extensible Toolkit for Scientific Computation (PETSc) can be installed using:

$ cd $HOME/installz
$ wget "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.6.2.tar.gz"
$ tar -xzf petsc-3.6.2.tar.gz
$ cd petsc-3.6.2
$ ./configure PETSC_DIR=$PWD PETSC_ARCH=linux-gcc-c --download-fblaslapack=1 --download-mpich=1 --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-clanguage=c --with-debugging=0
$ make all > all.log
$ make test > test.log

Then, the environment should be updated using:

$ export PETSC_DIR=$HOME/installz/petsc-3.6.2
$ export PETSC_ARCH=linux-gcc-c
$ export PATH=$PATH:$PETSC_DIR/$PETSC_ARCH/bin

Note that these three lines can also be added in ~/.bash_aliases so that the environment variables persist.

Build RAPID

$ cd rapid/
$ cd src/
$ make rapid

Testing on Ubuntu

Testing scripts are currently under development.

$ cd rapid/
$ cd rtk/
$ gfortran -o rtk_run_comp rtk_run_comp.f90 -I $TACC_NETCDF_INC -L $TACC_NETCDF_LIB -lnetcdf
$ gfortran -o rtk_run_conv_Qinit rtk_run_conv_Qinit.f90 -I $TACC_NETCDF_INC -L $TACC_NETCDF_LIB -lnetcdf

Note that the experienced users may find more up-to-date testing instructions in .travis.yml.

About

Routing Application for Parallel computatIon of Discharge (RAPID)

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Fortran 57.9%
  • Shell 40.3%
  • Makefile 1.8%