#r
Вопрос:
Я пытаюсь разобраться с гидрологической моделью SWAT и пакетом SWATplusR, который предназначен для создания экземпляра SWAT в R. Я просматриваю код, предоставленный на этом веб-сайте https://github.com/chrisschuerz/SWATplusR/blob/master/vignettes/SWATplusR.Rmd
Я могу зайти так далеко, как показано ниже, но затем я также получаю сообщение об ошибке. Я не вижу, как продвинуться дальше
library(SWATdata)
library(SWATplusR)
demo_path<-"C:Documents"
demo_path
######
path_plus <- load_demo(dataset = "project",
version = "plus",
path = demo_path,
revision = 57)
q_obs <- load_demo(dataset = "observation")
q_obs
plot(q_obs, type = "l")
######
# Path to the subbasin shape file
sub_path <- load_demo(dataset = "subbasin", version = "plus")
# Path to the subbasin shape file
riv_path <- load_demo(dataset = "river", version = "plus")
sub_path
riv_path
library(sf)
library(ggplot2)
sub <- read_sf(sub_path)
riv <- read_sf(riv_path)
ggplot()
geom_sf(data = sub)
geom_sf(data = riv, col = "royalblue", lwd = 0.75)
geom_sf_label(data = riv, aes(label = Channel))
theme_bw()
######
## this works - I get a basin map
## Below is a simple example to run a SWAT project
## and return the `variable = 'flo_out'` that is written
## into the `file = 'channel'` file for the spatial
##`unit = 1`. **Caution** in the demo SWAT model setup
## the main channel is channel number 1.
path_plus <- "C:/swat_demo/swatplus_rev57_demo"
######
q_sim_plus <- run_swatplus(project_path = path_plus,
output = define_output(file = "channel",
variable = "flo_out",
unit = 1))
Ошибка: ‘C:/swat_demo/swatplus_rev57_demo/time.sim-не существует.
Где может быть этот файл? Я пытался искать источники, но ничего не смог найти. Спасибо Ник Рэй