Learn R Programming

ropenmeteo (version 0.1.1)

write_glm_format: Write ensemble forecast dataframe to General Lake Model formatted csv files

Description

Write ensemble forecast dataframe to General Lake Model formatted csv files

Usage

write_glm_format(df, path)

Value

No return value, called to generate csv files in the GLM required format

Arguments

df

data frame output by get_ensemble_forecast()

path

directory where csv files will be written

Examples

Run this code

# \dontshow{
# Hide setting tempfile, since a user would specify a persistent location
 path <- tempdir()
# }

file <- system.file("extdata", "test-data.csv", package="ropenmeteo")
df <- readr::read_csv(file, show_col_types = FALSE)
df |>
   add_longwave() |>
   write_glm_format(path = path)
# \dontshow{
# tidy
 unlink(path)
# }

Run the code above in your browser using DataLab