if (FALSE) {
# Run simulations without post-processing
with_apsimx(
models = "path/to/apsimx",
file = "path/to/input.apsimx",
mets = c("path/to/met1.met", "path/to/met2.met"),
clean = "all"
)
# Run simulations with post-processing
post_process_function <- function(folder) {
output_files <- list.files(folder, full.names = TRUE)
message("Output files:", paste(output_files, collapse = "\n"))
}
result <- with_apsimx(
models = "path/to/apsimx",
file = "path/to/input.apsimx",
mets = c("path/to/met1.met", "path/to/met2.met"),
post_process = post_process_function
)
}
Run the code above in your browser using DataLab