Skip to contents

Read an AEME object from files

Usage

read_aeme_from_files(path)

Arguments

path

Path to the directory containing the AEME files.

Value

An AEME object populated with data from the files.

Examples

aeme_file <- system.file("extdata/aeme.rds", package = "AEME")
aeme <- readRDS(aeme_file)
path <- "test_write"
model_controls <- get_model_controls()
aeme <- build_aeme(path = path, aeme = aeme, model = "glm_aed",
model_controls = model_controls)
#> Created missing directory: D:\a\AEME\AEME\docs\reference\test_write
#>  Using observed water level
#>  No missing values in observed water level. Using observed water level
#>  Correcting water balance using estimated outflows (method = 2).
#>  Calculating lake level using lake depth and a sinisoidal function.
#>  Building GLM-AED2 for lake wainamu
#>  Copied in GLM nml file
#>  Copied in AED nml file and supporting files
#>  GLM nml validation completed - no issues detected.
aeme <- run_aeme(aeme = aeme, model = "glm_aed", path = path)
#>  Running models... (Have you tried parallelizing?) [2026-02-05 00:00:04]
#> → GLM-AED running... [2026-02-05 00:00:04]
#>  GLM-AED run successful! [2026-02-05 00:00:04]
#>  Model run complete! [2026-02-05 00:00:04]
write_aeme_to_files(aeme, path)
aeme_path <- get_lake_dir(aeme = aeme, path = path)
aeme2 <- read_aeme_from_files(aeme_path)