Hello Christoph,
Does SWATrunR allow to set conditions based on specific parameters? According to the Get Started page it should, however I'm not able to define specific parameter changes for channels or aquifers using the same syntax as described in the Get Started page. Whenever I try to run run_swatplus the function either returns a map() error in index 58, which holds changes for a .rte parameter:
Error in map():
ℹ In index: 58.
Caused by error in set_names():
! x must be a vector
Run rlang::last_trace() to see where the error occurred.
rlang::last_trace()
<error/purrr_error_indexed>
Error in map():
ℹ In index: 58.
Caused by error in set_names():
! x must be a vector
Backtrace:
▆
- ├─SWATrunR::run_swatplus(...)
- │ └─SWATrunR:::setup_swatplus(...)
- │ └─... %>% bind_rows(.)
- ├─dplyr::bind_rows(.)
- │ └─rlang::list2(...)
- ├─purrr::map(., ~setup_calibration_cal(.x, unit_cons))
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─SWATrunR (local) .f(.x[[i]], ...)
- │ └─SWATrunR:::setup_calibration_cal(.x, unit_cons)
- │ └─SWATrunR:::add_obj(par_cal, par_def$unit, unit_cons$units[[par_def$file_name]])
- │ └─... %>% bind_rows()
- ├─dplyr::bind_rows(.)
- │ └─rlang::list2(...)
- ├─rlang::set_names(., "OBJ" %_% 1:length(.))
- └─rlang::abort(message = message)
rlang::last_trace()
<error/purrr_error_indexed>
Error in map():
ℹ In index: 58.
Caused by error in set_names():
! x must be a vector
Backtrace:
▆
- ├─SWATrunR::run_swatplus(...)
- │ └─SWATrunR:::setup_swatplus(...)
- │ └─... %>% bind_rows(.)
- ├─dplyr::bind_rows(.)
- │ └─rlang::list2(...)
- ├─purrr::map(., ~setup_calibration_cal(.x, unit_cons))
- │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
- │ ├─purrr:::with_indexed_errors(...)
- │ │ └─base::withCallingHandlers(...)
- │ ├─purrr:::call_with_cleanup(...)
- │ └─SWATrunR (local) .f(.x[[i]], ...)
- │ └─SWATrunR:::setup_calibration_cal(.x, unit_cons)
- │ └─SWATrunR:::add_obj(par_cal, par_def$unit, unit_cons$units[[par_def$file_name]])
- │ └─... %>% bind_rows()
- ├─dplyr::bind_rows(.)
- │ └─rlang::list2(...)
- ├─rlang::set_names(., "OBJ" %_% 1:length(.))
- └─rlang::abort(message = message)
Or the script runs all the iterations in a blink of an eye.
Performing 1000 simulations on 4 cores:
Completed 1000 simulations in 4M 24S
count(qsim_cal$error_report)
A tibble: 1 × 1
1 1000
Error_report prints the following error:
forrtl: severe (157): Program Exception - access violation <chr [27]>
Can you provide some guidance in this matter?
Thank you for your attention.
Best regards,
Miguel
Hello Christoph,
Does SWATrunR allow to set conditions based on specific parameters? According to the Get Started page it should, however I'm not able to define specific parameter changes for channels or aquifers using the same syntax as described in the Get Started page. Whenever I try to run run_swatplus the function either returns a map() error in index 58, which holds changes for a .rte parameter:
Error in map():
ℹ In index: 58.
Caused by error in set_names():
! x must be a vector
Run rlang::last_trace() to see where the error occurred.
Backtrace:
▆
Backtrace:
▆
Or the script runs all the iterations in a blink of an eye.
Performing 1000 simulations on 4 cores:
Completed 1000 simulations in 4M 24S
A tibble: 1 × 1
Error_report prints the following error:
forrtl: severe (157): Program Exception - access violation <chr [27]>
Can you provide some guidance in this matter?
Thank you for your attention.
Best regards,
Miguel