Welcome to grwat
, an R package for the automatic hydrograph separation and daily 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.
Important note: The current state of the package should be considered experimental. Convenience of
grwat
data model and processing workflow should be tested by package users and may change in near future. Feel free to submit bugs and suggestions on improvement of the package to the GitHub issues.
Install the latest released version of grwat
from CRAN by:
install.packages("grwat")
The current development version of grwat
can be installed from R-universe:
# Enable repository from tsamsonov
options(
repos = c(
ropensci = 'https://tsamsonov.r-universe.dev',
CRAN = 'https://cloud.r-project.org'
)
)
# Download and install grwat in R
install.packages('grwat')
The current development version of grwat
can be installed from GitHub. For this three steps are required:
- Install
remotes
R package - Install compiler (Windows and macOS only)
- Install
grwat
R package
To install from GitHub, you should install remotes
package first (unless it is already installed on your machine):
install.packages("remotes")
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:
- Install Xcode command-line tools.
- Restart R session.
Windows users have to:
- Install Rtools.
- Restart R session.
If all previous steps are completed successfully, grwat
package can be installed via single command:
remotes::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
remotes::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"
grwat is an acronym made from ground water. This name emerged historically because the extraction of the ground flow (baseflow) is one of the most important stages in the advanced separation algorithm provided by the package.
grwat
package has been developed in 2019-2022 with financial support of Russian Science Foundation (RSF) Project 19-77-10032.
The main separation algorithm was developed in 2016-2018 with financial support of Russian Foundation for Basic Research (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 (RSF) Project 17-77-10169.