R/metnorenal3.R
swat_weather_input_chain.Rd
This function combines 3 miljotools
functions in a single gridded data
retrieval and processing pipeline to write and assign weather data to a SWAT+
setup. The functions involved are
swat_weather_input_chain(
area,
swat_setup,
directory = NULL,
from = NULL,
to = NULL,
area_buffer = 1500,
verbose = TRUE,
precision = 2,
write_wgn = TRUE,
sqlite_path = NULL
)
The catchment area to retrieve data for. (must be a shapefile)
The path to your SWAT+ setup (input files, aka TxtInOut)
directory to download and process data in
start of the to-be-dowloaded timeseries (ie. and min: "2012-09-01 10:00:00")
end of the to-be-dowloaded timeseries (ie. and max: "2023-01-31 10:00:00")
optional buffer in meters around the provided area
print status messages?
Optional, which precision (integer) should the hourly data be rounded down to when converted from daily to hourly. Default is '2' decimal places.
would you like to calculate and write the weather generator?
optionally, you can pass the path of your .sqlite file in order to update the database with your new met files
get_metno_reanalysis3()
downloads and processes the hourly gridded
reanalysis data for the nordics
reanalysis3_daily()
converts these hourly timeseries into daily.
reanalysis3_swatinput()
converts these timeseries into a SWAT+
compatible format as well as generating the weather generator, and updating
SWAT+ input files with the help of the R-package SWARTprepR
For more details please see the help pages of the individual functions. Also
please note the the package SWATprepR
is required for this pipeline.