FLAREr

Flexible, scalable, robust, and near-real time iterative ecological forecasts in lakes and reservoirs.
https://github.com/FLARE-forecast/FLAREr

Category: Hydrosphere
Sub Category: Freshwater and Hydrology

Keywords from Contributors

lake estuaries

Last synced: about 12 hours ago
JSON representation

Repository metadata

README.md

R-CMD-check
Codecov test coverage

FLAREr

This document serves as a user guide and a tutorial for the FLARE (Forecasting Lake and Reservoir Ecosystems) system (Thomas et al. 2020). FLARE generates forecasts with uncertainty of water temperature and water quality for 1- to 35-day-ahead time horizon at multiple depths of a lake or reservoir. It uses data assimilation to update the initial starting point for a forecast and the model parameters based a real-time statistical comparisons to observations. It has been developed, tested, and evaluated for Falling Creek Reservoir in Virginia (Thomas et al. 2020), Beaverdam Reservoir in Virginia (Wander et al 2024), Lake Sunapee in New Hampshire (Woelmer et al. 2024), National Ecological Observatory Network lakes across the United States (Thomas et al. 2023 and Olsson et al. 2024), and Lough Feeagh in Ireland (Paíz et al. 2024).

FLAREr is a set of R scripts that

  • Generating the inputs and configuration files required by the General Lake Model (GLM)
  • Applying data assimilation to GLM
  • Processing and archiving forecast output
  • Visualizing forecast output

FLARE uses the 1-D General Lake Model (Hipsey et al. 2019) as the mechanistic process model that predicts hydrodynamics of the lake or reservoir. For forecasts of water quality, it uses GLM with the Aquatic Ecosystem Dynamics library. FLARE requires GLM version 3.3 or higher.

More information about the GLM can be found here:

FLARE development has been supported by grants from the U.S. National Science Foundation (CNS-1737424, DBI-1933016, DBI-1933102)

Installation

You will need to download the necessary packages before running.

remotes::install_github("FLARE-forecast/FLAREr")

Next, you need the GLM model. You can get in using multiple pathways

The easiest way is to install the GLM3r package from Github using

remotes::install_github("rqthomas/GLM3r")

or you can download it from the AquaticEcoDynamics GitHub organization. This code assumes you are in the directory with the FLARE configurations and workflow subdirectories

download.file("https://github.com/rqthomas/glm-aed/archive/refs/heads/main.zip", "glm_aed.zip")
unzip("glm_aed.zip")

if you are running on Mac you will need to run:

system2("chmod","u+x glm-aed-main/binaries/macos/Sonoma/glm_latest/glm")
system2("./glm-aed-main/binaries/macos/Sonoma/glm_latest/glm")

if you are running on Linux you will need to run:

system2("chmod","u+x glm-aed-main/binaries/ubuntu/22.04/glm_latest/glm")
system2("./glm-aed-main/binaries/ubuntu/22.04/glm_latest/glm")

Working on windows

Use

FLAREr is a set of functions that address key steps in the forecasting workflow.

Requires

User-generated insitu observations, meteorology, and inflow/outflow in a specified format. See the FLARE example vignette for format specification.
You are required to set a directory structure as follows:

Quick Run

The code below will produce a single forecast for Falling Creek Reservoir using configuration files included with the package.

library(arrow)
library(tidyverse)
library(FLAREr)

remotes::install_github("rqthomas/GLM3r")
Sys.setenv('GLM_PATH'='GLM3r')


dir.create(tempdir(),showWarnings = FALSE)
lake_directory <- file.path(tempdir(), "extdata")
file.copy(system.file("extdata", package = "FLAREr"), tempdir(), recursive = TRUE)
run_flare(lake_directory = lake_directory,configure_run_file = "configure_run.yml", config_set_name = "default")

open_dataset(file.path(lake_directory,"forecasts/parquet")) |> 
  filter(variable == "temperature",
         depth == 1) |> 
  collect() |> 
  ggplot(aes(x = datetime, y = prediction, group = parameter)) +
  geom_line() +
  geom_vline(aes(xintercept = as_datetime(reference_datetime))) +
  labs(title = "1 m water temperature forecast")

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 792
Total Committers: 18
Avg Commits per committer: 44.0
Development Distribution Score (DDS): 0.297

Commits in past year: 183
Committers in past year: 12
Avg Commits per committer in past year: 15.25
Development Distribution Score (DDS) in past year: 0.148

Name Email Commits
rqthomas r****s@v****u 557
tadhg-moore t****m@v****u 168
addelany a****y@g****m 24
Freya E Olsson f****o@t****r 9
Vahid Daneshmand v****d@g****m 8
tadhg.m t****e@d****e 6
LAPTOP-FO87M896\freya f****n@o****m 4
Freya E Olsson f****o@t****r 3
Freya E Olsson f****o@t****r 2
Freya E Olsson f****o@t****r 2
Freya E Olsson f****o@t****r 2
Freya E Olsson f****o@t****r 1
Freya E Olsson f****o@t****r 1
Freya E Olsson f****o@t****r 1
Freya E Olsson f****o@t****r 1
Freya E Olsson f****o@t****r 1
Quinn Thomas r****s@r****l 1
Cayelan Carey c****n@v****u 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 19
Total pull requests: 86
Average time to close issues: about 1 year
Average time to close pull requests: 5 days
Total issue authors: 3
Total pull request authors: 7
Average comments per issue: 0.37
Average comments per pull request: 0.41
Merged pull request: 81
Bot issues: 0
Bot pull requests: 0

Past year issues: 9
Past year pull requests: 17
Past year average time to close issues: 23 days
Past year average time to close pull requests: 16 days
Past year issue authors: 2
Past year pull request authors: 4
Past year average comments per issue: 0.33
Past year average comments per pull request: 0.12
Past year merged pull request: 15
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/FLARE-forecast/FLAREr

Top Issue Authors

  • rqthomas (17)
  • vahid-dan (1)
  • melofton (1)

Top Pull Request Authors

  • rqthomas (34)
  • addelany (19)
  • tadhg-moore (17)
  • OlssonF (9)
  • Ashish-Ramrakhiani (4)
  • vahid-dan (2)
  • cayelan (1)

Top Issue Labels

  • enhancement (3)
  • bug (1)

Top Pull Request Labels


Package metadata

proxy.golang.org: github.com/flare-forecast/flarer

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/flare-forecast/flarer#section-documentation
  • Licenses: mit
  • Latest release: v3.0.3+incompatible (published about 1 month ago)
  • Last Synced: 2025-04-29T14:10:27.344Z (1 day ago)
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent repos count: 1.622%
    • Average: 4.057%
    • Dependent packages count: 6.492%
proxy.golang.org: github.com/FLARE-forecast/FLAREr

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/FLARE-forecast/FLAREr#section-documentation
  • Licenses:
  • Latest release: v3.0.3+incompatible (published about 1 month ago)
  • Last Synced: 2025-04-29T14:10:27.229Z (1 day ago)
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%

Dependencies

.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • EML * imports
  • GLM3r * imports
  • dplyr * imports
  • emld * imports
  • ggplot2 * imports
  • imputeTS * imports
  • lubridate * imports
  • magrittr * imports
  • mvtnorm * imports
  • ncdf4 * imports
  • parallel * imports
  • patchwork * imports
  • plyr * imports
  • rMR * imports
  • readr * imports
  • stringr * imports
  • tibble * imports
  • tools * imports
  • yaml * imports
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite

Score: -Infinity