Giter VIP home page Giter VIP logo

rapid's Introduction

RAPID

DOI

License (3-Clause BSD)

Docker Build

GitHub CI 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 with Docker

Installing RAPID is by far the easiest with Docker. This document was written and tested using Docker Community Edition which is available for free and can be installed on a wide variety of operating systems. To install it, follow the instructions in the link provided above.

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

Download RAPID

Downloading RAPID with Docker can be done using:

$ docker pull chdavid/rapid

Install packages

The beauty of Docker is that there is no need to install anymore packages. RAPID is ready to go! To run it, just use:

$ docker run --rm --name rapid -it chdavid/rapid

Testing with Docker

Testing scripts are currently under development.

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

Installation on Ubuntu

This document was written and tested on a machine with a clean image of Ubuntu 18.04.6 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 github_actions_CI.yml.

Download RAPID

First, make sure that git is installed:

$ sudo apt-get install -y --no-install-recommends 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 --no-install-recommends $(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 --no-install-recommends gfortran

Install netCDF

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

$ mkdir $HOME/installz
$ cd $HOME/installz
$ mkdir netcdf-install
$ wget -O netcdf-c-4.7.3.tar.gz https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.7.3.tar.gz
$ wget -O netcdf-fortran-4.5.2.tar.gz https://github.com/Unidata/netcdf-fortran/archive/refs/tags/v4.5.2.tar.gz
$ tar -xzf netcdf-c-4.7.3.tar.gz
$ tar -xzf netcdf-fortran-4.5.2.tar.gz
$ cd netcdf-c-4.7.3/
$ ./configure CC=gcc CPPFLAGS=-I/usr/lib/x86_64-linux-gnu/hdf5/serial/include LDFLAGS=-L/usr/lib/x86_64-linux-gnu/hdf5/serial/lib --prefix=$HOME/installz/netcdf-install --disable-dap
$ make check > check.log
$ make install > install.log
$ cd ..
$ cd netcdf-fortran-4.5.2/
$ ./configure CC=gcc FC=gfortran LD_LIBRARY_PATH=$HOME/installz/netcdf-install/lib:$LD_LIBRARY_PATH CPPFLAGS=-I$HOME/installz/netcdf-install/include LDFLAGS=-L$HOME/installz/netcdf-install/lib --prefix=$HOME/installz/netcdf-install/
$ make check > check.log
$ make install > install.log
$ cd ..

Then, the environment should be updated using:

$ export TACC_NETCDF_DIR=$HOME/installz/netcdf-install
$ export TACC_NETCDF_LIB=$TACC_NETCDF_DIR/lib
$ export TACC_NETCDF_INC=$TACC_NETCDF_DIR/include
$ export LD_LIBRARY_PATH=$TACC_NETCDF_LIB
$ 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.13.0.tar.gz"
$ tar -xzf petsc-3.13.0.tar.gz
$ cd petsc-3.13.0
$ ./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 PETSC_DIR=$PWD PETSC_ARCH=linux-gcc-c all > all.log
$ make PETSC_DIR=$PWD PETSC_ARCH=linux-gcc-c check > check.log

Then, the environment should be updated using:

$ export PETSC_DIR=$HOME/installz/petsc-3.13.0
$ 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 tst/
$ gfortran -o tst_run_comp tst_run_comp.f90 -I $TACC_NETCDF_INC -L $TACC_NETCDF_LIB -lnetcdff
$ gfortran -o tst_run_cerr tst_run_cerr.f90 -I $TACC_NETCDF_INC -L $TACC_NETCDF_LIB -lnetcdff
$ gfortran -o tst_run_conv_Qinit tst_run_conv_Qinit.f90 -I $TACC_NETCDF_INC -L $TACC_NETCDF_LIB -lnetcdff

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

rapid's People

Contributors

c-h-david avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.