Upgrading XML files of a JavaSTICS workspace directory to a newer STICS version format

upgrade_workspace_xml(
  workspace,
  javastics,
  out_dir,
  stics_version = "V9.2",
  target_version = "V10.0",
  plant = FALSE,
  overwrite = FALSE,
  ...
)

Arguments

workspace

Path of a JavaSTICS workspace

javastics

Path of JavaSTICS containing the STICS version corresponding to the version of the files to be converted

out_dir

Output directory of the generated files

stics_version

Name of the STICS version (VX.Y format)

target_version

Name of the STICS version to upgrade files to (VX.Y format)

plant

logical (optional), TRUE for upgrading plant files if a "plant" sub-directory of workspace exists, FALSE otherwise

overwrite

logical (optional), TRUE for overwriting files if they exist, FALSE otherwise

...

Additional input arguments

Value

None

Details

  • See SticsRFiles::get_stics_versions_compat() for listing versions

  • If general parameters files exist in workspace, they are also upgraded. In that case, residues parameters values are kept and might not be adapted to the target model version.

  • Weather data and observations files are fully copied to out_dir

Examples

if (FALSE) { # \dontrun{
upgrade_workspace_xml(
  workspace = "/path/to/JavaSTICS/workspace",
  javastics = "/path/to/JavaSTICS/folder",
  out_dir = "/path/to/an/output/directory"
)
} # }