This function takes the output from metnordic_extract_grid() and applies it
to a SWAT+ setup, with the help of SWATprepR.
swatplus_metnordic(
directory,
swat_setup = NULL,
write_wgn = TRUE,
start = NA,
end = NA,
sqlite_path = NULL,
backup = FALSE,
aux_data = NULL,
epsg_code = NULL,
fill_missing = TRUE,
clean_files = TRUE,
verbose = FALSE
)path to weather data as created by metnordic_extract_grid()
path to SWAT+ setup (alternatively, you can pass a sqlite_path)
should the weather generator be written?
optional parameter to define start date of time series
optional parameter to define end date of time series4
path to your SWAT+ sqlite file (only needed if you wish to update your database). Warning: start and end parameters will be ignored in this case (SWATprepR limitation)
(logical, defaults to true) creates a backup of your swat folder before modification
Additional (non-metnordic) data to add to your SWAT+ project. Must be a path to an .xlsx file which matches the SWATprepR format of load_template().
SWATprepR: (optional) Integer, EPSG code for station coordinates. Default epsg_code = 4326, which stands for WGS 84 coordinate system.
SWATprepR: (optional) Boolean, TRUE - fill data for missing stations with data from closest stations with available data. FALSE - leave stations without data. Weather generator will be used to fill missing variables for a model. Default fill_missing = TRUE.
SWATprepR: Logical, if TRUE, will remove all existing weather files in model setup folder before writing new ones. Default clean_files = TRUE.
print to console?
path to SWAT+ setup