RcamelsCL is an R package that provides functions for downloading spatial and temporal data from the Catchment Attributes and Meteorology for Large Sample Studies, Chile Dataset (CAMELS-CL) https://camels.cr2.cl/. Details of the dataset are provided in https://doi.org/10.5194/hess-22-5817-2018.
Bugs / comments / questions / collaboration of any kind are very welcomed.
RcamelsCL is an R package built to make the CAMELS-CL dataset easier to use. For hydrologists, that matters because CAMELS-CL (Alvarez-Garreton et al., 2018) has become a key reference for studying how river basins behave across Chile's wide range of climates and landscapes.
Instead of spending a large amount of time downloading files, reorganizing folders, and cleaning inputs, users can access the CAMELS-CL data through a consistent R workflow designed for research and modelling.
CAMELS-CL, short for Catchment Attributes and Meteorology for Large Sample Studies -- Chile, is one of the Chile's main benchmark datasets for large-sample hydrology and comparative catchment analysis.
It brings together the kinds of information researchers need to ask big questions, including:
That broad coverage makes the dataset especially useful for testing hydrological models, comparing catchments, and exploring how geography and climate shape water availability.
Developed by Héctor Garcés-Figueroa and Mauricio Zambrano-Bigiarini, within the Kimün-Ko water resources observatory at Universidad de La Frontera, RcamelsCL was designed to support reproducible scientific workflows end-to-end.
RcamelsCL gives users a reliable way to:
The result is straightforward: less time spent preparing data, and more time spent on model development, hypothesis testing, and hydrological analysis.
One of the package's strongest features is that it preserves the original dataset exactly as published. RcamelsCL provides access to the raw source CAMELS-CL data without changing its content.
That matters for public trust in science as much as for technical work. When researchers can trace their inputs back to the original repository, it becomes easier to check methods, compare results, and repeat studies with confidence.
This kind of transparency is especially valuable for:
Benchmarking studies, where researchers need to know they are testing models against the same source material.
Model intercomparison, to avoid that small preprocessing differences can change model outcomes.
Regional hydrological assessment, where consistent data handling makes it easier to compare catchments across Chile in a reproducible way.
Uses beyond specialist research. Although the package is built mostly for the scientific community, its value goes beyond high-level research projects. RcamelsCL is also well suited for:
For students, it lowers the barrier to working with real hydrological data. For practitioners, it offers a dependable entry point into one of the most comprehensive catchment datasets available for Chile.
Hydrology increasingly depends on tools that are not just accurate, but also transparent, repeatable, and efficient. RcamelsCL addresses a basic but important bottleneck: reproducible data access.
By making CAMELS-CL easier to download, organise, and use without altering the original records, the package gives researchers a stronger foundation for data-driven hydrology in Chile. That is a practical contribution with wide reach, from classroom exercises to large-scale environmental assessments.
The package should be cited as:
Garces-Figueroa H., Zambrano-Bigiarini M. (2026). RcamelsCL: Easy Handling of the CAMELS-CL Dataset. R package version 0.2-0, doi:10.32614/CRAN.package.RcamelsCL. https://CRAN.R-project.org/package=RcamelsCL.

RcamelsCL is an R package that gives users direct, organised access to the CAMELS-CL hydrology dataset for Chile. It helps researchers handle catchment attributes and hydrometeorological time series without building their own data-access pipeline from scratch.
CAMELS-CL is a benchmark dataset used to compare river basins across different climates and landscapes in Chile. It supports large-sample studies, model testing, and regional analysis by bringing together consistent catchment and meteorological information.
No. A central feature of RcamelsCL is that it preserves the original raw data as provided by the official repository. That improves transparency, traceability, and reproducibility in scientific work.
The package is useful for researchers, students, and practitioners working in hydrology, environmental science, and water resources. It is especially helpful for anyone who wants a reliable, reproducible way to use Chilean catchment data in teaching, modelling, or comparative analysis.
Alvarez-Garreton, C.; Mendoza, P. A.; Boisier, J. P.; Addor, N.; Galleguillos, M.; Zambrano-Bigiarini, M.; Lara, A.; Puelma, C.; Cortes, G.; Garreaud, R.; McPhee, J.; Ayala, A. (2018). The CAMELS-CL dataset: catchment attributes and meteorology for large sample studies -- Chile dataset, Hydrology and Earth System Sciences, 22, 5817--5846, https://doi.org/10.5194/hess-22-5817-2018.
Some examples (from: ?RcamelsCL::getData):
library(RcamelsCL)
###############
# Example 1: Getting only daily time series data for the 'Rio Trancura Antes Rio Llafenco'
# catchment
###############
x1 <- getData(9414001)
head(x1)
###############
# Example 2: Getting only daily time series of P [mm/day], Tmin [degC], Tavg [degC],
# Tmax [degC], PET [mm/day] and Q [mm/day] data for the 'Rio Trancura Antes
# Rio Llafenco' catchment
###############
var.names <- c("P_mm_day", "Tmin_degC_day", "Tavg_degC_day",
"Tmax_degC_day", "PET_mm_day", "Qobs_mm_day")
x2 <- getData(9414001)
x2 <- x2[, var.names]
names(x2) <- c("P", "Tmin", "Tavg", "Tmax", "PET", "Q")
###############
# Example 3: Getting only daily time series and catchment borders data for the
# 'Rio Trancura Antes Rio Llafenco' catchment
###############
x3 <- getData(9414001, include.shp=TRUE)
terra::plot(x3[["CatchmentBorders"]])
###############
# Example 4: Getting only daily time series and catchment attributes data for the
# 'Rio Trancura Antes Rio Llafenco' catchment
###############
x4 <- getData(9414001, include.attr=TRUE)
head(x4[["CatchmentAttributes"]])
###############
# Example 5: Getting daily time series, catchment borders and catchment attributes data for the
# 'Rio Trancura Antes Rio Llafenco' catchment
###############
x5 <- getData(9414001, include.shp=TRUE, include.attr=TRUE)
head(x5[["CatchmentTS"]])
terra::plot(x5[["CatchmentBorders"]])
###############
# Example 6: Getting daily time series, catchment borders, catchment attributes and additional
# precipitation datasets for the 'Rio Trancura Antes Rio Llafenco' catchment
###############
x6 <- getData(9414001, include.shp=TRUE, include.attr=TRUE,
include.extra.P=TRUE)
head(x6[["CatchmentTS"]])
terra::plot(x6[["CatchmentBorders"]])
head(x6[["CatchmentAttributes"]])
###############
# Example 7: Getting only monthly time series data for the 'Rio Trancura Antes Rio Llafenco'
# catchment
###############
x7 <- getData(9414001, tscale="monthly")
head(x7)
###############
# Example 8: Getting only annual time series data for the 'Rio Trancura Antes Rio Llafenco'
# catchment
###############
x8 <- getData(9414001, tscale="annual")
head(x8)
###############
# Example 9: Getting only annual time series data between 2008 and 2015 for the
# 'Rio Trancura Antes Rio Llafenco' catchment
###############
x9 <- getData(9414001, tscale="annual", from = as.Date("2008-01-01"),
to = as.Date("2015-12-31"))
head(x9)
###############
# Example 10: Getting only monthly time series data for the 'Rio Mapocho en Los Almendros'
# and 'Rio Trancura Antes Rio Llafenco' catchments
###############
target.ids <- c(5722002, 9414001)
nelements <- length(target.ids)
x10 <- vector(mode = "list", length = nelements)
for (i in seq_len(nelements)) {
x10[[i]] <- getData(target.ids[[i]], tscale="monthly")
}
str(x10)
Installing the latest stable version from CRAN:
install.packages("RcamelsCL")
Alternatively, you can also try the under-development version from GitLab:
# Using devtools
if (!require(devtools)) install.packages("devtools")
devtools::install_gitlab("hgarcesf/RcamelsCL")
# Using remotes
if (!require(remotes)) install.packages("remotes")
remotes::install_gitlab("hgarcesf/RcamelsCL")
If you find an error in some function, or want to report a typo in the documentation, or to request a new feature (and wish it be implemented :) you can do it here