This function updates a SWAT+ model text files and writes the atmodep.cli
file for a given dataframe containing atmospheric deposition data.
Arguments
- df
A data frame containing columns "DATE," "NH4_RF," "NO3_RF," "NH4_DRY," and "NO3_DRY" obtained from the
get_atmo_dep
function.- write_path
Character, path to the SWAT+ txtinout folder (example "my_model").
- t_ext
(optional) A string indicating the type of time aggregation: 'year' for yearly averages, 'month' for monthly averages, and 'annual' for the average of the entire period. Default default
t_ext = "year"
.
Value
Writes data to 'atmodep.cli' file and can update the SWAT+ SQLite database with codes and connections to atmospheric deposition data.
Examples
if (FALSE) {
basin_path <- system.file("extdata", "GIS/basin.shp", package = "SWATprepR")
df <- get_atmo_dep(basin_path)
project_path <- "./output/test"
add_atmo_dep(df, project_path)
}