This function applies the data extracted by senorge_extract_grid() to a
SWAT+ project using SWATprepR. Please note you need to pass "Auxiliary
data" to this function of additional meteorological data such that SWAT+ can
be run (SeNorge only has precipitation and temperature, more variables are
needed to run SWAT+)
swatplus_senorge(
extract_path,
metadata,
DEM,
aux_data,
epsg_code,
write_path = NULL,
db_path = NULL,
fill_missing = TRUE,
period_starts = NA,
period_ends = NA,
clean_files = TRUE,
verbose = FALSE
)string, path to the directory where data was extracted using senorge_extract_grid()
string, path to the metadata shape file generated by senorge_extract_grid().
string, path to a .tif raster of a DEM which covers the area of the extracted grid.
string, path to .xlsx sheet in SWATprepR format with Auxiliary meteo data (this is needed, as SeNorge does not have all required variables to run SWAT+)
SWATprepR: integer value fo the EPSG code of the projection of the auxilliary data (See ?SWATprepR::load_template())
SWATprepR: Character, path to the SWAT+ txtinout folder (example "my_model").
SWATprepR: A character string representing the path to the SWAT+ SQLite database (e.g., "./output/project.sqlite").
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: (optional) Character, date string (example '1991-01-01'). Default period_starts = NA, stands for all available in data.
SWATprepR: (optional) Character, date string (example '2020-12-31'). Default period_ends = NA, stands for all available in data.
SWATprepR: Logical, if TRUE, will remove all existing weather files in model setup folder before writing new ones. Default clean_files = TRUE.
logical, print status?
Returns TRUE if function finishes task.
#TODO