License: MIT lifecycle Coverage Status R-CMD-check

grwat

Welcome to grwat, an R package for the automatic hydrograph separation and hydrological time series analysis. grwat provides various filters to separate baseflow and quickflow. Implements advanced separation technique which involves meteorological data to reveal genetic components of the runoff: ground, rain, thaw and spring (seasonal thaw). High-performance C++17 computation, annually aggregated variables, statistical testing and numerous ggplot-based functions for informative plotting.

Installing

grwat is not available on CRAN yet. You can install it from GitHub repository. For this three steps are required:

  1. Install devtools R package
  2. Install compiler (Windows and macOS only)
  3. Install grwat R package

Install devtools

To install from GitHub, you should install devtools package first (unless it is already installed on your machine):

install.packages("devtools")

Install compiler

Since grwat contains C++ code, it needs to be compiled during the package installation.

Linux users should have the compiler already installed in their system.

macOS users have to:

  1. Install Xcode command-line tools.
  2. Restart R session.

Windows users have to:

  1. Install Rtools.
  2. Restart R session.

Install grwat

If all previous steps are completed successfully, grwat package can be installed via single command:

devtools::install_github("tsamsonov/grwat")

A note to Windows users: if you get the error during installation over the previously installed grwat, remove the package folder manually, restart R and then hit devtools::install_github("tsamsonov/grwat", INSTALL_opts = '--no-lock'). You should run RStudio as Administrator to get the full access to the package installation folder. The location of installation folder can be learned from Packages — Install dialog or by .libPaths() command in R console as displayed below.

> .libPaths()
[1] "C:/Users/tsamsonov/Documents/R/win-library/4.1"
[2] "C:/Program Files/R/R-4.1.0/library" 

Funding

grwat package is being developed with financial support of Russian Science Foundation (Project 19-77-10032).

The main separation algorithm was developed in 2016-2018 with financial support of RFBR (Project 16-35-60080).

The mountain block of the main separation algorithm was developed in 2018-2019 with financial support of Russian Science Foundation (Project 17-77-10169).