Skip to contents

This function prepares or updates climate data text input files in a SWAT+ model based on the provided meteo_lst.

Usage

prepare_climate(meteo_lst, write_path, period_starts = NA, period_ends = NA)

Arguments

meteo_lst

Nested list with dataframes. Nested structure: meteo_lst -> data -> Station ID -> Parameter -> Dataframe (DATE, PARAMETER), meteo_lst -> stations -> Dataframe (ID, Name, Elevation, Source, geometry, Long, Lat).

meteo_lst can be created using load_template function using 'xlsx' template file or it could to be created with load_swat_weather function loading information from SWAT+ model setup weather files.

write_path

Character, path to the SWAT+ txtinout folder (example "my_model").

period_starts

(optional) Character, date string (example '1991-01-01'). Default period_starts = NA, stands for all available in data.

period_ends

(optional) Character, date string (example '2020-12-31'). Default period_ends = NA, stands for all available in data.

Value

Fills or updates multiple weather-related text files in the SWAT+ model.

See also

Examples

if (FALSE) {
  # Example usage:
  prepare_climate(meteo_lst, "output", "1991-01-01", "2020-12-31")
}