A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

LWFBrook90R

Simulates daily transpiration, interception, soil and snow evaporation, streamflow and soil water fluxes through a soil profile covered with vegetation.
https://github.com/pschmidtwalter/lwfbrook90r

Category: Natural Resources
Sub Category: Soil and Land

Keywords

evapotranspiration modeling r-package waterbalance waterflux

Last synced: about 14 hours ago
JSON representation

Repository metadata

Run the LWF-Brook90 hydrological model within R.

README.Rmd

          ---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# LWFBrook90R


[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/pschmidtwalter/LWFBrook90R/workflows/R-CMD-check/badge.svg)](https://github.com/pschmidtwalter/LWFBrook90R/actions)
[![CRAN](https://www.r-pkg.org/badges/version/LWFBrook90R)](https://cran.r-project.org/package=LWFBrook90R)
[![](https://cranlogs.r-pkg.org/badges/grand-total/LWFBrook90R)](https://cran.r-project.org/package=LWFBrook90R)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3760298.svg)](https://doi.org/10.5281/zenodo.3760298)


`LWFBrook90R` provides an implementation of the Soil Vegetation Atmosphere
Transport (SVAT) model
[LWF-BROOK90](https://www.lwf.bayern.de/boden-klima/wasserhaushalt/index.php)
(Hammel & Kennel, 2001) written in Fortran. The model simulates daily
transpiration, interception, soil and snow evaporation, streamflow and soil
water fluxes through a soil profile covered with vegetation. A set of high-level
functions for model set up, execution and parallelization provide easy access to
plot-level SVAT simulations, as well as multi-run and large-scale applications.

## Installation

You can install the released version of LWFBrook90R from [CRAN](https://CRAN.R-project.org) with:

```{r, eval = FALSE}
install.packages("LWFBrook90R")
```

and the development version can be installed from [Github](https://github.com/pschmidtwalter/LWFBrook90R) using the package `remotes`:

```{r, eval = FALSE}
remotes::install_github(repo="pschmidtwalter/LWFBrook90R", build_vignettes = TRUE) 
```

## Usage

Below is basic example. For more complex examples take a look at the
packages vignettes with `browseVignettes("LWFBrook90R")`.

The main function `run_LWFB90()` creates the model input from model control
options, parameters, climate and soil data and returns the simulation
results.

```{r}
# load package and sample data
library(LWFBrook90R)
data(slb1_meteo, slb1_soil)

# set up default model control options and parameters
opts <- set_optionsLWFB90()
parms <- set_paramLWFB90()

# Derive soil hydraulic properties from soil physical properties 
# using a pedotransfer function: 
soil <- cbind(slb1_soil, hydpar_wessolek_tab(texture = slb1_soil$texture))

# run the model and capture results
lwfb90_res <- run_LWFB90(options_b90 = opts,
                         param_b90 = parms,
                         climate = slb1_meteo,
                         soil = soil)

```

Plot results

```{r,echo = FALSE, fig.height=4, fig.width=7}
oldpar <- par(no.readonly = TRUE)

dates <- with(lwfb90_res$output, as.Date(paste(yr, mo, da, sep = "-")))
par(mar = c(2,4.1,1,4.1))
plot(dates,lwfb90_res$output$evap, 
     col = "green", type = 'l', ylim = c(0,7),
     xlab = "", ylab = "Evapotranspiration [mm]")
par(new=TRUE)
plot(dates, lwfb90_res$output$swat, type = "l", 
     col = "blue", ylim = c(200,500), 
     yaxt = "n", xaxt = "n", ylab = "", xlab = "")
axis(4,pretty(c(200,500)))
mtext("Soil water storage [mm]", side = 4, line =3)
legend("left", legend = c("ET", "Swat"),
       col = c("green", "blue"),  lty = 1, 
       bty = "n")
par(oldpar)
```

## Citation

Schmidt-Walter, P., Trotsiuk, V., Meusburger, K., Zacios, M., Meesenburg, H.
(2020): Advancing simulations of water fluxes, soil moisture and drought stress
by using the LWF-Brook90 hydrological model in R. Agr. For. Met. 291, 108023.
https://doi.org/10.1016/j.agrformet.2020.108023

## Contributions

Implementations of further methods for creating model input (e.g. leaf area
dynamics, root depth density distributions, pedotransfer functions) and other
improvements are highly welcome.

## Authors

Paul Schmidt-Walter, Volodymyr Trotsiuk, Klaus Hammel, Martin Kennel,
Tony Federer.

Tony Federer’s original [Brook90](http://www.ecoshift.net/brook/b90doc.html)
Fortran 77 code (Brook90\_v3.1F, License: CC0) was enhanced by Klaus Hammel and
Martin Kennel at Bavarian State Institute of Forestry (LWF) around the year
2000. Since then, LWF-BROOK90 is distributed by
[LWF](https://www.lwf.bayern.de/boden-klima/wasserhaushalt/index.php) upon
request as a pre-compiled Fortran command line program together with an MS
Access User Interface. In 2019, Volodymyr Trotsiuk converted the Fortran 77 code
to Fortran 95 and implemented the connection to R. Paul Schmidt-Walter’s
`brook90r` (Schmidt-Walter, 2018) package for LWF-Brook90 input
data generation, model execution and result processing was adapted and extended
to control this interface function.

## License

GPL-3 for all Fortran and R code. `brook90r` has GPL-3, while LWF-Brook90
was without license until recently. Lothar Zimmermann and Stephan Raspe
(LWF), and all previous Fortran contributors agreed to assign GPL-3 to the
Fortran code.

## References

Federer C.A. (2002): BROOK 90: A simulation model for evaporation, soil water, and streamflow.
http://www.ecoshift.net/brook/brook90.htm

Federer C.A., Vörösmarty, C., Fekete, B. (2003): Sensitivity of Annual
Evaporation to Soil and Root Properties in Two Models of Contrasting Complexity.
J. Hydrometeorol. 4, 1276–1290. https://doi.org/10.1175/1525-7541(2003)004%3C1276:SOAETS%3E2.0.CO;2

Hammel, K., Kennel, M. (2001): Charakterisierung und Analyse der
Wasserverfügbarkeit und des Wasserhaushalts von Waldstandorten in Bayern mit dem
Simulationsmodell BROOK90. Forstliche Forschungsberichte München 185. 
ISBN 978-3-933506-16-0

Schmidt-Walter, P. (2018). brook90r: Run the LWF-BROOK90 hydrological model from 
within R (Version v1.0.1). Zenodo. https://doi.org/10.5281/zenodo.1433677


        

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 331
Total Committers: 8
Avg Commits per committer: 41.375
Development Distribution Score (DDS): 0.502

Commits in past year: 14
Committers in past year: 1
Avg Commits per committer in past year: 14.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Paul Schmidt-Walter p****r@n****e 165
Paul Schmidt-Walter p****r@d****e 66
Paul Schmidt-Walter p****r@n****e 58
Volodymyr Trotsiuk v****k@g****m 25
Robert Nuske r****e@n****e 13
fabern s****b@f****h 2
Paul Schmidt-Walter 3****r 1
Axel a****t@f****k 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 49
Total pull requests: 24
Average time to close issues: 2 months
Average time to close pull requests: 7 days
Total issue authors: 12
Total pull request authors: 6
Average comments per issue: 2.29
Average comments per pull request: 0.0
Merged pull request: 19
Bot issues: 0
Bot pull requests: 0

Past year issues: 1
Past year pull requests: 2
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 1
Past year pull request authors: 1
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/pschmidtwalter/lwfbrook90r

Top Issue Authors

  • rnuske (14)
  • trotsiuk (8)
  • rhabel (7)
  • pschmidtwalter (7)
  • MichaKoe (6)
  • yjaguilara (1)
  • HenrikBengtsson (1)
  • fabern (1)
  • gadermaierjosef (1)
  • acmue (1)
  • HammadAli-WD (1)
  • marekie (1)

Top Pull Request Authors

  • pschmidtwalter (9)
  • rnuske (6)
  • trotsiuk (5)
  • valentingar (2)
  • fabern (1)
  • awellpott (1)

Top Issue Labels

  • bug (3)
  • enhancement (3)
  • question (2)
  • help wanted (1)

Top Pull Request Labels

  • enhancement (1)

Package metadata

cran.r-project.org: LWFBrook90R

Simulate Evapotranspiration and Soil Moisture with the SVAT Model LWF-Brook90

  • Homepage: https://pschmidtwalter.github.io/LWFBrook90R/
  • Documentation: http://cran.r-project.org/web/packages/LWFBrook90R/LWFBrook90R.pdf
  • Licenses: GPL-3
  • Latest release: 0.6.1 (published 6 months ago)
  • Last Synced: 2025-04-25T12:04:47.350Z (1 day ago)
  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 361 Last month
  • Docker Downloads: 20,358
  • Rankings:
    • Forks count: 8.702%
    • Docker downloads count: 12.557%
    • Stargazers count: 16.476%
    • Average: 18.215%
    • Downloads: 19.026%
    • Dependent repos count: 23.86%
    • Dependent packages count: 28.668%
  • Maintainers (1)

Dependencies

DESCRIPTION cran
  • R >= 3.4.0 depends
  • data.table >= 1.10.4 imports
  • doFuture >= 0.10.0 imports
  • foreach >= 1.5.0 imports
  • future >= 1.19.0 imports
  • iterators >= 1.0.12 imports
  • methods * imports
  • parallelly >= 1.30.0 imports
  • progressr >= 0.6.0 imports
  • vegperiod >= 0.3.0 imports
  • knitr * suggests
  • rmarkdown * suggests
  • roxygen2 * suggests
  • testthat * suggests
.github/workflows/check-standard.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action 4.1.4 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite

Score: 14.58339037267886