diff --git a/.github/workflows/check-standard.yaml b/.github/workflows/check-standard.yaml index 6b6e1e44..a48042f5 100644 --- a/.github/workflows/check-standard.yaml +++ b/.github/workflows/check-standard.yaml @@ -31,7 +31,7 @@ jobs: } - { os: ubuntu-latest, - r: "4.2.0", + r: "4.4.0", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", } @@ -52,7 +52,7 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - pak-version: rc + #pak-version: rc # about pak-version: # Ubuntu doesn't install the proper version of XML see https://github.com/r-lib/actions/issues/559. Remove when fixed. # see also: https://stackoverflow.com/questions/73243945/pkgdown-action-failing-at-build-xml diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 5263de6f..8cc2f953 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -32,7 +32,7 @@ jobs: } - { os: ubuntu-latest, - r: "4.2.0", + r: "4.4.0", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", } diff --git a/CITATION.cff b/CITATION.cff index 4233b46c..128e361f 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -7,15 +7,15 @@ cff-version: 1.2.0 message: 'To cite package "SticsRFiles" in publications use:' type: software license: LGPL-3.0-or-later -title: 'SticsRFiles: Read and Modify ''STICS'' Input/Output Files' -version: 1.6.0 +title: 'SticsRFiles: Read and Modify STICS Input/Output Files' +version: 1.7.0 doi: 10.32614/CRAN.package.SticsRFiles -abstract: Manipulating input and output files of the 'STICS' crop model. Files are - either 'JavaSTICS' XML files or text files used by the model 'fortran' executable. - Most basic functionalities are reading or writing parameter names and values in - both XML or text input files, and getting data from output files. Advanced functionalities - include XML files generation from XML templates and/or spreadsheets, or text files - generation from XML files by using 'xslt' transformation. +abstract: Manipulating input and output files of the STICS crop model. Files are either + JavaSTICS XML files or text files used by the model fortran executable. Most basic + functionalities are reading or writing parameter names and values in both XML or + text input files, and getting data from output files. Advanced functionalities include + XML files generation from XML templates and/or spreadsheets, or text files generation + from XML files by using xslt transformation. authors: - family-names: Lecharpentier given-names: Patrice @@ -40,7 +40,6 @@ authors: repository: https://CRAN.R-project.org/package=SticsRFiles repository-code: https://github.com/SticsRPacks/SticsRFiles url: https://doi.org/10.5281/zenodo.4443206 -date-released: '2025-06-03' contact: - family-names: Lecharpentier given-names: Patrice diff --git a/DESCRIPTION b/DESCRIPTION index af7604a9..5633b592 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,6 @@ Package: SticsRFiles -Title: Read and Modify 'STICS' Input/Output Files -Version: 1.6.0 -Date: 2025-06-03 +Title: Read and Modify STICS Input/Output Files +Version: 1.7.0 Authors@R: c( person("Patrice", "Lecharpentier", , "patrice.lecharpentier@inrae.fr", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4044-4322")), @@ -23,13 +22,13 @@ Authors@R: c( person("Christine", "Le Bas", role = "rev"), person("Joel", "Leonard", role = "rev") ) -Description: Manipulating input and output files of the 'STICS' crop - model. Files are either 'JavaSTICS' XML files or text files used by - the model 'fortran' executable. Most basic functionalities are reading +Description: Manipulating input and output files of the STICS crop + model. Files are either JavaSTICS XML files or text files used by + the model fortran executable. Most basic functionalities are reading or writing parameter names and values in both XML or text input files, and getting data from output files. Advanced functionalities include XML files generation from XML templates and/or spreadsheets, or text - files generation from XML files by using 'xslt' transformation. + files generation from XML files by using xslt transformation. License: LGPL (>= 3) URL: https://github.com/SticsRPacks/SticsRFiles, https://doi.org/10.5281/zenodo.4443206 @@ -85,6 +84,7 @@ Collate: 'check_java_workspace.R' 'check_output_files.R' 'check_param_names.R' + 'check_upgrade_versions.R' 'col_names_to_var.R' 'compute_date_from_day.R' 'compute_day_number.R' @@ -192,15 +192,9 @@ Collate: 'static_help.R' 'stics_environment.R' 'stics_files_utils.R' - 'upgrade_ini_xml.R' - 'upgrade_param_gen_xml.R' - 'upgrade_param_newform_xml.R' - 'upgrade_plt_xml.R' - 'upgrade_sols_xml.R' - 'upgrade_sta_xml.R' - 'upgrade_tec_xml.R' - 'upgrade_usms_xml.R' - 'upgrade_workspace_xml.R' + 'upgrade_v10_v11.R' + 'upgrade_v9_v10.R' + 'upgrade_xml_files.R' 'var_to_col_names.R' 'xml_document.R' 'xml_files_functions.R' diff --git a/NEWS.md b/NEWS.md index bf40c415..f89702ef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,62 @@ +# SticsRFiles 1.7.0 +* FUNCTIONS + * Added new functions for upgrading STICS input files from version 10 to version 11 + * Management of STICS versions using the 'semver' package (major, minor, patch components) + * Removed useless warnings in some functions + * Using now get_version_num function for comparing versions (using 'svlist' object from 'semver' package) + * new function get_dev_stages for extracting STICS development stages dates from a list + of data.frame of simulations outputs + * parallelisation mode introduced for STICS inputs text files generation + * parallelisation mode introcuced for reading STICS output files + * new function for extracting a new xml workspace from a workspace, with possible usm selection (rewriting usms.xml, sols.xml) + * new function for calculating an approximate value of vapor pressure + * manage branches use in download_data function + * Added verbosity use in functions managing Stics variables and replaced warning by message in some cases + +* DOCUMENTATION + * functions help: added missing examples for exported functions + * vignettes update: for STICS files upgrading + +* FIXES + * Download function for examples csv files + * Function for reading csv or xls examples files + * managing text version to version number using 'semver' + * Remove `overwrite` argument from set_xml_file_version + * rename STICS humirac parameter to code_humirac following fortran code + * find general parameters files, .mod files location (either in workspace or in JavaStics config directory) + * manage duplicate values or files in gen_climate function + * get_xml_files_param_df: for the long format table the "value" column is converted to character for binding data.frame rows, + data selection with parameters names, management of empty parameters values when pivot_wider + * getting plants names with or without using the usms.xml file, for mixed usms directories (soles crops and intercrops) + * set_param_value: converting parameters values to a list if it is not a list when dimensions are compatible + * writing errors for weather data files + * functions arguments renaming to have more consistency among functions + * compute_date_from_day returns NA instead of 999 + * removed old deprecated arguments management (and 'lifecycle' dependency) + * sub-directories detection for reading observation and simulation outputs files, and duplicates + * download_data: error management + * fixed default values for mandatory parameters in _tec.xml templates files (V10 and V11) + * Added checks for calculating weather data years number and added new tests + +* DATA + * Input STICS files sets: simplification according to versions compatibility + * Update examples files for STICS version 11.0.0 + * adaptation of functions used for data manipulation for new data set of STICS 11.0.0 + +* REFACTORING + * Removed useless code, superfluous arguments and commented code + * Checking version function + * Functions simplification for upgrading files from STICS version 9 to 10 + * code style fixes + +* TESTS + * Checks and integration tests restructured + * Use of an automatic action for checking code style and updates + * Updates about testhat function used + * Added in workflows a dependabot for checking packages updates (producing pull requests) + * Removed from tests useless version number + + # SticsRFiles 1.6.0 _2025-06-03_ * FUNCTIONS * convert_xml2txt allows to convert sols.xml file to text files diff --git a/R/add_node_to_doc.R b/R/add_node_to_doc.R index b90957fa..0ffde87b 100644 --- a/R/add_node_to_doc.R +++ b/R/add_node_to_doc.R @@ -44,7 +44,7 @@ add_node_to_doc <- function(xml_doc, new_node, nodes_nb = 1, parent_path) { # Checking that parent_path is valid xpath for xml_doc if (is.null(get_nodes(xml_doc, parent_path))) { - warning(paste("Given xpath is not a valid one:", parent_path)) + warning("Given xpath is not a valid one:", parent_path) return(invisible()) } diff --git a/R/add_stics_nodes.R b/R/add_stics_nodes.R index 09863a33..69a42843 100644 --- a/R/add_stics_nodes.R +++ b/R/add_stics_nodes.R @@ -54,7 +54,7 @@ add_stics_nodes <- function( form_idx <- which(node_types$form_names[[file_tag]] == formalism_name) if (!length(form_idx)) { - stop(paste("Unkown formalism name", formalism_name)) + stop("Unkown formalism name", formalism_name) } if (formalism_name == "special techniques") { diff --git a/R/all_in_par.R b/R/all_in_par.R index 767cca3d..f34927d7 100644 --- a/R/all_in_par.R +++ b/R/all_in_par.R @@ -20,11 +20,8 @@ #' all_in_par <- function(stics_version = "latest") { # Checking and getting the right version - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) - # if (get_version_num(stics_version = stics_version) < 9.2) { - # cols_idx <- 1:4 - # } else { cols_idx <- c(1, 4, 7:8, 2, 3, 10) # } @@ -40,7 +37,15 @@ all_in_par <- function(stics_version = "latest") { stringsAsFactors = FALSE )[, cols_idx] - names(par_df) <- c("name", "file", "min", "max", "definition", "unit", "cultivar") + names(par_df) <- c( + "name", + "file", + "min", + "max", + "definition", + "unit", + "cultivar" + ) par_df$cultivar <- as.logical(par_df$cultivar) @@ -86,6 +91,9 @@ all_in_par <- function(stics_version = "latest") { #' #' @export #' +#' @examples +#' get_param_info() +#' get_param_info <- function( param = NULL, keyword = NULL, @@ -149,7 +157,7 @@ is_stics_param <- function(param, stics_version = "latest") { pars_names_parsed <- var_to_col_names(all_pars$name) index_par <- match(par_parsed, pars_names_parsed) par_found <- !is.na(index_par) - if (any(!par_found)) { + if (!all(par_found)) { cli::cli_alert_warning( paste0( "paremeters{?s} {.var {par_parsed[!par_found]}}", diff --git a/R/all_out_var.R b/R/all_out_var.R index 5b99ccb3..b6d875b3 100644 --- a/R/all_out_var.R +++ b/R/all_out_var.R @@ -20,7 +20,7 @@ #' all_out_var <- function(stics_version = "latest") { # Checking and getting the right version - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) if (get_version_num(stics_version = stics_version) < get_version_num("9.2")) { cols_idx <- 1:4 @@ -81,6 +81,10 @@ all_out_var <- function(stics_version = "latest") { #' #' @export #' +#' @examples +#' +#' get_var_info() +#' get_var_info <- function(var = NULL, keyword = NULL, stics_version = "latest") { all_vars <- all_out_var(stics_version) if (!is.null(var)) { diff --git a/R/approx_vapour_pressure.R b/R/approx_vapour_pressure.R index e574cbd6..d356037a 100644 --- a/R/approx_vapour_pressure.R +++ b/R/approx_vapour_pressure.R @@ -1,12 +1,18 @@ -##' Approximate vapour pressure -##' -##' Approximates vapour pressure as the saturated vapour pressure at the daily mean air temperature using relative humidity. -##' See section 9.3 of the STICS book, as well as M. Launay's explanations on the STICS forum (\href{https://w3.avignon.inrae.fr/forge/boards/26/topics/2237?r=2243#message-2243}{link}). -##' @param mean_temp numeric vector of daily mean air temperature (in Celsius degrees) -##' @param rel_humid numeric vector of relative humidity (in percentage) -##' @return numeric vector -##' @author Timothee Flutre -##' @export +#' Approximate vapour pressure +#' +#' @description Approximates vapour pressure as the saturated vapour pressure at the daily +#' mean air temperature using relative humidity. +#' See section 9.3 of the STICS book, as well as M. Launay's explanations on the STICS forum +#' (\href{https://w3.avignon.inrae.fr/forge/boards/26/topics/2237?r=2243#message-2243}{link}). +#' @param mean_temp numeric vector of daily mean air temperature (in Celsius degrees) +#' @param rel_humid numeric vector of relative humidity (in percentage) +#' @return numeric vector +#' @author Timothee Flutre +#' @export +#' +#' @examples +#' approx_vapour_pressure(15, 60) +#' approx_vapour_pressure <- function(mean_temp, rel_humid) { stopifnot( length(mean_temp) == length(rel_humid), diff --git a/R/check_choice_param.R b/R/check_choice_param.R index db145ecb..653be7aa 100644 --- a/R/check_choice_param.R +++ b/R/check_choice_param.R @@ -22,7 +22,7 @@ check_choice_param <- function(xml_doc, param_name, stop = FALSE) { #--------------------------------------------------------------------# # Early exiting for other docs than tec ones - if (!XML::xmlName(XML::xmlRoot(xml_doc@content)) == "fichiertec") { + if (XML::xmlName(XML::xmlRoot(xml_doc@content)) != "fichiertec") { return(invisible()) } diff --git a/R/check_java_workspace.R b/R/check_java_workspace.R index 4bd748fa..ac07e202 100644 --- a/R/check_java_workspace.R +++ b/R/check_java_workspace.R @@ -18,7 +18,7 @@ check_java_workspace <- function(javastics, workspace = NULL) { # Ensure that the user working directory is unchanged after # the function has run current_wd <- getwd() - on.exit(setwd(current_wd)) + on.exit(setwd(current_wd), add = TRUE) setwd(javastics) @@ -43,11 +43,11 @@ check_java_workspace <- function(javastics, workspace = NULL) { } if (base::is.null(ws) || !dir.exists(ws)) { - warning(paste( + warning( "The given directory does not exist or JavaSTICS working directory is not set :\n", ws - )) + ) return() } diff --git a/R/check_upgrade_versions.R b/R/check_upgrade_versions.R new file mode 100644 index 00000000..782ab996 --- /dev/null +++ b/R/check_upgrade_versions.R @@ -0,0 +1,79 @@ +# Compatibility checks between version and update to target_version +check_upgrade_versions <- function(stics_version, target_version) { + version_num <- get_version_num(stics_version) + target_version_num <- get_version_num(target_version) + min_version_num <- get_min_version_num( + version_num, + get_version_num(target_version) + ) + status <- TRUE + supported <- TRUE + upgradable <- TRUE + higher <- FALSE + major_version_num <- get_major_version(version_num) + major_min_version_num <- get_major_version(min_version_num) + major_target_version_num <- get_major_version(target_version_num) + same_version <- major_version_num == major_target_version_num + + if (major_min_version_num > major_version_num) { + status <- FALSE + supported <- FALSE + upgradable <- FALSE + } else if (major_version_num < major_min_version_num) { + # supported est TRUE car on peut le faire en + # étapes 9 -> 10 et 10 -> 11 + status <- FALSE + upgradable <- FALSE + } else if (major_version_num > major_target_version_num) { + status <- FALSE + upgradable <- FALSE + higher <- TRUE + } + warn_msg <- "" + if (!status) { + if (!supported) { + warn_msg <- paste( + "The starting version", + stics_version, + "is not supported for any upgrade!" + ) + } else if (!upgradable && !supported) { + warn_msg <- paste( + "The starting version", + stics_version, + "cannot be upgraded directly from ", + target_version, + "but in several steps from one to the other" + ) + } else if (same_version) { + warn_msg <- + paste("The initial and the target major versions are the same") + } else if (higher) { + warn_msg <- + paste("The initial major version is higher than the target major") + } + } + attr(status, "warn_msg") <- warn_msg + status +} + +get_min_version_num <- function(version_num, target_version_num) { + if (version_num < get_version_num(9)) { + return(get_version_num(9)) + } + + if ( + version_num < get_version_num(10) && + target_version_num == get_version_num(10) + ) { + return(get_version_num(9)) + } + + if ( + version_num < get_version_num(11) && + target_version_num == get_version_num(11) + ) { + return(get_version_num(10)) + } + return(version_num) +} diff --git a/R/compute_day_number.R b/R/compute_day_number.R index a229ab29..ca735376 100644 --- a/R/compute_day_number.R +++ b/R/compute_day_number.R @@ -44,20 +44,19 @@ is_leap_year <- function(year, integer = FALSE) { #' Optional. #' @return numeric vector #' @author Timothee Flutre -#' @examples #' -#' date <- as.Date("2015-02-10") -#' compute_day_from_date(date = date) +#' @export #' +#' @examples +#' +#' compute_day_from_date(date = as.Date("2015-02-10")) #' compute_day_from_date(date = "2015-02-10", start_year = 2014) #' -#' date <- as.Date("2009-02-10") -#' compute_day_from_date(date = date, start_year = 2008) +#' compute_day_from_date(date = as.Date("2009-02-10"), start_year = 2008) #' #' dates <- c(as.Date("2008-02-10"), as.Date("2009-02-10")) #' compute_day_from_date(date = dates, start_year = 2008) #' -#' @export compute_day_from_date <- function( date, start_year = NULL diff --git a/R/convert_xml2txt.R b/R/convert_xml2txt.R index 7652eeed..78100406 100644 --- a/R/convert_xml2txt.R +++ b/R/convert_xml2txt.R @@ -118,11 +118,11 @@ convert_xml2txt <- function( soils_names <- get_soils_list(file.path(dirname(file), "sols.xml")) if (!soil_name %in% soils_names) { - stop(paste( + stop( "Soil name ", soil_name, " not found in sols.xml file !" - )) + ) } # generate sol2txt.xsl in the tempdir() directory diff --git a/R/convert_xml2txt_int.R b/R/convert_xml2txt_int.R index 07bcd1b5..ebfd3665 100644 --- a/R/convert_xml2txt_int.R +++ b/R/convert_xml2txt_int.R @@ -26,7 +26,7 @@ convert_xml2txt_int <- function(xml_file, style_file, out_file = NULL) { f_names <- c(xml_file, style_file) ex_files <- file.exists(f_names) - if (any(!ex_files)) { + if (!all(ex_files)) { warning( "At least one input file doesn't exist ! \n", paste(f_names[!ex_files], collapse = ", ") diff --git a/R/download_data.R b/R/download_data.R index b5b7d6f5..37b0259f 100644 --- a/R/download_data.R +++ b/R/download_data.R @@ -170,7 +170,9 @@ get_referenced_dirs <- function(dirs = NULL, stics_version = NULL) { } dirs_names <- grep(pattern = "^study_case", x = names(ver_data), value = TRUE) - if (base::is.null(dirs)) dirs <- dirs_names + if (base::is.null(dirs)) { + dirs <- dirs_names + } dirs_idx <- dirs_names %in% dirs # Not any existing use case dir found diff --git a/R/download_usm_xl.R b/R/download_usm_xl.R index 92a02538..a7a97ea1 100644 --- a/R/download_usm_xl.R +++ b/R/download_usm_xl.R @@ -70,12 +70,12 @@ download_usm_xl <- function( dest_list <- file.path(out_dir, files_list) exist_files <- file.exists(dest_list) if (!overwrite && any(exist_files)) { - warning(paste( + warning( files_list[exist_files], "already exists in ", out_dir, "\nConsider to set overwrite = TRUE to overwrite (it | them )" - )) + ) # filtering existing files, not copied if overwrite == FALSE files_list <- files_list[!exist_files] } @@ -85,11 +85,11 @@ download_usm_xl <- function( if (any(success)) { if (verbose) { - message(paste( + message( files_list[success], " has been copied in directory ", out_dir - )) + ) } dest_list <- dest_list[success] } diff --git a/R/exist_param_xml.R b/R/exist_param_xml.R index 47e8f5eb..30711823 100644 --- a/R/exist_param_xml.R +++ b/R/exist_param_xml.R @@ -99,7 +99,7 @@ exist_param_csv <- function(param, javastics) { # checking existence of par_names if (read_csv) { par_names <- get_param_data_df( - file = inputs_path, + file = inputs_path )$name env_stics[["par_names"]] <- par_names } else { diff --git a/R/exists_param.R b/R/exists_param.R index 32f501da..88604d33 100644 --- a/R/exists_param.R +++ b/R/exists_param.R @@ -15,6 +15,7 @@ #' #' exists_param(xml_doc, "cfes") #' exists_param(xml_doc, c("cfes", "mulchbat")) +#' #' @keywords internal #' #' @noRd diff --git a/R/expand_stics_names.R b/R/expand_stics_names.R index 374dedcf..0f74862c 100644 --- a/R/expand_stics_names.R +++ b/R/expand_stics_names.R @@ -51,6 +51,7 @@ expand_stics_names <- function(in_csv_file, out_csv_file, header = FALSE) { # duplicating rows and concatenation for (p in seq_len(dim(par_to_expand)[1])) { + if (par_to_expand$name[p] == "Name") next par <- par_to_expand$name[p] par_dim <- par_to_expand$dim[p] tmp <- par_to_expand[rep(p, par_dim), ] diff --git a/R/force_param_values.R b/R/force_param_values.R index bf8b3612..4ac931b9 100644 --- a/R/force_param_values.R +++ b/R/force_param_values.R @@ -71,12 +71,12 @@ force_param_values <- function( ind_non_na <- !is.na(values) if (!all(ind_non_na)) { - warning(paste( + warning( "Parameter(s)", paste(names(values[!ind_non_na]), collapse = ","), "will not be forced (maybe their values are not numeric?", " In that case please use set_param_*** functions)." - )) + ) } values <- values[ind_non_na] diff --git a/R/gen_climate.R b/R/gen_climate.R index 67438fb5..27b4c709 100644 --- a/R/gen_climate.R +++ b/R/gen_climate.R @@ -26,7 +26,7 @@ gen_climate <- function(files_path, out_dir) { files_path <- complete_climate_paths(files_path) # data concatenation - climate_lines <- c() + climate_lines <- NULL for (i in seq_along(files_path)) { climate_lines <- c(climate_lines, trimws(readLines(files_path[i]))) } @@ -72,11 +72,11 @@ complete_climate_paths <- function(files_path) { if (length(files_names) < 2) { if (length(files_dir) > 1) { - stop(paste0( + stop( files_names[1], - " the same file exists in 2 locations: ", + "the same file exists in 2 locations:", paste(files_dir, collapse = ", ") - )) + ) } return(file.path(files_dir, files_names)) } diff --git a/R/gen_new_travail.R b/R/gen_new_travail.R index a666c832..7cc5fabf 100644 --- a/R/gen_new_travail.R +++ b/R/gen_new_travail.R @@ -29,7 +29,7 @@ gen_new_travail <- function( codoptim = NULL, out_dir = NULL ) { - data_plt2 <- c() + data_plt2 <- NULL if (usm_data$nbplantes > 1) { data_plt2 <- c("fplt2", "ftec2", "flai2") } @@ -194,7 +194,7 @@ get_usm_data <- function( data$fobs1 <- data$plante1$fobs - if (data$flai1 == "null" || data$flai1 == "defaut.lai") { + if (data$flai1 %in% c("", "null", "defaut.lai") || is.null(data$flai1)) { data$codesimul <- get_codesimul(0) } diff --git a/R/gen_obs.R b/R/gen_obs.R index d48e3ee7..cb865fbb 100644 --- a/R/gen_obs.R +++ b/R/gen_obs.R @@ -43,7 +43,7 @@ gen_obs <- function( ) { # Checking if out_dir exists if (!dir.exists(out_dir)) { - warning(paste("The directory does not exist", out_dir)) + warning("The directory does not exist", out_dir) return(invisible(FALSE)) } diff --git a/R/gen_sta_xml.R b/R/gen_sta_xml.R index 8d16c42a..a4a9d4f3 100644 --- a/R/gen_sta_xml.R +++ b/R/gen_sta_xml.R @@ -105,7 +105,7 @@ gen_sta_xml <- function( sta_out_file <- file.path(out_dir, out_name) # checking dimensions - if (!length(xml_docs) == length(sta_out_file)) { + if (length(xml_docs) != length(sta_out_file)) { stop("Xml output files names must have the same length as table lines ! ") } diff --git a/R/gen_tec_xml.R b/R/gen_tec_xml.R index dd719e25..32a0b237 100644 --- a/R/gen_tec_xml.R +++ b/R/gen_tec_xml.R @@ -74,6 +74,12 @@ gen_tec_xml <- function( } tec_col <- param_names[col_id] + # check if mandatory parameters are present + check_df_mandatory_parameters( + param_df[, -col_id], + c("iplt0", "profsem", "densitesem", "ressuite") + ) + xml_docs <- gen_tec_doc( xml_doc = xml_doc_tmpl, param_table = param_df[, -col_id], @@ -119,7 +125,7 @@ gen_tec_xml <- function( tec_out_file <- file.path(out_dir, out_name) # checking dimensions - if (!length(xml_docs) == length(tec_out_file)) { + if (length(xml_docs) != length(tec_out_file)) { stop("Xml output files names must have the same length as table lines ! ") } @@ -138,3 +144,45 @@ gen_tec_xml <- function( delete(xml_doc_tmpl) } } + + +#' Check if mandatory names are present in a data.frame names +#' and if any missing data in the corresponding column +#' +#' @param param_df a data.frame +#' @param par_names a vector of names +#' +#' @returns None +#' @keywords internal +#' @noRd +#' +check_df_mandatory_parameters <- function(param_df, par_names) { + df_names <- names(param_df) + exist_par <- par_names %in% names(param_df) + if (!all(exist_par)) { + stop( + "The input data.frame does not contain all the mandatory parameters:\n", + paste(par_names[!exist_par], collapse = ", "), + " is/are missing" + ) + } + + param_df <- param_df[par_names] + na_values <- unlist(lapply(param_df, function(x) any(is.na(x)))) + any_na <- any(na_values) + if (any_na) { + stop( + "NA values have been detected in column(s): ", + paste(df_names[na_values], collapse = ", ") + ) + } + + empty_values <- unlist(lapply(param_df, function(x) any(x == ""))) + any_empty <- any(empty_values) + if (any_empty) { + stop( + "Empty values have been detected in column(s): ", + paste(df_names[empty_values], collapse = ", ") + ) + } +} diff --git a/R/gen_usms_sols_doc.R b/R/gen_usms_sols_doc.R index 1b549c01..a623762d 100644 --- a/R/gen_usms_sols_doc.R +++ b/R/gen_usms_sols_doc.R @@ -82,7 +82,7 @@ gen_usms_sols_doc <- function( elts_nb <- nodes_nb } - if ("data.frame" %in% class(nodes_param)) { + if (inherits(nodes_param, "data.frame")) { elts_nb <- dim(nodes_param)[1] } diff --git a/R/gen_usms_xml2txt.R b/R/gen_usms_xml2txt.R index 61f70281..26313225 100644 --- a/R/gen_usms_xml2txt.R +++ b/R/gen_usms_xml2txt.R @@ -87,7 +87,7 @@ gen_usms_xml2txt <- function( # checking javastics path check_java_path(javastics) start_wd <- getwd() - on.exit(setwd(start_wd)) + on.exit(setwd(start_wd), add = TRUE) setwd(javastics) @@ -100,7 +100,9 @@ gen_usms_xml2txt <- function( # Setting the javastics workspace as root directory where to generate # usms files or directories (dir_per_usm_flag value is TRUE) - if (base::is.null(out_dir)) out_dir <- workspace + if (base::is.null(out_dir)) { + out_dir <- workspace + } # Creating target dir if not exists if (!dir.exists(out_dir)) { @@ -160,7 +162,7 @@ gen_usms_xml2txt <- function( usm[!usms_exist] ) } else { - if (any(!usms_exist)) { + if (!all(usms_exist)) { warning( "Not all usm exist in usms.xml file : ", paste(usm[!usms_exist], collapse = ", ") @@ -183,7 +185,7 @@ gen_usms_xml2txt <- function( all_files_list <- lapply(all_files_list, function(x) { x$paths <- x$paths[x$exist] x$exist <- x$exist[x$exist] - return(x) + x }) # Checking XML files existence, check_files @@ -278,26 +280,26 @@ gen_usms_xml2txt <- function( # in javastics for those that do not exist in # workspace out_files_def <- c("var.mod", "rap.mod", "prof.mod") - out_files_java_path <- file.path(javastics, "config", out_files_def) + out_files_work_path <- file.path(workspace, out_files_def) out_files_idx_path <- file.exists(out_files_work_path) out_files_path <- out_files_work_path[out_files_idx_path] - if (!all(out_files_idx_path)) { + if (!all(out_files_idx_path) && !is.null(javastics)) { out_files_path <- c( out_files_path, - out_files_java_path[!out_files_idx_path] + file.path(javastics, "config", out_files_def)[!out_files_idx_path] ) } if (parallel) { cl <- setup_parallelism(usms_number, cores) - on.exit(stopCluster(cl)) + on.exit(stopCluster(cl), add = TRUE) `%do_par_or_not%` <- foreach::`%dopar%` } else { `%do_par_or_not%` <- foreach::`%do%` } - + i <- 1 results <- foreach::foreach( i = seq_len(usms_number) ) %do_par_or_not% { @@ -367,10 +369,11 @@ gen_usms_xml2txt <- function( # Getting climate files paths (unique paths) clim_files_path <- unique( - usm_files_path[grep( + grep( pattern = "\\.[0-9]{4}$", - x = usm_files_path - )] + x = usm_files_path, + value = TRUE + ) ) # Getting xml files paths @@ -396,8 +399,8 @@ gen_usms_xml2txt <- function( next } - found_plt <- grepl(pattern = "_plt", x = file_path) - found_tec <- grepl(pattern = "_tec", x = file_path) + found_plt <- grepl(pattern = "_plt", x = file_path, fixed = TRUE) + found_tec <- grepl(pattern = "_tec", x = file_path, fixed = TRUE) if (found_plt) { plant_id_plt <- plant_id_plt + 1 @@ -447,19 +450,12 @@ gen_usms_xml2txt <- function( copy_status <- i_exec_status } - # Copying default files for outputs definition - # if they do not exist in usm_path - to_copy_idx <- !file.exists(file.path(usm_path, basename(out_files_path))) - - if (any(to_copy_idx)) { - out_copy_status <- all(file.copy( - from = out_files_path[to_copy_idx], - to = usm_path, - overwrite = TRUE - )) - } else { - out_copy_status <- TRUE - } + # Copying files for outputs definition + out_copy_status <- all(file.copy( + from = out_files_path, + to = usm_path, + overwrite = TRUE + )) # If only one usm, for exiting the loop if out_dir # is the workspace path, no need to copy files @@ -502,7 +498,12 @@ gen_usms_xml2txt <- function( # Copying lai files (whatever the lai forcing value is) lapply(flai_usms[[usm_name]], function(x) { - if (basename(x) == "null") { + if ( + basename(x) %in% + c("null", "defaut.lai") || + is.null(basename(x)) || + dir.exists(file.path(dirname(x), basename(x))) + ) { return(FALSE) } @@ -567,11 +568,11 @@ gen_usms_xml2txt <- function( # Returning a list of created directories and files copy status # for each directory ( FALSE if any files copy error ) - return(invisible(list( + invisible(list( usms_path = usms_path, files = basename(files_path), copy_status = global_copy_status, obs_copy_status = obs_copy_status, lai_copy_status = lai_copy_status - ))) + )) } diff --git a/R/get_dev_stages.R b/R/get_dev_stages.R index cb3a1126..fe783338 100644 --- a/R/get_dev_stages.R +++ b/R/get_dev_stages.R @@ -18,16 +18,34 @@ #' #' @export #' -get_dev_stages <- function(sim, - dev_vars = - c( - "iplts", "imbs", "ilets", "igers", - "idebdorms", "ifindorms", - "ilevs", "iamfs", "ilaxs", # "imontaisons", - "ilats", "iflos", "idrps", "inous", "idebdess", # "ilans", - "imats", "irecs" - ), - usm = NULL) { +#' @examples +#' \dontrun{ +#' simulations <- get_sim(workspace) +#' get_dev_stages(simulations, "iplts") +#' } +#' +get_dev_stages <- function( + sim, + dev_vars = c( + "iplts", + "imbs", + "ilets", + "igers", + "idebdorms", + "ifindorms", + "ilevs", + "iamfs", + "ilaxs", # "imontaisons", + "ilats", + "iflos", + "idrps", + "inous", + "idebdess", # "ilans", + "imats", + "irecs" + ), + usm = NULL +) { stopifnot( is.list(sim), !is.null(names(sim)) @@ -50,7 +68,7 @@ get_dev_stages <- function(sim, day = NA, date = "" ) - for (i in 1:nrow(out_usm)) { + for (i in seq_len(nrow(out_usm))) { dev_var <- dev_vars[i] if (!dev_var %in% colnames(dat)) { msg <- paste0("'", dev_var, "' not found") @@ -58,7 +76,8 @@ get_dev_stages <- function(sim, next } tmp <- table(dat[[dev_var]]) - if (length(tmp) == 1) { # ex. iplts + if (length(tmp) == 1) { + # ex. iplts out_usm$day[i] <- as.integer(names(tmp)[1]) } else if (length(tmp) == 2) { stopifnot(names(tmp)[1] == "0") @@ -66,11 +85,15 @@ get_dev_stages <- function(sim, } else { stop(paste0(dev_var, " has more than three values")) } - out_usm$date[i] <- as.character(compute_date_from_day(out_usm$day[i], firstYear)) + out_usm$date[i] <- as.character(compute_date_from_day( + out_usm$day[i], + firstYear + )) } out_usm$date <- as.Date(out_usm$date) out_usm$Date <- as.POSIXct(out_usm$date) # required to plot with CroPlotR - out_usm$var <- factor(out_usm$var, + out_usm$var <- factor( + out_usm$var, levels = out_usm$var[order(out_usm$day)], ordered = TRUE ) diff --git a/R/get_file.R b/R/get_file.R index 98589f93..573c37cd 100644 --- a/R/get_file.R +++ b/R/get_file.R @@ -261,7 +261,8 @@ get_file_ <- function( plant_names <- get_plant_name(workspace, usms_filepath, usms, javastics_path, verbose) } else { - # If we're using sub-directories, we consider the plant folder to be on the parent directory + # If we're using sub-directories, we consider the plant folder + # to be on the parent directory plant_names <- get_plant_name( unique(dirname(workspace)), @@ -291,7 +292,7 @@ get_file_ <- function( # Selecting using usm_name if (!is.null(usm_name)) { - usms <- intersect(usms, usm_name) + usms <- intersect(usm_name, usms) # Not any matching names if (!length(usms)) { return() @@ -330,7 +331,7 @@ get_file_ <- function( ) if (parallel) { cl <- setup_parallelism(length(inputs), cores) - on.exit(stopCluster(cl)) + on.exit(stopCluster(cl), add = TRUE) `%do_par_or_not%` <- foreach::`%dopar%` } else { `%do_par_or_not%` <- foreach::`%do%` @@ -380,6 +381,7 @@ get_file_ <- function( #' @return the obs or simulation output #' @keywords internal #' +#' #' @noRd #' get_file_one <- function( @@ -396,10 +398,15 @@ get_file_one <- function( p_name, verbose = verbose ) + # Conversion to data.frame + df <- data.frame(df) + # Removing useless columns and rows with all NA values + out <- df[ + rowSums(is.na(df)) < ncol(df), + colSums(is.na(df)) < nrow(df) + ] %>% + data.frame() - keep_cols <- df[, sapply(.SD, function(x) any(!is.na(x)))] - out <- df[, ..keep_cols] - out <- data.frame(out) # Filtering # Filtering Date on dates_list (format Posixct) if (!is.null(dates_list) && "Date" %in% names(out)) { diff --git a/R/get_files_list.R b/R/get_files_list.R index bddd97a9..fc2cd2be 100644 --- a/R/get_files_list.R +++ b/R/get_files_list.R @@ -162,15 +162,17 @@ get_files_list <- function( # checking if usms names exist # not any match usm_idx <- usms_full_list %in% usm - if (length(usm_idx) == 0) { + usm_in_usms_file <- usm %in% usms_full_list + if (!any(usm_in_usms_file)) { stop("No usm found in the usms.xml file") } # some usms not found - if (!length(usm) == sum(usm_idx)) { + if (!all(usm_in_usms_file)) { warning(paste( "There are missing usms in usms.xml file:\n", - paste(usms_full_list[!usm_idx], collapse = ", ") + paste(usm[!usm_in_usms_file], collapse = ", ") )) + usms_list <- usm[usm_in_usms_file] } else { # getting the usms wanted usms_list <- usms_full_list[usm_idx] @@ -199,11 +201,10 @@ get_files_list <- function( usm_files <- usm_files[node_names %in% file_type] # Keeping usms xml files, except plant files, obs, lai, null - # useless_files_idx <- grep("\\.obs|\\.lai|null", usm_files) - useless_files_idx <- grep("null", usm_files) + useless_files_idx <- usm_files %in% c("null", "defaut.lai", "") - if (length(useless_files_idx) > 0) { - usm_files <- usm_files[-useless_files_idx] + if (any(useless_files_idx)) { + usm_files <- usm_files[!useless_files_idx] } # adding usms.xml file if asked @@ -332,8 +333,10 @@ get_files_list <- function( pattern = "\\.[0-9]{4}$", usm_files_path ) - clim_files_path <- complete_climate_paths(usm_files_path[clim_files_idx]) - usm_files_path <- union(usm_files_path, clim_files_path) + if (length(clim_files_idx) > 0) { + clim_files_path <- complete_climate_paths(usm_files_path[clim_files_idx]) + usm_files_path <- c(usm_files_path[-clim_files_idx], clim_files_path) + } usm_files_exist <- file.exists(usm_files_path) # Adding the files lists diff --git a/R/get_param_txt.R b/R/get_param_txt.R index 67c221c5..f18e7fc5 100644 --- a/R/get_param_txt.R +++ b/R/get_param_txt.R @@ -83,7 +83,7 @@ get_param_txt <- function( stics_version = "latest", ... ) { - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) ini <- get_ini_txt( workspace = workspace, @@ -131,23 +131,11 @@ get_param_txt <- function( # NOT IN V10 several_fert <- several_thin <- is_pasture <- NULL tmp_names <- names(tmp) - several_fert <- ifelse( - "option_engrais_multiple" %in% - tmp_names && - tmp$option_engrais_multiple == 1, - TRUE, - FALSE - ) - several_thin <- ifelse( - "option_thinning" %in% tmp_names && tmp$option_thinning == 1, - TRUE, - FALSE - ) - is_pasture <- ifelse( - "option_pature" %in% tmp_names && tmp$option_pature == 1, - TRUE, - FALSE - ) + several_fert <- "option_engrais_multiple" %in% + tmp_names && + tmp$option_engrais_multiple == 1 + several_thin <- ("option_thinning" %in% tmp_names) && tmp$option_thinning == 1 + is_pasture <- "option_pature" %in% tmp_names && tmp$option_pature == 1 tec <- plant <- stats::setNames( vector(mode = "list", length = ini$nbplantes), @@ -203,7 +191,7 @@ get_param_txt <- function( variety[[i]], varieties[[i]] ) - if (any(is.na(variety))) { + if (anyNA(variety)) { cli::cli_alert_danger(alert_msg) return() } @@ -357,9 +345,9 @@ filter_param <- function( #' tmp <- get_tmp_txt( #' workspace = get_examples_path(file_type = "txt") #' ) -#' several_fert <- ifelse(tmp$option_engrais_multiple == 1, TRUE, FALSE) -#' several_thin <- ifelse(tmp$option_thinning == 1, TRUE, FALSE) -#' is_pasture <- ifelse(tmp$option_pature == 1, TRUE, FALSE) +#' several_fert <- tmp$option_engrais_multiple == 1 +#' several_thin <- tmp$option_thinning == 1 +#' is_pasture <- tmp$option_pature == 1 #' #' # Then, get the technical parameters: #' get_tec_txt( @@ -377,7 +365,7 @@ get_ini_txt <- function( stics_version, workspace = NULL ) { - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) filepath <- file if (!is.null(workspace)) { filepath <- file.path(workspace, file) @@ -567,7 +555,7 @@ get_tec_txt <- function( # breaking it. I think for example to a "version argument" because # the tec file is not generic. - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) par_lines <- readLines(filepath) itk <- vector(mode = "list", length = 0) @@ -814,7 +802,7 @@ val <- function(pval = list(index = 1, val = NA), values) { val_txt <- unlist(strsplit(trimws(values[pval$index - 1]), split = " ")) out_val <- suppressWarnings(as.numeric(val_txt)) - if (any(is.na(out_val))) { + if (anyNA(out_val)) { out_val <- val_txt } @@ -896,7 +884,7 @@ get_soil_txt <- function( stics_version, workspace = NULL ) { - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) filepath <- file if (!is.null(workspace)) { diff --git a/R/get_param_xml.R b/R/get_param_xml.R index ae49dab9..bb1612b3 100644 --- a/R/get_param_xml.R +++ b/R/get_param_xml.R @@ -76,7 +76,7 @@ get_param_xml <- function( is_duplicated_name <- xml_names %>% duplicated() xml_names[is_duplicated_name] <- paste0( "xml_", - which(is_duplicated_name == TRUE), + which(is_duplicated_name), "_", xml_names[is_duplicated_name] ) diff --git a/R/get_plant_name.R b/R/get_plant_name.R index 01d0510b..9851f1a0 100644 --- a/R/get_plant_name.R +++ b/R/get_plant_name.R @@ -193,7 +193,7 @@ get_plant_id <- function(usms_plant) { #' Getting xml plant files by usm from an usms.xml file #' #' @param usms_file usms.xml file path -#' @param usms usms names to get, if NULL all teh usms are taken into account +#' @param usms usms names to get, if NULL all the usms are taken into account #' #' @returns A named list with usm names containing plant files names #' @keywords internal diff --git a/R/get_report_results.R b/R/get_report_results.R index 4c3bd790..5febfb4c 100644 --- a/R/get_report_results.R +++ b/R/get_report_results.R @@ -59,7 +59,7 @@ get_report_results <- function( stringsAsFactors = FALSE ) - if (any(is.na(h))) { + if (anyNA(h)) { stop("Headers strings are not homogeneous in report file!") } } else { diff --git a/R/get_stics_versions_compat.R b/R/get_stics_versions_compat.R index 2d47995d..b9e3f4b2 100644 --- a/R/get_stics_versions_compat.R +++ b/R/get_stics_versions_compat.R @@ -24,37 +24,21 @@ #' #' get_stics_versions_compat <- function(version_index = NULL) { - # Getting versions list - ver_info <- get_versions_info() - versions_names <- ver_info$versions - # num_versions <- as.numeric(gsub(pattern = "^[V]", "", versions_names)) - num_versions <- get_version_num(versions_names) - - # Getting the latest version string - max_version <- max_versions_num(num_versions) - latest_version <- versions_names[ - unlist(lapply( - num_versions, - function(x) max_version == x - )) - ] - # List of versions strings and latest version string - versions <- list( - versions_list = versions_names, - latest_version = latest_version - ) + versions_list <- get_versions_list() + latest_version <- get_latest_version() + # returning a list of versions string if (is.null(version_index)) { - return(versions) + return(list(versions_list = versions_list, latest_version = latest_version)) } # getting relative backwards versions - nb_versions <- length(versions$versions_list) + nb_versions <- length(versions_list) - if (version_index < 0) { + if (version_index <= 0) { if (version_index >= -nb_versions + 1) { - return(versions$versions_list[nb_versions + version_index]) + return(versions_list[nb_versions + version_index]) } else { return(invisible()) } @@ -63,18 +47,36 @@ get_stics_versions_compat <- function(version_index = NULL) { # or absolute rank number if (version_index > 0) { if (version_index <= nb_versions) { - return(versions$versions_list[version_index]) + return(versions_list[version_index]) } else { return(invisible()) } } } +get_versions_list <- function(numeric = FALSE) { + # Getting versions list + versions_names <- get_versions_info()[["versions"]] + if (!numeric) { + return(versions_names) + } + return(get_version_num(versions_names)) +} + +get_latest_version <- function(numeric = FALSE) { + versions_list <- get_versions_list(numeric = TRUE) + latest <- max_version_num(versions_list) + if (numeric) { + return(latest) + } + paste0("V", as.character(latest)) +} + #' Checking the validity of a given version code #' #' @param stics_version An optional version name as listed in -#' get_stics_versions_compat() return +#' get_stics_versions_list() return #' #' @return A valid version string #' @@ -85,21 +87,18 @@ get_stics_versions_compat <- function(version_index = NULL) { #' @examples #' \dontrun{ #' -#' check_version_compat() +#' check_version() #' } -check_version_compat <- function(stics_version = "latest") { - versions <- get_stics_versions_compat() - +check_version <- function(stics_version = "latest") { if (stics_version == "latest") { - return(versions$latest_version) + stics_version <- get_latest_version() } - # fix the full version number - stics_version <- complete_version_num(stics_version) - - if (stics_version %in% versions$versions_list) { + if ( + get_version_num(stics_version) %in% + get_version_num(get_versions_list(), numeric = FALSE) + ) { return(stics_version) } - stop(stics_version, ": is an unknown version!") } @@ -186,8 +185,9 @@ get_versions_info <- function(stics_version = NULL, location = "install") { #' Getting version number from the version string #' -#' @param stics_version An optional version name as listed in -#' get_stics_versions_compat() return +#' @param stics_version A STICS character or numerical version +#' (may be simplified, i.e. 10.1 or "10.1" or full character version +#' "10.0.0" ) #' @param numeric logical, TRUE for numerical output format, #' FALSE for character output format #' @return version number (numeric or character) @@ -197,9 +197,9 @@ get_versions_info <- function(stics_version = NULL, location = "install") { #' #' @examples #' \dontrun{ -#' get_version_num() +#' get_version_num("V10.0") #' } -get_version_num <- function(stics_version = "latest", numeric = TRUE) { +get_version_num <- function(stics_version, numeric = TRUE) { if (length(stics_version) > 1) { versions_list <- unlist(lapply(stics_version, function(x) { get_version_num(x, numeric = numeric) @@ -208,38 +208,75 @@ get_version_num <- function(stics_version = "latest", numeric = TRUE) { } if (is.numeric(stics_version) && numeric) { - stics_version <- as.character(stics_version) + char_version <- as.character(stics_version) } - if (stics_version == "latest") { - stics_version <- get_stics_versions_compat()$latest_version + if (!inherits(stics_version, "svlist")) { + # fixing the version number to X.Y.Z from X, X.Y or from Vx, Vx.y, + char_version <- complete_version_num(stics_version) + + char_version <- gsub( + pattern = "([V | v]{1})([0-9\\.]*)", + x = char_version, + replacement = "\\2" + ) + # creating an object of type svlist + v <- semver::parse_version(char_version) + } else { + v <- stics_version + char_version <- as.character(v) } - # fixing the version number to X.Y.Z from X, X.Y or from Vx, Vx.y, - char_version <- complete_version_num(stics_version) - - char_version <- gsub( - pattern = "([V | v]{1})([0-9\\.]*)", - x = char_version, - replacement = "\\2" - ) - + # output is a version string if (!numeric) { return(char_version) } - # char_version <- gsub( - # pattern = "([0-9]*\\.[0-9]*)([\\.]{0,1})([0-9]{0,})", - # x = char_version, - # replacement = "\\1\\3" - # ) - # as.numeric(char_version) - v <- semver::parse_version(char_version) + # returning an object of class svlist with a char attribute attr(v, "version") <- char_version v } -max_versions_num <- function(versions_num) { +#' Get the major version number of a STICS version +#' +#' @param stics_version A svlist class object representing the STICS version +#' (i.e. Maj: 10 Min: 0 Pat: 0, got using get_version_num function) +#' +#' @keywords internal +#' @noRd +#' +get_major_version <- function(stics_version) { + if (is.character(stics_version)) { + stics_version <- get_version_num(stics_version) + } + unique( + unlist( + lapply( + stics_version, + function(x) get_version_parts(x, "major") + ) + ) + ) +} + + +get_version_parts <- function(stics_version, part) { + if (!part %in% get_version_parts_name()) { + return() + } + + ver <- try(semver::render_version(stics_version)[[part]]) + if (inherits(ver, "try-error")) { + return() + } + ver +} + +get_version_parts_name <- function() { + c("major", "minor", "patch", "prerelease", "build") +} + +max_version_num <- function(versions_num) { max_version <- versions_num[[1]] if (length(versions_num) < 2) { return(max_version) @@ -294,6 +331,8 @@ get_versions_file_name <- function() { complete_version_num <- function(stics_version) { + if (is.numeric(stics_version)) stics_version <- as.character(stics_version) + version_parts <- strsplit(stics_version, split = ".", fixed = TRUE)[[1]] version_parts_number <- length(version_parts) if (version_parts_number == 2) { @@ -301,10 +340,7 @@ complete_version_num <- function(stics_version) { } else if (version_parts_number == 1) { replic <- 2 } else { - replic <- 0 - } - if (replic == 0) { return(stics_version) } - stics_version <- paste(c(version_parts, rep("0", replic)), collapse = ".") + paste(c(version_parts, rep("0", replic)), collapse = ".") } diff --git a/R/get_xml_files_param_df.R b/R/get_xml_files_param_df.R index feff24c9..cb0bc577 100644 --- a/R/get_xml_files_param_df.R +++ b/R/get_xml_files_param_df.R @@ -101,7 +101,7 @@ get_xml_files_param_df <- function( } ) - return(dplyr::bind_rows(files_df, )) + return(dplyr::bind_rows(files_df)) } # Getting parameters file type diff --git a/R/get_xml_stics_version.R b/R/get_xml_stics_version.R index f96dfbfe..576d6352 100644 --- a/R/get_xml_stics_version.R +++ b/R/get_xml_stics_version.R @@ -39,5 +39,5 @@ get_xml_stics_version <- function(stics_version = "latest", xml_doc = NULL) { } # Getting version from compat csv file - return(check_version_compat(stics_version = stics_version)) + return(check_version(stics_version = stics_version)) } diff --git a/R/init_javastics_pref.R b/R/init_javastics_pref.R index a66ca03b..52f1be2b 100644 --- a/R/init_javastics_pref.R +++ b/R/init_javastics_pref.R @@ -21,7 +21,7 @@ init_javastics_pref <- function(javastics, overwrite = FALSE) { config_pref <- file.path(javastics, "config", "preferences.xml") - if (file.exists(config_pref) && overwrite == FALSE) { + if (file.exists(config_pref) && !overwrite) { cli::cli_alert_danger( paste0("Preference file already exists, try with {.code overwrite= TRUE}") ) diff --git a/R/is_stics_doc.R b/R/is_stics_doc.R index ff1f3cf6..108ee196 100644 --- a/R/is_stics_doc.R +++ b/R/is_stics_doc.R @@ -60,7 +60,7 @@ is_stics_doc <- function(xml_doc, doc_type = NULL, doc_types = NULL) { # doc types root_name <- XML::xmlName(XML::xmlRoot(xml_doc@content)) - if (!base::is.null(doc_type) && !doc_type == root_name) { + if (!base::is.null(doc_type) && doc_type != root_name) { return(FALSE) } diff --git a/R/javastics_cmd_util.R b/R/javastics_cmd_util.R index 27a834e5..ba08d6b9 100644 --- a/R/javastics_cmd_util.R +++ b/R/javastics_cmd_util.R @@ -202,7 +202,7 @@ get_java_version <- function(java_cmd = "java") { java_path <- system2("which", java_cmd, stdout = TRUE, stderr = TRUE) } else { # for Windows: splitting command if java_cmd is a full path - if (!basename(java_cmd) == java_cmd) { + if (basename(java_cmd) != java_cmd) { java_cmd <- c("/R", dirname(java_cmd), basename(java_cmd)) } diff --git a/R/manage_stics_versions.R b/R/manage_stics_versions.R index a7749989..b2e08154 100644 --- a/R/manage_stics_versions.R +++ b/R/manage_stics_versions.R @@ -92,7 +92,7 @@ download_csv_files <- function( ) } - err_idx <- unlist(lapply(file_path, function(x) class(x) == "try-error")) + err_idx <- unlist(lapply(file_path, function(x) inherits(x, "try-error"))) if (any(err_idx) && verbose) { warning("A least one file does not exist on the server !") diff --git a/R/read_params_table.R b/R/read_params_table.R index 022b38fa..7e8da860 100644 --- a/R/read_params_table.R +++ b/R/read_params_table.R @@ -128,7 +128,7 @@ replace_na <- function(in_df, replacement) { idx_col_has_na <- unlist( lapply(in_df, function(x) { - any(is.na(x)) + anyNA(x) }), use.names = FALSE ) diff --git a/R/rewrite_xml_files.R b/R/rewrite_xml_files.R index df690471..e09339d4 100644 --- a/R/rewrite_xml_files.R +++ b/R/rewrite_xml_files.R @@ -49,7 +49,7 @@ rewrite_usms_file <- function(usms_file, out_dir, usm = NULL) { # removing useless usm nodes nodes_to_remove <- unlist(lapply(usms_to_remove, function(x) { - xpath = paste0('//usm[@nom="', x, '"]') + xpath <- paste0('//usm[@nom="', x, '"]') XML::getNodeSet(usms_doc@content, xpath) })) @@ -124,7 +124,7 @@ rewrite_sols_file <- function(usms_file, sols_file, out_dir, usm = NULL) { # removing useless sol nodes nodes_to_remove <- unlist(lapply(sols_to_remove, function(x) { - xpath = paste0('//sol[@nom="', x, '"]') + xpath <- paste0('//sol[@nom="', x, '"]') XML::getNodeSet(sols_doc@content, xpath) })) diff --git a/R/set_param_txt.R b/R/set_param_txt.R index 51983745..08e34e36 100644 --- a/R/set_param_txt.R +++ b/R/set_param_txt.R @@ -68,7 +68,7 @@ set_param_txt <- function( value_id = NULL, stics_version = "latest" ) { - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) param <- gsub("P_", "", param) @@ -530,7 +530,7 @@ set_file_txt <- function( ) { param <- gsub("P_", "", param) - stics_version <- check_version_compat(stics_version = stics_version) + stics_version <- check_version(stics_version = stics_version) # access the function name from which set_file_txt was called type <- strsplit(deparse(sys.call(-1)), split = "\\(")[[1]][1] diff --git a/R/set_sols_param_xml.R b/R/set_sols_param_xml.R index 11abc7d7..660aa486 100644 --- a/R/set_sols_param_xml.R +++ b/R/set_sols_param_xml.R @@ -42,7 +42,7 @@ #' set_sols_param_xml <- function(xml_doc, sols_param, overwrite = FALSE) { - if (!"data.frame" %in% class(sols_param)) { + if (!inherits(sols_param, "data.frame")) { stop("sols_param do not belong to data.frame class/type") } diff --git a/R/set_usms_param_xml.R b/R/set_usms_param_xml.R index 21a8e564..0fb207b3 100644 --- a/R/set_usms_param_xml.R +++ b/R/set_usms_param_xml.R @@ -42,7 +42,7 @@ set_usms_param_xml <- function(xml_doc, usms_param = NULL, overwrite = FALSE) { if (!base::is.null(usms_param)) { - if (!("data.frame" %in% class(usms_param))) { + if (!inherits(usms_param, "data.frame")) { stop("usms_param does not belong to data.frame class/type") } # if any factor field type in data.frame diff --git a/R/stics_environment.R b/R/stics_environment.R index f1cb6e04..587cce02 100644 --- a/R/stics_environment.R +++ b/R/stics_environment.R @@ -392,7 +392,7 @@ stics_remove <- function(name = NULL, env_name = sticsenv_name()) { if (any(list_idx)) list_var_names <- name[list_idx] - if (any(!list_idx)) var_names <- name[!list_idx] + if (!all(list_idx)) var_names <- name[!list_idx] ret <- FALSE if (length(list_var_names)) { diff --git a/R/stics_files_utils.R b/R/stics_files_utils.R index cfc49cf4..fa12da1d 100644 --- a/R/stics_files_utils.R +++ b/R/stics_files_utils.R @@ -42,7 +42,7 @@ get_examples_path <- function( } # Validating the version string - stics_version <- check_version_compat(stics_version) + stics_version <- check_version(stics_version) # Checking if files available for the given version ver_data <- get_versions_info(stics_version = stics_version) @@ -100,7 +100,7 @@ get_examples_path <- function( return(invisible(examples_path)) } -# TODO: evaluate if useful ? +# TODO: evaluate if it is useful ? list_examples_files <- function( file_type, stics_version = "latest", @@ -122,7 +122,7 @@ list_examples_files <- function( get_examples_types <- function() { - file_types <- c( + c( "csv", "obs", "sti", @@ -133,7 +133,6 @@ get_examples_types <- function() { "xml_param", "xsl" ) - file_types } @@ -182,9 +181,9 @@ unzip_examples <- function(files_type, version_dir, overwrite = FALSE) { #' Copy mod, obs, lai, and weather data files #' @param workspace JavaSTICS xml workspace path +#' @param out_dir Output directory path #' @param file_type file type to copy among "mod", "obs", "clim" #' @param javastics JavsSTICS folder path (Optional) -#' @param out_dir Output directry path #' @param verbose logical, TRUE for displaying a copy message #' FALSE otherwise (default) #' @param overwrite Logical TRUE for overwriting files, @@ -197,12 +196,15 @@ unzip_examples <- function(files_type, version_dir, overwrite = FALSE) { #' workspace_files_copy <- function( workspace, + out_dir, file_type = NULL, javastics = NULL, - out_dir, overwrite = FALSE, verbose = FALSE ) { + # creating the output folder if it does not exist + if (!dir.exists(out_dir)) dir.create(out_dir) + # files types vector and associated regex file_types <- c("mod", "obs", "lai", "meteo") file_patt <- c("*.mod", "*.obs", "*.lai", "\\.[0-9]{4}$") @@ -214,9 +216,11 @@ workspace_files_copy <- function( ) # if file_type is not given, all files type are processed - if (is.null(file_type)) file_type <- file_types + if (is.null(file_type)) { + file_type <- file_types + } - # recurive call for a vector + # recursive call for a vector if (length(file_type) > 1) { stat_list <- vector(mode = "list", length(file_type)) for (i in seq_along(file_type)) { @@ -229,7 +233,7 @@ workspace_files_copy <- function( verbose = verbose ) } - invisible(stat_list) + return(invisible(stat_list)) } # Just in case if the func is used outside of the workspace upgrade @@ -240,7 +244,7 @@ workspace_files_copy <- function( return() } - # getting the file path list to copy + # Getting the files path list to copy patt <- file_patt[type_idx] files_list <- list.files( path = workspace, @@ -248,46 +252,57 @@ workspace_files_copy <- function( pattern = patt ) - # Just for the *.mod files, looking in javastics if not found in the workspace - # TODO: combine both if partial match - if (length(files_list) == 0) { - if (file_type == "mod") { - if (is.null(javastics)) { - warning(paste( - "No", - "mod", - "files in the source workspace", - "the Javastics path must be given", - "as input for copying files from it" - )) - } - - files_list <- list.files( + if ("mod" %in% file_type) { + if (!is.null(javastics)) { + javastics_files <- list.files( path = file.path( javastics, - "example", - full.names = TRUE, - pattern = patt - ) + "config" + ), + full.names = TRUE, + pattern = patt ) + } else { + javastics_files <- character(0) + } + + diff_files <- setdiff( + basename(javastics_files), + basename(files_list) + ) + + # completion of files list with javastics ones + if (length(diff_files) > 0) { + javastics_files <- + javastics_files[basename(javastics_files) %in% diff_files] + + files_list <- c(files_list, javastics_files) } } - # nothing to do + # Not any file neither in javastics nor in the workspace directories if (length(files_list) == 0) { - warning(paste0("Not any '", file_desc[type_idx], "' file to copy!")) + warning( + paste0("Not any '", file_desc[type_idx], "' file to copy!"), + " Neither in ", + javastics, + " nor in ", + workspace + ) return() } - # copy and treat of the copy return + # opy and treat of the copy return + dest_files <- file.path(out_dir, basename(files_list)) stat <- file.copy( from = files_list, - to = out_dir, + to = dest_files, overwrite = overwrite ) if (verbose) { message(paste("Copying", file_desc[type_idx], "files.\n")) + print(dest_files) } if (!all(stat)) { diff --git a/R/upgrade_ini_xml.R b/R/upgrade_ini_xml.R deleted file mode 100644 index 62d396d7..00000000 --- a/R/upgrade_ini_xml.R +++ /dev/null @@ -1,221 +0,0 @@ -#' Upgrading _ini.xml file(s) to a newer version -#' -#' @param file Path of an initialization (*_ini.xml) file or a vector of -#' @param out_dir Output directory path of the generated files -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' @param ... Additional input arguments -#' -#' @return None -#' -#' @export -#' -#' @details See SticsRFiles::get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_ini_xml( -#' file = file.path(dir_path, "file_ini.xml"), -#' out_dir = tempdir(), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_ini_xml <- function( - file, - out_dir, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE, - ... -) { - # for verifying output dir existence - check_dir <- TRUE - args <- list(...) - if ("check_dir" %in% names(args)) check_dir <- args$check_dir - if (check_dir) { - if (!dir.exists(out_dir)) dir.create(out_dir) - # for checking only once when multiple files are treated ! - check_dir <- FALSE - } - - # checking version - if (check_version) { - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file[1], - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version && is.null(param_gen_file)) { - stop("param_gen_file must be provided! ") - } - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file[1] - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - # Treating a files list - if (length(file) > 1) { - lapply(file, function(x) { - upgrade_ini_xml( - file = x, - out_dir = out_dir, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - param_gen_file = param_gen_file, - overwrite = overwrite, - check_dir = check_dir - ) - }) - return(invisible()) - } - - # Loading the old xml file - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Keeping old values - rm_names <- c("masec0", "QNplante0", "resperenne0") - old_values <- get_param_value(old_doc, rm_names) - - # Removing useless nodes - rm_nodes <- unlist(lapply(rm_names, function(x) { - unlist(get_nodes( - old_doc, - path = paste0("//", x) - )) - })) - lapply(rm_nodes, function(x) XML::removeNodes(x)) - - # Adding new option node - # including old nodes masec0,QNplante0,restemp0 - # (previously named resperennes0) - - str_1 <- paste0( - '' - - str <- paste0(str_1, str_2) - - new_node <- XML::xmlParseString(str, addFinalizer = TRUE) - - # Getting zrac0 node - prev_sibling <- unlist(get_nodes(old_doc, "//zrac0")) - - # Adding new node - lapply(prev_sibling, function(x) XML::addSibling(x, XML::xmlClone(new_node))) - - # setting values for restructured nodes - # resperennes0 became restemp0 - rm_names <- c("masec0", "QNplante0", "restemp0") - set_param_value( - old_doc, - param_name = as.list(rm_names), - param_value = old_values - ) - - if (is.null(get_nodes(old_doc, "//snow"))) { - # Adding snow node - new_node <- XML::xmlParseString( - " - 0.0 - 0.0 - 0.0 - 0.0 - ", - addFinalizer = TRUE - ) - - parent_node <- get_nodes(old_doc, path = "//initialisations")[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - } else { - # checking names an renaming them ! - old_names <- c("SDepth", "Sdry", "Swet", "ps") - new_names <- c("Sdepth0", "Sdry0", "Swet0", "ps0") - n <- get_nodes(old_doc, c(sprintf("//%s", old_names))) - - if (!is.null(n)) { - nodes_idx <- unlist(lapply(n, XML::xmlName)) %in% old_names - n <- n[nodes_idx] - new_names <- new_names[nodes_idx] - for (i in seq_along(length(n))) { - XML::xmlName(n[[i]]) <- new_names[i] - } - } - } - - # Renaming soil parameters - # hinit, NO3init, NH4init => hinitf, NO3initf, NH4initf - current_node <- get_nodes(old_doc, path = "//hinit")[[1]] - XML::xmlName(current_node) <- "Hinitf" - current_node <- get_nodes(old_doc, path = "//NO3init")[[1]] - XML::xmlName(current_node) <- "NO3initf" - current_node <- get_nodes(old_doc, path = "//NH4init")[[1]] - XML::xmlName(current_node) <- "NH4initf" - - # Writing to file _ini.xml - out_ini <- file.path(out_dir, basename(file)) - write_xml_file(old_doc, out_ini, overwrite) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_param_gen_xml.R b/R/upgrade_param_gen_xml.R deleted file mode 100644 index 0944f2b0..00000000 --- a/R/upgrade_param_gen_xml.R +++ /dev/null @@ -1,132 +0,0 @@ -#' Upgrading a param_gen.xml file to a newer version -#' -#' @param file Path of a param_gen.xml file -#' @param out_dir Output directory path of the generated file -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' -#' @return None -#' -#' @export -#' -#' @details See get_stics_versions_compat() for listing versions -#' -#' @examples -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_param_gen_xml( -#' file = file.path(dir_path, "param_gen.xml"), -#' out_dir = tempdir() -#' ) -upgrade_param_gen_xml <- function( - file, - out_dir, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE -) { - # Checking output directory - if (!dir.exists(out_dir)) dir.create(out_dir) - - if (check_version) { - min_version <- get_version_num("V9.1") - - # Extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version(file, stics_version) - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - } - - # Loading the old doc - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Nodes to remove - rm_names <- c("FINERT", "FMIN1", "FMIN2", "FMIN3", "khaut", "rayon", "concrr") - - rm_nodes <- lapply(rm_names, function(x) { - get_nodes( - old_doc, - path = paste0("//param[@nom='", x, "']") - ) - }) - lapply(rm_nodes, function(x) XML::removeNodes(x)) - - # Nodes to change - # 3.0 - # k_desat to kdesat - nodes_to_change <- get_nodes(old_doc, path = "//param[@nom='k_desat']") - if (!is.null(nodes_to_change)) { - set_attrs_values( - old_doc, - path = "//param[@nom='k_desat']", - attr_name = "nom", - values_list = "kdesat" - ) - } - - # Nodes to add - new_node <- XML::xmlParseString( - '0.0007 -0.02519 -0.015 -0.11200 -8.50000 -0.06000 -11.00000', - addFinalizer = TRUE - ) - - new_nodes <- XML::getNodeSet(new_node, path = "//param") - prev_sibling <- get_nodes(old_doc, "//param[@nom='TREFr']")[[1]] - - # For adding them in the right order - for (n in seq_along(new_nodes)) { - new <- XML::xmlClone(new_nodes[[n]]) - XML::addSibling(prev_sibling, new) - prev_sibling <- new - } - - # Writing to file param_gen.xml - write_xml_file( - old_doc, - file.path(out_dir, basename(file)), - overwrite = overwrite - ) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_param_newform_xml.R b/R/upgrade_param_newform_xml.R deleted file mode 100644 index 3c82bc53..00000000 --- a/R/upgrade_param_newform_xml.R +++ /dev/null @@ -1,267 +0,0 @@ -#' Upgrading a param_newform.xml file to a newer version -#' -#' @param file Path of a param_newform.xml file -#' @param out_dir Output directory path of the generated file -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. - -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' -#' @return None -#' -#' @export -#' -#' @details See SticsRFiles::get_stics_versions_compat() for listing versions -#' -#' @examples - -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_param_newform_xml( -#' file = file.path(dir_path,"param_newform.xml"), -#' out_dir = tempdir(), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -#' -upgrade_param_newform_xml <- function( - file, - out_dir, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE -) { - # TODO: eliminate when option will be reactivated later. - codemineral <- FALSE - - # Checking output directory - if (!dir.exists(out_dir)) dir.create(out_dir) - - if (check_version) { - min_version <- get_version_num("V9.1") - - # Extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file, - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version && is.null(param_gen_file)) { - stop("param_gen_file must be provided! ") - } - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - } - - # Loading the old doc - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # TODO : add from here if cond for calling specific version ranges updates - - # nodes to remove - form_names <- c( - "Specificities of cut crops", - "Activation of the module simulating tiller dynamics", - "Calculation of the maximal reserve compartment during reproductive stages", - "Calculation of the stem elongation stage for perenial grasslands", - "Moisture test for sowing decision", - paste0( - "automatic irrigations (associated with the options of automatic ", - "irrigation in tec file)" - ), - "calculation of the root death at cutting date for grasslands", - "option for several thinning ", - "option for several fertilizer type ", - # useless, options now removed - "residue incorporation" - ) - - nodes_to_rm <- lapply(form_names, function(x) { - get_nodes( - old_doc, - path = paste0("//formalisme[@nom='", x, "']") - ) - }) - - lapply(nodes_to_rm, function(x) if (!is.null(x)) XML::removeNodes(x)) - - # options to be removed - opt_names <- c( - "New mineralization of soil organic matter " - ) - - nodes_to_rm <- lapply(opt_names, function(x) { - get_nodes( - old_doc, - path = paste0("//option[@nom='", x, "']") - ) - }) - lapply(nodes_to_rm, function(x) XML::removeNodes(x)) - - # roots - new_node <- XML::xmlParseString( - ' - 1 - ', - addFinalizer = TRUE - ) - - prev_sibling <- get_nodes( - old_doc, - path = "//formalisme[@nom='Mineralization models']" - )[[1]] - XML::addSibling(prev_sibling, XML::xmlClone(new_node), after = TRUE) - - # options to add - # min, CsurN - - parent_node <- prev_sibling - - if (codemineral) { - new_node <- list( - XML::xmlParseString( - '', - addFinalizer = TRUE - ), - XML::xmlParseString( - '', - addFinalizer = TRUE - ) - ) - - lapply( - new_node, - function(x) XML::addChildren(parent_node, XML::xmlClone(x)) - ) - } else { - # if a version 10.0 file is retreated - # codemineral option must be retreived for the moment - - codemineral_node <- get_nodes( - old_doc, - path = paste0("//option[@nomParam='codemineral']") - ) - - if (!is.null(codemineral_node)) XML::removeNodes(codemineral_node) - - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - } - - # formalism modifications - # replacing formalisme option @nom, choix - set_attrs_values( - old_doc, - path = "//option[@nomParam='codecalferti']", - attr_name = "nom", - values_list = "automatic calculation of fertilisation" - ) - - set_attrs_values( - old_doc, - path = "//option[@nomParam='codetesthumN']", - attr_name = "nom", - values_list = paste0( - "automatic N fertilisation (1 = based on rainfall", - " 2 = based on soil water content)" - ) - ) - - set_attrs_values( - old_doc, - path = "//option[@nomParam='codetesthumN']", - attr_name = "choix", - values_list = "1" - ) - - # TODO: see what to do for the future v10 version ! - # --------------------------------------------------------------------------- - # ISOP specific option to temporarily add - new_node <- XML::xmlParseString( - ' - - ', - addFinalizer = TRUE - ) - - prev_sibling <- get_nodes( - old_doc, - path = "//formalisme[@nom='New Roots']" - )[[1]] - XML::addSibling(prev_sibling, XML::xmlClone(new_node)) - # --------------------------------------------------------------------------- - - # Writing to file param_newform.xml - write_xml_file( - old_doc, - file.path(out_dir, basename(file)), - overwrite = overwrite - ) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_plt_xml.R b/R/upgrade_plt_xml.R deleted file mode 100644 index 229ff9de..00000000 --- a/R/upgrade_plt_xml.R +++ /dev/null @@ -1,758 +0,0 @@ -#' Upgrading _plt.xml file(s) to a newer version -#' -#' @param file Path of an plant (*_plt.xml) file or a vector of -#' @param out_dir Output directory path of the generated files -#' @param param_newform_file Path of the param_newform.xml file corresponding -#' to the file version -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files to -#' (VX.Y format) -#' @param check_version Perform version consistency between `stics_version` -#' and the file version, for finally checking if an upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' @param ... Additional input arguments -#' -#' @return None -#' -#' @export -#' -#' @details See get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_plt_xml( -#' file = file.path(dir_path, "file_plt.xml"), -#' out_dir = tempdir(), -#' param_newform_file = file.path(dir_path, "param_newform.xml"), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_plt_xml <- function( - file, - out_dir, - param_newform_file, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE, - ... -) { - # For verifying output dir existence - check_dir <- TRUE - args_list <- list(...) - if ("check_dir" %in% names(args_list)) check_dir <- args_list$check_dir - if (check_dir) { - if (!dir.exists(out_dir)) dir.create(out_dir) - # for checking only once when multiple files are treated ! - check_dir <- FALSE - } - - # checking version - if (check_version) { - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file[1], - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version && is.null(param_gen_file)) { - stop("param_gen_file must be provided! ") - } - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file[1] - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - # Treating a files list - if (length(file) > 1) { - lapply(file, function(x) { - upgrade_plt_xml( - file = x, - out_dir = out_dir, - param_newform_file = param_newform_file, - param_gen_file = param_gen_file, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite, - check_dir = check_dir - ) - }) - return(invisible()) - } - - # local initialization, before loadinf RData - jvc_data <- NULL - - # Loading the old xml file - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Parameters to move to varietal parameters ---------------------------------- - # - # Coming from other formalisms than varietal ones - # Storing parameters values to set them to varietal ones - param_names_to_varietal <- c( - "phobase", - "phosat", - "stdordebour", - "bdens", - "hautbase", - "hautmax", - "dlaimax", - "dlaimaxbrut", - "innsen", - "rapsenturg", - "extin", - "ktrou", - "temin", - "teopt", - "slamax", - "tigefeuil", - "nbjgrain", - "nbgrmin", - "vitircarb", - "vitircarbT", - "stdrpnou", - "nbinflo", - "inflomax", - "pentinflores", - "vitpropsucre", - "vitprophuile", - "vitirazo", - "tgellev10", - "tgeljuv10", - "tgelveg10", - "psisto", - "psiturg", - "deshydbase" - ) - param_values_to_varietal <- get_param_value(old_doc, param_names_to_varietal) - - # nodes existing outside of 'cultivar parameters' formalism - nodes_to_rm <- lapply(param_names_to_varietal, function(x) { - get_nodes( - old_doc, - path = paste0( - "//formalisme[@nom!='cultivar parameters']//param[@nom='", - x, - "']" - ) - ) - }) - - # Checking nodes : all must be not NULL - nodes_null <- unlist(lapply(nodes_to_rm, is.null)) - if (any(nodes_null)) stop("missing nodes, not a v9.1 or 9.2 _plt.xml file") - - # Removing nodes - lapply(nodes_to_rm, function(x) XML::removeNodes(x)) - - # Already exist in varietal parameters - # Storing parameters values before applying new varietal parameters structure - param_names_keep <- c( - "stlevamf", - "stamflax", - "stlevdrp", - "stflodrp", - "stdrpdes", - "pgrainmaxi", - "adens", - "croirac", - "durvieF", - "jvc", - "sensiphot", - "stlaxsen", - "stsenlan", - "nbgrmax", - "stdrpmat", - "afruitpot", - "dureefruit" - ) - - param_values_keep <- get_param_value(old_doc, param_names_keep) - - # Checking values: list names == param_names_keep - if (!all(param_names_keep %in% names(param_values_keep))) { - stop("Missing values, , not a v9.1 or 9.2 _plt.xml file") - } - - # General plant parameters --------------------------------------------------- - # - # adding codephot_part - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - # test if the node exists - node_exists <- !is.null(get_nodes( - old_doc, - '//option[@nomParam="codephot_part"]' - )) - - if (node_exists) { - stop( - "codephot_part already exists, not a v9.1 or 9.2 _plt.xml file" - ) - } - - parent_node <- get_nodes( - old_doc, - '//option[@nomParam="codephot"]/choix[@code="1"]' - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - - # moving nbfeuilplant - node_to_move <- get_nodes(old_doc, path = "//param[@nom='nbfeuilplant']")[[1]] - prev_sibling <- get_nodes(old_doc, path = "//param[@nom='laiplantule']")[[1]] - - XML::addSibling(prev_sibling, node_to_move) - - # Recalculating irazomax - irazomax_calc <- calc_irazomax( - get_param_value(old_doc, "irmax")$irmax, - param_values_to_varietal$vitircarb, - param_values_to_varietal$vitirazo - ) - - new_node <- XML::xmlParseString( - paste0( - '', - irazomax_calc, - "" - ), - addFinalizer = TRUE - ) - - # adding irazomax node - parent_node <- get_nodes( - old_doc, - path = "//formalisme[@nom='yield formation']" - )[[1]] - XML::addChildren(parent_node, new_node, at = 0) - - message( - old_doc@name, - ": be aware that irazomax is a new parameter and its value (", - irazomax_calc, - ")\nis estimated using some other parameters values.\n", - paste0( - "But this value needs to be ajusted according to ", - "species and varieties " - ), - "\n" - ) - - # moving irmax - node_to_move <- get_nodes(old_doc, path = "//param[@nom='irmax']")[[1]] - parent_node <- get_nodes( - old_doc, - path = "//option[@nomParam='codeir']/choix[@code='1']" - )[[1]] - - XML::addChildren(parent_node, node_to_move) - - # add codedisrac option node - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - # before sibling - # ', - addFinalizer = TRUE - ) - - prev_sibling <- get_nodes(old_doc, "//*[@nomParam='codetemprac']")[[1]] - XML::addSibling(prev_sibling, XML::xmlClone(new_node)) - - # code_WangEngel - # in - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - "//*[@nomParam='codegdhdeb']/choix[@code='1']" - )[[1]] - XML::addChildren(parent_node, new_node) - - # Adding 2 option nodes - # in - # - new_nodes <- XML::xmlParseString( - ' - -', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - "//formalisme[@nom='partitioning of biomass in organs']" - )[[1]] - XML::addChildren(parent_node, kids = unlist(XML::xmlChildren(new_nodes))) - - # - # rayon - # - new_node <- XML::xmlParseString( - '0.02' - ) - prev_sibling <- get_nodes(old_doc, "//*[@nom='contrdamax']")[[1]] - XML::addSibling(prev_sibling, new_node) - - # adding 2 option nodes - new_nodes <- XML::xmlParseString( - ' - ', - addFinalizer = TRUE - ) - - parent_node <- get_nodes(old_doc, "//choix[@nom='true density']")[[1]] - - XML::addChildren(parent_node, kids = unlist(XML::xmlChildren(new_nodes))) - - # ----------------------------------------------------------- - # Update param values - # - # from param_gen.xml - # khaut, rayon - param_gen_values <- get_param_xml( - file = param_gen_file, - param = c("rayon", "khaut") - )[[1]] - set_param_value( - old_doc, - param_name = c("rayon", "khaut"), - param_value = param_gen_values - ) - - # from param_newform.xml - # coefracoupe(1), coefracoupe(2) -> coefracoupe - param_newform_values <- get_param_xml( - file = param_newform_file, - param = c("coefracoupe(1)", "coefracoupe(2)") - )[[1]] - - if (length(unique(unlist(param_newform_values))) > 1) { - stop( - "Multiple values of coefracoupe in param_gen.xml file" - ) - } - - set_param_value( - old_doc, - param_name = "coefracoupe", - param_value = param_newform_values[[1]] - ) - - # Updating other values than nodes values (i.e. nodes attributes values) - # - # Changing param min / max wrong attributes values - # hautbase => 0.1 - # 0 - nodes_to_change <- get_nodes(old_doc, path = "//param[@nom='hautbase']") - if (!is.null(nodes_to_change)) { - set_attrs_values( - old_doc, - path = "//param[@nom='hautbase']", - attr_name = "min", - values_list = "0.1" - ) - } - # - # Changing options' "choix", "nom" attribute values - # - # oui to yes, non to no - nodes_to_change <- get_nodes(old_doc, path = "//choix[@nom='oui']") - if (!is.null(nodes_to_change)) { - set_attrs_values( - old_doc, - path = "//choix[@nom='oui']", - attr_name = "nom", - values_list = "yes" - ) - } - nodes_to_change <- get_nodes(old_doc, path = "//choix[@nom='non']") - if (!is.null(nodes_to_change)) { - set_attrs_values( - old_doc, - path = "//choix[@nom='non']", - attr_name = "nom", - values_list = "no" - ) - } - - # Writing to file _plt.xml - out_plt <- file.path(out_dir, basename(file)) - write_xml_file(old_doc, out_plt, overwrite) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} - - -calc_irazomax <- function(irmax, vitircarb, vitirazo) { - irazomax <- (irmax / vitircarb) * vitirazo - - irazomax <- pmin(1., irazomax) - - if (is.nan(irazomax) || irazomax > 1) irazomax <- 1 - - return(round(irazomax, digits = 3)) -} diff --git a/R/upgrade_sols_xml.R b/R/upgrade_sols_xml.R deleted file mode 100644 index bb631b54..00000000 --- a/R/upgrade_sols_xml.R +++ /dev/null @@ -1,137 +0,0 @@ -#' Upgrading a sols.xml file to a newer version -#' -#' @param file Path of a sols.xml file -#' @param out_dir Output directory path of the generated file -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files to -#' (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' -#' @return None -#' -#' @export -#' -#' @details See SticsRFiles::get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_sols_xml( -#' file = file.path(dir_path, "sols.xml"), -#' out_dir = tempdir(), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_sols_xml <- function( - file, - out_dir, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE -) { - # hecking output directory - if (!dir.exists(out_dir)) dir.create(out_dir) - - # checking version - if (check_version) { - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file, - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version && is.null(param_gen_file)) { - stop("param_gen_file must be provided! ") - } - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - # Loading the old doc - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Checking if layer @nom are up to date (old @nom = horizon) - tableau_noms <- unlist(get_nodes(old_doc, "//tableau/@nom")) - - if (any(grep(pattern = "horizon", tableau_noms))) { - new_names <- unlist(lapply( - tableau_noms, - function(x) gsub(pattern = "horizon(.*)", x, replacement = "layer\\1") - )) - set_attrs_values(old_doc, "//tableau", "nom", new_names) - } - - # Nodes to add - new_node <- XML::xmlParseString( - '0.65000', - addFinalizer = TRUE - ) - # new_node <- XML::xmlParseString('0.65000', - # addFinalizer = TRUE) - - prev_sibling <- get_nodes(old_doc, "//param[@nom='CsurNsol']") - - # added for compatibility with old misspelled parameters - if (is.null(prev_sibling)) { - prev_sibling <- get_nodes(old_doc, "//param[@nom='csurNsol']") - # updating nom attribute content - set_attrs_values( - old_doc, - path = "//param[@nom='csurNsol']", - attr_name = "nom", - values_list = "CsurNsol" - ) - } - - for (n in seq_along(prev_sibling)) { - XML::addSibling(prev_sibling[[n]], XML::xmlClone(new_node)) - } - - # writing sols.xml file - write_xml_file(old_doc, file.path(out_dir, basename(file)), overwrite) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_sta_xml.R b/R/upgrade_sta_xml.R deleted file mode 100644 index b754bdb6..00000000 --- a/R/upgrade_sta_xml.R +++ /dev/null @@ -1,174 +0,0 @@ -#' Upgrading _sta.xml file(s) to a newer version -#' -#' @param file Path of a station (*_sta.xml) file or a vector of -#' @param out_dir Output directory path of the generated files -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' @param ... Additional input arguments -#' -#' @return None -#' -#' @export -#' -#' @details See SticsRFiles::get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_sta_xml( -#' file = file.path(dir_path, "file_sta.xml"), -#' out_dir = tempdir(), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_sta_xml <- function( - file, - out_dir, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE, - ... -) { - # for verifying output dir existence - check_dir <- TRUE - args <- list(...) - if ("check_dir" %in% names(args)) check_dir <- args$check_dir - if (check_dir) { - if (!dir.exists(out_dir)) dir.create(out_dir) - # for checking only once when multiple files are treated ! - check_dir <- FALSE - } - - # checking version - if (check_version) { - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file[1], - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file[1] - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - # Treating a files list - if (length(file) > 1) { - lapply(file, function(x) { - upgrade_sta_xml( - file = x, - param_gen_file = param_gen_file, - out_dir = out_dir, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite, - check_dir = check_dir - ) - }) - return(invisible()) - } - - if (!file.exists(file)) { - warning("Unknown file: ", file) - return(invisible()) - } - - # Loading xml file - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Getting old concrr value - concrr <- get_param_xml(param_gen_file, "concrr")$param_gen.xml$concrr - - # Getting new parameter - concrr_node <- XML::xmlParseString( - '0.02000', - addFinalizer = TRUE - ) - - # Getting the preceeding sibling node - prev_sibling <- get_nodes(old_doc, "//*[@nom='NH3ref']")[[1]] - XML::addSibling(node = prev_sibling, XML::xmlClone(concrr_node), after = TRUE) - - # Setting concrr value - set_param_value(old_doc, param_name = "concrr", param_value = concrr) - - # Adding snow formalism new node - new_node <- XML::xmlParseString( - ' - - ', - addFinalizer = TRUE - ) - - par_node <- get_nodes(old_doc, path = "/fichiersta")[[1]] - XML::addChildren(par_node, XML::xmlClone(new_node)) - - # Writing to file _sta.xml - write_xml_file( - old_doc, - file.path(out_dir, basename(file)), - overwrite = overwrite - ) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_tec_xml.R b/R/upgrade_tec_xml.R deleted file mode 100644 index e88fe8c1..00000000 --- a/R/upgrade_tec_xml.R +++ /dev/null @@ -1,528 +0,0 @@ -#' Upgrading _tec.xml file(s) to a newer version -#' -#' @param file Path of a crop management (*_tec.xml) file or a vector of -#' @param out_dir Output directory path of the generated files -#' @param param_newform_file Path of the param_newform.xml file corresponding -#' to the file version -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' @param ... Additional input arguments -#' -#' @return None -#' -#' @export -#' -#' @details See get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_tec_xml( -#' file = file.path(dir_path, "file_tec.xml"), -#' out_dir = tempdir(), -#' param_newform_file = file.path(dir_path, "param_newform.xml"), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_tec_xml <- function( - file, - out_dir, - param_newform_file, - param_gen_file, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE, - ... -) { - # for verifying output dir existence - check_dir <- TRUE - args <- list(...) - if ("check_dir" %in% names(args)) check_dir <- args$check_dir - if (check_dir) { - if (!dir.exists(out_dir)) dir.create(out_dir) - # for checking only once when multiple files are treated ! - check_dir <- FALSE - } - - # checking version - if (check_version) { - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file, - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version && is.null(param_gen_file)) { - stop("param_gen_file must be provided! ") - } - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file[1] - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - if (length(file) > 1) { - lapply(file, function(x) { - upgrade_tec_xml( - file = x, - param_newform_file = param_newform_file, - out_dir = out_dir, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - param_gen_file = param_gen_file, - overwrite = overwrite, - check_dir = check_dir - ) - }) - return(invisible()) - } - - # Loading the old xml file - old_doc <- xmldocument(file = file) - - # Setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # Getting values to keep - mscoupemini <- get_param_value(xml_doc = old_doc, param_name = "mscoupemini") - - # Keeping the value if any intervention node - engrais <- get_param_value(xml_doc = old_doc, param_name = "engrais") - - # Keeping the values if any intervention node - juleclair <- get_param_value(xml_doc = old_doc, param_name = "juleclair") - nbinfloecl <- get_param_value(xml_doc = old_doc, param_name = "nbinfloecl") - codeclaircie <- get_param_value( - xml_doc = old_doc, - param_name = "codeclaircie" - ) - - # Getting nodes to remove or move - param_names <- c( - "irecbutoir", - "ressuite", - "engrais", - "mscoupemini", - "juleclair", - "nbinfloecl" - ) - - nodes_to_change <- lapply(param_names, function(x) { - get_nodes( - old_doc, - path = paste0("//param[@nom='", x, "']") - ) - }) - # Removing useless nodes - lapply(nodes_to_change[3:6], function(x) XML::removeNodes(x)) - - # Nodes to be moved elsewhere: "irecbutoir", "ressuite" - nodes_to_move <- nodes_to_change[1:2] - - # tillage option - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - path = "//formalisme[@nom='soil tillage']" - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) - - # codedecisemis param - new_node <- XML::xmlParseString( - '3 -10 -0.75', - addFinalizer = TRUE - ) - - new_nodes <- XML::getNodeSet(new_node, path = "//param") - - prev_sibling <- get_nodes( - old_doc, - path = "//param[@nom='nbjseuiltempref']" - )[[1]] - # to keep the right order - for (n in seq_along(new_nodes)) { - new <- XML::xmlClone(new_nodes[[n]]) - XML::addSibling(prev_sibling, new) - prev_sibling <- new - } - - # option codedate_irrigauto - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - prev_sibling <- get_nodes( - old_doc, - path = "//param[@nom='doseirrigmin']" - )[[1]] - - XML::addSibling(prev_sibling, new_node) - - # intervention , engrais - # ----------------------- - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - path = "//formalisme[@nom='fertilisation']//ta_entete" - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - - XML::xmlAttrs(parent_node)["nb_colonnes"] <- "3" - - # If any intervention node - # adding engrais parameter and setting nb_colonnes as in ta_entete - parent_nodes <- get_nodes( - old_doc, - path = "//formalisme[@nom='fertilisation']//ta/intervention" - ) - if (!is.null(parent_nodes)) { - lapply( - parent_nodes, - function(x) { - XML::addChildren(x, XML::xmlClone(new_node)) - } - ) - set_param_value( - xml_doc = old_doc, - param_name = "engrais", - param_value = engrais - ) - lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "3") - } - - # param, option: harvest - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - path = "//formalisme[@nom='harvest']" - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) - - # Moving nodes do not require cloning them (I guess) - XML::addChildren(parent_node, kids = nodes_to_move, at = 0) - - # special techniques: codefauche - new_node <- list( - XML::xmlParseString( - '', - addFinalizer = TRUE - ), - XML::xmlParseString( - '', - addFinalizer = TRUE - ) - ) - - parent_node <- get_nodes( - old_doc, - path = "//option[@nomParam='codefauche']/choix" - )[[1]] - - # See if xmlClone is useful to apply ??? - XML::addChildren(parent_node, kids = new_node, at = 0) - - # special techniques: codemodfauche - ## Choix "calendar in days" - new_node <- XML::xmlParseString( - ' - - -', - addFinalizer = TRUE - ) - - new_nodes <- XML::getNodeSet(new_node, path = "//colonne") - - parent_node <- get_nodes( - old_doc, - path = "//choix[@nom='calendar in days']//ta_entete" - )[[1]] - # See if xmlClone is useful to apply ??? - XML::addChildren(parent_node, kids = new_nodes) - - XML::xmlAttrs(parent_node)["nb_colonnes"] <- "9" - - # If any intervention node - # add new param nodes: mscoupemini, tauxexportfauche, restit - # set kept value of engrais, mscoupemini - # set default values tauxexportfauche = 1 et restit = 2 - - parent_nodes <- get_nodes( - old_doc, - path = "//choix[@nom='calendar in days']//ta/intervention" - ) - if (!is.null(parent_nodes)) { - # See if xmlClone is useful to apply ??? - lapply(parent_nodes, function(x) XML::addChildren(x, new_nodes)) - set_param_value( - xml_doc = old_doc, - param_name = "engraiscoupe", - param_value = engrais - ) - set_param_value( - xml_doc = old_doc, - param_name = "mscoupemini", - param_value = mscoupemini - ) - set_param_value( - xml_doc = old_doc, - param_name = "tauxexportfauche", - param_value = 1 - ) - set_param_value( - xml_doc = old_doc, - param_name = "restit", - param_value = 2 - ) - lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "9") - } - - ## Choix "calendar in degree days" - parent_node <- get_nodes( - old_doc, - path = "//choix[@nom='calendar in degree days']//ta_entete" - )[[1]] - # See if xmlClone is useful to apply ??? - XML::addChildren(parent_node, kids = new_nodes) - - XML::xmlAttrs(parent_node)["nb_colonnes"] <- "9" - - # If any intervention node - # add new param nodes: mscoupemini, tauxexportfauche, restit - # set kept value of engrais, mscoupemini - # set default values tauxexportfauche = 1 et restit = 2 - parent_nodes <- get_nodes( - old_doc, - path = "//choix[@nom='calendar in degree days']//ta/intervention" - ) - if (!is.null(parent_nodes)) { - # See if xmlClone is useful to apply ??? - lapply(parent_nodes, function(x) XML::addChildren(x, new_nodes)) - set_param_value( - xml_doc = old_doc, - param_name = "engraiscoupe", - param_value = engrais - ) - set_param_value( - xml_doc = old_doc, - param_name = "mscoupemini", - param_value = mscoupemini - ) - set_param_value( - xml_doc = old_doc, - param_name = "tauxexportfauche", - param_value = 1 - ) - set_param_value(xml_doc = old_doc, param_name = "restit", param_value = 2) - lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "9") - } - - # special techniques: codeclaircie - new_node <- XML::xmlParseString( - ' - - - - -', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - path = "//option[@nomParam='codeclaircie']//choix[@code='2']" - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - - # adding intervention if choix codeclaircie == 2 (activation) - # Using values of juleclair, nbinfloecl got from the old parameters - if (codeclaircie == 2) { - # recup noeud ta_entete - op_node <- XML::xmlClone(get_nodes( - old_doc, - paste0("//ta_entete[colonne[@nom='", "juleclair", "']]") - )[[1]]) - XML::xmlName(op_node) <- "intervention" - parent_node <- get_nodes( - old_doc, - path = "//option[@nomParam='codeclaircie']//choix[@code='2']/ta" - )[[1]] - XML::addChildren(parent_node, op_node) - set_param_value( - xml_doc = old_doc, - param_name = "juleclair", - param_value = juleclair - ) - set_param_value( - xml_doc = old_doc, - param_name = "nbinfloecl", - param_value = nbinfloecl - ) - - XML::xmlAttrs(parent_node)["nb_interventions"] <- "1" - } - - # codejourdes - new_node <- XML::xmlParseString( - '', - addFinalizer = TRUE - ) - - parent_node <- get_nodes( - old_doc, - path = "//formalisme[@nom='special techniques']" - )[[1]] - - XML::addChildren(parent_node, XML::xmlClone(new_node)) - - # ---------------------------------------------------------------------------- - # Updating values with param_newform.xml ones - # - - param_names <- c( - "codetempfauche", - "nbj_pr_apres_semis", - "eau_mini_decisemis", - "humirac_decisemis", - "code_auto_profres(1)", - "resk(1)", - "resz(1)", - "P_codedate_irrigauto", - "datedeb_irrigauto", - "datefin_irrigauto", - "stage_start_irrigauto", - "stage_end_irrigauto" - ) - old_val <- get_param_xml(param_newform_file, param = param_names)[[basename( - param_newform_file - )]] - - # writing to file _tec.xml - out_tec <- file.path(out_dir, basename(file)) - write_xml_file(old_doc, out_tec, overwrite) - - # setting new values - param_names <- c( - "codetempfauche", - "nbj_pr_apres_semis", - "eau_mini_decisemis", - "humirac_decisemis", - "code_auto_profres", - "resk", - "resz", - "codedate_irrigauto", - "datedeb_irrigauto", - "datefin_irrigauto", - "stage_start_irrigauto", - "stage_end_irrigauto" - ) - set_param_xml( - file = out_tec, - param = param_names, - values = old_val, - overwrite = TRUE - ) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_usms_xml.R b/R/upgrade_usms_xml.R deleted file mode 100644 index 2671eba5..00000000 --- a/R/upgrade_usms_xml.R +++ /dev/null @@ -1,138 +0,0 @@ -#' Upgrading a usms.xml file to a newer version -#' -#' @param file Path of a usms.xml file -#' @param out_dir Output directory path of the generated file -#' @param param_gen_file Path of the param_gen.xml file corresponding -#' to the file version -#' @param obs_dir Directory path of the observation data files -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param check_version Perform version consistency with in stics_version input -#' with the file version and finally checking if the upgrade is possible -#' allowed to the target_version. If TRUE, param_gen_file is mandatory. -#' @param overwrite logical (optional), -#' TRUE for overwriting file if it exists, FALSE otherwise -#' -#' @return None -#' -#' @export -#' -#' @details See get_stics_versions_compat() for listing versions -#' -#' @examples -#' -#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") -#' -#' upgrade_usms_xml( -#' file = file.path(dir_path, "usms.xml"), -#' out_dir = tempdir(), -#' param_gen_file = file.path(dir_path, "param_gen.xml") -#' ) -#' -upgrade_usms_xml <- function( - file, - out_dir, - param_gen_file, - obs_dir = NULL, - stics_version = "V9.2", - target_version = "V10.0", - check_version = TRUE, - overwrite = FALSE -) { - # Checking output directory - if (!dir.exists(out_dir)) dir.create(out_dir) - - # checking version - if (check_version) { - if (is.null(param_gen_file)) stop("param_gen_file must be provided! ") - - min_version <- get_version_num("V9.1") - - # extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version( - file, - stics_version, - param_gen_file = param_gen_file - ) - - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - file - ) - } - - # Compatibility checks between version and update to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - # for checking only once when multiple files are treated ! - check_version <- FALSE - } - - if (is.null(obs_dir)) obs_dir <- dirname(file) - - # loading the old doc - old_doc <- xmldocument(file = file) - - # setting file STICS version - set_xml_file_version( - old_doc, - new_version = target_version - ) - - # checking if fobs exist - obs_nodes <- get_nodes(old_doc, "//fobs") - - # TODO: detect if fobs exist and evaluate - # where to add fobs fields !!!!! - # default behavior: no existing fobs fields - if (is.null(obs_nodes)) { - new_node <- XML::xmlParseString("null", addFinalizer = TRUE) - - parent_node <- get_nodes(old_doc, "//plante") - - lapply( - parent_node, - function(x) XML::addChildren(x, XML::xmlClone(new_node)) - ) - } - - # Usms names - usms_names <- get_attrs_values(old_doc, "//usm", "nom") - - # existing obs files - # intercrops usms are not taken into account in that case - obs_names <- paste0(usms_names, ".obs") - obs_exist <- file.exists(file.path(obs_dir, obs_names)) - obs_val <- rep("null", length(usms_names)) - obs_val[obs_exist] <- obs_names[obs_exist] - - # Setting obs files names into fobs for existing files - set_param_value( - old_doc, - param_name = "fobs", - param_value = obs_val, - parent_name = "plante", - parent_sel_attr = "1" - ) - - # writing file - write_xml_file(old_doc, file.path(out_dir, basename(file)), overwrite) - - XML::free(old_doc@content) - invisible(gc(verbose = FALSE)) -} diff --git a/R/upgrade_v10_v11.R b/R/upgrade_v10_v11.R new file mode 100644 index 00000000..3fd9a2cc --- /dev/null +++ b/R/upgrade_v10_v11.R @@ -0,0 +1,883 @@ +#' Upgrade _tec.xml file(s) from version 10 to 11 +#' +#' @param file xml technical file path or a vector of +#' @param out_dir Output directory path +# @param code_strip Integer indicating if the crop is sown in a strip design: 1 for yes, 2 for no (default) +# @param nrow How many rows in the strip design if `code_strip` is 1 (default 1) +#' @param ... additional argument(s) to pass +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_tec_xml_10_11( +#' file = file.path(dir_path, "file_tec.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_tec_xml_10_11 <- function( + file, + out_dir, + ..., + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # dot args management ... + dots_args <- list(...) + dots_args_names <- names(dots_args) + + # Setting optional args default values + code_strip <- 2 + nrow <- 1 + if ("code_strip" %in% dots_args_names) { + code_strip <- dots_args$code_strip + } + if ("nrow" %in% dots_args_names) { + nrow <- dots_args$nrow + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_tec_xml_10_11( + file = x, + out_dir = out_dir, + code_strip = code_strip, + nrow = nrow, + overwrite = overwrite + ) + }) + return(invisible()) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + format <- get_attrs_values( + xml_doc, + path = "//param[@nom='stage_start_irrigauto']", + attr_list = "format" + ) + + if (format != "character") { + set_attrs_values( + xml_doc, + path = "//param[@nom='stage_start_irrigauto']", + attr_name = "format", + values_list = "character" + ) + remove_attrs( + xml_doc, + path = "//param[@nom='stage_start_irrigauto']", + attr_names = c("min", "max") + ) + } + + format <- get_attrs_values( + xml_doc, + path = "//param[@nom='stage_end_irrigauto']", + attr_list = "format" + ) + + if (format != "character") { + set_attrs_values( + xml_doc, + path = "//param[@nom='stage_end_irrigauto']", + attr_name = "format", + values_list = "character" + ) + remove_attrs( + xml_doc, + path = "//param[@nom='stage_end_irrigauto']", + attr_names = c("min", "max") + ) + } + + set_param_value( + xml_doc, + param_name = list("stage_start_irrigauto", "stage_end_irrigauto"), + param_value = list("null", "null") + ) + + # code_strip is either NULL, 1 or 2, and in case it is null, we set it to 2 (no) + if (is.null(code_strip)) { + code_strip <- 2 + } else if (code_strip %in% c(1, 2)) { + code_strip <- as.integer(code_strip) + } else { + stop("code_strip must be either 1 (yes) or 2 (no)") + } + + # nrow must be a positive integer + nrow <- as.integer(nrow) + if (nrow < 1) { + stop("nrow must be a positive integer") + } + + strip_node <- XML::xmlParseString( + paste0( + '' + ), + addFinalizer = FALSE + ) + + prev_node <- get_nodes(xml_doc, path = "//param[@nom='orientrang']") + + XML::addSibling(prev_node[[1]], XML::xmlClone(strip_node)) + + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade _plt.xml file(s) from version 10 to 11 +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +# @param stage_const_height Plant height computation parameter (optional) +# @param elongation Plant height computation parameter (optional) +# @param nw_height Plant height computation parameter (optional) +# @param code_shape Plant height computation parameter (optional) +# @param haut_dev_x0 Plant height computation parameter (optional) +# @param haut_dev_k Plant height computation parameter (optional) +#' @param ... additional argument(s) to pass +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' @param warning Logical for rising warnings, FALSE otherwise +#' +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_plt_xml_10_11( +#' file = file.path(dir_path, "file_plt.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_plt_xml_10_11 <- function( + file, + out_dir, + # stage_const_height = NULL, + # elongation = NULL, + # nw_height = NULL, + # code_shape = NULL, + # haut_dev_x0 = NULL, + # haut_dev_k = NULL, + ..., + overwrite = FALSE, + warning = TRUE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # dot args management ... + dots_args <- list(...) + dots_args_names <- names(dots_args) + + # Setting optional args default values + stage_const_height <- NULL + elongation <- NULL + nw_height <- NULL + code_shape <- NULL + haut_dev_x0 <- NULL + haut_dev_k <- NULL + if ("stage_const_height" %in% dots_args_names) { + stage_const_height <- dots_args$stage_const_height + } + if ("elongation" %in% dots_args_names) { + elongation <- dots_args$elongation + } + if ("nw_height" %in% dots_args_names) { + nw_height <- dots_args$nw_height + } + if ("code_shape" %in% dots_args_names) { + code_shape <- dots_args$code_shape + } + if ("haut_dev_x0" %in% dots_args_names) { + haut_dev_x0 <- dots_args$haut_dev_x0 + } + if ("haut_dev_k" %in% dots_args_names) { + haut_dev_k <- dots_args$haut_dev_k + } + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_plt_xml_10_11( + file = x, + out_dir = out_dir, + stage_const_height = stage_const_height, + elongation = elongation, + nw_height = nw_height, + code_shape = code_shape, + haut_dev_x0 = haut_dev_x0, + haut_dev_k = haut_dev_k, + overwrite = overwrite, + warning = warning + ) + }) + return(invisible()) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + height_node <- XML::xmlParseString( + ' + no + 1.0 + 0.0 + + ', + addFinalizer = TRUE + ) + + leaves_node <- get_nodes(xml_doc, path = "//formalisme[@nom='leaves']") + + XML::addSibling(leaves_node[[1]], XML::xmlClone(height_node)) + + # Set values to added parameters if given as func inputs + # using + plant <- get_param_value( + xml_doc = xml_doc, + param_name = "codeplante" + )$codeplante + param <- get_plt_IC_param(crop = plant, warning = warning) + + if (!is.null(stage_const_height)) { + param$stage_const_height <- stage_const_height + } + if (!is.null(elongation)) { + param$elongation <- elongation + } + if (!is.null(nw_height)) { + param$nw_height <- nw_height + } + if (!is.null(code_shape)) { + param$code_shape <- code_shape + } + if (!is.null(haut_dev_x0)) { + param$haut_dev_x0 <- haut_dev_x0 + } + if (!is.null(haut_dev_k)) { + param$haut_dev_k <- haut_dev_k + } + + lapply(names(param), function(x) { + if (!is.null(param[[x]])) set_param_value(xml_doc, x, param[[x]]) + }) + + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Get crop new parameters for STICS V11 +#' +#' @param crop Stics crop code among code list +#' (to get crops codes get_plt_IC_param() ) +#' @param message Logical for rising warnings, FALSE otherwise +#' +#' @return A named list of V11 new plant parameters values +#' +#' @keywords internal +#' +#' @noRd +#' +#' @examples +#' \dontrun{ +#' # get plant codes +#' get_plt_IC_param() +#' # get default parameters values +#' get_plt_IC_param(NULL) +#' # get parameters values for poi +#' get_plt_IC_param("poi") +#' } +#' +get_plt_IC_param <- function(crop, warning = TRUE) { + crops_param <- plt_IC_param_list() + crop_names <- names(crops_param) + + if (missing(crop)) { + if (warning) { + warning( + "A crop name is mandatory see above list:\n", + sprintf(fmt = "%s, ", crop_names) + ) + } + return(invisible()) + } + + if (is.null(crop)) { + crop <- "default" + } + + name <- tolower(crop) + + if (!name %in% crop_names) { + name <- "default" + if (warning) { + val <- unlist(crops_param[[name]]) + val_name <- names(val) + warning( + "Unknown crop code name: ", + crop, + # crop, "\n See above list: \n", + # sprintf("%s, ", crop_names), + # "\n", + " Using default parameters values!\n", + paste(sprintf("%s: %s", val_name, val), collapse = ", ") + ) + } + } + + return(crops_param[[name]]) +} + + +#' New parameters values for V11 for +#' several crops +#' +#' @return a named list with crop names and parameters values for each crop +#' +#' @keywords internal +#' @noRd +#' +plt_IC_param_list <- function() { + # pea, wheat, fababean, barley + param <- list() + + param$default$stage_const_height <- "no" + param$default$elongation <- 1.0 + param$default$nw_height <- 0.0 + param$default$code_shape <- 1 + param$default$haut_dev_x0 <- 0.0 + param$default$haut_dev_k <- 0.0 + + param$poi$stage_const_height <- "mat" + param$poi$elongation <- 1.0 + param$poi$nw_height <- 0.0 + param$poi$code_shape <- 1 + param$poi$haut_dev_x0 <- 685.395497474724 + param$poi$haut_dev_k <- 0.0113605979397447 + + param$ble$stage_const_height <- "no" + param$ble$elongation <- 1.0 + param$ble$nw_height <- 0.0 + param$ble$code_shape <- 1 + param$ble$haut_dev_x0 <- 886.219548558914 + param$ble$haut_dev_k <- 0.00538369741357949 + + param$faba$stage_const_height <- "no" + param$faba$elongation <- 1.0 + param$faba$nw_height <- 0.45 + param$faba$code_shape <- 1 + param$faba$haut_dev_x0 <- 998.494003649625 + param$faba$haut_dev_k <- 0.00726768251150451 + + param$esc$stage_const_height <- "no" + param$esc$elongation <- 1.0 + param$esc$nw_height <- 0.0 + param$esc$code_shape <- 1 + param$esc$haut_dev_x0 <- 714.811280801783 + param$esc$haut_dev_k <- 0.00891413714283287 + + param$tou$stage_const_height <- "no" + param$tou$elongation <- 1.0 + param$tou$nw_height <- 0.0 + param$tou$code_shape <- 1 + param$tou$haut_dev_x0 <- 645.895914862214 + param$tou$haut_dev_k <- 0.0105505841187171 + + param$soj$stage_const_height <- "no" + param$soj$elongation <- 1.0 + param$soj$nw_height <- 0.0 + param$soj$code_shape <- 1 + param$soj$haut_dev_x0 <- 645.651309418313 + param$soj$haut_dev_k <- 0.00665713018807634 + + return(param) +} + +#' Upgrade _sta.xml file(s) from STICS version 10 to 11 +#' +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_sta_xml_10_11( +#' file = file.path(dir_path, "file_sta.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_sta_xml_10_11 <- function(file, out_dir, overwrite = FALSE) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_sta_xml_10_11( + file = x, + out_dir = out_dir, + overwrite = overwrite + ) + }) + return(invisible()) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # fix old nom attributes + codeetp <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + # get current values + par_values <- get_param_value(xml_doc, param_name = c("codeetp", "alphapt")) + + # replace codetp node with the previous one + codetp_node_to_rm <- get_nodes( + xml_doc, + path = '//option[@nomParam="codeetp"]' + ) + XML::removeNodes(codetp_node_to_rm[[1]]) + + par_node <- get_nodes(xml_doc, path = '//formalisme[@nom="climate"]') + + XML::addChildren(par_node[[1]], XML::xmlClone(codeetp), at = 0) + + # set values to current values + set_param_value( + xml_doc, + param_name = c("codeetp", "alphapt"), + param_value = par_values + ) + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Upgrade _ini.xml file(s) from STICS version 10 to 11 +#' +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_ini_xml_10_11( +#' file = file.path(dir_path, "file_ini.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_ini_xml_10_11 <- function(file, out_dir, overwrite = FALSE) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_ini_xml_10_11( + file = x, + out_dir = out_dir, + overwrite = overwrite + ) + }) + return(invisible()) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a param_gen.xml file from STICS version 10 to 11 +#' +#' @param file xml param_gen file path or a vector of +#' @param out_dir Output directory path +# @param hauteur_threshold new parameter for V11 +# @param par_to_net new parameter for V11 +#' @param ... additional argument(s) to pass +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_param_gen_xml_10_11( +#' file = file.path(dir_path, "param_gen.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_param_gen_xml_10_11 <- function( + file, + out_dir, + # hauteur_threshold = NULL, + # par_to_net = NULL, + ..., + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # dot args management ... + dots_args <- list(...) + dots_args_names <- names(dots_args) + + # Setting optional args default values + hauteur_threshold <- NULL + par_to_net <- NULL + + if ("hauteur_threshold" %in% dots_args_names) { + hauteur_threshold <- dots_args$hauteur_threshold + } + if ("par_to_net" %in% dots_args_names) { + par_to_net <- dots_args$par_to_net + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # after + IC_form_node <- XML::xmlParseString( + ' + 0.2 + ', + addFinalizer = TRUE + ) + sim_options_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='Simulation options']" + ) + XML::addSibling(sim_options_node[[1]], XML::xmlClone(IC_form_node)) + + # after 0.48000 + par2net_node <- XML::xmlParseString( + '0.83', + addFinalizer = TRUE + ) + + parsurg_node <- get_nodes(xml_doc, path = "//param[@nom='parsurrg']") + XML::addSibling(parsurg_node[[1]], XML::xmlClone(par2net_node)) + + # Set values to added parameters if given as func inputs + if (!is.null(hauteur_threshold)) { + set_param_value(xml_doc, "hauteur_threshold", hauteur_threshold) + } + if (!is.null(par_to_net)) set_param_value(xml_doc, "par_to_net", par_to_net) + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a param_newform.xml file from STICS version 10 to 11 +#' +#' @param file xml param_newform file path or a vector of +#' @param out_dir Output directory path +#' @param ... additional argument(s) to pass +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +# @param use_patho Logical TRUE if code_patho is to be added to the +# param_newform.xml file, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_param_newform_xml_10_11( +#' file = file.path(dir_path, "param_newform.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_param_newform_xml_10_11 <- function( + file, + out_dir, + ..., + overwrite = FALSE # , + # use_patho = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # dot args management ... + dots_args <- list(...) + dots_args_names <- names(dots_args) + + # Setting optional args default values + use_patho <- FALSE + + if ("use_patho" %in% dots_args_names) { + use_patho <- dots_args$use_patho + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # renaming humirac parameter to code_humirac + humirac_node <- get_nodes( + xml_doc, + path = "//formalisme/param[@nom='humirac']" + ) + + old_value <- get_param_value( + xml_doc = xml_doc, + param_name = "humirac" + )$humirac + + XML::removeNodes(humirac_node) + + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='New Roots']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) + + set_param_value( + xml_doc = xml_doc, + param_name = "code_humirac", + param_value = old_value + ) + + # adding parameters related to pathogen use, if specified in the + # function inputs + if (use_patho) { + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='coupling with pathogen models']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) + } + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Upgrade a sols.xml file from STICS version 10 to 11 +#' +#' @param file xml sols file path +#' @param out_dir Output directory path +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_sols_xml_10_11( +#' file = file.path(dir_path, "sols.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_sols_xml_10_11 <- function(file, out_dir, overwrite = FALSE) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a usms.xml file from STICS version 10 to 11 +#' +#' @param file xml usms file path +#' @param out_dir Output directory path +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @keywords internal +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_usms_xml_10_11( +#' file = file.path(dir_path, "usms.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_usms_xml_10_11 <- function(file, out_dir, overwrite = FALSE) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + xml_doc <- xmldocument(file) + + # set_version + check_and_upgrade_xml_version( + xml_doc, + from_version = "V10.1.1", + target_version = "V11.0" + ) + + # write the file + out_file <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_file, overwrite = overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} diff --git a/R/upgrade_v9_v10.R b/R/upgrade_v9_v10.R new file mode 100644 index 00000000..15c55242 --- /dev/null +++ b/R/upgrade_v9_v10.R @@ -0,0 +1,1948 @@ +#' Upgrade _tec.xml file(s) from STICS version 9 to 10 +#' +#' @param file Path of a crop management (*_tec.xml) file or a vector of +#' @param out_dir Output directory path of the generated files +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param param_newform_file Path of the param_newform.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_tec_xml_9_10( +#' file = file.path(dir_path, "file_tec.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml"), +#' param_newform_file = file.path(dir_path, "param_newform.xml") +#' ) +#' } +upgrade_tec_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + param_newform_file, + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_tec_xml_9_10( + file = x, + out_dir = out_dir, + param_gen_file = param_gen_file, + param_newform_file = param_newform_file, + overwrite = overwrite + ) + }) + return(invisible()) + } + + # Loading the old xml file + xml_doc <- xmldocument(file = file) + + # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10" + ) + + # Getting values to keep + mscoupemini <- get_param_value(xml_doc = xml_doc, param_name = "mscoupemini") + + # Keeping the value if any intervention node + engrais <- get_param_value(xml_doc = xml_doc, param_name = "engrais") + + # Keeping the values if any intervention node + juleclair <- get_param_value(xml_doc = xml_doc, param_name = "juleclair") + nbinfloecl <- get_param_value(xml_doc = xml_doc, param_name = "nbinfloecl") + codeclaircie <- get_param_value( + xml_doc = xml_doc, + param_name = "codeclaircie" + ) + + # Getting nodes to remove or move + param_names <- c( + "irecbutoir", + "ressuite", + "engrais", + "mscoupemini", + "juleclair", + "nbinfloecl" + ) + + nodes_to_change <- lapply(param_names, function(x) { + get_nodes( + xml_doc, + path = paste0("//param[@nom='", x, "']") + ) + }) + # Removing useless nodes + lapply(nodes_to_change[3:6], function(x) XML::removeNodes(x)) + + # Nodes to be moved elsewhere: "irecbutoir", "ressuite" + nodes_to_move <- nodes_to_change[1:2] + + # tillage option + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='soil tillage']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) + + # codedecisemis param + new_node <- XML::xmlParseString( + '3 +10 +0.75', + addFinalizer = TRUE + ) + + new_nodes <- XML::getNodeSet(new_node, path = "//param") + + prev_sibling <- get_nodes( + xml_doc, + path = "//param[@nom='nbjseuiltempref']" + )[[1]] + # to keep the right order + for (n in seq_along(new_nodes)) { + new <- XML::xmlClone(new_nodes[[n]]) + XML::addSibling(prev_sibling, new) + prev_sibling <- new + } + + # option codedate_irrigauto + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + prev_sibling <- get_nodes( + xml_doc, + path = "//param[@nom='doseirrigmin']" + )[[1]] + + XML::addSibling(prev_sibling, new_node) + + # intervention , engrais + # ----------------------- + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='fertilisation']//ta_entete" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + + XML::xmlAttrs(parent_node)["nb_colonnes"] <- "3" + + # If any intervention node + # adding engrais parameter and setting nb_colonnes as in ta_entete + parent_nodes <- get_nodes( + xml_doc, + path = "//formalisme[@nom='fertilisation']//ta/intervention" + ) + if (!is.null(parent_nodes)) { + lapply( + parent_nodes, + function(x) { + XML::addChildren(x, XML::xmlClone(new_node)) + } + ) + set_param_value( + xml_doc = xml_doc, + param_name = "engrais", + param_value = engrais + ) + lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "3") + } + + # param, option: harvest + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='harvest']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node), at = 0) + + # Moving nodes do not require cloning them (I guess) + XML::addChildren(parent_node, kids = nodes_to_move, at = 0) + + # special techniques: codefauche + new_node <- list( + XML::xmlParseString( + '', + addFinalizer = TRUE + ), + XML::xmlParseString( + '', + addFinalizer = TRUE + ) + ) + + parent_node <- get_nodes( + xml_doc, + path = "//option[@nomParam='codefauche']/choix" + )[[1]] + + # See if xmlClone is useful to apply ??? + XML::addChildren(parent_node, kids = new_node, at = 0) + + # special techniques: codemodfauche + ## Choix "calendar in days" + new_node <- XML::xmlParseString( + ' + + +', + addFinalizer = TRUE + ) + + new_nodes <- XML::getNodeSet(new_node, path = "//colonne") + + parent_node <- get_nodes( + xml_doc, + path = "//choix[@nom='calendar in days']//ta_entete" + )[[1]] + # See if xmlClone is useful to apply ??? + XML::addChildren(parent_node, kids = new_nodes) + + XML::xmlAttrs(parent_node)["nb_colonnes"] <- "9" + + # If any intervention node + # add new param nodes: mscoupemini, tauxexportfauche, restit + # set kept value of engrais, mscoupemini + # set default values tauxexportfauche = 1 et restit = 2 + + parent_nodes <- get_nodes( + xml_doc, + path = "//choix[@nom='calendar in days']//ta/intervention" + ) + if (!is.null(parent_nodes)) { + # See if xmlClone is useful to apply ??? + lapply(parent_nodes, function(x) XML::addChildren(x, new_nodes)) + set_param_value( + xml_doc = xml_doc, + param_name = "engraiscoupe", + param_value = engrais + ) + set_param_value( + xml_doc = xml_doc, + param_name = "mscoupemini", + param_value = mscoupemini + ) + set_param_value( + xml_doc = xml_doc, + param_name = "tauxexportfauche", + param_value = 1 + ) + set_param_value( + xml_doc = xml_doc, + param_name = "restit", + param_value = 2 + ) + lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "9") + } + + ## Choix "calendar in degree days" + parent_node <- get_nodes( + xml_doc, + path = "//choix[@nom='calendar in degree days']//ta_entete" + )[[1]] + # See if xmlClone is useful to apply ??? + XML::addChildren(parent_node, kids = new_nodes) + + XML::xmlAttrs(parent_node)["nb_colonnes"] <- "9" + + # If any intervention node + # add new param nodes: mscoupemini, tauxexportfauche, restit + # set kept value of engrais, mscoupemini + # set default values tauxexportfauche = 1 et restit = 2 + parent_nodes <- get_nodes( + xml_doc, + path = "//choix[@nom='calendar in degree days']//ta/intervention" + ) + if (!is.null(parent_nodes)) { + # See if xmlClone is useful to apply ??? + lapply(parent_nodes, function(x) XML::addChildren(x, new_nodes)) + set_param_value( + xml_doc = xml_doc, + param_name = "engraiscoupe", + param_value = engrais + ) + set_param_value( + xml_doc = xml_doc, + param_name = "mscoupemini", + param_value = mscoupemini + ) + set_param_value( + xml_doc = xml_doc, + param_name = "tauxexportfauche", + param_value = 1 + ) + set_param_value(xml_doc = xml_doc, param_name = "restit", param_value = 2) + lapply(parent_nodes, function(x) XML::xmlAttrs(x)["nb_colonnes"] <- "9") + } + + # special techniques: codeclaircie + new_node <- XML::xmlParseString( + ' + + + + +', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//option[@nomParam='codeclaircie']//choix[@code='2']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + + # adding intervention if choix codeclaircie == 2 (activation) + # Using values of juleclair, nbinfloecl got from the old parameters + if (codeclaircie == 2) { + # recup noeud ta_entete + op_node <- XML::xmlClone(get_nodes( + xml_doc, + paste0("//ta_entete[colonne[@nom='", "juleclair", "']]") + )[[1]]) + XML::xmlName(op_node) <- "intervention" + parent_node <- get_nodes( + xml_doc, + path = "//option[@nomParam='codeclaircie']//choix[@code='2']/ta" + )[[1]] + XML::addChildren(parent_node, op_node) + set_param_value( + xml_doc = xml_doc, + param_name = "juleclair", + param_value = juleclair + ) + set_param_value( + xml_doc = xml_doc, + param_name = "nbinfloecl", + param_value = nbinfloecl + ) + + XML::xmlAttrs(parent_node)["nb_interventions"] <- "1" + } + + # codejourdes + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='special techniques']" + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + + # ---------------------------------------------------------------------------- + # Updating values with param_newform.xml ones + # + + param_names <- c( + "codetempfauche", + "nbj_pr_apres_semis", + "eau_mini_decisemis", + "humirac_decisemis", + "code_auto_profres(1)", + "resk(1)", + "resz(1)", + "P_codedate_irrigauto", + "datedeb_irrigauto", + "datefin_irrigauto", + "stage_start_irrigauto", + "stage_end_irrigauto" + ) + old_val <- get_param_xml(param_newform_file, param = param_names)[[basename( + param_newform_file + )]] + + # writing to file _tec.xml + out_tec <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_tec, overwrite) + + # setting new values + param_names <- c( + "codetempfauche", + "nbj_pr_apres_semis", + "eau_mini_decisemis", + "humirac_decisemis", + "code_auto_profres", + "resk", + "resz", + "codedate_irrigauto", + "datedeb_irrigauto", + "datefin_irrigauto", + "stage_start_irrigauto", + "stage_end_irrigauto" + ) + set_param_xml( + file = out_tec, + param = param_names, + values = old_val, + overwrite = TRUE + ) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Upgrade _plt.xml file(s) from STICS version 9 to 10 +#' +#' @param file Path of an plant (*_plt.xml) file or a vector of +#' @param out_dir Output directory path of the generated files +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param param_newform_file Path of the param_newform.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +# @param ... Additional input arguments +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_plt_xml_9_10( +#' file = file.path(dir_path, "file_plt.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml"), +#' param_newform_file = file.path(dir_path, "param_newform.xml") +#' ) +#' } +upgrade_plt_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + param_newform_file, + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_plt_xml_9_10( + file = x, + out_dir = out_dir, + param_gen_file = param_gen_file, + param_newform_file = param_newform_file, + overwrite = overwrite + ) + }) + return(invisible()) + } + + # local initialization, before loadinf RData + jvc_data <- NULL + + # Loading the old xml file + xml_doc <- xmldocument(file = file) + + # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10" + ) + + # Parameters to move to varietal parameters ---------------------------------- + # + # Coming from other formalisms than varietal ones + # Storing parameters values to set them to varietal ones + param_names_to_varietal <- c( + "phobase", + "phosat", + "stdordebour", + "bdens", + "hautbase", + "hautmax", + "dlaimax", + "dlaimaxbrut", + "innsen", + "rapsenturg", + "extin", + "ktrou", + "temin", + "teopt", + "slamax", + "tigefeuil", + "nbjgrain", + "nbgrmin", + "vitircarb", + "vitircarbT", + "stdrpnou", + "nbinflo", + "inflomax", + "pentinflores", + "vitpropsucre", + "vitprophuile", + "vitirazo", + "tgellev10", + "tgeljuv10", + "tgelveg10", + "psisto", + "psiturg", + "deshydbase" + ) + param_values_to_varietal <- get_param_value(xml_doc, param_names_to_varietal) + + # nodes existing outside of 'cultivar parameters' formalism + nodes_to_rm <- lapply(param_names_to_varietal, function(x) { + get_nodes( + xml_doc, + path = paste0( + "//formalisme[@nom!='cultivar parameters']//param[@nom='", + x, + "']" + ) + ) + }) + + # Checking nodes : all must be not NULL + nodes_null <- unlist(lapply(nodes_to_rm, is.null)) + if (any(nodes_null)) { + stop("missing nodes, not a v9.1 or 9.2 _plt.xml file") + } + + # Removing nodes + lapply(nodes_to_rm, function(x) XML::removeNodes(x)) + + # Already exist in varietal parameters + # Storing parameters values before applying new varietal parameters structure + param_names_keep <- c( + "stlevamf", + "stamflax", + "stlevdrp", + "stflodrp", + "stdrpdes", + "pgrainmaxi", + "adens", + "croirac", + "durvieF", + "jvc", + "sensiphot", + "stlaxsen", + "stsenlan", + "nbgrmax", + "stdrpmat", + "afruitpot", + "dureefruit" + ) + + param_values_keep <- get_param_value(xml_doc, param_names_keep) + + # Checking values: list names == param_names_keep + if (!all(param_names_keep %in% names(param_values_keep))) { + stop("Missing values, , not a v9.1 or 9.2 _plt.xml file") + } + + # General plant parameters --------------------------------------------------- + # + # adding codephot_part + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + # test if the node exists + node_exists <- !is.null(get_nodes( + xml_doc, + '//option[@nomParam="codephot_part"]' + )) + + if (node_exists) { + stop( + "codephot_part already exists, not a v9.1 or 9.2 _plt.xml file" + ) + } + + parent_node <- get_nodes( + xml_doc, + '//option[@nomParam="codephot"]/choix[@code="1"]' + )[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + + # moving nbfeuilplant + node_to_move <- get_nodes(xml_doc, path = "//param[@nom='nbfeuilplant']")[[1]] + prev_sibling <- get_nodes(xml_doc, path = "//param[@nom='laiplantule']")[[1]] + + XML::addSibling(prev_sibling, node_to_move) + + # Recalculating irazomax + irazomax_calc <- calc_irazomax( + get_param_value(xml_doc, "irmax")$irmax, + param_values_to_varietal$vitircarb, + param_values_to_varietal$vitirazo + ) + + new_node <- XML::xmlParseString( + paste0( + '', + irazomax_calc, + "" + ), + addFinalizer = TRUE + ) + + # adding irazomax node + parent_node <- get_nodes( + xml_doc, + path = "//formalisme[@nom='yield formation']" + )[[1]] + XML::addChildren(parent_node, new_node, at = 0) + + message( + xml_doc@name, + ": be aware that irazomax is a new parameter and its value (", + irazomax_calc, + ")\nis estimated using some other parameters values.\n", + paste0( + "But this value needs to be ajusted according to ", + "species and varieties " + ), + "\n" + ) + + # moving irmax + node_to_move <- get_nodes(xml_doc, path = "//param[@nom='irmax']")[[1]] + parent_node <- get_nodes( + xml_doc, + path = "//option[@nomParam='codeir']/choix[@code='1']" + )[[1]] + + XML::addChildren(parent_node, node_to_move) + + # add codedisrac option node + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + # before sibling + # ', + addFinalizer = TRUE + ) + + prev_sibling <- get_nodes(xml_doc, "//*[@nomParam='codetemprac']")[[1]] + XML::addSibling(prev_sibling, XML::xmlClone(new_node)) + + # code_WangEngel + # in + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + "//*[@nomParam='codegdhdeb']/choix[@code='1']" + )[[1]] + XML::addChildren(parent_node, new_node) + + # Adding 2 option nodes + # in + # + new_nodes <- XML::xmlParseString( + ' + +', + addFinalizer = TRUE + ) + + parent_node <- get_nodes( + xml_doc, + "//formalisme[@nom='partitioning of biomass in organs']" + )[[1]] + XML::addChildren(parent_node, kids = unlist(XML::xmlChildren(new_nodes))) + + # + # rayon + # + new_node <- XML::xmlParseString( + '0.02' + ) + prev_sibling <- get_nodes(xml_doc, "//*[@nom='contrdamax']")[[1]] + XML::addSibling(prev_sibling, new_node) + + # adding 2 option nodes + new_nodes <- XML::xmlParseString( + ' + ', + addFinalizer = TRUE + ) + + parent_node <- get_nodes(xml_doc, "//choix[@nom='true density']")[[1]] + + XML::addChildren(parent_node, kids = unlist(XML::xmlChildren(new_nodes))) + + # ----------------------------------------------------------- + # Update param values + # + # from param_gen.xml + # khaut, rayon + param_gen_values <- get_param_xml( + file = param_gen_file, + param = c("rayon", "khaut") + )[[1]] + set_param_value( + xml_doc, + param_name = c("rayon", "khaut"), + param_value = param_gen_values + ) + + # from param_newform.xml + # coefracoupe(1), coefracoupe(2) -> coefracoupe + param_newform_values <- get_param_xml( + file = param_newform_file, + param = c("coefracoupe(1)", "coefracoupe(2)") + )[[1]] + + if (length(unique(unlist(param_newform_values))) > 1) { + stop( + "Multiple values of coefracoupe in param_gen.xml file" + ) + } + + set_param_value( + xml_doc, + param_name = "coefracoupe", + param_value = param_newform_values[[1]] + ) + + # Updating other values than nodes values (i.e. nodes attributes values) + # + # Changing param min / max wrong attributes values + # hautbase => 0.1 + # 0 + nodes_to_change <- get_nodes(xml_doc, path = "//param[@nom='hautbase']") + if (!is.null(nodes_to_change)) { + set_attrs_values( + xml_doc, + path = "//param[@nom='hautbase']", + attr_name = "min", + values_list = "0.1" + ) + } + # + # Changing options' "choix", "nom" attribute values + # + # oui to yes, non to no + nodes_to_change <- get_nodes(xml_doc, path = "//choix[@nom='oui']") + if (!is.null(nodes_to_change)) { + set_attrs_values( + xml_doc, + path = "//choix[@nom='oui']", + attr_name = "nom", + values_list = "yes" + ) + } + nodes_to_change <- get_nodes(xml_doc, path = "//choix[@nom='non']") + if (!is.null(nodes_to_change)) { + set_attrs_values( + xml_doc, + path = "//choix[@nom='non']", + attr_name = "nom", + values_list = "no" + ) + } + + # Writing to file _plt.xml + out_plt <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_plt, overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +calc_irazomax <- function(irmax, vitircarb, vitirazo) { + irazomax <- (irmax / vitircarb) * vitirazo + + irazomax <- pmin(1., irazomax) + + if (is.nan(irazomax) || irazomax > 1) { + irazomax <- 1 + } + + return(round(irazomax, digits = 3)) +} + +#' Upgrade _sta.xml file(s) from STICS version 9 to 10 +#' +#' @param file Path of a station (*_sta.xml) file or a vector of +#' @param out_dir Output directory path of the generated files +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +# @param ... Additional input arguments +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See SticsRFiles::get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_sta_xml_9_10( +#' file = file.path(dir_path, "file_sta.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' } +upgrade_sta_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_sta_xml_9_10( + file = x, + param_gen_file = param_gen_file, + out_dir = out_dir, + # stics_version = stics_version, + # target_version = target_version, + # check_version = check_version, + overwrite = overwrite # , + # check_dir = check_dir + ) + }) + return(invisible()) + } + + # Loading xml file + xml_doc <- xmldocument(file = file) + + # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # Getting old concrr value + concrr <- get_param_xml(param_gen_file, "concrr")$param_gen.xml$concrr + + # Getting new parameter + concrr_node <- XML::xmlParseString( + '0.02000', + addFinalizer = TRUE + ) + + # Getting the preceeding sibling node + prev_sibling <- get_nodes(xml_doc, "//*[@nom='NH3ref']")[[1]] + XML::addSibling(node = prev_sibling, XML::xmlClone(concrr_node), after = TRUE) + + # Setting concrr value + set_param_value(xml_doc, param_name = "concrr", param_value = concrr) + + # Adding snow formalism new node + new_node <- XML::xmlParseString( + ' + + ', + addFinalizer = TRUE + ) + + par_node <- get_nodes(xml_doc, path = "/fichiersta")[[1]] + XML::addChildren(par_node, XML::xmlClone(new_node)) + + # Writing to file _sta.xml + write_xml_file( + xml_doc, + file.path(out_dir, basename(file)), + overwrite = overwrite + ) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Upgrade _ini.xml file(s) from STICS version 9 to 10 +#' +#' @param file Path of an initialization (*_ini.xml) file or a vector of +#' @param out_dir Output directory path of the generated files +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See SticsRFiles::get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_ini_xml_9_10( +#' file = file.path(dir_path, "file_ini.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' } +upgrade_ini_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Treating a files list + if (length(file) > 1) { + lapply(file, function(x) { + upgrade_ini_xml_9_10( + file = x, + out_dir = out_dir, + param_gen_file = param_gen_file, + overwrite = overwrite + ) + }) + return(invisible()) + } + + # Loading the old xml file + xml_doc <- xmldocument(file = file) + + # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # Keeping old values + rm_names <- c("masec0", "QNplante0", "resperenne0") + old_values <- get_param_value(xml_doc, rm_names) + + # Removing useless nodes + rm_nodes <- unlist(lapply(rm_names, function(x) { + unlist(get_nodes( + xml_doc, + path = paste0("//", x) + )) + })) + lapply(rm_nodes, function(x) XML::removeNodes(x)) + + # Adding new option node + # including old nodes masec0,QNplante0,restemp0 + # (previously named resperennes0) + + str_1 <- paste0( + '' + + str <- paste0(str_1, str_2) + + new_node <- XML::xmlParseString(str, addFinalizer = TRUE) + + # Getting zrac0 node + prev_sibling <- unlist(get_nodes(xml_doc, "//zrac0")) + + # Adding new node + lapply(prev_sibling, function(x) XML::addSibling(x, XML::xmlClone(new_node))) + + # setting values for restructured nodes + # resperennes0 became restemp0 + rm_names <- c("masec0", "QNplante0", "restemp0") + set_param_value( + xml_doc, + param_name = as.list(rm_names), + param_value = old_values + ) + + if (is.null(get_nodes(xml_doc, "//snow"))) { + # Adding snow node + new_node <- XML::xmlParseString( + " + 0.0 + 0.0 + 0.0 + 0.0 + ", + addFinalizer = TRUE + ) + + parent_node <- get_nodes(xml_doc, path = "//initialisations")[[1]] + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + } else { + # checking names an renaming them ! + old_names <- c("SDepth", "Sdry", "Swet", "ps") + new_names <- c("Sdepth0", "Sdry0", "Swet0", "ps0") + n <- get_nodes(xml_doc, c(sprintf("//%s", old_names))) + + if (!is.null(n)) { + nodes_idx <- unlist(lapply(n, XML::xmlName)) %in% old_names + n <- n[nodes_idx] + new_names <- new_names[nodes_idx] + for (i in seq_along(length(n))) { + XML::xmlName(n[[i]]) <- new_names[i] + } + } + } + + # Renaming soil parameters + # hinit, NO3init, NH4init => hinitf, NO3initf, NH4initf + current_node <- get_nodes(xml_doc, path = "//hinit")[[1]] + XML::xmlName(current_node) <- "Hinitf" + current_node <- get_nodes(xml_doc, path = "//NO3init")[[1]] + XML::xmlName(current_node) <- "NO3initf" + current_node <- get_nodes(xml_doc, path = "//NH4init")[[1]] + XML::xmlName(current_node) <- "NH4initf" + + # Writing to file _ini.xml + out_ini <- file.path(out_dir, basename(file)) + write_xml_file(xml_doc, out_ini, overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a param_gen.xml file from STICS version 9 to 10 +#' +#' @param file Path of a param_gen.xml file +#' @param out_dir Output directory path of the generated file +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_param_gen_xml_9_10( +#' file = file.path(dir_path, "param_gen.xml"), +#' out_dir = tempdir() +#' ) +#' } +upgrade_param_gen_xml_9_10 <- function( + file, + out_dir, + overwrite = FALSE +) { + # Checking output directory + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Loading the old doc + xml_doc <- xmldocument(file = file) + + # # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # Nodes to remove + rm_names <- c("FINERT", "FMIN1", "FMIN2", "FMIN3", "khaut", "rayon", "concrr") + + rm_nodes <- lapply(rm_names, function(x) { + get_nodes( + xml_doc, + path = paste0("//param[@nom='", x, "']") + ) + }) + lapply(rm_nodes, function(x) XML::removeNodes(x)) + + # Nodes to change + # 3.0 + # k_desat to kdesat + nodes_to_change <- get_nodes(xml_doc, path = "//param[@nom='k_desat']") + if (!is.null(nodes_to_change)) { + set_attrs_values( + xml_doc, + path = "//param[@nom='k_desat']", + attr_name = "nom", + values_list = "kdesat" + ) + } + + # Nodes to add + new_node <- XML::xmlParseString( + '0.0007 +0.02519 +0.015 +0.11200 +8.50000 +0.06000 +11.00000', + addFinalizer = TRUE + ) + + new_nodes <- XML::getNodeSet(new_node, path = "//param") + prev_sibling <- get_nodes(xml_doc, "//param[@nom='TREFr']")[[1]] + + # For adding them in the right order + for (n in seq_along(new_nodes)) { + new <- XML::xmlClone(new_nodes[[n]]) + XML::addSibling(prev_sibling, new) + prev_sibling <- new + } + + # Writing to file param_gen.xml + write_xml_file( + xml_doc, + file.path(out_dir, basename(file)), + overwrite = overwrite + ) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a param_newform.xml file from STICS version 9 to 10 +#' +#' @param file Path of a param_newform.xml file +#' @param out_dir Output directory path of the generated file +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See SticsRFiles::get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_param_newform_xml_9_10( +#' file = file.path(dir_path, "param_newform.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' } +upgrade_param_newform_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # TODO: eliminate when option will be reactivated later. + codemineral <- FALSE + + # Checking output directory + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Loading the old doc + xml_doc <- xmldocument(file = file) + + # # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # TODO : add from here if cond for calling specific version ranges updates + + # nodes to remove + form_names <- c( + "Specificities of cut crops", + "Activation of the module simulating tiller dynamics", + "Calculation of the maximal reserve compartment during reproductive stages", + "Calculation of the stem elongation stage for perenial grasslands", + "Moisture test for sowing decision", + paste0( + "automatic irrigations (associated with the options of automatic ", + "irrigation in tec file)" + ), + "calculation of the root death at cutting date for grasslands", + "option for several thinning ", + "option for several fertilizer type ", + # useless, options now removed + "residue incorporation" + ) + + nodes_to_rm <- lapply(form_names, function(x) { + get_nodes( + xml_doc, + path = paste0("//formalisme[@nom='", x, "']") + ) + }) + + lapply(nodes_to_rm, function(x) if (!is.null(x)) XML::removeNodes(x)) + + # options to be removed + opt_names <- c( + "New mineralization of soil organic matter " + ) + + nodes_to_rm <- lapply(opt_names, function(x) { + get_nodes( + xml_doc, + path = paste0("//option[@nom='", x, "']") + ) + }) + lapply(nodes_to_rm, function(x) XML::removeNodes(x)) + + # roots + new_node <- XML::xmlParseString( + ' + 1 + ', + addFinalizer = TRUE + ) + + prev_sibling <- get_nodes( + xml_doc, + path = "//formalisme[@nom='Mineralization models']" + )[[1]] + XML::addSibling(prev_sibling, XML::xmlClone(new_node), after = TRUE) + + # options to add + # min, CsurN + + parent_node <- prev_sibling + + if (codemineral) { + new_node <- list( + XML::xmlParseString( + '', + addFinalizer = TRUE + ), + XML::xmlParseString( + '', + addFinalizer = TRUE + ) + ) + + lapply( + new_node, + function(x) XML::addChildren(parent_node, XML::xmlClone(x)) + ) + } else { + # if a version 10.0 file is retreated + # codemineral option must be retreived for the moment + + codemineral_node <- get_nodes( + xml_doc, + path = paste0("//option[@nomParam='codemineral']") + ) + + if (!is.null(codemineral_node)) { + XML::removeNodes(codemineral_node) + } + + new_node <- XML::xmlParseString( + '', + addFinalizer = TRUE + ) + + XML::addChildren(parent_node, XML::xmlClone(new_node)) + } + + # formalism modifications + # replacing formalisme option @nom, choix + set_attrs_values( + xml_doc, + path = "//option[@nomParam='codecalferti']", + attr_name = "nom", + values_list = "automatic calculation of fertilisation" + ) + + set_attrs_values( + xml_doc, + path = "//option[@nomParam='codetesthumN']", + attr_name = "nom", + values_list = paste0( + "automatic N fertilisation (1 = based on rainfall", + " 2 = based on soil water content)" + ) + ) + + set_attrs_values( + xml_doc, + path = "//option[@nomParam='codetesthumN']", + attr_name = "choix", + values_list = "1" + ) + + # TODO: see what to do for the future v10 version ! + # --------------------------------------------------------------------------- + # ISOP specific option to temporarily add + new_node <- XML::xmlParseString( + ' + + ', + addFinalizer = TRUE + ) + + prev_sibling <- get_nodes( + xml_doc, + path = "//formalisme[@nom='New Roots']" + )[[1]] + XML::addSibling(prev_sibling, XML::xmlClone(new_node)) + # --------------------------------------------------------------------------- + + # Writing to file param_newform.xml + write_xml_file( + xml_doc, + file.path(out_dir, basename(file)), + overwrite = overwrite + ) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + +#' Upgrade a sols.xml file from STICS version 9 to 10 +#' +#' @param file Path of a sols.xml file +#' @param out_dir Output directory path of the generated file +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See SticsRFiles::get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_sols_xml_9_10( +#' file = file.path(dir_path, "sols.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' } +upgrade_sols_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # checking output directory + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Loading the old doc + xml_doc <- xmldocument(file = file) + + # Setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # Checking if layer @nom are up to date (old @nom = horizon) + tableau_noms <- unlist(get_nodes(xml_doc, "//tableau/@nom")) + + if (any(grep(pattern = "horizon", tableau_noms))) { + new_names <- unlist(lapply( + tableau_noms, + function(x) gsub(pattern = "horizon(.*)", x, replacement = "layer\\1") + )) + set_attrs_values(xml_doc, "//tableau", "nom", new_names) + } + + # Nodes to add + new_node <- XML::xmlParseString( + '0.65000', + addFinalizer = TRUE + ) + # new_node <- XML::xmlParseString('0.65000', + # addFinalizer = TRUE) + + prev_sibling <- get_nodes(xml_doc, "//param[@nom='CsurNsol']") + + # added for compatibility with old misspelled parameters + if (is.null(prev_sibling)) { + prev_sibling <- get_nodes(xml_doc, "//param[@nom='csurNsol']") + # updating nom attribute content + set_attrs_values( + xml_doc, + path = "//param[@nom='csurNsol']", + attr_name = "nom", + values_list = "CsurNsol" + ) + } + + for (n in seq_along(prev_sibling)) { + XML::addSibling(prev_sibling[[n]], XML::xmlClone(new_node)) + } + + # writing sols.xml file + write_xml_file(xml_doc, file.path(out_dir, basename(file)), overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} + + +#' Upgrade a usms.xml file from STICS version 9 to 10 +#' +#' @param file Path of a usms.xml file +#' @param out_dir Output directory path of the generated file +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +# @param obs_dir Directory path of the observation data files +#' @param overwrite logical (optional), +#' TRUE for overwriting file if it exists, FALSE otherwise +#' +#' @return None +#' +#' @keywords internal +#' +#' @details See get_stics_versions_compat() for listing versions +#' +#' @examples +#' \dontrun{ +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V9.2") +#' +#' upgrade_usms_xml_9_10( +#' file = file.path(dir_path, "usms.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' } +upgrade_usms_xml_9_10 <- function( + file, + out_dir, + param_gen_file, + # obs_dir = NULL, + overwrite = FALSE +) { + # Checking output directory + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # if (is.null(obs_dir)) { + obs_dir <- dirname(file) + # } + + # loading the old doc + xml_doc <- xmldocument(file = file) + + # # setting file STICS version + set_xml_file_version( + xml_doc, + new_version = "V10.0" + ) + + # checking if fobs exist + obs_nodes <- get_nodes(xml_doc, "//fobs") + + # TODO: detect if fobs exist and evaluate + # where to add fobs fields !!!!! + # default behavior: no existing fobs fields + if (is.null(obs_nodes)) { + new_node <- XML::xmlParseString("null", addFinalizer = TRUE) + + parent_node <- get_nodes(xml_doc, "//plante") + + lapply( + parent_node, + function(x) XML::addChildren(x, XML::xmlClone(new_node)) + ) + } + + # Usms names + usms_names <- get_attrs_values(xml_doc, "//usm", "nom") + + # existing obs files + # intercrops usms are not taken into account in that case + obs_names <- paste0(usms_names, ".obs") + obs_exist <- file.exists(file.path(obs_dir, obs_names)) + obs_val <- rep("null", length(usms_names)) + obs_val[obs_exist] <- obs_names[obs_exist] + + # Setting obs files names into fobs for existing files + set_param_value( + xml_doc, + param_name = "fobs", + param_value = obs_val, + parent_name = "plante", + parent_sel_attr = "1" + ) + + # writing file + write_xml_file(xml_doc, file.path(out_dir, basename(file)), overwrite) + + XML::free(xml_doc@content) + invisible(gc(verbose = FALSE)) +} diff --git a/R/upgrade_workspace_xml.R b/R/upgrade_workspace_xml.R deleted file mode 100644 index 84e90b8f..00000000 --- a/R/upgrade_workspace_xml.R +++ /dev/null @@ -1,377 +0,0 @@ -#' Upgrading XML files of a JavaSTICS workspace directory -#' to a newer STICS version format -#' -#' @param workspace Path of a JavaSTICS workspace -#' @param javastics Path of JavaSTICS containing the STICS version corresponding -#' to the version of the files to be converted -#' @param out_dir Output directory of the generated files -#' @param stics_version Name of the STICS version (VX.Y format) -#' @param target_version Name of the STICS version to upgrade files -#' to (VX.Y format) -#' @param plant logical (optional), TRUE for upgrading plant files if a "plant" -#' sub-directory of workspace exists, FALSE otherwise -#' @param overwrite logical (optional), -#' TRUE for overwriting files if they exist, FALSE otherwise -#' @param ... Additional input arguments -#' -#' @return None -#' -#' @export -#' -#' @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 -#' \dontrun{ -#' upgrade_workspace_xml( -#' workspace = "/path/to/JavaSTICS/workspace", -#' javastics = "/path/to/JavaSTICS/folder", -#' out_dir = "/path/to/an/output/directory" -#' ) -#' } -upgrade_workspace_xml <- function( - workspace, - javastics, - out_dir, - stics_version = "V9.2", - target_version = "V10.0", - plant = FALSE, - overwrite = FALSE, - ... -) { - # For testing if files are upgradable - check_version <- FALSE - verbose <- TRUE - upgr_par_gen <- FALSE - upgr_par_new <- FALSE - - args <- list(...) - if ("check_version" %in% names(args)) check_version <- args$check_version - if ("verbose" %in% names(args)) verbose <- args$verbose - - min_version <- get_version_num("V9.1") - - # Getting param_gen.xml path - par_gen <- get_param_gen_file(type = "param_gen.xml", workspace, javastics) - if (is.null(par_gen)) { - stop( - "param_gen.xml: file not found in\n", - workspace, - " or ", - javastics, - "directory! " - ) - } - if (attr(par_gen, "where") == "workspace") upgr_par_gen <- TRUE - - # Extracting or detecting the STICS version corresponding to the xml file - # based on param_gen.xml file content - file_version <- check_xml_file_version(par_gen, stics_version) - if (!file_version) { - stop( - "The input version ", - stics_version, - " does not match file version ", - attr(file_version, "version"), - " \n", - par_gen - ) - } - - # Compatibility checks between version and upgrade to target_version - ver_num <- get_version_num(stics_version) - if (ver_num < min_version) { - stop( - "Files from the version ", - stics_version, - " cannot be converted to the version ", - target_version - ) - } - - #---------------------------------------------------------------------------- - # TODO: add a call for getting tags - # check_upgrade_from_to_versions to enable - # switch in each upgrade function according the from/to correspondence. - #---------------------------------------------------------------------------- - - # Testing the workspace dir to be converted - if ( - !dir.exists(workspace) || - !file.exists(file.path(workspace, "usms.xml")) - ) { - stop( - workspace, - ": the directory does not exist or is not a JavaSTICS workspace !" - ) - } - - # Just in case, creating the target directory - if (!dir.exists(out_dir)) dir.create(out_dir) - - # Testing the JavaSTICS dir - if ( - !dir.exists(javastics) || - !file.exists(file.path(javastics, "JavaStics.exe")) - ) { - stop( - javastics, - " : the directory does nor exist or is not a JavaSTICS one !" - ) - } - - if (verbose) { - message( - paste( - "Upgrading files from version", - stics_version, - "to", - target_version, - "\n" - ), - paste("From: ", workspace, "\n"), - paste("To: ", out_dir, "\n"), - "-----------------------------------\n" - ) - } - - # Converting param_gen.xml - if (upgr_par_gen) { - upgrade_param_gen_xml( - file = par_gen, - out_dir = out_dir, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite - ) - - if (verbose) { - message("param_gen.xml\n") - } - } - - # Getting param_newform.xml path - par_new <- get_param_gen_file( - type = "param_newform.xml", - workspace, - javastics - ) - if (is.null(par_new)) { - stop( - "param_newform.xml: file not found in\n", - workspace, - " or ", - javastics, - "directory! " - ) - } - if (attr(par_new, "where") == "workspace") upgr_par_new <- TRUE - - # Converting param_newform.xml - if (upgr_par_new) { - upgrade_param_newform_xml( - file = par_new, - out_dir = out_dir, - param_gen_file = par_gen, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite - ) - - if (verbose) { - message("param_new_form.xml\n") - } - } - - # Converting usms.xml file - usms <- file.path(workspace, "usms.xml") - - upgrade_usms_xml( - file = usms, - out_dir = out_dir, - param_gen_file = par_gen, - obs_dir = workspace, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite - ) - - if (verbose) { - message("usms.xml\n") - } - - # Converting sols.xml file - sols <- file.path(workspace, "sols.xml") - - upgrade_sols_xml( - file = sols, - out_dir = out_dir, - param_gen_file = par_gen, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite - ) - - if (verbose) { - message("sols.xml\n") - } - - # Converting station files (*_sta.xml) - sta_files <- get_in_files(in_dir_or_files = workspace, kind = "sta") - - upgrade_sta_xml( - file = sta_files, - out_dir = out_dir, - param_gen_file = par_gen, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite, - check_dir = FALSE - ) - - if (verbose) { - message("*_sta.xml\n") - } - - # Converting initialisation files (*_ini.xml) - ini_files <- get_in_files(in_dir_or_files = workspace, kind = "ini") - - upgrade_ini_xml( - file = ini_files, - out_dir = out_dir, - param_gen_file = par_gen, - stics_version = stics_version, - target_version = target_version, - check_version = TRUE, - overwrite = overwrite, - check_dir = FALSE - ) - - if (verbose) { - message("*_ini.xml\n") - } - - # Converting crop management files (*_tec.xml) - tec_files <- get_in_files(in_dir_or_files = workspace, kind = "tec") - - upgrade_tec_xml( - file = tec_files, - out_dir = out_dir, - param_newform_file = par_new, - param_gen_file = par_gen, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite, - check_dir = FALSE - ) - - if (verbose) { - message("*_tec.xml\n") - } - - # # Copying *.mod files (for model outputs) - # stat <- file.copy( - # from = list.files(path = workspace, full.names = TRUE, pattern = "*.mod"), - # to = out_dir, overwrite = overwrite - # ) - # - # if (verbose) { - # message("Copying *.mod files.\n") - # } - - # Copying observation files - # all .obs files deteted in workspace, - # not only according to usms names, because now obs files names are - # references in the usms.xml file (i.e. not fixed a priori) - # stat <- file.copy( - # from = list.files(path = workspace, full.names = TRUE, pattern = "*.obs"), - # to = out_dir, overwrite = overwrite - # ) - # - # if (verbose) { - # message("Copying *.obs files.\n") - # } - - # Copying weather data files - # Note: for the moment, all files with a numerical extension - # (i.e. year, as .1996) are taken into account because when USM are - # defined over 2 successive years, files are not explicitly mentioned - # in the usms.xml file. - - # weather_files <- - # list.files(workspace, full.names = TRUE, pattern = "\\.[0-9]") - # - # stat <- file.copy( - # from = weather_files, - # to = out_dir, overwrite = overwrite - # ) - # - # if (!all(stat)) { - # warning("Error when copying file(s): ", - # paste(weather_files[stat], collapse = ", ")) - # } - # - # if (verbose) { - # message("Copying weather files.\n") - # } - - # TODO: see how to manage variables names checks in *.mod files - # Probably, the new JavaSTICS path may be added as a new function argument - # for getting information on output variables - # (use get_var_info with the appropriate version string) - - workspace_files_copy( - workspace = workspace, - file_type = c("mod", "obs", "lai", "meteo"), - javastics = javastics, - out_dir = out_dir, - overwrite = overwrite, - verbose = verbose - ) - - # Upgrading plant files - # if a plant sub directory exists in workspace - plant_files <- get_in_files( - in_dir_or_files = file.path(workspace, "plant"), - kind = "plt" - ) - - if (length(plant_files) > 0) { - if (verbose) { - message("*_plt.xml\n") - } - - # For creating a sub-directory in workspace for upgraded plant files - plant_out_dir <- file.path(out_dir, "plant") - if (!dir.exists(plant_out_dir)) dir.create(plant_out_dir) - - upgrade_plt_xml( - file = plant_files, - out_dir = plant_out_dir, - param_gen_file = par_gen, - param_newform_file = par_new, - stics_version = stics_version, - target_version = target_version, - check_version = check_version, - overwrite = overwrite, - check_dir = FALSE - ) - } - - if (verbose) { - message(paste0( - "-----------------------------------\n", - "Files upgrade and copy is complete.\n" - )) - } -} diff --git a/R/upgrade_xml_files.R b/R/upgrade_xml_files.R new file mode 100644 index 00000000..e0714c52 --- /dev/null +++ b/R/upgrade_xml_files.R @@ -0,0 +1,734 @@ +#' Upgrade _tec.xml file(s) to a next major version +#' +#' @param file xml technical file path or a vector of +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the initial version +#' @param param_newform_file Path of the param_newform.xml file corresponding +#' to the file version +#' @param ... additional argument(s) to pass to called functions +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_tec_xml( +#' file = file.path(dir_path, "file_tec.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml"), +#' param_newform_file = file.path(dir_path, "param_newform.xml") +#' ) +#' +upgrade_tec_xml <- function( + file, + out_dir, + param_gen_file, + param_newform_file, + ..., + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_tec_xml_9_10( + file, + out_dir, + param_gen_file, + param_newform_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_tec_xml_10_11( + file = file, + out_dir = out_dir, + ..., + overwrite = overwrite + ) + } +} + +#' Upgrade _plt.xml file(s) to a next major version +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the initial version +#' @param param_newform_file Path of the param_newform.xml file corresponding +#' to the file version +#' @param ... additional argument(s) to pass to called functions +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' @param warning Logical for rising warnings, FALSE otherwise +#' +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_plt_xml( +#' file = file.path(dir_path, "file_plt.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml"), +#' param_newform_file = file.path(dir_path, "param_newform.xml") +#' ) +#' +upgrade_plt_xml <- function( + file, + out_dir, + param_gen_file, + param_newform_file, + ..., + overwrite = FALSE, + warning = TRUE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_plt_xml_9_10( + file, + out_dir, + param_gen_file, + param_newform_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_plt_xml_10_11( + file = file, + out_dir = out_dir, + ..., + overwrite = overwrite, + warning = warning + ) + } +} + + +#' Upgrade _sta.xml file(s) to a next major version +#' +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the initial version +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_sta_xml( +#' file = file.path(dir_path, "file_sta.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' +upgrade_sta_xml <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_sta_xml_9_10( + file, + out_dir, + param_gen_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_sta_xml_10_11( + file = file, + out_dir = out_dir, + overwrite = overwrite + ) + } +} + + +#' Upgrade _ini.xml file(s) to a next major version +#' +#' @param file xml plant file path or a vector of +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the initial version +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_ini_xml( +#' file = file.path(dir_path, "file_ini.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' +upgrade_ini_xml <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_ini_xml_9_10( + file, + out_dir, + param_gen_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_ini_xml_10_11( + file = file, + out_dir = out_dir, + overwrite = overwrite + ) + } +} + +#' Upgrade a param_gen.xml file to a next major version +#' +#' @param file xml param_gen file path or a vector of +#' @param out_dir Output directory path +# @param hauteur_threshold new parameter for V11 +# @param par_to_net new parameter for V11 +#' @param ... additional argument(s) to pass to called functions +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_param_gen_xml( +#' file = file.path(dir_path, "param_gen.xml"), +#' out_dir = tempdir() +#' ) +#' +upgrade_param_gen_xml <- function( + file, + out_dir, + # hauteur_threshold = NULL, + # par_to_net = NULL, + ..., + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = file) + + # switch over versions + if (file_version == 9) { + upgrade_param_gen_xml_9_10( + file, + out_dir, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_param_gen_xml_10_11( + file = file, + out_dir = out_dir, + ..., + overwrite = overwrite + ) + } +} + +#' Upgrade a param_newform.xml file to a next major version +#' +#' @param file xml param_newform file path or a vector of +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param ... additional argument(s) to pass to called functions +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +# @param use_patho Logical TRUE if code_patho is to be added to the +# param_newform.xml file, FALSE otherwise +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_param_newform_xml( +#' file = file.path(dir_path, "param_newform.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' +upgrade_param_newform_xml <- function( + file, + out_dir, + param_gen_file, + ..., + overwrite = FALSE # , + # use_patho = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_param_newform_xml_9_10( + file, + out_dir, + param_gen_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_param_newform_xml_10_11( + file = file, + out_dir = out_dir, + ..., + overwrite = overwrite + ) + } +} + + +#' Upgrade a sols.xml file to a next major version +#' +#' @param file xml sols file path +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_sols_xml( +#' file = file.path(dir_path, "sols.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' +upgrade_sols_xml <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_sols_xml_9_10( + file, + out_dir, + param_gen_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_sols_xml_10_11( + file = file, + out_dir = out_dir, + overwrite = overwrite + ) + } +} + +#' Upgrade a usms.xml file to a next major version +#' +#' @param file xml usms file path +#' @param out_dir Output directory path +#' @param param_gen_file Path of the param_gen.xml file corresponding +#' to the file version +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' +#' @return None +#' +#' @export +#' +#' @examples +#' +#' dir_path <- get_examples_path(file_type = "xml", stics_version = "V10.0") +#' +#' upgrade_usms_xml( +#' file = file.path(dir_path, "usms.xml"), +#' out_dir = tempdir(), +#' param_gen_file = file.path(dir_path, "param_gen.xml") +#' ) +#' +upgrade_usms_xml <- function( + file, + out_dir, + param_gen_file, + overwrite = FALSE +) { + # Getting file version if upgradable + file_version <- file_upgradable_version(file, param_gen_file = param_gen_file) + + # switch over versions + if (file_version == 9) { + upgrade_usms_xml_9_10( + file, + out_dir, + param_gen_file, + overwrite = overwrite + ) + } + + if (file_version == 10) { + upgrade_usms_xml_10_11( + file = file, + out_dir = out_dir, + overwrite = overwrite + ) + } +} + + +#' Upgrade a Javastics STICS xml workspace directory to a next major version +#' +#' @param workspace JavaStics xml workspace path +#' @param out_dir Output directory path +#' @param ... additional argument(s) to pass to called functions +#' @param javastics Path of JavaSTICS containing the STICS version corresponding +#' to the version of the files to be converted (optional) +#' @param overwrite Logical TRUE for overwriting files, +#' FALSE otherwise (default) +#' @param verbose logical, TRUE for displaying a copy message +#' FALSE otherwise (default) +# @param use_patho Logical TRUE if code_patho is to be added to the +# param_newform.xml file, FALSE otherwise +#' +#' @return None +#' +#' @export +#' +#' @examples +#' \dontrun{ +#' upgrade_workspace_xml( +#' workspace = "/path/to/JavaSTICS/workspace", +#' out_dir = "/path/to/an/output/directory", +#' javastics = "/path/to/JavaSTICS/folder" +#' ) +#' } +#' +upgrade_workspace_xml <- function( + workspace, + out_dir, + ..., + javastics = NULL, + overwrite = FALSE, + verbose = FALSE # , + # use_patho = FALSE +) { + # Just in case, creating the target directory + if (!dir.exists(out_dir)) { + dir.create(out_dir) + } + + # Ajout gestion des args ... + # comment dispatcher en fonctions des fichiers et versions ??? + dots_args <- list(...) + dots_args_names <- names(dots_args) + + # # Getting param_gen.xml path + par_gen <- get_param_gen_file( + file = "param_gen.xml", + workspace = workspace, + javastics = javastics + ) + # + stics_version <- get_major_version(get_xml_file_version(par_gen)) + + if (verbose) { + message( + paste( + "Upgrading files from version", + stics_version, + "to", + stics_version + 1, + "\n" + ), + paste("From: ", workspace, "\n"), + paste("To: ", out_dir, "\n"), + "-----------------------------------\n" + ) + } + # + upgrade_param_gen_xml( + file = par_gen, + out_dir = out_dir, + ..., + overwrite = overwrite + ) + # + if (verbose) { + message("param_gen.xml\n") + } + # + # # Getting param_newform.xml path + par_new <- get_param_gen_file( + file = "param_newform.xml", + workspace = workspace, + javastics = javastics + ) + # + upgrade_param_newform_xml( + file = par_new, + out_dir = out_dir, + param_gen_file = par_gen, + ..., + overwrite = overwrite # , + # use_patho = use_patho + ) + # + if (verbose) { + message("param_new_form.xml\n") + } + # + # # Converting usms.xml file + usms <- file.path(workspace, "usms.xml") + upgrade_usms_xml( + usms, + out_dir, + param_gen_file = par_gen, + overwrite = overwrite + ) + # + if (verbose) { + message("usms.xml\n") + } + # + # # Converting sols.xml file + sols <- file.path(workspace, "sols.xml") + upgrade_sols_xml( + sols, + out_dir, + param_gen_file = par_gen, + overwrite = overwrite + ) + # + if (verbose) { + message("sols.xml\n") + } + # + # # Converting station files (*_sta.xml) + sta_files <- get_in_files(in_dir_or_files = workspace, kind = "sta") + upgrade_sta_xml( + sta_files, + out_dir, + param_gen_file = par_gen, + overwrite = overwrite + ) + # + if (verbose) { + message("*_sta.xml\n") + } + # + # # Converting initialisation files (*_ini.xml) + ini_files <- get_in_files(in_dir_or_files = workspace, kind = "ini") + upgrade_ini_xml( + ini_files, + out_dir, + param_gen_file = par_gen, + overwrite = overwrite + ) + # + if (verbose) { + message("*_ini.xml\n") + } + + # Converting crop management files (*_tec.xml) + tec_files <- get_in_files(in_dir_or_files = workspace, kind = "tec") + # code_strip = NULL + # nrow = NULL + # if ("code_strip" %in% dots_args_names) code_strip <- dots_args$code_strip + # if ("nrow" %in% dots_args_names) nrow <- dots_args$nrow + upgrade_tec_xml( + tec_files, + out_dir, + param_gen_file = par_gen, + param_newform_file = par_new, + # code_strip = code_strip, + # nrow = nrow, + ..., + overwrite = overwrite + ) + + if (verbose) { + message("*_tec.xml\n") + } + + # Upgrading plant files + # if a plant sub directory exists in workspace + usms_plt_files <- + unique(unlist(get_param_xml(file = usms, param = "fplt")$usms$fplt)) + usms_plt_files <- usms_plt_files[usms_plt_files != "null"] + plant_files <- get_in_files( + in_dir_or_files = file.path(workspace, "plant"), + kind = "plt" + ) + plant_idx <- usms_plt_files %in% basename(plant_files) + full_plant_files <- file.path(workspace, "plant", usms_plt_files[plant_idx]) + + usms_plt_files <- usms_plt_files[!plant_idx] + + if (!is.null(javastics)) { + plant_files <- get_in_files( + in_dir_or_files = file.path(javastics, "plant"), + kind = "plt" + ) + + plant_idx <- usms_plt_files %in% basename(plant_files) + + # Combining javastics and workspace plant files + full_plant_files <- c( + full_plant_files, + file.path(javastics, "plant", usms_plt_files[plant_idx]) + ) + } + + if (length(full_plant_files) > 0) { + # For creating a sub-directory in workspace for upgraded plant files + plant_out_dir <- file.path(out_dir, "plant") + if (!dir.exists(plant_out_dir)) { + dir.create(plant_out_dir) + } + + upgrade_plt_xml( + file = full_plant_files, + out_dir = plant_out_dir, + param_gen_file = par_gen, + param_newform_file = par_new, + ..., + overwrite = overwrite + ) + + if (verbose) { + message("*_plt.xml\n") + } + } + + # Other files types copy from the source workspace, + # or from javastics "example" + # dir for *.mod files if they do not exist in the workspace + workspace_files_copy( + workspace = workspace, + out_dir = out_dir, + javastics = javastics, + overwrite = overwrite, + verbose = verbose + ) + + if (verbose) { + message(paste0( + "-----------------------------------\n", + "Files upgrade and copy is complete.\n" + )) + } +} + + +#' Get the minimal upgradable file version +#' +#' @returns A numerical major version +#' @keywords internal +#' @noRd +#' +get_min_major_version <- function() { + get_major_version(get_version_num(9)) +} + +#' Checking if the file version is an upgradable version +#' +#' @description +#' If the file major version is too low an arror is raised +#' +#' @returns A numerical major version +#' @keywords internal +#' @noRd +#' +file_upgradable_version <- function(file, param_gen_file) { + # Treating a files list + if (length(file) > 1) { + major_versions <- unique(unlist(lapply(file, function(x) { + file_upgradable_version( + file = x, + param_gen_file = param_gen_file + ) + }))) + if (length(major_versions) > 1) { + stop( + "No possible upgrade, all files versions are not identical: ", + paste(major_versions, collapse = ", ") + ) + } + return(major_versions) + } + + # Getting information about the file initial version + file_version <- get_xml_file_version(file, param_gen_file = param_gen_file) + version_num <- get_version_num(file_version) + + # get major version + major_version <- get_major_version(version_num) + + if (major_version < 9) { + stop( + file, + ": the file is not upgradable, its major version is too old: ", + major_version + ) + } + major_version +} diff --git a/R/xml_files_functions.R b/R/xml_files_functions.R index b86add54..794a11b5 100644 --- a/R/xml_files_functions.R +++ b/R/xml_files_functions.R @@ -11,7 +11,9 @@ get_in_files <- function(in_dir_or_files, kind) { obs = "\\.obs$" ) - if (!kind %in% names(files_patterns)) stop("file kind error: ", kind) + if (!kind %in% names(files_patterns)) { + stop("file kind error: ", kind) + } if (kind == "obs") { file_pattern <- files_patterns[[kind]] @@ -46,73 +48,51 @@ get_in_files <- function(in_dir_or_files, kind) { } get_param_gen_file <- function( - type = c("param_gen.xml", "param_newform.xml"), - workspace_dir, - javastics_dir = NULL + file, + workspace, + javastics = NULL ) { - par_file <- file.path(workspace_dir, type) + if (!file %in% c("param_gen.xml", "param_newform.xml")) { + stop(file, "is not a gerenal parameters file name !") + } + + par_file <- file.path(workspace, file) + + exists_in_workspace <- file.exists(par_file) - if (file.exists(par_file)) { + if (exists_in_workspace) { attr(par_file, "where") <- "workspace" return(par_file) } - if (is.null(javastics_dir)) { - warning( - "JavaSTICS path must be given as input argument\n", - type, + if (is.null(javastics)) { + stop( + "JavaSTICS path is needed as as input argument\n", + file, " has not been found in ", - workspace_dir + workspace ) - return() } - par_file <- file.path(javastics_dir, "config", type) + par_file <- file.path(javastics, "config", file) - if (file.exists(par_file)) { + exists_in_javastics <- file.exists(par_file) + + if (exists_in_javastics) { attr(par_file, "where") <- "javastics" return(par_file) } - warning(type, " has not been found in ", javastics_dir) - - return() -} - -to_xml_version <- function(stics_version) { - err <- FALSE - - if (is.numeric(stics_version)) stics_version <- as.character(stics_version) - - if (!grepl(pattern = "\\.", x = stics_version)) { - stics_version <- paste0(stics_version, ".0") - } - numbers <- grepl(pattern = "[0-9]", stics_version) - - # no numbers in version - if (!numbers) err <- TRUE - - char_no_v <- grepl(pattern = "[a-u w-z A-U W-Z]", stics_version) - - # Wrong character in version - if (char_no_v) err <- TRUE - - # No dot in version - - if (grepl(pattern = "\\.$", x = stics_version)) err <- TRUE - - if (err) { - warning("Version must be X.Y, or VX.Y, or vX.Y") - return() - } - - as.character(get_version_num(stics_version = stics_version, numeric = FALSE)) + stop( + file, + " has not been found neither in ", + javastics, + " nor in", + workspace + ) } - -# set_xml_stics_version <- function(xml_file_or_doc, new_version="V10.0", -# overwrite = FALSE) { -set_xml_file_version <- function(xml_doc, new_version = "V10.0") { +set_xml_file_version <- function(xml_doc, new_version) { # If an xml document is given file must not be null if (!inherits(xml_doc, "xml_document")) { stop( @@ -121,17 +101,33 @@ set_xml_file_version <- function(xml_doc, new_version = "V10.0") { ) } # Adding version to detect if the file have been previously updated to 10.0 - ver <- to_xml_version(new_version) + ver <- get_version_num(new_version, numeric = FALSE) names(ver) <- "version" root_path <- paste0("/", XML::xmlName(XML::xmlRoot(xml_doc@content))) - att <- get_attrs(xml_doc, path = root_path) + att_value <- get_attrs_values( + xml_doc, + path = root_path, + attr_list = "version" + ) + + if (length(att_value) == 0) { + add_attrs(xml_doc, path = root_path, named_vector = ver) + return(invisible()) + } # Checking file version - if (!is.null(att) && att[, "version"] == ver) { + if (!is.null(att_value) && att_value[, "version"] == ver) { warning("The file is already in version ", new_version) return(invisible(xml_doc)) } + set_attrs_values( + xml_doc, + path = root_path, + attr_name = "version", + values_list = ver + ) + add_attrs(xml_doc, path = root_path, named_vector = ver) invisible(xml_doc) @@ -145,6 +141,8 @@ get_xml_file_version <- function(xml_file_or_doc, param_gen_file = NULL) { att <- get_attrs(xml_doc, path = paste0("/", xml_root_name)) + # "version" attribute added in files from version 10 + # for 10 and above, early return if ("version" %in% colnames(att)) { version_string <- get_version_string(att[, "version"]) return(version_string) @@ -195,33 +193,6 @@ get_xml_file_version <- function(xml_file_or_doc, param_gen_file = NULL) { return() } -# TODO: see *xml_file_version functions ... -# check_xml_stics_version <- function(xml_file_or_doc, version, -# param_gen_file = NULL) { -check_xml_file_version <- function( - xml_file_or_doc, - stics_version, - param_gen_file = NULL -) { - # xml_version <- get_xml_stics_version(xml_file_or_doc, - # param_gen_file = param_gen_file) - xml_version <- get_xml_file_version( - xml_file_or_doc, - param_gen_file = param_gen_file - ) - - r <- TRUE - - if (is.null(xml_version)) { - return(FALSE) - } - - if (!stics_version %in% xml_version) r <- FALSE - - attr(r, "version") <- xml_version - return(r) -} - get_xml_doc <- function(xml_file_or_doc) { type_id <- c("character", "xml_document") %in% class(xml_file_or_doc) @@ -271,3 +242,80 @@ write_xml_file <- function(xml_doc, file, overwrite = FALSE) { save_xml_doc(xml_doc, file) return(invisible(TRUE)) } + +#' Check if the versions for upgrading xml files are compatible +#' +#' @param xml_doc An SticsRFiles xml_doc object +#' @param from_version STICS starting version +#' @param target_version STICS target version +#' @param verbose logical, TRUE for displaying an information message +#' FALSE otherwise (default) +#' +#' @return a logical value TRUE if changing the version has been successful, +#' or FALSE otherwise; the file initial major version is identical to the +#' target one. +#' +#' @description +#' Defining if the starting version to use for files upgrading process +#' is compatible with the target version. +#' Versions may be given either as character strings (i.e. "V9.2") +#' or numerical value (i.e. 9.2) +#' +#' @keywords internal +#' @noRd +#' +check_and_upgrade_xml_version <- function( + xml_doc, + from_version, + target_version, + verbose = FALSE +) { + # Checking if target version is supported + # raising an error if not! + check_version(target_version) + target_version_num <- get_version_num(target_version) + from_version_major <- get_major_version(get_version_num(from_version)) + target_version_major <- get_major_version(target_version_num) + + if (target_version_major > from_version_major + 1) { + stop( + "The target version ", + target_version, + " must be only one major version higher than the initial version ", + from_version + ) + } + + # checking actual version consistency between from_version + # and file version + file_version_major <- get_major_version( + get_version_num( + get_xml_file_version( + xml_doc + ) + ) + ) + # the file version and the target version are the same! + if (from_version_major == target_version_major) { + if (verbose) { + message( + "The initial file version is already a ", + from_version_major, + "version!" + ) + } + return(FALSE) + } + + if (from_version_major != file_version_major) { + stop( + "The file major version is not consistent with the given", + "initial version!", + "it must be a", + paste0(from_version_major, ".x") + ) + } + # Setting new file STICS version + set_xml_file_version(xml_doc, new_version = target_version_num) + TRUE +} diff --git a/_pkgdown.yml b/_pkgdown.yml index c4139788..39273676 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -2,7 +2,7 @@ destination: docs url: https://sticsrpacks.github.io/SticsRFiles/ reference: - - title: "Upgrade XML files from STICS version 9.* to 10.* format" + - title: "Upgrade XML files to a next major version (i.e. from 9.2 to 10, or from 10 to 11)" desc: Functions for upgrading parameter files contents: - upgrade_workspace_xml @@ -27,8 +27,10 @@ reference: contents: - get_param_info - is_stics_param + - get_xml_files_param_df - get_var_info - is_stics_var + - get_dev_stages - title: "Generate JavaSTICS Input files (XML format)" desc: Functions for generating a set of XML files of a given type (from existing XML file or given template, plus a data.frame describing the parameters to modify for each file to create) @@ -67,7 +69,7 @@ reference: contents: - set_param_txt - - title: "Get values in STICS Input files (Text format)" + - title: "Get values from STICS Input files (Text format)" contents: - get_param_txt - get_plants_nb @@ -75,7 +77,7 @@ reference: - get_varmod - get_lai_forcing - - title: "Get values in STICS Output files" + - title: "Get values from STICS Output files" contents: - get_sim - get_report_results diff --git a/inst/WORDLIST b/inst/WORDLIST index 7a95e9fd..0ca8e67e 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -16,10 +16,13 @@ IRR Ini Intercrops JavaSTICS +JavaStics +Javastics LAI LF Launay's POSIXct +Qmulchdec README Rmd STICS @@ -28,6 +31,7 @@ Stics SticsOnR SticsRPacks SticsRTests +SugarCane TEC Tec USM @@ -35,7 +39,6 @@ USMS USMs Unwatch Usm -VX Vill YYYY aclim @@ -44,11 +47,14 @@ arg argi args azomes +banane calc +canne cff choix climat climatex +climcanj coderes compat concrr @@ -68,6 +74,7 @@ epc extdata fclim fertilizations +fichierpar ficini ficplt finit @@ -103,10 +110,13 @@ nomsol norg num optim +orge param params pargen parnew +patate +patho patm plt pre @@ -116,6 +126,12 @@ rapportP readxl seealso snu +solbanane +solcanne +solorge +solpatate +solsorgho +sorgho sta stade sti diff --git a/inst/extdata/csv.zip b/inst/extdata/csv.zip index 9e84219d..b3564433 100644 Binary files a/inst/extdata/csv.zip and b/inst/extdata/csv.zip differ diff --git a/inst/extdata/obs.zip b/inst/extdata/obs.zip index d26d4f90..36da71b9 100644 Binary files a/inst/extdata/obs.zip and b/inst/extdata/obs.zip differ diff --git a/inst/extdata/src_files/csv/V11.0/inputs.csv b/inst/extdata/src_files/csv/V11.0/inputs.csv new file mode 100644 index 00000000..d86c7dc6 --- /dev/null +++ b/inst/extdata/src_files/csv/V11.0/inputs.csv @@ -0,0 +1,741 @@ +Name;Definition;Unit;File;dim;type;min;max;codeoptimisation;variete +aangst;coefficient of the Angstrom relationship for extraterrestrial radiation;SD;STATION;1;real;0;0.9;1;0 +abscission;fraction of senescent leaves falling to the soil;SD;PARPLT;1;real;0;1;1;0 +aclim;climatic component to calculate actual soil evaporation (Brisson & Perrier, 1991);mm;STATION;1;real;4;25;1;0 +adens;Interplant competition parameter;SD;PARPLT;1;real;-2;0;1;1 +adfol;parameter determining the leaf density evolution within the chosen shape;m-1;PARPLT;1;real;-10;10;1;0 +adil;parameter of the critical dilution curve [Nplante]=adil MS^(-bdil);% ;PARPLT;1;real;1;7;1;0 +adilmax;parameter of the maximum dilution curve [Nplante]=adilmax MS^(-bdilmax);% ;PARPLT;1;real;3;10;1;0 +afpf;parameter of the logistic function defining sink strength of fruits (indeterminate growth) : relative fruit age at which growth is maximal;SD;PARPLT;1;real;0.01;1;1;0 +afruitpot;maximal number of set fruits per inflorescence and per degree day (indeterminate growth);fruits.inflorescence-1.degree_d-1;PARPLT;1;real;0.5;20;1;1 +ahres;parameter of organic residues humification: hres=1-ahres*CsurNres/(bhres+CsurNres);SD;PARAM;21;real;0;100;1;0 +akres;parameter of organic residues decomposition: kres=akres+bkres/CsurNres;d-1;PARAM;21;real;-0.2;1;1;0 +aks;parameter of calculation of the energetic loss between the inside and the outside of a greenhouse ;W.m-2.K-1;STATION;1;real;0.01;100;1;0 +albedo;albedo of the bare dry soil;SD;PARSOL;1;real;0.05;0.6;1;0 +albedomulchplastique;albedo of plastic cover;SD;PARTEC;1;real;0.05;0.8;1;0 +albedomulchresidus;albedo of plant mulch;SD;PARAM;21;real;0.05;0.8;1;0 +albveg;albedo of the vegetation;SD;STATION;1;real;0.05;0.3;1;0 +allocfrmax;maximal daily allocation to fruits;SD;PARPLT;1;real;0.05;1;1;0 +alloperirac;allocation rate of the seed reserves (perisperm) to the rootlet growth;SD;PARPLT;1;real;0.05;1;1;0 +alphaCO2;coefficient accounting for the modification of radiation use efficiency in case of atmospheric CO2 increase;SD;PARPLT;1;real;1;2;1;0 +alphapH;maximal soil pH variation per unit of inorganic N added with slurry;kg-1.ha;PARAM;1;real;0.001;0.02;1;0 +alphaphot;parameter of photoperiodic effect on leaf lifespan;SD;PARPLT;1;real;0;1000;1;0 +alphapt;parameter of Priestley-Taylor formula;SD;STATION;1;real;1;2;1;0 +altinversion;altitude of inversion of the thermal gradient;m;STATION;1;real;0;2000;1;0 +altisimul;altitude of simulated site;m;STATION;1;real;0;2000;1;0 +altistation;altitude of the input metorological station ;m;STATION;1;real;0;2000;1;0 +ampfroid;semi thermal amplitude for vernalising effect;degree_C;PARPLT;1;real;1;30;1;0 +anitcoupe;amount of mineral N added by fertiliser application at each cut of a forage crop;kg.ha-1;PARTEC;20;real;0;400;1;0 +argi;clay content after decarbonation;%;PARSOL;1;real;0;60;1;0 +awb;parameter determining C/N ratio of biomass during organic residues decomposition: CsurNbio=awb+bwb/CsurNres;g.g-1;PARAM;21;real;0;100;1;0 +bangst;coefficient of the Angstrom s relationship for extraterrestrial radiation;SD;STATION;1;real;0;1;1;0 +bdens;minimal plant density above which interplant competition starts;m-2;PARPLT;1;real;1;200;1;1 +bdil;parameter of the critical dilution curve [Nplante]=adil MS^(-bdil);SD;PARPLT;1;real;0.01;0.8;1;0 +bdilmax;parameter of the maximum dilution curve [Nplante]=adilmax MS^(-bdilmax);SD;PARPLT;1;real;0.01;0.8;1;0 +belong;parameter of the curve of coleoptile elongation;degree_d-1;PARPLT;1;real;0.005;0.04;1;0 +beta;parameter of increase of maximal transpiration when a water stress occurs ;SD;PARAM;1;real;1;2;1;0 +bformnappe;coefficient for the water table shape (artificially drained soil);SD;PARAM;1;real;0;1;1;0 +bfpf;parameter of the logistic curve defining sink strength of fruits (indeterminate growth): maximum growth rate relative to maximum fruit weight;SD;PARPLT;1;real;0;30;1;0 +bhres;parameter of organic residues humification: hres=1-ahres*CsurNres/(bhres+CsurNres);g.g-1;PARAM;21;real;-5;2000;1;0 +biorognem;minimal crop biomass removed when topping (automatic calculation);t.ha-1;PARTEC;1;real;0;10;1;0 +bkres;potential rate of decomposition of organic residues: kres=akres+bkres/CsurNres;g.g-1;PARAM;21;real;-2;2;1;0 +bks;parameter of calculation of the energetic lost between the inside and the outside of a greenhouse ;W.m-2.K-1;STATION;1;real;0;100;1;0 +bwb;parameter determining C/N ratio of biomass during organic residues decomposition: CsurNbio=awb+bwb/CsurNres;g.g-1;PARAM;21;real;-500;0;1;0 +cadencerec;number of days between two harvests;d;PARTEC;1;integer;1;30;0;0 +cailloux;volumetric content of pebbles per soil layer;%;PARSOL;5;real;0;100;1;0 +calc;total carbonate content;%;PARSOL;1;real;0;100;1;0 +capiljour;capillary rise upward water flux;mm.d-1;PARSOL;1;real;0.1;20;1;0 +celong;parameter of the plantlet elongation curve;SD;PARPLT;1;real;1;10;1;0 +cfes;parameter defining the soil contribution to evaporation versus depth ;SD;PARSOL;1;real;0.5;4;1;0 +cfpf;parameter of the first potential growth phase of fruit, corresponding to an exponential type function describing the cell division phase;SD;PARPLT;1;real;0.1;100;1;0 +cgrain;slope of the relationship between grain number and growth rate ;t-1.m2.d;PARPLT;1;real;100;5000;1;0 +cgrainv0;fraction of the maximal number of grains when growth rate is zero;SD;PARPLT;1;real;0;1;1;0 +cielclair;fraction of sunny hours allowing the inversion of thermal gradient with altitude;SD;STATION;1;real;0;1;1;0 +cmax_pdenit;Soil organic carbon concentration above which denitrification potential is constant and maximum;g.kg-1;PARAM;1;real;3;40;1;0 +cmin_pdenit;Soil organic carbon concentration below which denitrification potential is constant and minimum;g.kg-1;PARAM;1;real;0;3;1;0 +CNgrainrec;minimal N content of grain at harvest ;g.g-1;PARTEC;1;real;0;1;1;0 +CNresmax;maximum value of C/N ratio of organic residue;g.g-1;PARAM;21;real;3;300;1;0 +CNresmin;minimum value of C/N ratio of organic residue;g.g-1;PARAM;21;real;3;300;1;0 +codabri;option to activate cropping under shelter: 1 = no, 2 = yes;code 1/2;PARTEC;1;integer;1;2;0;0 +codadret;option to calculate mountain climate taking into account the orientation: 1 = south, 2 = north;code 1/2;STATION;1;integer;1;2;0;0 +codaltitude;option to activate the calculation of the climate in altitude: 1 = no, 2 = yes;code 1/2;STATION;1;integer;1;2;0;0 +codazofruit;option to activate the direct effect of N plant status on the fruit/grain number: 1 = no, 2 = yes;code 1/2;PARPLT;1;integer;1;2;0;0 +codazorac;option to activate the effect of N stress on root partitioning within the soil profile: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codcaleffeuil;option to calculate leaf removal by thinning: 1 = proportion of leaf removed (effeuil), 2 = lai minimal (laieffeuil);code 1/2;PARTEC;1;integer;1;2;0;0 +codcalinflo;option to calculate the inflorescences number: 1 = read in param.par, 2 = calculated at the amf stage;code 1/2;PARPLT;1;integer;1;2;0;0 +codcalrogne;option to calculate topping: 1 = forced topping, 2 = automatic calculation;code 1/2;PARTEC;1;integer;1;2;0;0 +codcueille;option to define harvest type: 1 =single harvest (cutting), 2 = multiple harvests (picking);code 1/2;PARTEC;1;integer;1;2;0;0 +code_acti_reserve;option to activate the simulation of Nitrogen and Carbon reserves: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +code_auto_profres;option to define profres: 1 = profres calculated as proftrav *(1-exp(-resk.(proftrav-resz)), 2 = profres read in tec file;code 1/2;PARTEC;1;integer;1;2;0;0 +code_CsurNsol_dynamic;option to activate the dynamic calculation of CsurNsol: 1 = yes, 2 = no;code 1/2;PARAMV6;1;integer;1;2;0;0 +code_diff_root;option to activate the simulation of 2 root classes: 1 =yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +code_hautfauche_dyn;option to activate dynamic calculation of residual LAI, biomass and N content after cutting: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +code_hourly_wfps_denit;option to activate hourly WFPS calculation for denitrification: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +code_hourly_wfps_nit;option to activate hourly WFPS calculation for nitrification: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +code_humirac;option to calculate the root growth reduction factor due to soil water content, 0: no effect of soil water content, 1: using a discontinuous function with a threshold at hminf, 2: using a linear function between hminf and hccf;SD;PARAMV6;1;integer;0;2;0;0 +code_pdenit;option to define the denitrification potential: 1 = read in soil parameter, 2 = calculated from soil organic carbon concentration;code 1/2;PARAM;1;integer;1;2;0;0 +code_ratiodenit;option to define the N2O/(N2+N2O) ratio of denitrification: 1 = constant, 2 = variable;code 1/2;PARAM;1;integer;1;2;0;0 +code_rationit;option to define the N2O/(N2+N2O) ratio of nitrification: 1 = constant, 2 = variable;code 1/2;PARAM;1;integer;1;2;0;0 +code_rootdeposition;code to simulate N demand and allocation to roots and their turn-over during crop growth cycle: 1 = daily deposition, 2 = deposition only at harvest;code 1/2;PARPLT;1;integer;1;2;0;0 +code_shape;code for plant height computation using LAI (1, default), or using phasic development (2) ;code 1/2;PARPLT;1;integer;1;2;0;0 +code_stress_root;option to activate the preferential allocation of biomass to roots in case of water or N stress: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +code_strip;option to activate the computation of light interception for an intercrop: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;100;0;0 +code_tnit;option to define the temperature function for nitrification: 1 = piecewise linear, 2 = gaussian;code 1/2;PARAM;1;integer;1;2;0;0 +code_vnit;option to define the nitrification rate dependence on NH4: 1 = first order, 2 = Michaelis-Menten;code 1/2;PARAM;1;integer;1;2;0;0 +code_WangEngel;option to activate the effect of temperature on development units for emergence according to Wang et Engel (1998): 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codeactimulch;option to activate the mulch effect at soil surface: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codeaumin;option to activate the harvest according to grain/fruit water content: 1 = water content > minimum threshold, 2 = water content < maximum threshold;code 1/2;PARTEC;1;integer;1;2;0;0 +codebeso;option to calculate water requirements: 1 = k.ETP approach, 2= resistive method;code 1/2;PARPLT;1;integer;1;2;0;0 +codebfroid;option to calculate chilling requirements: 1 = no need, 2 = vernalising days, 3 = development stage;code 1/2/3;PARPLT;1;integer;1;3;0;0 +codecailloux;option to take into account pebbles in the water and N balances: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codecalferti;option to activate the automatic calculation of fertilisation rate: 1 = yes, 2 = no;code 1/2;PARAMV6;1;integer;1;2;0;0 +codecalirrig;option to activate the automatic calculation of irrigation requirements: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codecaltemp;option to activate the use of crop temperature for phasic development calculation: 1 = empirical relation, 2 = energy balance;code 1/2;STATION;1;integer;1;2;0;0 +codeclaircie;option to simulate fruit removal: 1 = no, 2 = yes (for smallest fruits) ;code 1/2;PARTEC;1;integer;1;2;0;0 +codeclichange;option to activate climate change: 1 = no, 2 =yes;code 1/2;STATION;1;integer;1;2;0;0 +codedate_irrigauto;option to activate the beginning and the ending dates in case of automatic irrigation: 1 = dates, 2= crop stages, 3 = nothing;code 1/2/3;PARTEC;1;integer;1;3;0;0 +codedateappH2O;option to calculate irrigation dates according to sum of temperatures: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codedateappN;option to calculate mineral fertilizer application dates according to sum of temperatures: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codedecirecolte;option to activate moisture and frost effects on harvest decision: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codedecisemis;option to activate the moisture effect on sowing decision: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codedenit;option to activate the calculation of denitrification model: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codedisrac;option to define root profile in soil: 1 = standard root distribution, 2 = root emission proportional to root biomass;code 1/2;PARPLT;1;integer;1;2;0;0 +codedormance;option to calculate dormancy and chilling requirements: 1 = forcing, 2 = Richardson, 3 = Bidabe;code 1/2/3;PARPLT;1;integer;1;3;0;0 +codeDST;option to activate the variations in physical soil conditions due to tillage: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codeDSTnbcouche;option to define the number of compacted soil layers: 1 = one layer, 2 = two layers;code 1/2;PARTEC;1;integer;1;2;0;0 +codeDSTtass;option to activate the soil compaction at sowing and harvest: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codedyntalle;option to activate the module simulating tillers dynamics: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codeetp;option to calculate PET: 1 = forced Penman, 2 = calculated Penman, 3= Shuttleworth & Wallace, 4 = Priestley & Taylor;code 1/2/3/4;STATION;1;integer;1;4;0;0 +codefauche;option to activate cuts of forage crops: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codefente;option to activate an additional water compartment for swelling soils: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codeffeuil;option to activate plant thinning: 1 = no, 2 = yes;code 1/2;PARTEC;1;integer;1;2;0;0 +codefixpot;option to calculate the maximal symbiotic fixation: 1 = fixed value read in the plant file, 2 = depends on growth rate;code 1/2;PARPLT;1;integer;1;3;0;0 +codefracappN;option to activate split applications of N fertiliser: 1 = absolute value, 2 = fraction of total N application;code 1/2;PARTEC;1;integer;1;2;0;0 +codefrmur;option to define the maturity status of the fruits in the variable CHARGEFRUIT: 1 = including ripe fruits (last box N), 2 = excluding ripe fruits (first N-1 boxes);code 1/2;PARAM;1;integer;1;2;0;0 +codefxn;option to define the effect of soil nitrate on N fixation: 1 = no effect, 2 = effect of nitrate amount, 3 = effect of nitrate concentration;code 1/2/3;PARAM;1;integer;1;3;0;0 +codegdh;option to define the time step used for calculating development units: 1 = hourly, 2 = daily;code 1/2;PARPLT;1;integer;1;2;0;0 +codegdhdeb;option to define the time step used for calculating bud break date: 1 = daily, 2 = hourly growing degrees;code 1/2;PARPLT;1;integer;1;2;0;0 +codegermin;option to simulate germination: 1 = germination phase, 2 = immediate germination;code 1/2;PARPLT;1;integer;1;2;0;0 +codeh2oact;option to activate water stress effect on crop growth: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codehypo;option to simulate plant emergency: 1 = phase of hypocotyl growth (sown crops), 2 = plantation of plantlets;code 1/2;PARPLT;1;integer;1;2;0;0 +codeindetermin;option to simulate the type of leaf growth and fruit growth: 1 = determinate, 2 = undeterminate;code 1/2;PARPLT;1;integer;1;2;0;0 +codeinitprec;option to activate reset of initial conditions in case of chained simulations: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codeINN;option to compute NNI: 1 = cumulative NNI, 2 = instantaneous NNI;code 1/2;PARPLT;1;integer;1;2;0;0 +codeinnact;option to activate N stress effect on root length growth: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codeintercept;option to simulate rainfall interception by leaves: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codeir;option to calculate the ratio grain weight/total biomass: 1 = proportional to time, 2 = proportional to thermal time;code 1/2;PARPLT;1;integer;1;2;0;0 +codejourdes;option to simulate perennial crops destruction;code 1/2;PARTEC;1;integer;1;2;0;0 +codelaitr;option to calculate the intercepted radiation according to: 1 = LAI, 2 = soil cover;code 1/2;PARPLT;1;integer;1;2;0;0 +codelegume;option to define if the crop is a legume fixing N: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codemacropor;option to activate calculation of water flux in soil macroporosity: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codemicheur;option to calculate hourly microclimatic outputs (output file humidite.sti): 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codeminopt;option to simulate a bare soil with a constant water content: 1 = yes, 2 = no ;code 1/2;PARAM;1;integer;1;2;0;0 +codemodfauche;option to define the cutting mode: 1 = automatic calculation depending on phenologic and trophic state, 2 = pre-established calendar in days, 3 = pre-established calendar in degree-days;code 1/2/3;PARTEC;1;integer;1;3;0;0 +codemodlsnow;option to calculate snow variables: 1 = unused, 2 = unused, 3 = Snow model 3;code 1/2/3;STATION;1;integer;1;3;0;0 +codemonocot;option to define the type of plant: 1 = monocot, 2 =dicot;code 1/2;PARPLT;1;integer;1;2;0;0 +codemontaison;option to stop the reserve limitation after stem elongation in grassland: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codemortalracine;option to calculate the mass of dead roots after a cut: 1 = based on masec, 2 = based on masectot;code 1/2;PARPLT;1;integer;1;2;0;0 +codemsfinal;option to define if the biomass and yield are conserved after harvest: 1 = yes, 2 = no (values set at 0);code 1/2;PARAM;1;integer;1;2;0;0 +codenitrif;option to activate the nitrification model: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codeNmindec;option to activate the limitation of residues decomposition due lack of mineral N: 1 = yes, 2 = no;code 1/2;PARAMV6;1;integer;1;2;0;0 +codeoutscient;option to write outputs files with scientific format: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codepaillage;option to define soil cover: 1 = no cover, 2 = plastic cover partly covering the soil ;code 1/2;PARTEC;1;integer;1;2;0;0 +codepalissage;option to define if the plant is fixed onto a vertical support: 1 = no, 2 =yes;code 1/2;PARTEC;1;integer;1;3;0;0 +codeperenne;option to define the crop perenniality: 1 = annual crop, 2 = perennial crop;code 1/2;PARPLT;1;integer;1;2;0;0 +codephot;option to define plant photoperiodism: 1 = yes, 2 = no;code1/2;PARPLT;1;integer;1;2;0;0 +codephot_part;simulation of the effect of decreasing photoperiod on biomass allocation : 1 = yes, 2 = no;code1/2;PARPLT;1;integer;1;2;0;0 +codeplante;option to define the coding name of the plant (3 characters);SD;PARPLT;1;character;0;0;0;0 +codeplisoleN;option to define N requirements at the beginning of the cycle: 1 = dense plant population, 2 = isolated plants;code 1/2;PARPLT;1;integer;1;2;0;0 +codepluiepoquet;option to replace rainfall by irrigation at poquet depth in the case of poquet sowing: 1 = yes, 2 = no ;code 1/2;PARAMV6;1;integer;1;2;0;0 +codeprofmes;option of soil depth for calculating water and N stocks (1 = profmes, 2 = soil depth);code 1/2;PARAM;1;integer;1;2;0;0 +coderacine;option to define the calculation of root growth and extension: 1 = standard profile, 2 = root length density;code 1/2;PARPLT;1;integer;1;2;0;0 +coderecolteassoc;option to harvest intercrop species simultaneously, at the physiological maturity date of the earliest one: 1 = no, 2 = yes;code 1/2;PARTEC;1;integer;1;2;0;0 +coderemontcap;option to activate capillary rise: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +coderes;residue type: 1=mature crop, 2=cover crop, 3=Manure, 4=Green compost, 5=Sewage sludge, 6=Vinasse, 7=Horn, 8=vineyard prunings, 9=pig slurry, 10=rhizomes;code 1 to 10;PARTEC;10;integer;1;21;0;0 +coderes_pature;residue type used to simulate bovine feces: 1-10;code 1 to 10;PARAMV6;1;integer;1;10;0;0 +coderetflo;option to activate the effect of water stress on development before the stage DRP (filling of harvested organs): 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codernet;option to calculate net radiation: 1 = Brunt method, 2 = Cellier method;code 1/2;STATION;1;integer;1;2;0;0 +codesensibilite;option to activate the sensitivity analysis version of the model: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codeseprapport;option to select the column separator in the rapport.sti output file: 1 = space separator, 2 = separator indicated in the file rapport.sti;code 1/2;PARAM;1;integer;1;2;0;0 +codesimul;option to define the type of crop simulation: culture or 0 (LAI calculated by the model), feuille or 1 (LAI forced);SD / code 0/1;USM/USMXML;1;character/integer;0;1;0;0 +codesnow;option to activate the snow module: 1 = yes, 2 = no;code 1/2;PARAM;1;integer;1;2;0;0 +codestade;option to force one or several development stages: 1 = yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codestrphot;option to activate the photoperiodic stress on lifespan (1 = yes, 2 = no);code 1/2;PARPLT;1;integer;1;2;0;0 +codesuite;option to simulate several successive USM: 0 = no, 1 = yes;code 0/1;USM;1;integer;0;1;0;0 +codeSWDRH;optin to calculate the duration of surface wetness: 1=yes , 2 = no;code 1/2;PARAMV6;1;integer;1;2;0;0 +codesymbiose;option to calculate symbiotic N fixation: 1 = based on critical dilution curve, 2 = specific calculation of N fixation;code 1/2;PARAM;1;integer;1;2;0;0 +codetaille;option to activate pruning: 1 = no, 2 = yes;code 1/2;PARTEC;1;integer;1;2;0;0 +codetemp;option to calculate thermal time for plant growth: 1 = based on air temperature, 2 = based on crop temperature;code 1/2;PARPLT;1;integer;1;2;0;0 +codetempfauche;option to define the reference temperature to compute cutting sum of temperatures: 1 = upvt, 2 = udevair;code 1/2;PARTEC;1;integer;1;2;0;0 +codetemprac;option to calculate thermal time for root growth: 1 = crop temperature, 2 = soil temperature;code 1/2;PARPLT;1;integer;1;2;0;0 +codetesthumN;option to define automatic N fertilisation calculation: 1 = based on rainfall, 2 = based on soil water content;code 1/2;PARAMV6;1;integer;1;2;0;0 +codetradtec;option to activate the effect of crop structure on radiation transfer: 1 =yes, 2 = no;code 1/2;PARTEC;1;integer;1;2;0;0 +codetranspitalle;option to choose the ratio used to calculate tiller mortality: 1 = et/etm, 2 = epc2/eopC;code 1/2;PARPLT;1;integer;1;2;0;0 +codetransrad;option to calculate radiation interception: 1 = Beer law, 2 = radiative transfer;code 1/2;PARPLT;1;integer;1;2;0;0 +codetremp;option to activate heat effect on grain filling: 1 = yes, 2 = no;code 1/2;PARPLT;1;integer;1;2;0;0 +codetrosee;option to calculate hourly dew temperature : 1 = linear interpolation, 2 = sinusoidal interpolation (Debele Bekele et al, 2007);code 1/2;PARAMV6;1;integer;1;2;0;0 +codetycailloux;code for pebble type;code 1 to 10;PARAM;1;integer;1;10;0;0 +codetypeng;code for fertiliser type;code 1 to 8;PARAM;1;integer;1;8;0;0 +codetypres;code for organic residue;code 1 to 10;PARAM;1;integer;1;21;0;0 +codevar;code for cultivar name;SD;PARPLT;1;character;0;1;0;0 +codgelflo;option to activate the frost effect at anthesis: 1 = no, 2 = yes;code 1/2;PARPLT;1;integer;1;2;0;0 +codgeljuv;option to activate the frost effect on LAI at the juvenile stage: 1 = no, 2 = yes;code 1/2;PARPLT;1;integer;1;2;0;0 +codgellev;option to activate the frost effect on plantlet growth: 1 = no, 2 = yes;code 1/2;PARPLT;1;integer;1;2;0;0 +codgelveg;option to activate the frost effect on LAI at adult stage: 1 = no, 2 = yes;code 1/2;PARPLT;1;integer;1;2;0;0 +codhauteff;option to define the height of leaf removal (if the thinning option is activated): 1 = bottom of the canopy, 2 = top of the canopy;code 1/2;PARTEC;1;integer;1;2;0;0 +codhnappe;option to calculate the watertable level : 1 = mean height, 2 = height at the distance distdrain;code 1/2;PARAM;1;integer;1;2;0;0 +codlainet;option to calculate the LAI: 1 = net LAI, 2 = difference between gross LAI and senescent LAI;code 1/2;PARPLT;1;integer;1;2;0;0 +codlocferti;option to define localized fertilisation: 1 = at soil surface, 2 = deeper in the soil;code 1/2;PARTEC;1;integer;1;2;0;0 +codlocirrig;option to define localized irrigation: 1= above the foliage, 2= below the foliage above the soil, 3 = in the soil;code 1/2/3;PARTEC;1;integer;1;3;0;0 +codoptim;option to activate the optimisation code: 0 = no, 1 = optimisation for the main crop, 2 = optimisation for the associated crop;code 0/1/2;USM;1;integer;0;2;0;0 +codrainage;option to simulate artificial drainage: 1 = yes, 2 = no;code 1/2;PARSOL;1;integer;1;2;0;0 +codrecolte;option to define harvest strategy: 1 = at physiological maturity, 2 = according to water content, 3 = according to sugar content, 4 = according to nitrogen content, 5 = according to oil content;code 1 to 5;PARTEC;1;integer;1;5;0;0 +codrognage;option to activate foliage control by trimming: 1 = no, 2 = yes;code 1/2;PARTEC;1;integer;1;2;0;0 +codtrophrac;option to activate a trophic effect on root length growth: 1 = permanent link, 2 = link by thresholds, 3 = no effect;code 1/2/3;PARPLT;1;integer;1;3;0;0 +coef_calcul_doseN;crop N concentration below which there is no N return to the soil through animal urine;g.kg-1;PARAMV6;1;real;1;30;1;0 +coef_calcul_qres;crop N concentration used to calculate animal feces from animal grass dry matter intake;g.kg-1;PARAMV6;1;real;1;10;1;0 +coefamflax;multiplier coefficient applied to the thermal time requirement between stages AMF and LAX;SD;PARPLT;1;real;1;2;1;0 +coefb;parameter defining the radiation saturation effect on biomass conversion efficiency;g.MJ-1;PARAM;1;real;0.05;0.15;1;0 +coefdevil;multiplier coefficient of the outdoor radiation to calculate PET inside of a greenhouse;SD;STATION;1;real;0.3;1.2;1;0 +coefdrpmat;multiplier coefficient applied to the thermal time requirement between stages DRP and MAT;SD;PARPLT;1;real;1;2;1;0 +coefflodrp;multiplier coefficient applied to the thermal time requirement between stages FLO and DRP;SD;PARPLT;1;real;1;2;1;0 +coeflaxsen;multiplier coefficient applied to the thermal time requirement between stages LAX and SEN;SD;PARPLT;1;real;1;2;1;0 +coeflevamf;multiplier coefficient applied to the thermal time requirement between stages LEV and AMF;SD;PARPLT;1;real;1;2;1;0 +coeflevdrp;multiplier coefficient applied to the thermal time requirement between stages LEV and DRP;SD;PARPLT;1;real;1;2;1;0 +coefmshaut;ratio of crop biomass to useful cutting height of crops ;t.ha-1.m-1;PARPLT;1;real;2;50;1;0 +coefracoupe;proportion of roots dying after a cut of a forage crop;SD;PARPLT;1;real;0.001;1;1;0 +coefrnet;coefficient applied to the (outdoor) net radiation to calculate the net radiation under a greenhouse;SD;STATION;1;real;0.001;1;1;0 +coefsenlan;multiplier coefficient applied to the thermal time requirement between stages SEN and LAN;SD;PARPLT;1;real;1;2;1;0 +concirr;concentration of mineral N (NH4+NO3-N) in irrigation water;kg.ha-1 mm-1;PARTEC;1;real;0;0.2;1;0 +concNnodseuil;maximal concentration of mineral N in soil for nodule onset ;kg.ha-1.mm-1;PARPLT;1;real;0;10;1;0 +concNrac0;nitrate-N concentration (if codefxN=3) or nitrate-N amount (if codefxN=2) above which N fixation is totally inhibited;kg.ha-1.mm-1 or kg.ha-1.cm-1;PARPLT;1;real;0;10;1;0 +concNrac100;nitrate-N concentration (if codefxN=3) or nitrate-N amount (if codefxN=2) below which N fixation is maximum;kg.ha-1.mm-1 or kg.ha-1.cm-1;PARPLT;1;real;0;2;1;0 +concrr;concentration of mineral N (NH4+NO3-N) in the rain;kg.ha-1 mm-1;STATION;1;real;0;3;1;0 +concseuil;minimum concentration of NO3-N in soil (unavailable for leaching and for uptake);kg.ha-1 mm-1;PARSOL;1;real;0;0.5;1;0 +contrdamax;maximal reduction factor applied to root growth rate due to soil strengthness (high bulk density);SD;PARPLT;1;real;0;1;1;0 +corecTrosee;temperature to substract to Tmin to estimate dew point temperature (in case of missing air humidity data);degree_C;STATION;1;real;-5;5;1;0 +couvermulchplastique;fraction of soil covered by the plastic mulch ;SD;PARTEC;1;real;0;1;1;0 +Crespc;C content in organic residue (DW);%;PARTEC;11;real;0;100;1;0 +Crespc_pature;C content in animal feces (FW);%;PARAMV6;1;real;0;100;1;0 +CroCo;fraction of organic residue which is decomposable;SD;PARAM;21;real;0;1;1;0 +croirac;elongation rate of the root apex;cm.degree_d-1;PARPLT;1;real;0;0.5;1;1 +CsurNres;C/N ratio of residue;g.g-1;PARTEC;11;real;4;300;1;0 +CsurNsol0;Initial C to N ratio of soil humus;g.g-1;PARSOL;1;real;8;20;1;0 +culturean;number of calendar years involved in the crop cycle (1 = 1 year e.g. for spring crops, 2 = two years, e.g. for winter crops);SD;USM/USMXML;1;integer;1;2;1;0 +cvent;parameter of the climate calculation under shelter;SD;STATION;1;real;0.001;1;1;0 +cwb;minimum ratio C/N of microbial biomass decomposing organic residues;g.g-1;PARAM;21;real;5;60;1;0 +dachisel;bulk density of soil after soil tillage (Chisel);g.cm-3;PARTEC;1;real;0.8;1.7;1;0 +dacohes;bulk density of soil below which root growth is reduced due to a lack of soil cohesion;g.cm-3;PARAM;1;real;0.001;1.4;1;0 +DAF;bulk density of fine earth fraction in each soil layer;g.cm-3;PARSOL;5;real;0.8;2;1;0 +dalabour;bulk density of soil after full inversion tillage (plough);g.cm-3;PARTEC;1;real;0.8;2;1;0 +darecolte;bulk density of soil after harvest;g.cm-3;PARTEC;1;real;0.8;2;1;0 +dasemis;bulk density of soil after sowing;g.cm-3;PARTEC;1;real;0.8;2;1;0 +daseuilbas;bulk density of soil above which root growth is maximal;g.cm-3;PARAM;1;real;1;1.4;1;0 +daseuilhaut;bulk density of soil above which root growth becomes impossible;g.cm-3;PARAM;1;real;1.4;2.5;1;0 +datedeb_irrigauto;starting date of automatic irrigations;julian_d;PARTEC;1;integer;1;731;0;0 +datedebut;starting date of simulation;julian_d;USM/USMXML;1;integer;0;730;0;0 +datefin;ending date of simulation;julian_d;USM/USMXML;1;integer;0;730;0;0 +datefin_irrigauto;ending date of automatic irrigations;julian_d;PARTEC;1;integer;1;731;0;0 +debsenrac;thermal time units defining the beginning of root senescence (root life time);degree_d;PARPLT;1;real;0;2000;1;0 +deneng;maximal fraction of the mineral fertilizer that can be denitrified (used if codedenit is not activated);SD;PARAM;8;real;0;1;1;0 +densinitial;initial root density in each of the five soil layers;cm.cm-3;INIT;5;real;0;10;1;0 +densitesem;plant sowing density ;plant.m-2;PARTEC;1;real;0.05;2000;1;0 +deshydbase;rate of change of water content in fruits (FW) vs thermal time (>0 or <0);g.g-1.degree_d-1;PARPLT;1;real;-0.02;0.02;1;1 +dfolbas;minimal foliar density within the considered shape;m2.m-3;PARPLT;1;real;1;10;1;0 +dfolhaut;maximal foliar density within the considered shape;m2.m-3;PARPLT;1;real;1;10;1;0 +dfpf;parameter of the first potential growth phase of fruit, corresponding to an exponential type function describing the cell division phase;SD;PARPLT;1;real;0.01;5;1;0 +difN;diffusion coefficient of nitrate in soil at field capacity;cm2.d-1;PARAM;1;real;0.01;0.1;1;0 +diftherm;soil thermal diffusivity;cm2.s-1;PARAM;1;real;0.001;0.01;1;0 +distdrain;distance between mole drains;cm;PARAM;1;real;0;25000;1;0 +DKmax;difference between the maximum and the minimum melting rates for snow;mm.degree_C-1.d-1;STATION;1;real;1;2;1;0 +dlaimax;maximum rate of net daily increase of LAI;m2.degree_d-1;PARPLT;1;real;0.000005;0.5;1;1 +dlaimaxbrut;maximum rate of gross daily increase of LAI;m2.degree_d-1;PARPLT;1;real;0.000005;0.5;1;1 +dlaimin;accelerating parameter for the lai growth rate;SD;PARPLT;1;real;0;1;1;0 +dltamsmaxsen;growth rate above which there is no more photoperiodic effect on senescence;t.ha-1.d-1;PARPLT;1;real;0.01;0.2;1;0 +dltamsminsen;growth rate below which the photoperiodic effect on senescence is maximal;t.ha-1.d-1;PARPLT;1;real;0.01;0.2;1;0 +doseI;daily amount of irrigation water;mm.d-1;PARTEC;30;real;0;500;1;0 +doseirrigmin;minimal amount of daily irrigation;mm.d-1;PARTEC;1;real;0;500;1;0 +doseN;daily amount of N added through fertilizers;kg.ha-1.d-1;PARTEC;20;real;0;500;1;0 +dosimx;maximum amount of irrigation water applied daily (mode automatic irrigation);mm.d-1;PARTEC;1;real;10;500;1;0 +dosimxN;maximum amount of fertiliser N applied daily (mode automatic fertilisation);kg.ha-1.d-1;PARAMV6;1;real;5;500;1;0 +dpHvolmax;maximal pH increase following the application of slurry;SD;PARAM;1;real;0;3;1;0 +draclong;maximum rate of root length production per plant;cm.plant-1.degree_d-1;PARPLT;1;real;1;1000;1;0 +dureefruit;duration of the fruit between onset and physiological maturity;degree_d;PARPLT;1;real;10;2000;1;1 +durvieF;maximal lifespan of an adult leaf expressed in summation of Q10=2 (2**(T-Tbase));SD;PARPLT;1;real;10;500;1;1 +durviesupmax;relative additional lifespan due to N excess in plant (INN > 1);SD;PARPLT;1;real;0;1;1;0 +E;snow compaction parameter;mm.mm-1.d-1;STATION;1;real;0;0.05;1;0 +eau_mini_decisemis;minimum amount of rainfall required to start sowing (when codedecisemis is activated);mm;PARTEC;1;integer;0;40;0;0 +eaures;water content of organic residue (FW);%;PARTEC;11;real;0;99;1;0 +eaures_pature;water content of animal feces deposited on soil during grazing (FW);%;PARAMV6;1;real;0;100;1;0 +ecartdrain;distance between mole drains;cm;PARSOL;1;real;100;5000;1;0 +efcroijuv;maximum radiation use efficiency during the juvenile phase (LEV-AMF);g.MJ-1;PARPLT;1;real;1;7;1;0 +efcroirepro;maximum radiation use efficiency during the grain filling phase (DRP-MAT);g.MJ-1;PARPLT;1;real;1;10;1;0 +efcroiveg;maximum radiation use efficiency during the vegetative stage (AMF-DRP);g.MJ-1;PARPLT;1;real;1;10;1;0 +effeuil;fraction of leaf removed by plant thinning;SD;PARTEC;1;real;0;1;1;0 +effirr;irrigation efficiency;SD;PARTEC;1;real;0.2;1;1;0 +efremobil;Efficiency of use of carbohydrates in storage organs of perennials;SD;PARPLT;1;real;0;1;1;0 +elmax;maximum elongation of the coleoptile in darkness condition;cm;PARPLT;1;real;2;40;1;0 +elongation;plant elongation factor for the shaded component of a dominated plant: more elongation when > 1.0 compared to reference in sole crop;SD;PARPLT;1;real;1;2;1;0 +engamm;fraction of ammonium in the N fertilizer;SD;PARAM;8;real;0;1;1;0 +engrais;fertilizer type (1=ammonium nitrate, 2=UAN solution, 3=urea, 4=anhydrous ammonia, 5=ammonium sulfate, 6=ammonium phosphate, 7=calcium nitrate, 8= fixed efficiency fertiliser);SD;PARTEC;10;integer;1;8;0;0 +engrais_pature;fertilizer type used to mimic urine excretion (1=ammonium nitrate, 2=UAN solution, 3=urea, 4=anhydrous ammonia, 5=ammonium sulfate, 6=ammonium phosphate, 7=calcium nitrate, 8= fixed efficiency fertiliser);SD;PARAMV6;1;integer;1;8;0;0 +engraiscoupe;fertilizer type (1=ammonium nitrate, 2=UAN solution, 3=urea, 4=anhydrous ammonia, 5=ammonium sulfate, 6=ammonium phosphate, 7=calcium nitrate, 8= fixed efficiency fertiliser);SD;PARTEC;10;integer;1;8;0;0 +envfruit;fraction of envelop in grainmaxi;SD;PARPLT;1;real;0;0.5;1;0 +epc;thickness of each soil layer;cm ;PARSOL;5;integer;1;1000;1;0 +epd;thickness of mixing cells in each soil layer ( = 2 * dispersion length);cm;PARSOL;5;integer;1;50;0;0 +extin;extinction coefficient of photosynthetic active radiation in the canopy;SD;PARPLT;1;real;0.1;1.5;1;1 +fclim1;name of the first climate file;SD;USM/USMXML;1;character;0;0;0;0 +fclim2;name of the second climate file;SD;USM/USMXML;1;character;0;0;0;0 +fhminsat;relative soil mineralisation rate at water saturation;SD;PARAM;1;real;0;1;1;0 +finert;initial fraction of inert pool in the soil organic pool (= stable SON/ total SON);SD;PARSOL;1;real;0;1;1;0 +finit;name of the initialisation file ;SD;USM/USMXML;1;character;0;0;0;0 +fixmax;maximal N symbiotic fixation rate;kg.ha-1.d-1;PARPLT;1;real;2;12;1;0 +fixmaxgr;maximal N symbiotic fixation rate per unit of grain growth rate;kg.t-1;PARPLT;1;real;0;50;1;0 +fixmaxveg;maximal N symbiotic fixation rate per unit of vegetative growth rate;kg.t-1;PARPLT;1;real;0;50;1;0 +flagecriture;option for writing the output files (1 = mod_history.sti, 2=daily outputs,4= report outputs, 8=balance outputs,16 = profile outputs, 32= debug outputs, 64 = screen outputs) sum them to have several types of outputs;SD;PARAM;1;integer;0;127;0;0 +flai;name of the LAI file;SD;USM/USMXML;1;character;0;0;0;0 +fNCbiomin;minimal value for the ratio N/C of the microbial biomass when N limits decomposition;g.g-1;PARAM;1;real;0.01;0.1;1;0 +fNmindecmin;minimal fraction of mineral N available for residues decomposition (if codeNmindec is activated);SD;PARAMV6;1;real;0;1;1;0 +fnx;maximum fraction of NH4 nitrified each day (first order model);SD;PARAM;1;real;0.01;1;1;0 +fobs;name of the observed file;SD;USM/USMXML;1;character;0;0;0;0 +forme;option to define the shape of leaf density profile: 1 = rectangle, 2 = triangle;code 1/2;PARPLT;1;integer;1;2;0;0 +fplt;name of the plant file;SD;USM/USMXML;1;character;0;0;0;0 +fracN;proportion of fertiliser N applied at each application;%;PARTEC;10;real;5;100;1;0 +fredkN;reduction factor of decomposition rate of organic residues when mineral N is limiting;SD;PARAM;1;real;0.1;1;1;0 +fredlN;reduction factor of decomposition rate of microbial biomass when mineral N is limiting;SD;PARAM;1;real;0.2;1;1;0 +fredNsup;additional reduction factor of residues decomposition rate when mineral N is highly limiting;SD;PARAM;1;real;0;1;1;0 +fstation;name of the weather station file;SD;USM/USMXML;1;character;0;0;0;0 +ftec;name of the technical file;SD;USM/USMXML;1;character;0;0;0;0 +ftemh;parameter (1/2) of the temperature function on humus decomposition rate;degree_K-1;PARAM;1;real;0.05;0.5;1;0 +ftemha;parameter (2/2) of the temperature function on humus decomposition rate;SD;PARAM;1;real;10;50;1;0 +ftemr;parameter (1/2) of the temperature function on decomposition rate of organic residues;degree_K-1;PARAM;1;real;0.05;0.5;1;0 +ftemra;parameter (2/2) of the temperature function on decomposition rate of organic residues;SD;PARAM;1;real;5;30;1;0 +GMIN1;parameter (1/7) of the new mineralization function (Clivot et al, 2017), mineralization rate constant;d-1;PARAM;1;real;0;1;1;0 +GMIN2;parameter (2/7) of the new mineralization function (Clivot et al, 2017), clay content factor;%-1;PARAM;1;real;0;0.1;1;0 +GMIN3;parameter (3/7) of the new mineralization function (Clivot et al, 2017), CaCO3 content factor;%-1;PARAM;1;real;0;0.1;1;0 +GMIN4;parameter (4/7) of the new mineralization function (Clivot et al, 2017), pH factor 1 ;pH-1;PARAM;1;real;0;1;1;0 +GMIN5;parameter (5/7) of the new mineralization function (Clivot et al, 2017), pH factor 2;pH;PARAM;1;real;3;11;1;0 +GMIN6;parameter (6/7) of the new mineralization function (Clivot et al, 2017), C/N soil factor 1;g.g-1;PARAM;1;real;0;1;1;0 +GMIN7;parameter (7/7) of the new mineralization function (Clivot et al, 2017), C/N soil factor 2;g.g-1;PARAM;1;real;5;35;1;0 +gradtn;thermal gradient in altitude for minimal temperatures ;degree_C.100m-1;STATION;1;real;0.1;3;1;0 +gradtninv;thermal gradient in altitude for minimal temperatures under the inversion level;degree_C.100m-1;STATION;1;real;0.1;3;1;0 +gradtx;thermal gradient in altitude for maximal temperatures ;degree_C.100m-1;STATION;1;real;0.1;3;1;0 +h2ofeuiljaune;water content of yellow leaves (FW);g.g-1;PARPLT;1;real;0.05;1;1;0 +h2ofeuilverte;water content of green leaves (FW);g.g-1;PARPLT;1;real;0.5;1;1;0 +h2ofrvert;water content of fruits before the beginning of dehydration (FW);g.g-1;PARPLT;1;real;0.1;1;1;0 +h2ograinmax;maximal water content of fruits at harvest (FW);g.g-1;PARTEC;1;real;0.05;1;1;0 +h2ograinmin;minimal water content of fruits at harvest (FW);g.g-1;PARTEC;1;real;0.05;1;1;0 +h2oreserve;water content of crop reserve (FW);g.g-1;PARPLT;1;real;0.5;1;1;0 +h2otigestruc;water content of structural stem part (FW);g.g-1;PARPLT;1;real;0.5;1;1;0 +hautbase;basal height of crop;m;PARPLT;1;real;0.1;2;1;1 +hautcoupe;cut height for forage crops (calendar fixed);m;PARTEC;20;real;0.01;0.5;1;0 +hautcoupedefaut;cut height for forage crops (calendar calculated);m;PARTEC;1;real;0.01;0.5;1;0 +haut_dev_x0;Inflexion point parameter for the height~phasic development relationship;SD;PARPLT;1;real;0;5000.0;1;0 +haut_dev_k;Logistic growth rate parameter for the height~phasic development relationship;SD;PARPLT;1;real;0;0.05;1;0 +hauteur_threshold;height difference between crops in intercrop below which we consider the canopies mixed (homogeneous). Used in radiative transfer option as a fallback to Beer-Lambert.;m;PARAM;1;real;0.05;1;1;0 +hautmax;maximum height of crop;m;PARPLT;1;real;0.1;5;1;1 +hautmaxtec;maximal height of the plant allowed by the management;m;PARTEC;1;real;0.5;3;1;0 +hautrogne;cutting height for trimmed plants;m;PARTEC;1;real;0.2;2;1;0 +hcccx;gravimetric water content at field capacity of each type of pebble (dry soil);%;PARAM;10;real;10;110;1;0 +hccf;gravimetric water content at field capacity of each soil layer (in fine earth, dry soil);%;PARSOL;5;real;10;110;1;0 +Hinitf;initial gravimetric water content of each soil layer (in fine earth, dry soil);%;INIT;5;real;5;110;1;0 +hminf;gravimetric water content at wilting point of each soil layer (in fine earth, dry soil);%;PARSOL;5;real;2;25;1;0 +hminm;relative water content (fraction of field capacity) below which mineralisation rate is nil;SD;PARAM;1;real;0;1;1;0 +hminn;relative water content (fraction of field capacity) below which nitrification rate is nil;SD;PARAM;1;real;0;1;1;0 +hoptm;relative water content (fraction of field capacity) above which mineralisation rate is maximum;SD;PARAM;1;real;0.2;1;1;0 +hoptn;relative water content (fraction of field capacity) above which nitrification rate is maximum;SD;PARAM;1;real;0.2;1;1;0 +huilerec;minimal oil content of fruits at harvest (FW);g.g-1;PARTEC;1;real;0.1;1;1;0 +humcapil;threshold of soil gravimetric water content under which capillary rise occurs (dry soil);%;PARSOL;1;real;2;10;1;0 +humirac_decisemis;relative soil moisture threshold above which sowing is possible (0 = no sensitivity to drought, 1 = highly sensitive);SD;PARTEC;1;real;0;1;1;0 +iamf;forced day for AMF stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +ichsl;soil number in the param.soil file;SD;USM;1;integer;1;999;0;0 +idebdorm;day of the dormancy entrance;julian_d;PARPLT;1;integer;1;999;0;0 +idor;day of the dormancy entrance;julian_d;java;1;integer;1;999;0;0 +idrp;forced day for DRP stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +ifindorm;day of dormancy break;julian_d;PARPLT;1;integer;1;999;0;0 +iflo;forced day for FLO stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +ifwater;end of simulation as cumulative julian day (>365 spans into next year);julian_d;USM;1;integer;1;731;0;0 +ilan;forced day for LAN stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +ilax;forced day for LAX stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +ilev;forced day for LEV stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +imat;forced day for MAT stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +infil;infiltrability rate at the base of each soil layer (if codemacropor = 1);mm.d-1;PARSOL;6;real;0.1;100;1;0 +inflomax;maximal number of inflorescences per plant;SD;PARPLT;1;real;0;100;1;1 +infrecouv;ulai at the stage AMF (maximal rate of leaf growth);SD;PARPLT;1;real;0;3;1;0 +inilai;initial value of lai for cotyledons;m2.m-2;PARPLT;1;real;0;1;1;0 +iniprofil;option of smoothing out the initial mineral N and water profiles (spline function): 2 = no, 1 = yes;SD;PARAM;1;integer;1;2;0;0 +inngrain1;NNI below which net absorption of N during grain filling is maximal;SD;PARPLT;1;real;0.3;2;1;0 +inngrain2;NNI above which net absorption of N during grain filling is nil ;SD;PARPLT;1;real;0.3;2;1;0 +INNimin;INNI (instantaneous NNI) corresponding to INNmin;SD;PARPLT;1;real;0;1;1;0 +INNmin;minimum value of NNI possible for the crop;SD;PARPLT;1;real;0;1;1;0 +innsen;parameter of the N stress function active on senescence (INNsenes);SD;PARPLT;1;real;-2;1;1;1 +innturgmin;parameter of the N stress function active on leaf expansion (INNLAI);SD;PARPLT;1;real;-2;1;1;0 +interrang;width of the crop interrow;m;PARTEC;1;real;0;10;1;0 +iplt;date of sowing;julian_d;java;1;integer;1;731;0;0 +iplt0;date of sowing;julian_d;PARTEC;1;integer;1;731;0;0 +irazomax;Maximum nitrogen harvest index;SD;PARPLT;1;real;0;1;1;0 +irec;forced day for REC stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +irecbutoir;latest date of harvest (imposed if the crop cycle is not finished at this date);julian_d;PARTEC;1;integer;1;731;0;0 +irmax;maximum harvest index;SD;PARPLT;1;real;0.2;1;1;0 +irrlev;amount of irrigation applied automatically on the sowing day to allow germination when the model calculates irrigation;mm;PARAM;1;real;0;50;1;0 +isen;forced day for SEN stage (999 = not forced);julian_d;PARTEC;1;integer;1;731;0;0 +isnu;date when the soil is bare;julian_d;java;1;integer;1;731;0;0 +iwater;starting day of the simulation;julian_d;USM;1;integer;1;731;0;0 +julapI;date(s) of irrigation ;julian_d;PARTEC;30;integer;1;731;0;0 +julapN;date(s) of fertilizer application;julian_d;PARTEC;20;integer;1;731;0;0 +juldes;day of perennial crop destruction;julian_d;PARTEC;1;integer;1;731;0;0 +juleclair;day of fruits removal;julian_d;PARTEC;10;integer;1;731;0;0 +juleffeuil;day of leaf removal;julian_d;PARTEC;1;integer;1;731;0;0 +julfauche;date(s) of each cut for forage crops ;julian_d;PARTEC;20;integer;1;731;0;0 +julouvre2;day (1/2) of opening the shelter;julian_d;PARTEC;1;integer;1;731;0;0 +julouvre3;day (2/2) of opening the shelter;julian_d;PARTEC;1;integer;1;731;0;0 +julres;date(s) of organic residue addition to soil;julian_d;PARTEC;11;integer;1;731;0;0 +julrogne;day of plant trimming;julian_d;PARTEC;1;integer;1;731;0;0 +jultaille;day of pruning;julian_d;PARTEC;1;integer;1;731;0;0 +jultrav;date(s) of soil tillage;julian_d;PARTEC;11;integer;1;731;0;0 +julvernal;day of initiation of vernalisation in perennial crops (between 1 and 365) ;julian_d;PARPLT;1;integer;1;731;0;0 +jvc;number of vernalising days or dormancy units;d;PARPLT;1;real;0;150;1;1 +jvcmini;minimum number of vernalising days ;d;PARPLT;1;real;0;20;1;0 +Kamm;affinity constant for NH4 in nitrification (if Michaelis_Menten formalism is used);mg.L-1;PARAM;1;real;1;100;1;0 +kbio;potential decay rate of microbial biomass decomposing organic residues;d-1;PARAM;21;real;0;0.2;1;0 +kcouvmlch;extinction coefficient connecting the soil cover to the amount of plant mulch;SD;PARAM;21;real;0;1;1;0 +Kd;Affinity constant for nitrate in denitrification;mg.L-1;PARAM;1;real;10;500;1;0 +kdesat;rate constant of de-saturation ;d-1;PARAM;1;real;1;20;1;0 +kdisrac;rate constant defining root length distribution throughout the profile;cm-2;PARPLT;1;real;0.0002;0.002;1;0 +khaut;extinction coefficient connecting LAI to crop height;SD;PARPLT;1;real;0.2;2;1;1 +Kmabs1;affinity constant of N uptake by roots for the fast uptake system;micromole.L-1;PARPLT;1;real;20;200;1;0 +Kmabs2;affinity constant of N uptake by roots for the low uptake system;micromole.L-1;PARPLT;1;real;4000;40000;1;0 +kmax;maximum crop coefficient for water requirements (= MET/PET);SD;PARPLT;1;real;0.5;4;1;0 +Kmin;minimum snow melting rate on 21 December;mm.degree_C-1.d-1;STATION;1;real;1.5;2.5;1;0 +krepracperm;parameter of biomass root partitioning : evolution of the ratio root/total (permanent trophic link);SD;PARPLT;1;real;0.0001;1;1;0 +krepracseu;parameter of biomass root partitioning : evolution of the ratio root/total (trophic link by thresholds);SD;PARPLT;1;real;0.0001;1;1;0 +ksol;soil hydraulic conductivity in the vicinity of mole drains;SD;PARSOL;1;real;0.0001;1;1;0 +kstemflow;extinction coefficient connecting LAI to stemflow;SD;PARPLT;1;real;0.1;2;1;0 +ktrou;extinction coefficient of PAR through the crop (used in the radiative transfer module);SD;PARPLT;1;real;0.1;2;1;1 +lai0;initial leaf area index;m2.m-2;INIT;1;real;0;10;1;0 +laicomp;LAI above which competition between plants starts;m2.m-2;PARPLT;1;real;0;1;1;0 +laidebeff;LAI at the beginning of leaf removal;m2.m-2;PARTEC;1;real;1;10;1;0 +laieffeuil;LAI removed from the crop at day juleffeuil;m2.m-2;PARTEC;1;real;0.05;10;1;0 +laiplantule;LAI of plantlet at the plantation;m2.m-2;PARPLT;1;real;0;8;1;0 +lairesiduel;residual LAI after each cut of forage crop;m2.m-2;PARTEC;20;real;0;2;1;0 +largrogne;trimmed width;m;PARTEC;1;real;0.1;2;1;0 +largtec;technical width;m;PARTEC;1;real;0.1;2;1;0 +latitude;latitude of the site;degree;STATION;1;real;-90;90;1;0 +locferti;soil depth at which fertiliser is applied;cm;PARTEC;1;integer;0;30;0;0 +locirrig;soil depth at which irrigation is applied;cm;PARTEC;1;integer;1;30;0;0 +longsperac;specific root length;cm.g-1;PARPLT;1;real;250;25000;1;0 +lvfront;root density at the root apex;cm.cm-3;PARPLT;1;real;0.02;1;1;0 +lvmax;maximum root length density in the top soil (used to calculate root mass);cm.cm-3;PARPLT;1;real;0;5;1;0 +lvopt;root length density (RLD) above which water and N uptake are maximum and independent of RLD;cm.cm-3;PARAM;1;real;0.2;1;1;0 +magrain0;initial grain dry weight;g.m-2;INIT;1;real;0;5;1;0 +maperenne0;initial value of biomass of storage organs in perennial crops;t.ha-1;INIT;1;real;0;30;1;0 +margerogne;topping occurs when plant height exceeds (hautrogne+margerogne) when automatic trimming is activated;m;PARTEC;1;real;0.01;1;1;0 +masec0;initial plant biomass (if the option to simulate N and C reserves is not activated);t.ha-1;INIT;1;real;0;10;1;0 +masecmeta;biomass of the plantlet supposed to be composed of metabolic N;t.ha-1;PARPLT;1;real;0.1;1;1;0 +masecNmax;aerial biomass above which N dilution occurs (critical and maximal curves);t.ha-1;PARPLT;1;real;0.05;5;1;0 +masecnp0;initial aerial biomass;t.ha-1;INIT;1;real;0;10;1;0 +masecplantule;initial shoot biomass of plantlet;t.ha-1;PARPLT;1;real;0.002;4;1;0 +masvolcx;bulk density of each type of pebble;g.cm-3;PARAM;10;real;0.5;5;1;0 +max_pdenit;maximal value of the denitrification potential (if code_pdenit = 2);kg.ha-1.cm-1.d-1;PARAM;1;real;0;100;1;0 +maxazorac;mineral N concentration in soil above which root growth is maximum ;kg.ha-1.cm-1;PARPLT;1;real;0.1;5;1;0 +maxtalle;maximum tillers density per soil area;tiller.m-2;PARPLT;1;real;0;10000;1;0 +min_pdenit;minimal value of the denitrification potential (if code_pdenit = 2);kg.ha-1.cm-1.d-1;PARAM;1;real;0;2;1;0 +minazorac;mineral N concentration in soil below which root growth is reduced ;kg.ha-1.cm-1;PARPLT;1;real;0;5;1;0 +minefnra;reduction factor on root growth when soil mineral N is limiting (< minazorac);SD;PARPLT;1;real;0;1;1;0 +mouillabil;maximum wettability of leaves;mm.m-2;PARPLT;1;real;0.05;3;1;0 +mouillabilmulch;maximum wettability of crop mulch;mm.t-1.ha;PARAM;5;real;0.05;5;1;0 +mscoupemini;minimum value of aerial biomass required to make a cut of forage crop;t.ha-1;PARTEC;20;real;1;10;1;0 +msresiduel;residual aerial biomass after a cut of a forage crop;t.ha-1;PARTEC;20;real;0;5;1;0 +mulchbat;mulch depth at which a crust occurs (a value must be given but if in the plt.xml the vigueurbat parameter is equal to 1 then the parameter is inactive);cm;PARSOL;1;real;0;2;1;0 +nbans;number of years for a simulation;years;USM;1;integer;1;100;0;0 +nbcueille;number of fruit harvests during the crop cycle: 1 = one harvest, 2 = several harvests;code 1/2;PARTEC;1;integer;1;2;0;0 +nbfeuilplant;leaf number per plant when planting;leaf.plant-1;PARPLT;1;integer;0;10;0;0 +nbfgellev;leaf number at the end of the juvenile phase (frost sensitivity) ;leaf.plant-1;PARPLT;1;integer;1;5;0;0 +nbgrmax;maximum number of fruits per surface area;m-2;PARPLT;1;real;0;1000000;1;1 +nbgrmin;minimum number of fruits per surface area;m-2 ;PARPLT;1;real;0;10000;1;1 +nbinflo;imposed number of inflorescences per plant;inflorescence.plant-1;PARPLT;1;real;1;1000;1;1 +nbinfloecl;number of inflorescences or fruits removed at fruit removal ;number.plant-1;PARTEC;10;real;0;10;1;0 +nbj_pr_apres_semis;number of days used to calculate rainfall requirement to start sowing (if codedecisemis is activated);d;PARTEC;1;integer;1;20;0;0 +nbjgerlim;maximum number of days after grain imbibition allowing full germination;d;PARPLT;1;integer;1;50;0;0 +nbjgrain;number of days used to compute the number of viable grains;d;PARPLT;1;integer;5;40;0;1 +nbjmaxapresrecolte;maximum number of days allowed for harvest (if the soil compaction option is activated);d;PARTEC;1;integer;0;90;0;0 +nbjmaxapressemis;maximum number of days allowed for sowing (if the soil compaction option is activated);d;PARTEC;1;integer;0;90;0;0 +nbjoursrrversirrig;number of days during which rainfall is replaced by irrigation in the soil after a sowing poquet;d;PARAMV6;1;integer;0;366;0;0 +nbjres;number of residue additions;SD;PARTEC;1;integer;0;8;0;0 +nbjseuiltempref;number of days without frost for sowing (if sowing decision option is activated);d;PARTEC;1;integer;1;60;0;0 +nbjtrav;number of tillage operations;SD;PARTEC;1;integer;0;8;0;0 +nboite;number of boxes or age classes of fruits used to calculate fruit growth for undeterminate crops ;SD;PARPLT;1;integer;1;20;0;0 +nbplantes;number of simulated plants;SD;USM/USMXML;1;integer;1;2;0;0 +NH3ref;NH3 concentration in the atmosphere;microgram.m-3;STATION;1;real;0;10;1;0 +nh4_min;minimum (fixed ?) NH4 concentration found in soil;mg.kg-1;PARAM;1;real;0;20;1;0 +NH4initf;initial amount of NH4-N in each of the soil layers (in fine earth);kg.ha-1;INIT;5;real;0;200;1;0 +nlevlim1;number of days after germination after which plant emergence is reduced;d;PARPLT;1;integer;1;100;0;0 +nlevlim2;number of days after germination after which plant emergence is impossible;d;PARPLT;1;integer;1;100;0;0 +Nmeta;proportion of metabolic N in the plantlet;%;PARPLT;1;real;0;100;1;0 +Nminres;proportion of mineral N content in organic residues (FW);%;PARTEC;11;real;0;30;1;0 +Nminres_pature;proportion of N mineral content in animal feces (FW);%;PARAMV6;1;real;0;100;1;0 +NO3initf;initial amount of NO3-N in each of the soil layers (in fine earth);kg.ha-1;INIT;5;real;0;200;1;0 +nom;name of the USM;SD;USM;1;character;0;0;0;0 +nomsol;name of the soil;SD;USM/USMXML;1;character;0;0;0;0 +Norg;soil organic N content in the first soil layer (constant down to the depth profhum, dry soil);%;PARSOL;1;real;5.00E-02;0.5;1;0 +Nreserve;maximal proportion of N in plant reserves (difference between the maximal and critical dilution curves);%;PARPLT;1;real;0;100;1;0 +nrow;number of plant rows in a strip (if code_strip is activated);SD;PARTEC;1;integer;1;10;1;0 +numsol;soil number;SD;PARSOL/USM;1;integer;0;1000;0;0 +nw_height;Importance of the N & W stress effect on plant heigth.;SD;PARPLT;1;real;0;1;1;0 +obstarac;soil depth at which root growth is stopped due to physical constraints;cm;PARSOL;1;real;10;1000;1;0 +ombragetx;change in air temperature in the northern hillslope of mountains (activated if codadret=2);degree_C;STATION;1;real;-5;5;1;0 +option_pature;option to activate grazing in pastures: 1 = yes, 2 = no;code 1/2;PARAMV6;1;integer;1;2;0;0 +orgeng;maximal amount of fertilizer N that can be immobilized in the soil (fraction for type 8);kg.ha-1;PARAM;8;real;0;100;1;0 +orientrang;direction of crop rows (relative to north);rad;PARTEC;1;real;0;6.28;1;0 +parazofmorte;C/N ratio of dead leaves when crop NNI = 1;g.g-1;PARPLT;1;real;10;20;1;0 +Parazoper;C/N ratio of perennial organs when crop NNI = 1;g.g-1;PARPLT;1;real;10;50;1;0 +parazorac;C/N ratio of roots when crop NNI = 1;g.g-1;PARPLT;1;real;10;50;1;0 +ParazoTmorte;C/N ratio of dead stems when crop NNI = 1;g.g-1;PARPLT;1;real;10;250;1;0 +parsurrg;fraction of photosynthetically active radiation in global radiation (PAR/RG);SD;PARAM;1;real;0.4;0.6;1;0 +par_to_net;Coefficient to compute plant net radiation from absorbed PAR;SD;PARAM;1;real;0.5;1;1;0 +patm;atmospheric pressure;hPa;STATION;1;real;800;1200;1;0 +penterui;runoff coefficient taking into account the plant mulch;SD;PARSOL;1;real;0;5;1;0 +pentinflores;parameter used to calculate the inflorescences number ;kg-1;PARPLT;1;real;0;10;1;1 +pentlaimax;parameter of the logistic curve of LAI growth ;SD;PARPLT;1;real;0;10;1;0 +pentrecouv;parameter of the logistic curve of soil cover rate;SD;PARPLT;1;real;0;10;1;0 +pertes_restit_ext;fraction of animal feces and urine not returned in grazed paddocks (e.g. in resting area, milking parlour, housing and paths/roads);SD;PARAMV6;1;real;0;1;1;0 +pgrainmaxi;maximum grain weight (at 0% water content);g;PARPLT;1;real;0;5;1;1 +pH0;Initial soil pH (water solution);pH;PARSOL;1;real;4;9;1;0 +phiv0;parameter allowing the calculation of the climate under shelter;SD;STATION;1;real;0;0.01;1;0 +pHmaxden;pH beyond which the N2O molar fraction in the denitrification process is minimum (<= ratiodenit);pH;PARAM;1;real;6;10;1;0 +pHmaxnit;soil pH above which nitrification rate is maximum;pH;PARAM;1;real;6;9;1;0 +pHmaxvol;soil pH above which NH3 volatilisation derived from fertiliser is maximum;pH;PARAM;1;real;6;9;1;0 +pHminden;pH below which the N2O molar fraction in the denitrification process is maximum (100% );pH;PARAM;1;real;3;6.5;1;0 +pHminnit;soil pH below which nitrification is nil;pH;PARAM;1;real;3;6;1;0 +pHminvol;soil pH below which NH3 volatilisation derived from fertiliser is nil;pH;PARAM;1;real;3;6;1;0 +phobase;basal photoperiod ;hours;PARPLT;1;real;0;24;1;1 +phobasesen;photoperiod under which the photoperiodic stress affects the lifespan of leaves;hours;PARPLT;1;real;1;12;1;0 +phosat;saturating photoperiod;hours;PARPLT;1;real;0;24;1;1 +pHvols;parameter used to calculate the variation of soil pH after the addition of slurry;pH;PARAM;1;real;5;9;1;0 +phyllotherme;thermal duration between the apparition of two successive leaves on the main stem;degree_d;PARPLT;1;real;10;150;1;0 +plNmin;minimal amount of rain required to start an automatic N fertilisation;mm.d-1;PARAM;1;real;5;30;1;0 +pluiebat;minimal amount of rain required to create a soil crust (a value must be given but if in the plt.xml the vigueurbat parameter is equal to 1 then the parameter is inactive);mm.d-1;PARSOL;1;real;5;100;1;0 +pminruis;minimal amount of rain required to produce runoff ;mm.d-1;PARAM;1;real;2;50;1;0 +Pns;density of the new snow;kg.m-3;STATION;1;real;10;200;1;0 +potgermi;soil water potential below which seed imbibition is impeded;MPa;PARPLT;1;real;-4.2;-0.1;1;0 +primingmax;maximum priming ratio (relative to SOM decomposition rate);SD;PARAM;1;real;1;5;1;0 +prof;snow cover threshold for snow insulation;cm;STATION;1;real;5;15;1;0 +profdenit;soil depth at which denitrification is active (if codedenit is activated);cm;PARSOL;1;real;10;40;1;0 +profdrain;depth of mole drains;cm;PARSOL;1;integer;20;200;1;0 +profhum;maximum soil depth with an active biological activity;cm;PARSOL;1;real;10;150;1;0 +profhumrecolteuse;soil depth at which moisture is considered to allow harvesting (if soil compaction is activated);cm;PARTEC;1;real;0;100;1;0 +profhumsemoir;soil depth at which moisture is considered to allow sowing (if soil compaction is activated);cm;PARTEC;1;real;0;100;1;0 +profimper;upper depth of the impermeable layer (from the soil surface);cm;PARSOL;1;real;50;200;1;0 +proflabour;minimal soil depth for ploughing (if soil compaction is activated);cm;PARAM;1;real;0;100;1;0 +profmes;depth of measurement of the soil water reserve;cm;PARTEC;1;real;10;1000;1;0 +profnod;maximum depth at which N2 fixation by legume crops is possible;cm;PARPLT;1;real;10;50;1;0 +profres;upper depth of organic residue incorporation ;cm;PARTEC;11;real;0;30;1;0 +profsem;depth of sowing;cm;PARTEC;1;real;0;10;1;0 +proftrav;maximum depth affected by soil tillage;cm;PARTEC;11;real;0;50;1;0 +proftravmin;minimal soil depth for chisel tillage (if soil compaction is activated);cm;PARAM;1;real;0;100;1;0 +prophumtassrec;soil moisture content (fraction of field capacity) above which compaction may occur and delay harvest;SD;PARAM;1;real;0.8;1.8;1;0 +prophumtasssem;soil moisture content (fraction of field capacity) above which compaction may occur and delay sowing;SD;PARAM;1;real;0.8;1.8;1;0 +propjgermin;minimal fraction of the duration nbjgerlim when the temperature is higher than the temperature threshold Tdmax ;%;PARPLT;1;real;0;1;1;0 +proprac;ratio of root mass to aerial mass at harvest;SD;PARAM;1;real;0.05;0.5;1;0 +propracfmax;fraction of fine roots emitted in the layer 0-1 cm (in length, maximum value over the root profile);SD;PARPLT;1;real;0.51;0.95;1;0 +Propres;maximal fraction of the biomass reserves that can be mobilized from aerial organs in all crops;SD;PARPLT;1;real;0;1;1;0 +propresP;maximal fraction of the biomass reserves that can be mobilized from storage organs in perennials;SD;PARPLT;1;real;0;1;1;0 +PropresPN;maximal fraction of the N reserves that can be mobilized from storage organs in perennials;SD;PARPLT;1;real;0;1;1;0 +ps0;initial density of the snow cover;kg.m-3;INIT;1;real;10;1000;1;0 +psihucc;soil water potential corresponding to field capacity ;MPa;PARAM;1;real;-5;-0.1;1;0 +psihumin;soil water potential corresponding to wilting point;MPa;PARAM;1;real;-5;-0.1;1;0 +psisto;potential of stomatal closing (absolute value);bars;PARPLT;1;real;1;25;1;1 +psiturg;potential of the beginning of decrease of the cellular extension (absolute value);bars;PARPLT;1;real;1;15;1;1 +q0;cumulative soil evaporation above which evaporation rate is decreased ;mm;PARSOL;1;real;0;50;1;0 +q10;Q10 used for the dormancy break calculation ;SD;PARPLT;1;real;1.5;3.5;1;0 +qmulchdec;maximal amount of decomposable mulch;t.ha-1;PARAM;21;real;0;5;1;0 +qmulchruis0;amount of mulch above which runoff is suppressed;t.ha-1;PARAM;21;real;0;5;1;0 +QNperenne0;initial value of nitrogen amount in storage organs in perennial crops ;kg.ha-1;INIT;1;real;0;500;1;0 +QNplante0;initial N amount in the plant (if the option to simulate N and C reserves is not activated);kg.ha-1;INIT;1;real;0;500;1;0 +QNplantenp0;initial N amount in non-perennial organs of the plant;kg.ha-1;INIT;1;real;0;200;1;0 +QNpltminINN;minimal amount of N in the plant required to compute INN;kg.ha-1;PARAM;1;real;0;50;1;0 +qres;mass of organic residues added to soil (fresh weight);t.ha-1;PARTEC;11;real;0;200;1;0 +Qtot_N;total amount of mineral N fertilizer applications ;kg.ha-1;PARTEC;1;real;0;200;1;0 +ra;aerodynamic resistance (used in volatilization module with the PET approach);s.m-1;STATION;1;real;10;70;1;0 +rapdia;ratio of coarse roots diameter to fine roots diameter;SD;PARPLT;1;real;1;9.12;1;0 +rapforme;ratio of thickness to width of the crop shape (negative when the base of the form < top);SD;PARPLT;1;real;-5;5;1;0 +rapNmindec;slope of the linear relationship between the fraction of mineral N available for residue decomposition and the amount of C in decomposing residues;g.g-1;PARAMV6;1;real;0;0.01;1;0 +rapsenturg;threshold soil water content active to simulate water senescence stress as a proportion of the turgor stress;SD;PARPLT;1;real;0.5;1.5;1;1 +ratiodenit;fraction of N2O emitted per unit of N denitrified;SD;PARAM;1;real;0;1;1;0 +ratiodurvieI;life span of early leaves expressed as a fraction of the life span of the last leaves emitted DURVIEF;SD;PARPLT;1;real;0;1;1;0 +ratiol;water stress index below which irrigation is started in automatic mode (0 in manual mode);SD;PARTEC;1;real;0.2;1;1;0 +ratiolN;nitrogen stress index below which fertilisation is started in automatic mode (0 in manual mode);SD;PARAMV6;1;real;0.2;1;1;0 +rationit;fraction of N2O emitted per unit of N nitrified;SD;PARAM;1;real;0;1;1;0 +ratiosen;fraction of senescent biomass (relative to total biomass);SD;PARPLT;1;real;0;1;1;0 +rayon;average radius of the roots;cm ;PARPLT;1;real;0.005;0.07;1;0 +rdrain;radius of the mole drains;cm;PARAM;1;real;1;100;1;0 +remobres;fraction of daily remobilisable C reserves;d-1;PARPLT;1;real;0;0.5;1;0 +repracpermax;maximum root biomass relative to total biomass (permanent trophic link);SD;PARPLT;1;real;0.1;0.9;1;0 +repracpermin;minimum root biomass relative to total biomass (permanent trophic link);SD;PARPLT;1;real;0.1;0.9;1;0 +repracseumax;maximum root biomass relative to total biomass (trophic link by thresholds);SD;PARPLT;1;real;0.1;0.9;1;0 +repracseumin;minimum root biomass relative to total biomass (trophic link by thresholds);SD;PARPLT;1;real;0.1;0.9;1;0 +resk;parameter 1/2 used to calculate profres (if code_auto_profres = 1): profres = proftrav *(1-exp(-resk.(proftrav-resz));cm-1;PARTEC;1;real;0.05;0.25;1;0 +resplmax;maximal reserve of biomass;t.ha-1;PARPLT;1;real;0;100;1;0 +ressuite;type of crop residue: roots / whole_crop / straw+roots / stubble+roots / prunings;SD;PARTEC;1;character;0;0;0;0 +restemp0;initial biomass of metabolic reserves in the perennial organs;t.ha-1;INIT;1;real;0;15;1;0 +restit;option of restitution in case of pasture yes (1), no (2);code 1/2;PARTEC;20;integer;1;2;0;0 +resz;parameter 2/2 used to calculate profres (if code_auto_profres = 1): profres = proftrav *(1-exp(-resk.(proftrav-resz));cm;PARTEC;1;real;1;10;1;0 +rsmin;minimal stomatal resistance of leaves;s.m-1;PARPLT;1;real;20;500;1;0 +RTD;root tissue density;g.cm-3;PARPLT;1;real;0.05;0.8;1;0 +rugochisel;roughness length of bare soil after chisel tillage (if soil compaction is activated);m;PARTEC;1;real;0.01;0.2;1;0 +rugolabour;roughness length of bare soil after mouldboard ploughing (if soil compaction is activated);m;PARTEC;1;real;0.01;0.2;1;0 +ruisolnu;fraction of runoff (relative to total rainfall) in a bare soil ;SD;PARSOL;1;real;0;1;1;0 +scale_tdenitopt;parameter related to the range of optimum temperature for denitrification;SD;PARAM;1;real;10;40;1;0 +scale_tnitopt;parameter related to the range of optimum temperature for nitrification;SD;PARAM;1;real;5;30;1;0 +Sdepth0;initial snow cover depth;m;INIT;1;real;0;3;1;0 +Sdry0;initial water in solid state in the snow cover;mm;INIT;1;real;0;300;1;0 +sea;specific area of fruit envelops;cm2.g-1;PARPLT;1;real;0;300;1;0 +sensanox;index of anoxia sensitivity (0 = insensitive, 1 = highly sensitive);SD;PARPLT;1;real;0;1;1;0 +sensiphot;index of photoperiod sensitivity (1 = insensitive, 0 = highly sensitive);SD;PARPLT;1;real;0;1;1;1 +sensrsec;index of root sensitivity to drought (1 = insensitive, 0 = highly sensitive);SD;PARPLT;1;real;0;1;1;0 +separateurrapport;column separator in rapport.sti file;SD;PARAM;1;character;0;0;0;0 +seuilLAIapex;maximal value of LAI+LAIapex when LAIapex is > 0;m2.m-2;PARPLT;1;real;0;10;1;0 +seuilmortalle;relative transpiration threshold to calculate tiller mortality;mm.d-1;PARPLT;1;real;0;10;1;0 +seuilreconspeupl;tiller density below which the entire population will not be regenerated;m-2;PARPLT;1;real;0;4000;1;0 +sigmadistalle;parameter used for calculating tiller mortality (gamma law) ;SD;PARPLT;1;real;0;0.5;1;0 +slamax;maximum SLA (specific leaf area) of green leaves;cm2.g-1;PARPLT;1;real;50;500;1;1 +slamin;minimum SLA (specific leaf area) of green leaves;cm2.g-1;PARPLT;1;real;50;500;1;0 +spfrmax;maximal sources/sinks value allowing the trophic stress calculation for fruit onset;SD;PARPLT;1;real;0.7;2;1;0 +spfrmin;minimal sources/sinks value allowing the trophic stress calculation for fruit onset;SD;PARPLT;1;real;0;1;1;0 +splaimax;maximal sources/sinks value allowing the trophic stress calculation for leaf growing;SD;PARPLT;1;real;0.7;2;1;0 +splaimin;minimal value of ratio sources/sinks for the leaf growth ;SD;PARPLT;1;real;0.01;1;1;0 +stade0;crop stage at the beginning of simulation;SD;INIT;1;character;0;0;0;0 +stadebbchamf;equivalent stage in BBCH-scale (amf= maximum acceleration of leaf growth, end of juvenile phase) ;SD;PARPLT;1;character;0;0;0;0 +stadebbchdebdes;equivalent stage in BBCH-scale (debdes= date of onset of water dynamics in harvested organs);SD;PARPLT;1;character;0;0;0;0 +stadebbchdrp;equivalent stage in BBCH-scale (drp = starting date of filling of harvested organs);SD;PARPLT;1;character;0;0;0;0 +stadebbchfindorm;equivalent stage in BBCH-scale (end of dormancy);SD;PARPLT;1;character;0;0;0;0 +stadebbchflo;equivalent stage in BBCH-scale (flowering);SD;PARPLT;1;character;0;0;0;0 +stadebbchger;equivalent stage in BBCH-scale (germination);SD;PARPLT;1;character;0;0;0;0 +stadebbchlax;equivalent stage in BBCH-scale (lax = maximum leaf area index, end of leaf growth );SD;PARPLT;1;character;0;0;0;0 +stadebbchlev;equivalent stage in BBCH-scale (emergence);SD;PARPLT;1;character;0;0;0;0 +stadebbchmat;equivalent stage in BBCH-scale (maturity);SD;PARPLT;1;character;0;0;0;0 +stadebbchnou;equivalent stage in BBCH-scale (fruit set);SD;PARPLT;1;character;0;0;0;0 +stadebbchplt;equivalent stage in BBCH-scale (sowing);SD;PARPLT;1;character;0;0;0;0 +stadebbchrec;equivalent stage in BBCH-scale (harvest);SD;PARPLT;1;character;0;0;0;0 +stadebbchsen;equivalent stage in BBCH-scale (senescence);SD;PARPLT;1;character;0;0;0;0 +stadecoupedf;stage of automatic cut for forage crops;SD;PARTEC;1;character;0;0;0;0 +stage_end_irrigauto;phenological stage for ending automatic irrigations (plt, ger, lev, amf, lax, drp ,flo, sen, rec, mat, debdorm, findorm);SD;PARTEC;1;character;0;0;0;0 +stage_start_irrigauto;phenological stage for starting automatic irrigations (plt, ger, lev, amf, lax, drp ,flo, sen, rec, mat, debdorm, findorm);SD;PARTEC;1;character;0;0;0;0 +stage_const_height;Stage at which the plant height remains constant (lax, sen, flo, drp, mat, rec, and no for nothing);SD;PARPLT;1;character;0;0;0;0 +stamflax;cumulative thermal time between the stages AMF (maximum acceleration of leaf growth, end of juvenile phase) and LAX (maximum leaf area index, end of leaf growth );degree_d;PARPLT;1;real;0;6000;1;1 +stdnofno;cumulative thermal time between the beginning and the end of nodulation;degree_d;PARPLT;1;real;0;500;1;0 +stdordebour;cumulative thermal time between the dormancy break and the bud break ;degree_d;PARPLT;1;real;0;20000;1;1 +stdrpdes;cumulative thermal time between the DRP stage (starting date of filling of harvested organs) and DEBDES (date of onset of water dynamics in harvested organs);degree_d;PARPLT;1;real;0;900;1;1 +stdrpmat;cumulative thermal time between the stages DRP (starting date of filling of harvested organs) and MAT (maturity);degree_d;PARPLT;1;real;0;2000;1;1 +stdrpnou;cumulative thermal time between the stages DRP (starting date of filling of harvested organs) and NOU (end of setting);degree_d;PARPLT;1;real;0;6000;1;1 +stemflowmax;maximal fraction of rainfall flowing down along the stems ;SD;PARPLT;1;real;0;1;1;0 +stflodrp;cumulative thermal time between FLO (anthesis) and DRP (starting date of filling of harvested organs) (only for indication);degree_d;PARPLT;1;real;0;500;1;1 +stfnofvino;cumulative thermal time between the end of the nodulation and the end of the nodule life ;degree_d;PARPLT;1;real;0;500;1;0 +stlaxsen;cumulative thermal time between the stages LAX (maximum leaf area index, end of leaf growth ) and SEN (beginning of leaf senescence) ;degree_d;PARPLT;1;real;0;6000;1;1 +stlevamf;cumulative thermal time between the stages LEV (emergence) and AMF (maximum acceleration of leaf growth, end of juvenile phase) ;degree_d;PARPLT;1;real;0;6000;1;1 +stlevdno;cumulative thermal time between emergence and the beginning of nodulation ;degree_d;PARPLT;1;real;0;500;1;0 +stlevdrp;cumulative thermal time between the stages LEV (emergence) and DRP (starting date of filling of harvested organs);degree_d;PARPLT;1;real;0;6000;1;1 +stoprac;stage when root growth stops (LAX= maximum leaf area index, end of leaf growth or SEN=beginning of leaf senescence);SD;PARPLT;1;character;0;0;0;0 +stpltger;cumulative thermal time allowing germination;degree_d;PARPLT;1;real;0;100;1;0 +stressdev;maximum phasic delay allowed due to stresses ;SD;PARPLT;1;real;0.1;0.9;1;0 +stsenlan;cumulative thermal time between the stages SEN (beginning of leaf senescence) and LAN;degree_d;PARPLT;1;real;0;6000;1;1 +stubblevegratio;fraction of unharvested biomass stubble to vegetative biomass at harvest;SD;PARTEC;1;real;0;1;1;0 +sucrerec;minimal sugar concentration at harvest (fresh matter);g.g-1;PARTEC;1;real;0.0001;0.5;1;0 +surfapex;equivalent surface of a transpiring apex;m2;PARPLT;1;real;0;0.0001;1;0 +surfouvre1;relative area of the shelter opened the first day of opening;SD;PARTEC;1;real;0.1;0.8;1;0 +surfouvre2;relative area of the shelter opened the second day of opening;SD;PARTEC;1;real;0.1;0.8;1;0 +surfouvre3;relative area of the shelter opened the third day of opening;SD;PARTEC;1;real;0.1;0.8;1;0 +Swet0;initial water in liquid state in the snow cover;mm;INIT;1;real;0;300;1;0 +swfacmin;minimal value for drought stress index (turfac, swfac, senfac);SD;PARPLT;1;real;0;1;1;1 +SWrf;degree day temperature index for snow refreezing;mm.degree_C-1.d-1;STATION;1;real;0;0.01;1;0 +tauxexportfauche;fraction of cut which is exported;SD;PARTEC;20;real;0;1;1;0 +tauxmortresP;mortality rate of perennial organs ;d-1;PARPLT;1;real;0;0.5;1;0 +tauxrecouvkmax;soil cover rate corresponding to the maximal crop coefficient for water requirement (plant surface / soil surface);m2.m-2;PARPLT;1;real;0.5;2;1;0 +tauxrecouvmax;maximal soil cover rate (plant surface / soil surface);m2.m-2;PARPLT;1;real;0.5;2;1;0 +tcmax;maximum temperature at which growth ceases;degree_C;PARPLT;1;real;10;50;1;0 +tcmin;minimum temperature at which growth ceases;degree_C;PARPLT;1;real;-10;15;1;0 +tcxstop;temperature beyond which foliar growth stops;degree_C;PARPLT;1;real;0;100;1;0 +tdebgel;temperature below which frost affects plant growth;degree_C;PARPLT;1;real;-5;5;1;0 +tdenitopt_gauss;optimum temperature for denitrification;degree_C;PARAM;1;real;0;60;1;0 +tdmax;maximum temperature above which development stops;degree_C;PARPLT;1;real;15;40;1;0 +tdmaxdeb;maximal temperature for hourly calculation of phasic duration between dormancy and bud breaks;degree_C;PARPLT;1;real;0;40;1;0 +tdmin;minimum temperature below which development stops;degree_C;PARPLT;1;real;-10;15;1;0 +tdmindeb;minimal thermal threshold for hourly calculation of phasic duration between dormancy and bud breaks;degree_C;PARPLT;1;real;0;40;1;0 +tdoptdeb;optimal temperature for calculation of phasic duration between dormancy and bud breaks;degree_C;PARPLT;1;real;0;30;1;0 +temax;maximal temperature above which plant growth stops;degree_C;PARPLT;1;real;15;40;1;0 +temin;minimum temperature for development;degree_C;PARPLT;1;real;-10;15;1;1 +tempdeshyd;increase in fruit dehydration rate due to the increase in crop temperature (Tcult-Tair);%.degree_C-1;PARPLT;1;real;0.0001;0.05;1;0 +tempfauche;cumulative thermal time between two cuts of forage crops ;degree_d;PARTEC;20;real;0;2000;1;0 +tempnod1;temperature parameter (1/4) used to calculate N fixation by legumes ;degree_C;PARPLT;1;real;-10;40;1;0 +tempnod2;temperature parameter (2/4) used to calculate N fixation by legumes ;degree_C;PARPLT;1;real;-10;40;1;0 +tempnod3;temperature parameter (3/4) used to calculate N fixation by legumes ;degree_C;PARPLT;1;real;-10;40;1;0 +tempnod4;temperature parameter (4/4) used to calculate N fixation by legumes ;degree_C;PARPLT;1;real;-10;40;1;0 +teopt;optimal temperature (1/2) for plant growth;degree_C;PARPLT;1;real;10;30;1;1 +teoptbis;optimal temperature (2/2) for plant growth;degree_C;PARPLT;1;real;10;30;1;0 +tfroid;optimal temperature for vernalisation;degree_C;PARPLT;1;real;-5;10;1;0 +tgelflo10;temperature resulting in 10% of frost damages on flowers and fruits;degree_C;PARPLT;1;real;-25;0;1;0 +tgelflo90;temperature resulting in 90% of frost damages on flowers and fruits;degree_C;PARPLT;1;real;-25;0;1;0 +tgeljuv10;temperature resulting in 10% of frost damage on LAI (juvenile stage);degree_C;PARPLT;1;real;-25;0;1;1 +tgeljuv90;temperature resulting in 90% of frost damage on LAI (juvenile stage);degree_C;PARPLT;1;real;-25;0;1;0 +tgellev10;temperature resulting in 10% of frost damages on plantlet;degree_C;PARPLT;1;real;-25;0;1;1 +tgellev90;temperature resulting in 90% of frost damages on plantlet;degree_C;PARPLT;1;real;-25;0;1;0 +tgelveg10;temperature resulting in 10% of frost damage on LAI (adult stage);degree_C;PARPLT;1;real;-25;0;1;1 +tgelveg90;temperature resulting in 90% of frost damage on LAI (adult stage);degree_C;PARPLT;1;real;-25;0;1;0 +tgmin;minimum temperature below which emergence is stopped;degree_C;PARPLT;1;real;-10;15;1;0 +tigefeuil;ratio stem (structural part)/leaf;SD;PARPLT;1;real;0;3;1;1 +tigefeuilcoupe;ratio stem (structural part)/leaf on the cutting day;SD;PARPLT;1;real;0;3;1;0 +tletale;lethal temperature for the plant;degree_C;PARPLT;1;real;-30;-1;1;0 +tmaxremp;maximal temperature above which grain filling stops;degree_C;PARPLT;1;real;10;40;1;0 +tmaxseuil;maximum temperature when snow cover is higher than prof;degree_C;STATION;1;real;-0.5;0.5;1;0 +Tmf;threshold temperature for snow melting;degree_C;STATION;1;real;0;1;1;0 +tmin_mineralisation;minimal temperature for decomposition of humified organic matter;degree_C;PARAM;1;real;0.05;0.5;1;0 +tminremp;minimal temperature below which grain filling stops;degree_C;PARPLT;1;real;0;20;1;0 +tminseuil;minimum temperature when snow cover is higher than prof;degree_C;STATION;1;real;-1;0;1;0 +tnitmax;maximal temperature above which nitrification stops;degree_C;PARAM;1;real;30;50;1;0 +tnitmin;minimal temperature below which nitrification stops;degree_C;PARAM;1;real;-10;20;1;0 +tnitopt;optimal temperature (1/2) for nitrification;degree_C;PARAM;1;real;10;40;1;0 +tnitopt_gauss;optimal temperature (1/2) for nitrification;degree_C;PARAM;1;real;0;50;1;0 +tnitopt2;optimal temperature (2/2) for nitrification;degree_C;PARAM;1;real;20;45;1;0 +transplastic;transmission coefficient of the plastic shelter;SD;PARTEC;1;real;0.3;0.9;1;0 +trefh;reference temperature for decomposition of humified organic matter;degree_C;PARAM;1;real;-10;20;1;0 +trefr;reference temperature for decomposition of organic residues;degree_C;PARAM;1;real;-10;20;1;0 +trmax;maximum air temperature (tmax) above which all precipitation is assumed to be rain;degree_C;STATION;1;real;0.5;1.5;1;0 +tsmax;maximum air temperature (tmax) below which all precipitation is assumed to be snow;degree_C;STATION;1;real;-3;-0.5;1;0 +tustressmin;water stress index (min(turfac,inns)) below which there is an extra LAI senescence;SD;PARPLT;1;real;0.3;1;1;0 +typecailloux;Pebbles type: 1 = Beauce limestone1, 2 = Beauce limestone, 3 = Lutetian limestone, 4 = Lutetian Brackish marl and limestone, 5 = morainic gravels, 6 = unweathered flint, sandstone or granite, 7 = weathered granite, 8 = Jurassic limestone 9 = Pebbles from Magneraud;SD;PARSOL;5;integer;1;10;0;0 +typsol;soil type;SD;PARSOL;1;character;0;0;0;0 +udlaimax;ulai from which the rate of leaf growth decreases ;SD;PARPLT;1;real;1;3;1;0 +upvttapI;thermal time from emergence (UPVT units) driving irrigation;degree_d;PARTEC;30;integer;0;200;0;0 +upvttapN;thermal time from emergence (UPVT units) driving fertilization;degree_d;PARTEC;20;integer;0;200;0;0 +usm;name of the USM;SD;USMXML;1;character;0;0;0;0 +Vabs2;N uptake rate at which fertilizer loss is divided by 2;kg.ha-1.d-1;PARAM;1;real;0.5;5;1;0 +variete;cultivar number corresponding to the cultivar name in the plant file;SD;PARTEC;1;integer;1;200;0;0 +vigueurbat;plant vigor index allowing to emerge through a soil crust ;SD;PARPLT;1;real;0.0001;1;1;0 +vitirazo;rate of increase of the N harvest index vs time;g.g-1.d-1;PARPLT;1;real;0.001;0.04;1;1 +vitircarb;rate of increase of the C harvest index vs time;g.g-1.d-1;PARPLT;1;real;0.001;0.02;1;1 +vitircarbT;rate of increase of the C harvest index vs thermal time;g.g-1.degree_d-1;PARPLT;1;real;0.00005;0.002;1;1 +vitno;rate of increase of the potential biological fixation rate after nodule onset, per unit of thermal time;number.degree_d-1;PARPLT;1;real;0.001;0.01;1;0 +vitprophuile;rate of increase of oil harvest index vs time;g.g-1.d-1;PARPLT;1;real;0.001;0.01;1;1 +vitpropsucre;rate of increase of sugar harvest index vs time;g.g-1.d-1;PARPLT;1;real;0.001;0.01;1;1 +vitreconspeupl;rate of regeneration of the tiller population;degree_C-1;PARPLT;1;real;0;0.1;1;0 +vlaimax;ulai at the inflexion point of the function DELTAI=f(ULAI);SD;PARPLT;1;real;1.5;2.5;1;0 +Vmax1;maximum specific N uptake rate with the low affinity transport system;micromole.cm-1.h-1;PARPLT;1;real;0.0002;0.01;1;0 +Vmax2;maximum specific N uptake rate with the high affinity transport system;micromole.cm-1.h-1;PARPLT;1;real;0.002;0.1;1;0 +vnitmax;maximum nitrification rate (if Michaelis-Menten formalism is used);mg.kg-1.d-1;PARAM;1;real;0;100;1;0 +voleng;maximal fraction of mineral fertilizer that can be volatilized ;SD;PARAM;8;real;0;1;1;0 +vpotdenit;potential rate of denitrification for the whole denitrifying layer;kg.ha-1.d-1;PARSOL;1;real;0.3;10;1;0 +wdata1;name of the first climate file;SD;USM;1;character;0;0;0;0 +wdata2;name of the last climate file;SD;USM;1;character;0;0;0;0 +wfpsc;WFPS (Water filled porosity space) threshold above which denitrification occurs;SD;PARAM;1;real;0.3;1;1;0 +Wh;N/C ratio of soil humus;g.g-1;PARAM;1;real;0.05;0.14;1;0 +Xorgmax;maximal amount of N immobilised in soil derived from the mineral fertilizer ;kg.ha-1;PARAM;1;real;100;500;1;0 +y0msrac;minimal amount of root mass at harvest (when aerial biomass is nil);t.ha-1;PARAM;1;real;0;5;1;0 +yres;Carbon assimilation yield by the microbial biomass during crop residues decomposition;SD;PARAM;21;real;0.3;0.7;1;0 +z0solnu;roughness length of bare soil;m;PARSOL;1;real;0.01;0.2;1;0 +zesx;maximal soil depth affected by soil evaporation;cm;PARSOL;1;real;10;150;1;0 +zlabour;depth of ploughing (reference profile);cm;PARPLT;1;real;0;100;1;0 +zpente;depth at which root density is 50% of the surface root density (reference profile);cm ;PARPLT;1;real;10;200;1;0 +zprlim;maximum depth of the root profile (reference profile);cm ;PARPLT;1;real;10;200;1;0 +zr;reference height of meteorological data measurement;m;STATION;1;real;2;10;1;0 +zrac0;initial depth of root apex of the crop;cm;INIT;1;real;0;200;1;0 +zracplantule;initial depth of root apex of the plantlet;cm;PARPLT;1;real;0;200;1;0 diff --git a/inst/extdata/src_files/csv/V11.0/outputs.csv b/inst/extdata/src_files/csv/V11.0/outputs.csv new file mode 100644 index 00000000..61eea320 --- /dev/null +++ b/inst/extdata/src_files/csv/V11.0/outputs.csv @@ -0,0 +1,830 @@ +Name;Definition;Unit;Source;Type;VarIndex;PltExpoIndex +abso(n);N uptake rate by the crop;kg.ha-1.d-1;p;real;n;2 +age_prairie;age of the forage crop since sowing;year;p;integer;0;1 +airg(n);daily amount of irrigation water;mm.d-1;sc;real;n;0 +albedolai;albedo of the crop including soil and vegetation;SD;sc;real;0;0 +allocfruit;allocation ratio of assimilates to the fruits;0-1;p;real;0;2 +amm_1_30;amount of NH4-N in the soil layer 1 to 30 cm;kg.ha-1;sc;real;0;0 +amm_31_60;amount of NH4-N in the soil layer 31-60 cm;kg.ha-1;sc;real;0;0 +amm_61_90;amount of NH4-N in the soil layer 61-90 cm;kg.ha-1;sc;real;0;0 +ammomes;amount of NH4-N in soil over the depth profmes;kg.ha-1;function;real;0;0 +amptcultmat;mean daily temperature range (tcult) during the reproductive phase (stages lax - rec);degreeC;c;real;0;0 +anit(n);daily amount of fertiliser-N added to crop;kg.ha-1.d-1;sc;real;n;0 +anit_engrais(n);Daily nitrogen provided by fertiliser;kgN.ha-1 j-1;sc;real;n;0 +anit_uree(n);amount of animal urine returned to the soil;kgN.ha-1 j-1;sc;real;n;0 +anoxmoy;index of anoxia over the root depth;0-1;p;real;0;1 +AZamm(1);amount of NH4-N in soil layer 1;kg.ha-1;sc;real;1;0 +AZamm(2);amount of NH4-N in soil layer 2;kg.ha-1;sc;real;2;0 +AZamm(3);amount of NH4-N in soil layer 3;kg.ha-1;sc;real;3;0 +AZamm(4);amount of NH4-N in soil layer 4;kg.ha-1;sc;real;4;0 +AZamm(5);amount of NH4-N in soil layer 5;kg.ha-1;sc;real;5;0 +azlesd;daily amount of NO3-N leached in mole drains;kg.ha-1.d-1;soil;real;0;0 +AZnit(1);amount of NO3-N in soil layer 1;kg.ha-1;soil;real;1;0 +AZnit(2);amount of NO3-N in soil layer 2;kg.ha-1;soil;real;2;0 +AZnit(3);amount of NO3-N in soil layer 3;kg.ha-1;soil;real;3;0 +AZnit(4);amount of NO3-N in soil layer 4;kg.ha-1;soil;real;4;0 +AZnit(5);amount of NO3-N in soil layer 5;kg.ha-1;soil;real;5;0 +azomes;amount of NO3-N in soil over the depth profmes;kg.ha-1;function;real;0;0 +azsup_by_horizon(1);lixiviation under the horizon 1;kgN.ha-1;sc;real;1;0 +azsup_by_horizon(2);lixiviation under the horizon 2;kgN.ha-1;sc;real;2;0 +azsup_by_horizon(3);lixiviation under the horizon 3;kgN.ha-1;sc;real;3;0 +azsup_by_horizon(4);lixiviation under the horizon 4;kgN.ha-1;sc;real;4;0 +azsup_by_horizon(5);lixiviation under the horizon 5;kgN.ha-1;sc;real;5;0 +azsup_under_profmes;lixiviation under the depth of measurement profmes;kgN.ha-1;sc;real;0;0 +bouchon;index showing if the shrinkage slots are opened (0) or closed (1);code 0/1;sc;real;0;0 +Cb;amount of C in the microbial biomass decomposing organic residues mixed with soil;kg.ha-1;sc;real;0;0 +Cbmulch;amount of C in the microbial biomass decomposing organic residues at soil surface (mulch);kg.ha-1;sc;real;0;0 +cdemande;cumulative amount of N needed by the plant (plant needs);kg.ha-1;p;real;0;1 +cEdirect;total evaporation (water evaporated by the soil + intercepted by leaves and mulch) integrated over the cropping season;mm;sc;real;0;1 +cEdirecttout;total evaporation (water evaporated by the soil + intercepted by leaves and mulch) integrated over the simulation period;mm;sc;real;0;1 +cep;cumulative transpiration over the cropping season of plant 1;mm;p;real;0;1 +cep2;cumulative transpiration over the cropping season of plants 1 and 2;mm;sc;real;0;1 +ces;cumulative evaporation over the cropping season;mm;p;real;0;1 +cestout;cumulative evaporation over the simulation period;mm;sc;real;0;0 +cet;cumulative evapotranspiration over the cropping season;mm;p;real;0;1 +cet_from_lev;cumulative evapotranspiration over the cropping season (from emergence or budbreak);mm;sc;real;0;1 +cet_from_plt;cumulative evapotranspiration over the cropping season (from planting or budbreak);mm;sc;real;0;1 +cetm;cumulative maximum evapotranspiration over the cropping season;mm;p;real;0;1 +Cetmtout;cumulative maximum evapotranspiration over the simulation period;mm;c;real;0;0 +cetp;cumulative potential evapotranspiration (PET) over the cropping season;mm;p;real;0;1 +chargefruit;number of filling grains or ripe fruits;m-2;p;real;0;1 +Chuma;amount of active C in humified organic matter;kg.ha-1;sc;real;0;0 +Chumi;amount of inert C in humified organic matter;kg.ha-1;sc;real;0;0 +Chumt;amount of C in humified organic matter (active + inert fractions);kg.ha-1;sc;real;0;0 +cintermulch;cumulative amount of rain intercepted by the mulch;mm;sc;real;0;0 +cinterpluie;cumulative amount of rain intercepted by the leaves;mm;p;real;0;1 +Cmulch;amount of C in the whole plant mulch;kg.ha-1;sc;real;0;0 +Cmulchdec;amount of C in the decomposable mulch;kg.ha-1;sc;real;0;0 +Cmulchnd;amount of C in the non decomposable mulch;kg.ha-1;sc;real;0;0 +CNgrain;N concentration in fruits;% dry weight;p;real;0;2 +Cnondec(1);amount of C in the undecomposable mulch made of residues of type 1;kg.ha-1;sc;real;1;0 +Cnondec(10);amount of C in the undecomposable mulch made of residues of type 10;kg.ha-1;sc;real;10;0 +Cnondec(2);amount of C in the undecomposable mulch made of residues of type 2;kg.ha-1;sc;real;2;0 +Cnondec(3);amount of C in the undecomposable mulch made of residues of type 3;kg.ha-1;sc;real;3;0 +Cnondec(4);amount of C in the undecomposable mulch made of residues of type 4;kg.ha-1;sc;real;4;0 +Cnondec(5);amount of C in the undecomposable mulch made of residues of type 5;kg.ha-1;sc;real;5;0 +Cnondec(6);amount of C in the undecomposable mulch made of residues of type 6;kg.ha-1;sc;real;6;0 +Cnondec(7);amount of C in the undecomposable mulch made of residues of type 7;kg.ha-1;sc;real;7;0 +Cnondec(8);amount of C in the undecomposable mulch made of residues of type 8;kg.ha-1;sc;real;8;0 +Cnondec(9);amount of C in the undecomposable mulch made of residues of type 9;kg.ha-1;sc;real;9;0 +CNplante;N concentration in the aboveground plant;% dry weight;p;real;0;2 +CO2(n);atmospheric CO2 concentration above 330 ppm;ppm;c;real;n;0 +CO2hum;daily amount of CO2-C emitted due to the mineralisation of soil humus;kg.ha-1.d-1;sc;real;0;0 +CO2res;daily amount of CO2-C emitted due to the mineralisation of organic residues;kg.ha-1.d-1;sc;real;0;0 +CO2sol;daily amount of CO2-C emitted due to soil mineralisation (humus and organic residues);kg.ha-1.d-1;sc;real;0;0 +codebbch_output;code of the bbch stage (see plant file);0-99;p;integer;0;1 +concN_W_drained;daily nitrate concentration in drainage water;mg NO3.l-1.day;soil;real;0;0 +concNO3les;nitrate concentration in drained water;mg NO3.l-1;soil;real;0;0 +concNO3sol(1);nitrate concentration in soil layer 1;mg NO3.l-1;sc;real;1;0 +concNO3sol(2);nitrate concentration in soil layer 2;mg NO3.l-1;sc;real;2;0 +concNO3sol(3);nitrate concentration in soil layer 3;mg NO3.l-1;sc;real;3;0 +concNO3sol(4);nitrate concentration in soil layer 4;mg NO3.l-1;sc;real;4;0 +concNO3sol(5);nitrate concentration in soil layer 5;mg NO3.l-1;sc;real;5;0 +condenit;ratio of actual to potential denitrifying rate;0-1;soil;real;0;0 +couvermulch;cover ratio of mulch;0-1;sc;real;0;0 +cpluie;cumulative amount of rain over the simulation period;mm;sc;real;0;0 +cprecip;cumulative water supply over the cropping season (precipitation + irrigation);mm;p;real;0;1 +cpreciptout;cumulative water supply over the simulation period (precipitation + irrigation);mm;sc;real;0;0 +Cr;amount of C in organic residues mixed with soil in the profhum layer;kg.ha-1;sc;real;0;0 +Cresiduprofil(1);amount of C in residues over the soil depth profhum in the residue type 1;kg.ha-1;sc;real;1;0 +Cresiduprofil(10);amount of C in residues over the soil depth profhum in the residue type 10;kg.ha-1;sc;real;10;0 +Cresiduprofil(2);amount of C in residues over the soil depth profhum in the residue type 2;kg.ha-1;sc;real;2;0 +Cresiduprofil(3);amount of C in residues over the soil depth profhum in the residue type 3;kg.ha-1;sc;real;3;0 +Cresiduprofil(4);amount of C in residues over the soil depth profhum in the residue type 4;kg.ha-1;sc;real;4;0 +Cresiduprofil(5);amount of C in residues over the soil depth profhum in the residue type 5;kg.ha-1;sc;real;5;0 +Cresiduprofil(6);amount of C in residues over the soil depth profhum in the residue type 6;kg.ha-1;sc;real;6;0 +Cresiduprofil(7);amount of C in residues over the soil depth profhum in the residue type 7;kg.ha-1;sc;real;7;0 +Cresiduprofil(8);amount of C in residues over the soil depth profhum in the residue type 8;kg.ha-1;sc;real;8;0 +Cresiduprofil(9);amount of C in residues over the soil depth profhum in the residue type 9;kg.ha-1;sc;real;9;0 +crg;cumulative global radiation over the cropping season;MJ.m-2;p;real;0;1 +crgtout;cumulative global radiation over the simulation period;MJ.m-2;c;real;0;0 +Crprof;amount of C in deep organic residues mixed with soil (below the profhum depth);kg.ha-1;sc;real;0;0 +Crtout;total amount of C in organic residues present over the whole soil profile;kg.ha-1;sc;real;0;0 +CsurNrac;C/N ratio of living roots; g g-1;function;real;0;0 +CsurNracmort;C/N ratio of dead roots (cumulative); g g-1;function;real;0;0 +CsurNres_pature;C/N ratio of residues in case of pasture; g g-1;sc;real;0;0 +CsurNsol;C/N ratio of soil organic matter in the profhum layer; g g-1;soil;real;0;0 +ctairtout;cumulative air temperature (tair) over the simulation period;degreeC;c;real;0;0 +ctcult;cumulative crop temperature (tcult) over the cropping season;degreeC;p;real;0;1 +ctculttout;cumulative crop temperature (tcult) over the simulation period;degreeC;c;real;0;0 +ctetptout;cumulative potential evapotranspiration (pet) over the simulation period;mm;c;real;0;0 +ctmoy;cumulative air temperature over the cropping season;degreeC;p;real;0;1 +cum_et0;cumulative maximum evapotranspiration over the cropping season (eop+eos);mm;p;real;0;0 +cum_et0_from_lev;cumulative maximum evapotranspiration over the cropping season from germination or budbreak (eop+eos);mm;sc;real;0;0 +cum_immob;cumulative amount of N immobilised by the microbial biomass decomposing residues;kg.ha-1;sc;real;0;0 +cum_immob_positif;cumulative amount of N immobilised by the microbial biomass decomposing residues (positive value);kg.ha-1;sc;real;0;0 +cumlracz;cumulative length of active roots per soil surface;cm.cm-2;p;real;0;1 +cumraint;cumulative intercepted radiation;MJ.m-2;p;real;0;1 +cumrg;cumulative global radiation during the stage sowing-harvest;MJ.m-2;p;real;0;1 +cumvminh;daily amount of N mineralised from humus;kg.ha-1.d-1;soil;real;0;0 +cumvminr;daily amount of N mineralised from organic residues;kg.ha-1.d-1;soil;real;0;0 +da(1);bulk density of the layer 1 (recalculated by the model if codeDSTtass is 1);g.cm-3;soil;real;1;0 +da(2);bulk density of the layer 2 (recalculated by the model if codeDSTtass is 1);g.cm-3;soil;real;2;0 +date_irrigations(1);date of irrigation;julian day;sc;integer;1;0 +date_irrigations(10);date of irrigation;julian day;sc;integer;10;0 +date_irrigations(11);date of irrigation;julian day;sc;integer;11;0 +date_irrigations(12);date of irrigation;julian day;sc;integer;12;0 +date_irrigations(13);date of irrigation;julian day;sc;integer;13;0 +date_irrigations(14);date of irrigation;julian day;sc;integer;14;0 +date_irrigations(15);date of irrigation;julian day;sc;integer;15;0 +date_irrigations(16);date of irrigation;julian day;sc;integer;16;0 +date_irrigations(17);date of irrigation;julian day;sc;integer;17;0 +date_irrigations(18);date of irrigation;julian day;sc;integer;18;0 +date_irrigations(19);date of irrigation;julian day;sc;integer;19;0 +date_irrigations(2);date of irrigation;julian day;sc;integer;2;0 +date_irrigations(20);date of irrigation;julian day;sc;integer;20;0 +date_irrigations(21);date of irrigation;julian day;sc;integer;21;0 +date_irrigations(22);date of irrigation;julian day;sc;integer;22;0 +date_irrigations(23);date of irrigation;julian day;sc;integer;23;0 +date_irrigations(24);date of irrigation;julian day;sc;integer;24;0 +date_irrigations(25);date of irrigation;julian day;sc;integer;25;0 +date_irrigations(26);date of irrigation;julian day;sc;integer;26;0 +date_irrigations(27);date of irrigation;julian day;sc;integer;27;0 +date_irrigations(28);date of irrigation;julian day;sc;integer;28;0 +date_irrigations(29);date of irrigation;julian day;sc;integer;29;0 +date_irrigations(3);date of irrigation;julian day;sc;integer;3;0 +date_irrigations(30);date of irrigation;julian day;sc;integer;30;0 +date_irrigations(4);date of irrigation;julian day;sc;integer;4;0 +date_irrigations(5);date of irrigation;julian day;sc;integer;5;0 +date_irrigations(6);date of irrigation;julian day;sc;integer;6;0 +date_irrigations(7);date of irrigation;julian day;sc;integer;7;0 +date_irrigations(8);date of irrigation;julian day;sc;integer;8;0 +date_irrigations(9);date of irrigation;julian day;sc;integer;9;0 +day_after_begin_simul;number of days from the beginning of simulation;days;function;integer;0;0 +day_after_emergence;number of days after emergence;days;function;integer;0;1 +day_after_sowing;days after sowing or planting;days;function;integer;0;0 +day_cut;cut day;julian day;p;integer;0;0 +DCbmulch;change in C amount in microbial biomass decomposing mulch between the beginning and the end of simulation;kg.ha-1;function;real;0;0 +DChumt;change in humified organic C in soil between beginning and end of simulation;kg.ha-1;function;real;0;0 +DCmulch;change in mulch C between the beginning and end of simulation;kg.ha-1;function;real;0;0 +DCr;change in C of organic residues between begining and end of simulation;kg.ha-1;function;real;0;0 +DCrprof;change in deep root C between the beginning and end of simulation;kg.ha-1;function;real;0;0 +deltai(n);daily increase in green leaf index per soil surface;m2.m-2.d-1;p;real;n;2 +deltaz;rate of deepening of the root front;cm.d-1;p;real;0;1 +demande;daily N requirement of the plant to maximise crop growth;kg.ha-1.d-1;p;real;0;2 +demandeper;daily N requirement of the perennial organs to maximise crop growth;kg.ha-1.d-1;p;real;0;2 +demanderac;daily N requirementof the roots to maximise crop growth;kg.ha-1.d-1;p;real;0;2 +demandetot;daily N requirement of the plant to maximise crop growth after susbtracting N fixation;kg.ha-1.d-1;p;real;0;0 +densite;actual sowing density;plants.m-2;p;real;0;1 +densiteequiv;equivalent plant density for the understorey crop;plants.m-2;p;real;0;1 +dfol;within the shape leaf density;m2.m-3;p;real;0;1 +diftemp1intercoupe;mean difference between crop and air temperatures during the vegetative phase (emergence - maximum LAI);degreeC;p;real;0;0 +diftemp2intercoupe;mean difference between crop and air temperatures during the reproductive phase (maximum LAI - maturity);degreeC;p;real;0;0 +dltags;daily growth rate of the plantlets;t.ha-1.d-1;p;real;0;2 +dltaisen;daily change in the senescent leaf area index;m2.m-2.d-1;p;real;0;2 +dltams(n);daily growth rate of the plant;t.ha-1.d-1;p;real;n;2 +dltamsen;daily senescence rate of the plant;t.ha-1.d-1;p;real;0;2 +dltaremobil;daily amount of perennial reserves remobilised;t.ha-1.d-1;p;real;0;2 +dltaremobilN;daily amount of perennial N reserves remobilised;kg.ha-1.d-1;p;real;0;2 +dltmsrac_plante;pour sorties ArchiSTICS: biomasse journaliere allouee aux racines; g.m2.sol;p;real;0;0 +DNbmulch;change in biomass N associated with the mulch between beginning and end of simulation;kg.ha-1;function;real;0;0 +DNhumt;change in humified organic N in soil between beginning and end of simulation;kg.ha-1;function;real;0;0 +DNmulch;change in mulch N between beginning and end of simulation;kg.ha-1;function;real;0;0 +DNr;change in N of organic residues between begining and end of simulation;kg.ha-1;function;real;0;0 +DNrprof;change in N of deep dead roots between begining and end of simulation;kg.ha-1;function;real;0;0 +DQNtot2;change in N content of the two plants (aerial + root + perennial organs) between beginning and end of simulation;kg.ha-1;sc;real;0;0 +drain;daily amount of water drained at the base of the soil profile;mm.d-1;sc;real;0;0 +drain_from_lev;cumulative amount of water drained at the base of the soil profile during the crop cycle (emergence or budbreak to harvest);mm;sc;real;0;0 +drain_from_plt;cumulative amount of water drained at the base of the soil profile during the crop cycle (planting to harvest);mm;sc;real;0;0 +drat;cumulative amount of water drained at the base of the soil profile during the simulation period;mm;sc;real;0;0 +drlsenmortalle;root biomass corresponding to dead tillers;t.ha-1.d-1;p;real;0;0 +DSMN;change in soil mineral N between beginning and end of simulation;kg.ha-1;function;real;0;0 +DSOC;change in soil organic C (without residues) between beginning and end of simulation;kg.ha-1;function;real;0;0 +DSOCtot;change in total soil organic C (with residues) between beginning and end of simulation;kg.ha-1;function;real;0;0 +DSON;change in soil organic N (without residues) between beginning and end of simulation;kg.ha-1;function;real;0;0 +DSONtot;change in total soil organic N (with residues) between beginning and end of simulation;kg.ha-1;function;real;0;0 +DSTN;change in total soil N (mineral + organic) between beginning and end of simulation;kg.ha-1;function;real;0;0 +dtj(n);thermal time for root growth;degreeC.d;p;real;n;0 +dureehumec;number of hours which are wet (rainy days or days when tcult < dew point);hour;c;real;0;0 +dureeRH;number of night hours during which relative humidity exceeds a 90% threshold;hour;c;real;0;0 +durvie(n);actual life span of the leaf surface;degreeC;p;real;n;3 +eai;equilvalent leaf area for ear;m2.m-2;p;real;0;2 +ebmax;maximum value of radiation use efficiency;cg.MJ-1;p;real;0;1 +ebmax_gr; Maximum radiation use efficiency during the vegetative stage (AMF-DRP);g MJ-1;function;real;0;0 +Edirect;daily amount of water evaporated by the soil + intercepted by leaves and mulch;mm.d-1;sc;real;0;0 +efda;reduction factor on root growth due to physical constraint (through bulk density);0-1;p;real;0;0 +efdensite;density factor on leaf area growth;0-1;p;real;0;0 +efdensite_rac;density factor on root growth;0-1;p;real;0;0 +ef_elongation;Shoot elongation effect due to plant shading;0-1;p;real;n;0 +efNrac_mean;reduction factor on root growth rate due to mineral N concentration;0-1;p;real;0;0 +em_N2O;daily amount of N2O-N emitted from soil;kg.ha-1.d-1;sc;real;0;0 +em_N2Oden;daily amount of N2O-N emitted from soil by denitrification;kg.ha-1.d-1;sc;real;0;0 +em_N2Onit;daily amount of N2O-N emitted from soil by nitrification;kg.ha-1.d-1;sc;real;0;0 +Emd;daily amount of water directly evaporated after leaves interception;mm.d-1;p;real;0;1 +emulch;daily amount of water directly evaporated after mulch interception;mm.d-1;sc;real;0;0 +eo;intermediary variable for the computation of evapotranspiration;mm.d-1;sc;real;0;0 +eop;daily maximum transpiration flux;mm.d-1;p;real;0;2 +eos;daily maximum evaporation flux;mm.d-1;sc;real;0;0 +ep;daily actual transpiration flux;mm.d-1;p;real;0;2 +epc_recal(1);thickness of the soil layer 1 (recalculated by the model if codeDSTtass is 1);cm;soil;real;1;0 +epc_recal(2);thickness of the soil layer 2 (recalculated by the model if codeDSTtass is 1);cm;soil;real;2;0 +epc_recal(3);thickness of the soil layer 3 (recalculated by the model if codeDSTtass is 1);cm;soil;real;3;0 +epc_recal(4);thickness of the soil layer 4 (recalculated by the model if codeDSTtass is 1);cm;soil;real;4;0 +epc_recal(5);thickness of the soil layer 5 (recalculated by the model if codeDSTtass is 1);cm;soil;real;5;0 +epsib;radiation use efficiency;t.ha-1.MJ-1.m2;p;real;0;2 +esol;daily actual soil evaporation flux;mm.d-1;sc;real;0;0 +et;daily evapotranspiration (esol + ep);mm.d-1;sc;real;0;0 +et0;daily maximun evapotranspiration flux (transpiration + soil evaporation);mm;p;real;0;0 +etm;daily maximum evapotranspiration (esol + eop);mm.d-1;sc;real;0;0 +etm_etr1moy;etm/etr ratio on the vegetative phase;0-1;p;real;0;1 +etm_etr2moy;etm/etr ratio on the reproductive phase;0-1;p;real;0;1 +etpp(n);daily potential evapotranspiration as given by the formula of Penman;mm.d-1;c;real;n;0 +etr_etm1moy;etr/etm ratio on the vegetative phase;0-1;p;real;0;1 +etr_etm2moy;etr/etm ratio on the reproductive phase;0-1;p;real;0;1 +exces(1);amount of water in the macroporosity of the layer 1;mm;sc;real;1;0 +exces(2);amount of water in the macroporosity of the layer 2;mm;sc;real;2;0 +exces(3);amount of water in the macroporosity of the layer 3;mm;sc;real;3;0 +exces(4);amount of water in the macroporosity of the layer 4;mm;sc;real;4;0 +exces(5);amount of water in the macroporosity of the layer 5;mm;sc;real;5;0 +exobiom;reduction factor on biomass growth due to water excess;0-1;p;real;0;1 +exofac;waterlogging index;0-1;p;real;0;1 +exofac1moy;mean value of the waterlogging index during the vegetative stage (emergence - fruit establishment);0-1;p;real;0;1 +exofac2moy;mean value of the waterlogging index during the reproductive stage (fruit establishment - maturity);0-1;p;real;0;1 +exolai;reduction factor on leaf growth due to water excess;0-1;p;real;0;1 +fapar;proportion of the radiation intercepted;0-1;p;real;0;2 +fco2;specie-dependant CO2 effect on radiation use efficiency;SD;p;real;0;0 +fco2s;specie-dependant CO2 effect onstomate closure;SD;p;real;0;0 +fgelflo;reduction factor on the number of fruits due to frost;0-1;p;real;0;1 +fixmaxvar;maximal rate of BNF (symbiotic fixation);kg.ha-1.d-1;p;real;0;2 +fixpot;potential rate of BNF (symbiotic fixation);kg.ha-1.d-1;p;real;0;2 +fixreel;actual rate of BNF (symbiotic fixation);kg.ha-1.d-1;p;real;0;2 +flurac;daily amount of N taken up by the plant when N uptake is limited by the plant capacity absorption;kg.ha-1.d-1;p;real;0;1 +flusol;daily amount of N taken up by the plant when N uptake is limited by the transfer from soil to root;kg.ha-1.d-1;p;real;0;1 +fpari;radiation effect on conversion efficiency;g.MJ-1;p;real;0;1 +fpari_gr;radiation factor on the calculation of conversion efficiency;g MJ-1;function;real;0;0 +fpft;daily sink capacity of fruits;g.m-2.d-1;p;real;0;2 +fpv(n);daily sink capacity of growing leaves;g.m-2.d-1;p;real;n;2 +FsNH3;daily amount of NH3-N emitted from soil by volatilisation;micro g.m-2.d-1;sc;real;0;0 +fstressgel;reduction factor on leaf growth due to frost;0-1;p;real;0;1 +ftemp;reduction factor on biomass growth due to temperature-related epsibmax;0-1;p;real;0;1 +fxa;reduction factor on BNF (symbiotic fixation) due to soil anoxia;0-1;sc;real;0;0 +fxn;reduction factor on BNF (symbiotic fixation) due to mineral N concentration;0-1;sc;real;0;0 +fxt;reduction factor on BNF (symbiotic fixation) due to soil temperature;0-1;sc;real;0;0 +fxw;reduction factor on BNF (symbiotic fixation) due to soil water content;0-1;sc;real;0;0 +gel1;stress factor on leaves damaged by frost before amf stage (end of juvenile phase );0-1;p;real;0;0 +gel1_percent;proportion of leaves damaged by frost before amf stage (end of juvenile phase );%;function;real;0;0 +gel2;stress factor on leaves damaged by frost after amf stage (end of juvenile phase );0-1;p;real;0;0 +gel2_percent;proportion of leaves damaged by frost after amf stage (end of juvenile phase );%;function;real;0;0 +gel3;stress factor on flowers or fruits damaged by frost;0-1;p;real;0;0 +gel3_percent;proportion of flowers or fruits damaged by frost;%;function;real;0;0 +GHG;Greenhouse Gas emission (CO2 + N2O) expressed in CO2eq/ha =Qem_N2O*44/28*296 -DSOC*44/12;kg.ha-1;sc;real;0;0 +grain_dry_weight_mg;Grain unit dry weight;mg;p;real;0;0 +H2Orec;water content of harvested organs;0-1;p;real;0;2 +H2Orec_percent;water content of harvested organs;% fresh weight;function;real;0;2 +hauteur;height of canopy;m;p;real;0;2 +HI_C;harvest index for carbon;0-1;function;real;0;0 +HI_N;harvest index for nitrogen;0-1;function;real;0;0 +Hmax;maximum height of water table between drains;cm;soil;real;0;0 +hnappe;height of water table affecting plant growth;cm;soil;real;0;0 +Hpb;minimum depth of perched water table;cm;soil;real;0;0 +Hph;maximum depth of perched water table;cm;soil;real;0;0 +HR(1);water content of the soil layer 1;% dry weight;sc;real;1;0 +HR(2);water content of the soil layer 2;% dry weight;sc;real;2;0 +HR(3);water content of the soil layer 3;% dry weight;sc;real;3;0 +HR(4);water content of the soil layer 4;% dry weight;sc;real;4;0 +HR(5);water content of the soil layer 5;% dry weight;sc;real;5;0 +HR_mm(1);water content of the soil layer 1;mm;sc;real;1;0 +HR_mm(2);water content of the soil layer 2;mm;sc;real;2;0 +HR_mm(3);water content of the soil layer 3;mm;sc;real;3;0 +HR_mm(4);water content of the soil layer 4;mm;sc;real;4;0 +HR_mm(5);water content of the soil layer 5;mm;sc;real;5;0 +HR_mm_1_30;water content of the layer 1-30 cm;mm;sc;real;0;0 +HR_mm_31_60;water content of the layer 31-60 cm;mm;sc;real;0;0 +HR_mm_61_90;water content of the layer 61-90 cm;mm;sc;real;0;0 +HR_vol_1_10;water content of the layer 1-10 cm;mm-3.mm-3;sc;real;0;0 +HR_vol_1_30;water content of the layer 1-30 cm (table);mm-3.mm-3;sc;real;0;0 +HR_vol_121_150;water content of the layer 121-150 cm (table);mm-3.mm-3;sc;real;0;0 +HR_vol_151_180;water content of the layer 151-180 cm (table);mm-3.mm-3;sc;real;0;0 +HR_vol_31_60;water content of the layer 31-60 cm (table);mm-3.mm-3;sc;real;0;0 +HR_vol_61_90;water content of the layer 61-90 cm (table);mm-3.mm-3;sc;real;0;0 +HR_vol_91_120;water content of the layer 91-120 cm (table);mm-3.mm-3;sc;real;0;0 +huile;oil content of harvested organs;0-1;p;real;0;2 +huile_percent;oil content of harvested organs;% fresh weight;function;real;0;2 +humair;air moisture content;0-1;c;real;0;0 +humair_percent;air moisture content;% saturation;c;real;0;0 +humidite;air moisture content in the canopy;0-1;sc;real;0;0 +humidite_percent;air moisture content in the canopy;% saturation;sc;real;0;0 +humirac_mean;reduction factor on root growth due to soil water content (mean value over the root profile);0-1;p;real;0;1 +hur_10_vol;soil water content in the soil at 10 cm ;cm/cm;sc;real;0;0 +husup_by_horizon(1);drainage under the horizon 1;mm;sc;real;1;0 +husup_by_horizon(2);drainage under the horizon 2;mm;sc;real;2;0 +husup_by_horizon(3);drainage under the horizon 3;mm;sc;real;3;0 +husup_by_horizon(4);drainage under the horizon 4;mm;sc;real;4;0 +husup_by_horizon(5);drainage under the horizon 5;mm;sc;real;5;0 +husup_under_profmes;drainage under the depth of measurement profmes;mm;sc;real;0;0 +iamfs;date of amf stage (maximum acceleration of leaf growth, end of juvenile phase );julian day;function;integer;0;1 +idebdess;date of onset of water dynamics in harvested organs;julian day;function;integer;0;1 +idebdorms;date of entry into dormancy;julian day;function;integer;0;1 +idrps;starting date of filling of harvested organs;julian day;function;integer;0;1 +ifindorms;date of emergence from dormancy;julian day;function;integer;0;1 +iflos;date of flowering;julian day;function;integer;0;1 +iflos_minus_150;date of flowering minus150 degrees day;julian day;function;integer;0;1 +iflos_plus_150;date of flowering plus 150 degrees day;julian day;function;integer;0;1 +igers;date of germination;julian day;function;integer;0;1 +ilans;date of lan stage (leaf index nil);julian day;function;integer;0;1 +ilaxs;date of lax stage (leaf index maximum);julian day;function;integer;0;1 +ilevs;date of emergence;julian day;function;integer;0;1 +imats;date of start of physiological maturity;julian day;function;integer;0;1 +imontaisons;date of start of stem elongation;julian day;function;integer;0;0 +infil_recal(1);infiltrability parameter at the base of the layer 1;mm.d-1;soil;real;1;0 +infil_recal(2);infiltrability parameter at the base of the layer 2;mm.d-1;soil;real;2;0 +infil_recal(3);infiltrability parameter at the base of the layer 3;mm.d-1;soil;real;3;0 +infil_recal(4);infiltrability parameter at the base of the layer 4;mm.d-1;soil;real;4;0 +infil_recal(5);infiltrability parameter at the base of the layer 5;mm.d-1;soil;real;5;0 +init_H2O_balance;total initial water balance over the simulation period;mm;function;real;0;0 +final_H2O_balance;total final water balance over the simulation period;mm;function;real;0;0 +init_plant_N_balance;total initial plant nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +final_plant_N_balance;total final plant nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +init_soil_mineral_N_balance;total initial soil mineral nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +final_soil_mineral_N_balance;total final soil mineral nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +init_soil_organic_N_balance;total initial soil organic nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +final_soil_organic_N_balance;total final soil organic nitrogen balance over the simulation period;kg.ha-1;function;real;0;0 +init_soil_organic_C_balance;total initial soil organic carbon balance over the simulation period;kg.ha-1;function;real;0;0 +final_soil_organic_C_balance;total final soil organic carbon balance over the simulation period;kg.ha-1;function;real;0;0 +inn;nitrogen nutrition index (NNI);0-2;p;real;0;2 +inn1intercoupe;average NNI during the cut (cut crop vegetative phase: emergence to maximum LAI);0-2;p;real;0;0 +inn1moy;average NNI during the vegetative stage;0-2;p;real;0;1 +inn2intercoupe;average NNI during the cut (cut crop reproductive phase: maximum LAI to maturity);0-2;p;real;0;0 +inn2moy;average NNI during the reproductive stage;0-2;p;real;0;1 +innlai;reduction factor on leaf growth due to NNI (nitrogen deficiency);innmin to 1;p;real;0;2 +inns;reduction factor on biomass growth due to NNI (nitrogen deficiency);innmin to 1;p;real;0;2 +innsenes;nitrogen stress index affecting leaves death;innmin to 1;p;real;0;2 +inous;ending date for setting of harvested organs;julian day;function;real;0;1 +intermulch;daily amount of water intercepted by the mulch (vegetal);mm.d-1;sc;real;0;0 +interpluie;daily amount of water intercepted by leaves;mm.d-1;p;real;0;2 +iplts;date of sowing or planting;julian day;function;integer;0;1 +irazo(n);nitrogen harvest index;0-1;p;real;n;2 +ircarb(n);carbon harvest index;0-1;p;real;n;2 +irecs;date of harvest (first if several);julian day;function;integer;0;1 +irrigjN;daily amount of mineral N added by irrigation;kg.ha-1.d-1;sc;real;0;0 +irrigN;cumulative amount of mineral N added by irrigation;kg.ha-1;sc;real;0;0 +isens;date of begninning leaf senescence stage;julian day;function;integer;0;1 +is_dominant;1 if the plant is dominant, 0 otherwise;code 0/1;p;logical;0;0 +izrac;water excess stress index on roots;0-1;p;real;0;1 +jjul;julian day of the year corresponding to the current simulation day (resets each year);d;function;integer;0;0 +lai(n);leaf area index (table);m2.m-2;p;real;n;2 +lai_mx_av_cut;LAI before cut (for cut crops , for others = lai(n) );SD;p;real;0;1 +laimax;maximum leaf area index;m2.m-2;p;real;0;2 +laisen(n);leaf area index of senescent leaves (table);m2.m-2;p;real;n;2 +largeur;width of the plant shape;m;p;real;0;2 +leaching_from_lev;cumulative amount of NO3-N leached at the base of the soil profile during the crop cycle ( emergence or budbreak to harvest);kg.ha-1;sc;real;0;0 +leaching_from_plt;cumulative amount of NO3-N leached at the base of the soil profile during the crop cycle (planting to harvest);kg.ha-1;sc;real;0;0 +leai;Leaf+ear area index = lai +eai;m2.m-2;p;real;0;2 +lessiv;daily amount of NO3-N leached at the base of the soil profile;kg.ha-1.d-1;sc;real;0;0 +lracf(1);root length density of fine roots in layer 1;cm.cm-3;p;real;1;0 +lracf(2);root length density of fine roots in layer 2;cm.cm-3;p;real;2;0 +lracf(3);root length density of fine roots in layer 3;cm.cm-3;p;real;3;0 +lracf(4);root length density of fine roots in layer 4;cm.cm-3;p;real;4;0 +lracf(5);root length density of fine roots in layer 5;cm.cm-3;p;real;5;0 +lracg(1);root length density of coarse roots in layer 1;cm.cm-3;p;real;1;0 +lracg(2);root length density of coarse roots in layer 2;cm.cm-3;p;real;2;0 +lracg(3);root length density of coarse roots in layer 3;cm.cm-3;p;real;3;0 +lracg(4);root length density of coarse roots in layer 4;cm.cm-3;p;real;4;0 +lracg(5);root length density of coarse roots in layer 5;cm.cm-3;p;real;5;0 +LRACH(1);root length density in soil layer 1;cm.cm-3;p;real;1;0 +LRACH(2);root length density in soil layer 2;cm.cm-3;p;real;2;0 +LRACH(3);root length density in soil layer 3;cm.cm-3;p;real;3;0 +LRACH(4);root length density in soil layer 4;cm.cm-3;p;real;4;0 +LRACH(5);root length density in soil layer 5;cm.cm-3;p;real;5;0 +lracsentotf;cumulative length of senescent roots;cm root.cm-2 soil;p;real;0;1 +lracsentotg;cumulative length of senescent roots;cm root.cm-2 soil;p;real;0;1 +mabois;biomass removed by pruning;t.ha-1;p;real;0;2 +maenfruit;biomass of harvested organ envelops;t.ha-1;p;real;0;2 +mafauche;biomass of forage cuts;t.ha-1;p;real;0;0 +mafauchetot;cumulative biomass of forage cuts;t.ha-1;p;real;0;0 +mafeuil;biomass of leaves;t.ha-1;p;real;0;2 +mafeuil_kg_ha;Dry matter of leaves;kg.ha-1;function;real;0;0 +mafeuiljaune;biomass of yellow leaves;t.ha-1;p;real;0;2 +mafeuiltombe;biomass of fallen leaves;t.ha-1;p;real;0;2 +mafeuiltombefauche;biomass of fallen leaves between two cuts;t.ha-1;p;real;0;1 +mafeuilverte;biomass of green leaves;t.ha-1;p;real;0;2 +mafou;biomass of harvested organs for cut crops;t.ha-1;p;real;0;1 +mafrais;aboveground fresh matter;t.ha-1;p;real;0;2 +mafruit;biomass of harvested organs;t.ha-1;function;real;0;1 +mafruit_kg_ha;Dry matter of harvested organs;kg.ha-1;function;real;0;0 +maperenne;biomass of perennial organs;t.ha-1;p;real;0;2 +maperennemort;biomass of dead perennial organs;t.ha-1;p;real;0;2 +masec(n);biomass of aboveground plant (table);t.ha-1;p;real;n;2 +masec_kg_ha;Aboveground dry matter;kg.ha-1;function;real;0;0 +masec_mx_av_cut;Aboveground dry matter before cut(for cut crops, for others = masec(n) );t.ha-1;p;real;0;1 +masecneo;biomass of newly-formed organs;t.ha-1;p;real;0;2 +masecnp;biomass of aerials and non perennial organs;t.ha-1;p;real;n;2 +masectot;total plant biomass (aerials + roots + perennial organs);t.ha-1;p;real;0;1 +masecveg;biomass of vegetative organs;t.ha-1;p;real;0;2 +matigestruc;biomass of stems (only structural parts);t.ha-1;p;real;0;2 +matigestruc_kg_ha;Dry matter of stems (only structural parts);kg.ha-1;function;real;0;0 +matuber;biomass of tuber (harvested organs, only calculated for sugarbeet);t.ha-1;p;real;0;1 +mean_swfac_flo_p_m_150;swfac mean on the period flowering minus 150 degrees day to flowering plus 150 degrees days;0-1;function;real;0;1 +mortalle;daily number of dying tillers;d-1;p;real;0;1 +mortmasec;cumulative biomass of dead tillers;t.ha-1;p;real;0;1 +mortreserve;biomass of reserves corresponding to dead tillers;t.ha-1.d-1;p;real;0;1 +mouillmulch;amount of water retained by the mulch;mm;sc;real;0;0 +MSexporte;cumulative amount of harvested biomass;t.ha-1;p;real;0;1 +msjaune;senescent biomass of the plant;t.ha-1;p;real;0;2 +msneojaune;newly-formed senescent biomass;t.ha-1;p;real;0;2 +msrac(n);biomass of roots;t.ha-1;p;real;n;0 +msracf(1);biomass of fine roots in layer 1;t.ha-1;p;real;1;0 +msracf(2);biomass of fine roots in layer 2;t.ha-1;p;real;2;0 +msracf(3);biomass of fine roots in layer 3;t.ha-1;p;real;3;0 +msracf(4);biomass of fine roots in layer 4;t.ha-1;p;real;4;0 +msracf(5);biomass of fine roots in layer 5;t.ha-1;p;real;5;0 +msracg(1);biomass of coarse roots in layer 1;t.ha-1;p;real;1;0 +msracg(2);biomass of coarse roots in layer 2;t.ha-1;p;real;2;0 +msracg(3);biomass of coarse roots in layer 3;t.ha-1;p;real;3;0 +msracg(4);biomass of coarse roots in layer 4;t.ha-1;p;real;4;0 +msracg(5);biomass of coarse roots in layer 5;t.ha-1;p;real;5;0 +msracmort;Biomass of dead roots;t.ha-1;p;real;0;0 +msracmortf(1);cumulative biomass of dead fine roots in layer 1;t.ha-1;p;real;1;0 +msracmortf(2);cumulative biomass of dead fine roots in layer 2;t.ha-1;p;real;2;0 +msracmortf(3);cumulative biomass of dead fine roots in layer 3;t.ha-1;p;real;3;0 +msracmortf(4);cumulative biomass of dead fine roots in layer 4;t.ha-1;p;real;4;0 +msracmortf(5);cumulative biomass of dead fine roots in layer 5;t.ha-1;p;real;5;0 +msracmortg(1);cumulative biomass of dead coarse roots in layer 1;t.ha-1;p;real;1;0 +msracmortg(2);cumulative biomass of dead coarse roots in layer 2;t.ha-1;p;real;2;0 +msracmortg(3);cumulative biomass of dead coarse roots in layer 3;t.ha-1;p;real;3;0 +msracmortg(4);cumulative biomass of dead coarse roots in layer 4;t.ha-1;p;real;4;0 +msracmortg(5);cumulative biomass of dead coarse roots in layer 5;t.ha-1;p;real;5;0 +msrec_fou;biomass of harvested forage;t.ha-1;p;real;0;1 +msrec_fou_coupe;Dry matter of harvested organs for forages at cutting;t.ha-1;p;real;0;0 +msrec_fou_tot;Dry matter of harvestable organs for forages cumulated over the USM ;t.ha-1;p;real;0;0 +MSrecycle;cumulative amount of biomass returned to soil (unexported at harvest + fallen leaves);t.ha-1;p;real;0;1 +msresjaune;senescent residual dry matter;t.ha-1;p;real;0;2 +mstot;biomass of whole plant (aerial + root + perennial organs);t.ha-1;p;real;0;0 +N_mineralisation;cumulative amount of N mineralized from humus and organic residues;kg.ha-1;sc;real;0;0 +n_tot_irrigations;total number of rrigations;SD;sc;integer;0;0 +N_volatilisation;cumulative amount of N volatilised from fertilizer and organic inputs;kg.ha-1;soil;real;0;0 +Nb;amount of N in the microbial biomass decomposing organic residues mixed with soil;kg.ha-1;sc;real;0;0 +nb_days_frost_amf_120;number of days of tcultmin< tdebgel from amf stage to amf+120 degrees day;d;p;integer;0;1 +nb_days_humair_gt_90_percent1;number of days when humair_percent >=90% between amf and lax;days;sc;integer;0;0 +nb_days_humair_gt_90_percent2;number of days when humair_percent >=90% between lax and drp;days;sc;integer;0;0 +nbfeuille;number of leaves on main stem;SD;p;integer;0;1 +nbinflo_recal;number of inflorescences per plant;SD;function;real;0;1 +nbj0remp;number of shrivelling days;d;p;integer;0;1 +nbjechaudage;number of shrivelling days between lax and rec;d;c;integer;0;0 +nbjgel;number of frosting days active on the plant;d;p;integer;0;1 +nbjpourdecirecolte;number of days until harvest is launched when it is postponed by the harvest decision option;d;p;integer;0;1 +nbjpourdecisemis;number of days until sowing is launched when it is postponed by the sowing decision option;d;p;integer;0;1 +Nbmulch;amount of N in microbial biomass decomposing the decomposable mulch;kg.ha-1;sc;real;0;0 +NCbio;N/C ratio of biomass decomposing organic residues;SD;sc;real;0;0 +Ndenit;daily denitrification rate in soil (if option denitrification is activated);kg.ha-1.d-1;soil;real;0;0 +Ndfa;proportion of total plant N issued from N fixation;0-1;p;real;0;0 +Nexporte;cumulative amount of N removed by crop harvests;kg.ha-1;p;real;0;1 +nfruit(1);number of fruits in box 1;SD;p;real;1;2 +nfruit(2);number of fruits in box 2;SD;p;real;2;2 +nfruit(3);number of fruits in box 3;SD;p;real;3;2 +nfruit(4);number of fruits in box 4;SD;p;real;4;2 +nfruit(5);number of fruits in box 5;SD;p;real;5;2 +nfruit(nboite);number of fruits in last box;SD;function;real;0;2 +nfruit(nboite-1);number of fruits in last but one box;SD;function;real;0;2 +nfruitnou;number of set fruits;fruits.m-2;p;real;0;2 +Nhuma;amount of N in active soil organic matter;kg.ha-1;sc;real;0;0 +Nhumi;amount of N in inert soil organic matter;kg.ha-1;sc;real;0;0 +Nhumt;amount of N in humus soil organic matter (active + inert fractions);kg.ha-1;sc;real;0;0 +nit_1_30;amount of NO3-N in the soil layer 1 to 30 cm;kg.ha-1;sc;real;0;0 +nit_31_60;amount of NO3-N in the soil layer 31 to 60 cm;kg.ha-1;sc;real;0;0 +nit_61_90;amount of NO3-N in the soil layer 61 to 90 cm;kg.ha-1;sc;real;0;0 +soilN_rootdepth;amount of NO3-N in soil in the maximum root depth;kg.ha-1;sc;real;0;0 +nitetcult(n);number of iterations to calculate tcult;SD;c;integer;n;0 +nitrifj;daily nitrification rate in soil (if option nitrification is activated);kg.ha-1;soil;real;0;0 +Nmineral_from_lev;cumulative amount of N mineralized during the crop cycle ( emergence or budbreak-harvest);kg.ha-1;sc;real;0;0 +Nmineral_from_plt;cumulative amount of N mineralized during the crop cycle (sowing-harvest);kg.ha-1;sc;real;0;0 +Nmulch;amount of N in the plant mulch;kg.ha-1;sc;real;0;0 +Nmulchdec;amount of N in the decomposable mulch;kg.ha-1;sc;real;0;0 +Nmulchnd;amount of N in the non decomposable mulch;kg.ha-1;sc;real;0;0 +Nnondec(1);amount of N in the undecomposable mulch derived from residues type 1;kg.ha-1;sc;real;1;0 +Nnondec(10);amount of N in the undecomposable mulch derived from residues type 10;kg.ha-1;sc;real;10;0 +Nnondec(2);amount of N in the undecomposable mulch derived from residues type 2;kg.ha-1;sc;real;2;0 +Nnondec(3);amount of N in the undecomposable mulch derived from residues type 3;kg.ha-1;sc;real;3;0 +Nnondec(4);amount of N in the undecomposable mulch derived from residues type 4;kg.ha-1;sc;real;4;0 +Nnondec(5);amount of N in the undecomposable mulch derived from residues type 5;kg.ha-1;sc;real;5;0 +Nnondec(6);amount of N in the undecomposable mulch derived from residues type 6;kg.ha-1;sc;real;6;0 +Nnondec(7);amount of N in the undecomposable mulch derived from residues type 7;kg.ha-1;sc;real;7;0 +Nnondec(8);amount of N in the undecomposable mulch derived from residues type 8;kg.ha-1;sc;real;8;0 +Nnondec(9);amount of N in the undecomposable mulch derived from residues type 9;kg.ha-1;sc;real;9;0 +nodn;reduction factor on nodulation establishment (potential BNF) due to mineral N stress;0-1;sc;real;0;0 +Norgeng;daily amount of N immobilized from fertiliser;kg.ha-1.d-1;soil;real;0;0 +Nr;amount of N in the decomposing organic residues mixed with soil;kg.ha-1;sc;real;0;0 +Nrecycle;cumulative amount of N returned to soil (unexported at harvest + fallen leaves);kg.ha-1;p;real;0;1 +Nresiduprofil(1);amount of N in organic residues over the profhum depth, derived from residues type 1;kg.ha-1;sc;real;1;0 +Nresiduprofil(10);amount of N in organic residues over the profhum depth, derived from residues type 10;kg.ha-1;sc;real;10;0 +Nresiduprofil(2);amount of N in organic residues over the profhum depth, derived from residues type 2;kg.ha-1;sc;real;2;0 +Nresiduprofil(3);amount of N in organic residues over the profhum depth, derived from residues type 3;kg.ha-1;sc;real;3;0 +Nresiduprofil(4);amount of N in organic residues over the profhum depth, derived from residues type 4;kg.ha-1;sc;real;4;0 +Nresiduprofil(5);amount of N in organic residues over the profhum depth, derived from residues type 5;kg.ha-1;sc;real;5;0 +Nresiduprofil(6);amount of N in organic residues over the profhum depth, derived from residues type 6;kg.ha-1;sc;real;6;0 +Nresiduprofil(7);amount of N in organic residues over the profhum depth, derived from residues type 7;kg.ha-1;sc;real;7;0 +Nresiduprofil(8);amount of N in organic residues over the profhum depth, derived from residues type 8;kg.ha-1;sc;real;8;0 +Nresiduprofil(9);amount of N in organic residues over the profhum depth, derived from residues type 9;kg.ha-1;sc;real;9;0 +Nrprof;amount of N in deep organic residues mixed with soil (below the profhum depth);kg.ha-1;sc;real;0;0 +Nrtout;total amount of N in organic residues present over the whole soil profile;kg.ha-1;sc;real;0;0 +Nsurplus;Difference between N inputs and outputs to the soil, including organic fertilizer inputs;kg.ha-1;sc;real;0;0 +Nsurplus_min;Difference between N inputs and outputs to the soil, without organic fertilizer inputs;kg.ha-1;sc;real;0;0 +numcoupe;cut number;SD;p;integer;0;1 +numcult;crop season number;SD;sc;integer;0;0 +Nvolat_from_lev;cumulative amount of N volatilised during the crop cycle( emergence or budbreak-harvest);kg.ha-1;sc;real;0;0 +Nvolat_from_plt;cumulative amount of N volatilised during the crop cycle (planting-harvest);kg.ha-1;sc;real;0;0 +Nvoleng;daily amount of N volatilised from fertiliser;kg.ha-1.d-1;soil;real;0;0 +Nvolorg;daily amount of N volatilised from organic inputs;kg.ha-1.d-1;soil;real;0;0 +offrenod;daily amount of N fixed symbiotically (BNF);kg.ha-1.d-1;p;real;0;2 +p1000grain;1000 grains weight (dry weight);g;function;real;0;1 +pdsfruit(1);weight of fruits in box 1;g.m-2;p;real;1;2 +pdsfruit(2);weight of fruits in box 2;g.m-2;p;real;2;2 +pdsfruit(3);weight of fruits in box 3;g.m-2;p;real;3;2 +pdsfruit(4);weight of fruits in box 4;g.m-2;p;real;4;2 +pdsfruit(5);weight of fruits in box 5;g.m-2;p;real;5;2 +pdsfruit(nboite);weight of fruits in last box;g.m-2;function;real;0;2 +pdsfruit(nboite-1);weight of fruits in last but one box;g.m-2;function;real;0;2 +pdsfruitfrais;weight of fresh fruits;g.m-2;p;real;0;2 +penfruit;ratio of fruit envelops to plant biomass;0-1;p;real;0;2 +pfeuil(n);ratio of leaves to plant biomass;0-1;p;real;n;2 +pfeuiljaune;ratio of yellow leaves to plant biomass;0-1;p;real;0;2 +pfeuilverte(n);ratio of green leaves to non-senescent plant biomass;0-1;p;real;n;2 +phoi;photoperiod;hour;c;real;0;0 +pHvol;pH of soil surface as affected by organic residues application (slurry);SD;soil;real;0;0 +pousfruit;number of fruits transferred from one box to the next;SD;p;real;0;2 +poussracmoy;mean reduction factor on the root growth due to soil constraints (option true density);0-1;p;real;0;1 +precip;daily amount of water added to soil (precipitation + irrigation - mulch interception - runoff at the surface);mm.d-1;sc;real;0;0 +precipjN;daily amount of mineral N added to soil due to precipitation;kg.ha-1.d-1;sc;real;0;0 +precipN;cumulative amount of mineral N added to soil due to precipitation;kg.ha-1;sc;real;0;0 +preciprec(n);recalculated daily precipitation;mm.d-1;c;real;n;0 +preserve;proportion of reserve in total plant biomass;0-1;p;real;0;2 +profexteau;average depth of water absorption by plant;cm;p;real;0;1 +profextN;average depth of N absorption by plant;cm;p;real;0;1 +profnappe;depth of water table;cm;soil;real;0;0 +psibase;predawn leaf water potential;MPa;p;real;0;1 +ptigestruc;proportion of structural stems in total plant biomass;0-1;p;real;0;2 +q_irrigations(1);amount of irrigation;mm;sc;real;1;0 +q_irrigations(10);amount of irrigation;mm;sc;real;10;0 +q_irrigations(11);amount of irrigation;mm;sc;real;11;0 +q_irrigations(12);amount of irrigation;mm;sc;real;12;0 +q_irrigations(13);amount of irrigation;mm;sc;real;13;0 +q_irrigations(14);amount of irrigation;mm;sc;real;14;0 +q_irrigations(15);amount of irrigation;mm;sc;real;15;0 +q_irrigations(16);amount of irrigation;mm;sc;real;16;0 +q_irrigations(17);amount of irrigation;mm;sc;real;17;0 +q_irrigations(18);amount of irrigation;mm;sc;real;18;0 +q_irrigations(19);amount of irrigation;mm;sc;real;19;0 +q_irrigations(2);amount of irrigation;mm;sc;real;2;0 +q_irrigations(20);amount of irrigation;mm;sc;real;20;0 +q_irrigations(21);amount of irrigation;mm;sc;real;21;0 +q_irrigations(22);amount of irrigation;mm;sc;real;22;0 +q_irrigations(23);amount of irrigation;mm;sc;real;23;0 +q_irrigations(24);amount of irrigation;mm;sc;real;24;0 +q_irrigations(25);amount of irrigation;mm;sc;real;25;0 +q_irrigations(26);amount of irrigation;mm;sc;real;26;0 +q_irrigations(27);amount of irrigation;mm;sc;real;27;0 +q_irrigations(28);amount of irrigation;mm;sc;real;28;0 +q_irrigations(29);amount of irrigation;mm;sc;real;29;0 +q_irrigations(3);amount of irrigation;mm;sc;real;3;0 +q_irrigations(30);amount of irrigation;mm;sc;real;30;0 +q_irrigations(4);amount of irrigation;mm;sc;real;4;0 +q_irrigations(5);amount of irrigation;mm;sc;real;5;0 +q_irrigations(6);amount of irrigation;mm;sc;real;6;0 +q_irrigations(7);amount of irrigation;mm;sc;real;7;0 +q_irrigations(8);amount of irrigation;mm;sc;real;8;0 +q_irrigations(9);amount of irrigation;mm;sc;real;9;0 +QCapp;cumulative amount of organic C added to soil;kg.ha-1;sc;real;0;0 +QCO2hum;cumulative amount of CO2-C emitted due to mineralisation of humus;kg.ha-1;sc;real;0;0 +QCO2mul;cumulative amount of CO2-C emitted due to mineralisation of residues in the mulch;kg.ha-1;sc;real;0;0 +QCO2res;cumulative amount of CO2-C emitted due to mineralisation of residues (including mulch);kg.ha-1;sc;real;0;0 +QCO2sol;cumulative amount of CO2-C emitted due to heterotrophic respiration (QCO2res + QCO2hum);kg.ha-1;sc;real;0;0 +QCperennemort;cumulative amount of C in dead perennial organs;kg.ha-1;p;real;0;2 +QCperennemort2;cumulative amount of C in dead perennial organs of the two plants;kg.ha-1;sc;real;0;0 +QCplantetombe;cumulative amount of C added to soil by fallen leaves due to senescence;kg.ha-1;p;real;0;2 +QCplantetombe2;cumulative amount of C added to soil by fallen leaves due to senescence for the two plants;kg.ha-1;sc;real;0;0 +QCprimed;cumulative amount of C mineralised by priming effect;kg.ha-1;sc;real;0;0 +QCrac;amount of C in living roots;kg.ha-1;p;real;0;1 +QCracmort;cumulative amount of C added to soil by dead roots;kg.ha-1;p;real;0;1 +QCracmort2;cumulative amount of C added to soil by dead roots of the two plants;kg.ha-1;sc;real;0;1 +QCresorg;cumulative amount of C added to soil through organic exogenous residues;kg.ha-1;sc;real;0;0 +QCressuite;cumulative amount of C added to soil due to aerial residues at harvest;kg.ha-1;p;real;0;1 +QCressuite2;cumulative amount of C added to soil due to aerial residues at harvest for the two plants;kg.ha-1;sc;real;0;1 +QCressuite_tot;cumulative amount of C added to soil by aerial residues from all harvests;t.ha-1;p;real;0;1 +QCressuite_tot2;cumulative amount of C added to soil by aerial residues from all harvests of the two plants;kg.ha-1;sc;real;0;1 +QCrogne;cumulative amount of C added to soil by fallen leaves due to trimming;kg.ha-1;p;real;0;0 +QCrogne2;cumulative amount of C added to soil by fallen leaves due to trimming of the two plants;kg.ha-1;sc;real;0;0 +Qdrain;water flow rate in mole drains;mm.d-1;soil;real;0;0 +Qdraincum;cumulative amount of water flowing in mole drains;mm;soil;real;0;0 +Qem_N2O;cumulative amount of N2O-N emitted from soil;kg.ha-1;sc;real;0;0 +Qem_N2Oden;cumulative amount of N2O-N emitted from soil by denitrification;kg.ha-1;sc;real;0;0 +Qem_N2Onit;cumulative amount of N2O-N emitted from soil by nitrification;kg.ha-1;sc;real;0;0 +qexport;biomass exported out of the field;t.ha-1;p;real;0;0 +Qfix;amount of N fixed symbiotically (BNF) between two cuts;kg.ha-1;p;real;0;2 +Qfixtot;cumulative amount of N fixed symbiotically (BNF);kg.ha-1;p;real;0;2 +Qfixtot2;cumulative amount of N fixed symbiotically (BNF) by the two plants;kg.ha-1;sc;real;0;0 +Qles;cumulative amount of NO3-N leached at the base of the soil profile;kg.ha-1;sc;real;0;0 +Qlesd;cumulative amount of NO3-N leached into mole drains;kg.ha-1;soil;real;0;0 +Qmin;cumulative amount of mineralized N from soil;kg.ha-1;sc;real;0;0 +Qminh;cumulative amount of mineralized N derived from humus decomposition;kg.ha-1;sc;real;0;0 +Qminr;cumulative amount of mineralized N derived from organic residues decomposition;kg.ha-1;sc;real;0;0 +qmulch;biomass of plant mulch;t.ha-1;sc;real;0;0 +QNabso;cumulative N absorbed by the crop (fixation not included);kg.ha-1;p;real;0;2 +QNabso2;cumulative N absorbed by the two crops (fixation not included);kg.ha-1;sc;real;0;0 +QNabsoaer;cumulative N absorbed by the crop and allocated to the aerials;kg.ha-1;p;real;0;2 +QNabsoper;cumulative N absorbed by the crop and allocated to the perennial organs;kg.ha-1;p;real;0;2 +QNabsorac;cumulative N absorbed by the crop and allocated to the roots;kg.ha-1;p;real;0;2 +QNabsotot;cumulative N taken up by the crop, including N fixation ;kg.ha-1;p;real;0;2 +QNapp;cumulative amount of organic N added to soil (straw + roots + fallen leaves + organic fertilisers );kg.ha-1;sc;real;0;0 +QNdenit;cumulative amount of N denitrified during the simulation period;kg.ha-1;soil;real;0;0 +QNdenit_from_lev;cumulative amount of N denitrified during the crop cycle ( emergence or budbreak-harvest);kg.ha-1;sc;real;0;0 +QNdenit_from_plt;cumulative amount of N denitrified during the crop cycle;kg.ha-1;sc;real;0;0 +QNexport;Amount of nitrogen exported at harvest (harvested and removed parts);kg.ha-1;p;real;0;0 +QNexport2;Amount of nitrogen exported at harvest from the two plants;kg.ha-1;sc;real;0;0 +QNfauche;Amount of N exported in each cut;kg.ha-1;p;real;0;0 +QNfauchetot;Cumulative amount of N exported by all cuts;kg.ha-1;p;real;0;0 +QNfauchetot2;Cumulative amount of N exported by all cuts of the two plants;kg.ha-1;sc;real;0;0 +QNfeuille;N content of structural part of the leaves;kg.ha-1;p;real;0;0 +QNfeuilleres;N content of the leaves (structural + RubisCO);kg.ha-1;function;real;0;0 +QNgaz;cumulative amount of gaseous N losses (through volatilisation and denitrification) ;kg.ha-1;soil;real;0;0 +QNgrain;amount of N in harvested organs (grains / fruits);kg.ha-1;p;real;0;2 +Qnitrif;cumulative amount of N nitrified in soil (if option nitrification is activated);kg.ha-1;sc;real;0;0 +QNorgeng;cumulative amount of N immobilized from fertiliser;kg.ha-1;soil;real;0;0 +QNperenne;amount of N in perennial organs;kg.ha-1;p;real;0;2 +QNperennemort;cumulative amount of N in dead perennial organs;kg.ha-1;p;real;0;2 +QNperennemort2;cumulative amount of N in dead perennial organs of the two plants;kg.ha-1;sc;real;0;0 +QNplante;amount of N in plants (aerial + perennial organs), without roots;kg.ha-1;p;real;0;0 +QNplante_mx_av_cut;Amount of nitrogen taken up by the plant before cut (for cut crops, for others = QNplante);kg.ha-1;p;real;0;1 +QNplantenp;amount of N in non perennial organs (aerials + roots);kg.ha-1;p;real;n;2 +QNplantetombe;cumulative amount of N added to soil by fallen leaves;kg.ha-1;p;real;0;2 +QNplantetombe2;cumulative amount of N added to soil by fallen leaves of the two plants;kg.ha-1;sc;real;0;0 +QNprimed;cumulative amount of N mineralised by priming effect;kg.ha-1;sc;real;0;0 +QNrac;amount of N in roots;kg.ha-1;p;real;0;1 +QNracmort;cumulative amount of N added to soil by dead roots;kg.ha-1;p;real;0;1 +QNracmort2;cumulative amount of N added to soil by dead roots of the two plants;kg.ha-1;sc;real;0;1 +QNresorg;cumulative amount of organic exogenous N added to soil;kg.ha-1;sc;real;0;0 +QNresperenne;amount of N in perennial reserves;kg.ha-1;p;real;0;2 +QNresperennestruc;amount of N in the structural pool of perennial organs;kg.ha-1;p;real;0;0 +QNressuite;cumulative amount of N added to soil by aerial residues at harvest;kg.ha-1;p;real;0;1 +QNressuite_tot;cumulative amount of N added to soil by aerial residues from all harvests;kg.ha-1;p;real;0;1 +QNressuite_tot2;cumulative amount of N added to soil by aerial residues from all harvests of the two plants;kg.ha-1;sc;real;0;1 +QNressuite2;cumulative amount of N added to soil by aerial residues of the two plants;kg.ha-1;sc;real;0;1 +QNrestemp;amount of N in temporary reserves of vegetative organs that can be remobilised;kg.ha-1;p;real;0;0 +QNrogne;cumulative amount of N added to soil due to trimming;kg.ha-1;p;real;0;1 +QNrogne2;cumulative amount of N added to soil due to trimming of the two plants;kg.ha-1;sc;real;0;1 +QNtige;Structural nitrogen content in stems;kg.ha-1;p;real;0;0 +QNtot;amount of N in whole plant (aerial + root + perennial organs);kg.ha-1;p;real;0;0 +QNtot2;amount of N in whole plant (aerial + root + perennial organs) of the two plants;kg.ha-1;sc;real;0;0 +QNveg;amount of N in vegetative organs;kg.ha-1;p;real;0;0 +QNvegstruc;amount of N in the structural part of vegetative organs;kg.ha-1;p;real;0;0 +QNvoleng;cumulative amount of N volatilised from fertiliser;kg.ha-1;soil;real;0;0 +QNvolorg;cumulative amount of N volatilised from organic inputs;kg.ha-1;soil;real;0;0 +qres_pature;amount of crop residue by pasture applied to the soil (fresh weight);t MF ha-1;sc;real;0;0 +Qressuite;biomass of residues from the previous crop returned to soil at harvest (without fallen leaves);t.ha-1;p;real;0;1 +Qressuite_tot;amount of total harvest residues (aerials + roots);t.ha-1;p;real;0;1 +ra_recal;aerodynamic resistance between the canopy and the reference level zr;s.m-1;sta;real;0;0 +raint;photosynthetic active radiation intercepted by the canopy;MJ.m-2;p;real;0;2 +ras;aerodynamic resistance between the soil and the canopy;s.m-1;sc;real;0;0 +ratioFT;Leaves to stem ratio;SD;function;real;0;0 +ratioTF;Stem to leaves ratio, taking the value of 0 or P_tigefeuil;SD;p;real;0;0 +Ratm;atmospheric radiation;MJ.m-2;sc;real;0;0 +rc;resistance of canopy;s.m-1;p;real;0;1 +rdif;ratio of diffuse radiation to global radiation;0-1;sc;real;0;0 +remobilj;daily amount of biomass remobilized for growth;t.ha-1.d-1;p;real;0;2 +remontee;capillary uptake from the base of the soil profile;mm.d-1;soil;real;0;0 +rendementsec;biomass of harvested organs (0% moisture);t.ha-1;p;real;0;1 +resmes;amount of soil water integrated on the measurement depth;mm;function;real;0;0 +resperenne;biomass of metabolic reserves in the perennial organs;t.ha-1;p;real;0;2 +resrac;soil water reserve in the root zone;mm;p;real;0;1 +restemp;biomass reserves (carbohydrates) in shoots that can be accumulated or mobilized for crop growth;t.ha-1;p;real;0;2 +rfpi;reduction factor on plant development due to photoperiod;0-1;p;real;0;1 +rfvi;reduction factor on plant development due to vernalization;0-1;p;real;0;1 +rlj;rate of root length growth;cm.cm-2.d-1;p;real;0;1 +rltot;total root length (accounting for senescent roots);cm.cm-2;function;real;0;1 +rltotf;total length of fine roots (accounting for senescent roots);cm.cm-2;p;real;0;1 +rltotg;total length of coarse roots (accounting for senescent roots);cm.cm-2;p;real;0;1 +rmaxi;maximum water reserve used;mm;p;real;0;1 +rnet;net radiation;MJ.m-2;sc;real;0;0 +rnetS;net radiation at the soil surface;MJ.m-2;sc;real;0;0 +rombre;fraction of the total radiation in the shade;0-1;p;real;0;1 +rsoleil;fraction of the total radiation in the full sun;0-1;p;real;0;1 +RsurRU;fraction of plant available water over the soil profile;0-1;function;real;0;0 +RsurRUrac;fraction of plant available water over the root profile;0-1;p;real;0;1 +RU;plant available water content over the soil profile;mm;function;real;0;0 +ruissel;daily amount of water in total runoff (surface + overflow);mm.d-1;sc;real;0;0 +ruisselsurf;daily amount of water in runoff at soil surface;mm.d-1;sc;real;0;0 +ruisselt;cumulative amount of water in total runoff (surface + overflow);mm;sc;real;0;0 +runoff_from_lev;cumulative amount of water in runoff (surface + overflow) during the crop cycle ( emergence or budbreak-harvest);mm;sc;real;0;0 +runoff_from_plt;cumulative amount of water in runoff (surface + overflow) during the crop cycle (sowing-harvest);mm;sc;real;0;0 +RUrac;maximum plant available water content over the root profile;mm;p;real;0;1 +saturation;amount of water in the soil macroporosity;mm;sc;real;0;0 +Sdepth(n);snow cover depth;m;c;real;n;0 +senfac;reduction factor on leaf life span due to water stress (increasing senescence rate);0-1;p;real;0;2 +sla;specific leaf area;cm2.g-1;p;real;0;2 +SMN;amount of soil mineral N content over the soil profile;kg.ha-1;sc;real;0;0 +SMNmes;amount of soil mineral N content over the depth profmes;kg.ha-1;function;real;0;0 +Snowaccu(n);daily snowfall accumulation (mm water equivalent);mm.d-1;c;real;n;0 +Snowmelt(n);daily snowmelt (mm water equivalent);mm.d-1;c;real;n;0 +SOC;amount of soil organic C (= Chumt + Cb) over the profhum depth;kg.ha-1;sc;real;0;0 +SOCL(1);amount of soil organic C (= Chumt + Cb) in the layer 1;kg.ha-1;sc;real;0;0 +SOCL(2);amount of soil organic C (= Chumt + Cb) in the layer 2;kg.ha-1;sc;real;0;0 +SOCL(3);amount of soil organic C (= Chumt + Cb) in the layer 3;kg.ha-1;sc;real;0;0 +SOCL(4);amount of soil organic C (= Chumt + Cb) in the layer 4;kg.ha-1;sc;real;0;0 +SOCL(5);amount of soil organic C (= Chumt + Cb) in the layer 5;kg.ha-1;sc;real;0;0 +SOC0;amount of soil organic C (= Chumt + Cb) over the profhum depth at time 0;kg.ha-1;sc;real;0;0 +SOCbalance;Soil organic C balance (inputs-outputs) over the whole soil profile;kg.ha-1;function;real;0;0 +SOCinputs;Soil organic C inputs to the whole soil profile;kg.ha-1;sc;real;0;0 +SOCtot;amount of soil organic C (all organic pools) over the whole soil profile;kg.ha-1;sc;real;0;0 +SoilAvW;amount of plant available water in soil over the depth profmes;mm;sc;real;0;0 +SoilAvW_by_layers(1);amount of plant available water in soil for layer 1;mm;function;real;1;0 +SoilAvW_by_layers(2);amount of plant available water in soil for layer 2;mm;function;real;2;0 +SoilAvW_by_layers(3);amount of plant available water in soil for layer 3;mm;function;real;3;0 +SoilAvW_by_layers(4);amount of plant available water in soil for layer 4;mm;function;real;4;0 +SoilAvW_by_layers(5);amount of plant available water in soil for layer 5;mm;function;real;5;0 +SoilWatM;amount of plant available water in soil over the depth profmesW;mm;sc;real;0;0 +som_HUR;cumulative water content of the soil microporosity;mm;sc;real;0;0 +som_sat;cumulative amount of water in the soil macroporosity;mm;sc;real;0;0 +somcour;cumulative units of development (upvt) between two stages;degreeC.d;p;real;0;1 +somcourdrp;cumulative units of development (upvt) between two reproductive stages;degreeC.d;p;real;0;1 +somcourfauche;sum of temperature beetwen 2 cuts of forage crop;degreeC.d;p;real;0;1 +somcourmont;cumulative units of development from the start of vernalisation;degreeC.d;p;real;0;1 +somdifftculttair;cumulative temperature difference (tcult-tair) during the simulation period;degreeC;c;real;0;0 +somtemp;sum of temperatures (expressed in Q10 =sum (2.0 ** (udevair ou udevcult / 10.));degreeC.d;p;real;0;1 +somudevair;sum of air temperature (udevair) from sowing to harvest;degreeC;p;real;0;1 +somudevcult;sum of crop temperature (udevcult) from sowing to harvest;degreeC;p;real;0;1 +somupvtsem;sum of development units (upvt) from sowing to harvest;degreeC;p;real;0;1 +SON;amount of soil organic N (= Nhumt + Nb) over the profhum depth;kg.ha-1;sc;real;0;0 +SONL(1);amount of soil organic N (= Nhumt + Nb) in the layer 1;kg.ha-1;sc;real;0;0 +SONL(2);amount of soil organic N (= Nhumt + Nb) in the layer 2;kg.ha-1;sc;real;0;0 +SONL(3);amount of soil organic N (= Nhumt + Nb) in the layer 3;kg.ha-1;sc;real;0;0 +SONL(4);amount of soil organic N (= Nhumt + Nb) in the layer 4;kg.ha-1;sc;real;0;0 +SONL(5);amount of soil organic N (= Nhumt + Nb) in the layer 5;kg.ha-1;sc;real;0;0 +SON0;amount of soil organic N (= Nhumt + Nb) over the profhum depth at time 0;kg.ha-1;sc;real;0;0 +SONbalance;Soil organic N balance (inputs-outputs) over the whole soil profile;kg.ha-1;function;real;0;0 +SONinputs;Soil organic N inputs to the whole soil profile;kg.ha-1;sc;real;0;0 +SONtot;amount of soil organic N (all organic pools) over the whole soil profile;kg.ha-1;sc;real;0;0 +sourcepuits;source to sink ratio of assimilates in the plant;SD;p;real;0;2 +spfruit;reduction factor on the fruits number due to trophic stress;0-1;p;real;0;2 +splai;source to sink ratio of assimilates in the leaves;SD;p;real;0;2 +stemflow;daily amount of water runoff along the stem;mm.d-1;p;real;0;1 +STN;total soil N (mineral + organic);kg.ha-1;sc;real;0;0 +str1intercoupe;average stomatal water stress index during the vegetative phase (emergence - maximum LAI) of forage crops;0-1;p;real;0;0 +str2intercoupe;average stomatal water stress index during the reproductive phase (maximum LAI - maturity) of forage crops;0-1;p;real;0;0 +stu1intercoupe;average turgescence water stress index during the vegetative phase (emergence - maximum LAI) of forage crops;0-1;p;real;0;0 +stu2intercoupe;average turgescence water stress index during the reproductive phase (maximum LAI - maturity) of forage crops;0-1;p;real;0;0 +sucre;sugar content of harvested organs;0-1;p;real;0;2 +sucre_percent;sugar content of harvested organs;% fresh weight;function;real;0;2 +surf(ao);fraction of the soil surface in the shade;0-1;p;real;ao;0 +surf(as);fraction of the soil surface in the sun;0-1;p;real;as;0 +swfac;stomatic water stress index;0-1;p;real;0;2 +swfac1moy;average stomatic water stress index over the vegetative stage;0-1;p;real;0;1 +swfac2moy;average stomatic water stress index over the reproductive stage;0-1;p;real;0;1 +tairveille;mean air temperature at the previous day;degreeC;sc;real;0;0 +tauxcouv(n);cover rate of the canopy;SD;function;real;n;0 +tcult;crop surface temperature (daily average);degreeC;sc;real;0;0 +tcult_tairveille;difference between canopy temperature and air temperature;degreeC;sc;real;0;0 +tcultmax;crop surface temperature (daily maximum);degreeC;sc;real;0;0 +tcultmin;crop surface temperature (daily minimum);degreeC;sc;real;0;0 +tempeff;efficient temperature for growth;degreeC;p;real;0;1 +tetp(n);efficient potential evapotranspiration (entered or calculated);mm.d-1;c;real;n;0 +tetstomate;threshold of soil water content limiting transpiration and photosynthesis;% vol;p;real;0;1 +teturg;threshold of soil water content limiting the growth of leaves (in surface area);% vol;p;real;0;1 +tmax(n);maximum active temperature of atmosphere;degreeC;c;real;n;0 +tmaxext(n);maximum temperature of external atmosphere;degreeC;c;real;n;0 +tmaxrec(n);recalculated daily maximum temperature (with presence of a snow cover);degreeC;c;real;n;0 +tmin(n);minimum active temperature of atmosphere;degreeC;c;real;n;0 +tminext(n);minimum temperature of external atmsphere;degreeC;c;real;n;0 +tminrec(n);recalculated daily minimum temperature (with presence of a snow cover);degreeC;c;real;n;0 +tmoy(n);mean active temperature of atmosphere;degreeC;c;real;n;0 +tmoyext(n);mean temperature of external atmosphere;degreeC;c;real;n;0 +tmoyIpltJuin;mean temperature from sowing or planting (iplt stage) until June 30;degreeC;function;real;0;1 +tmoyIpltSept;mean temperature from sowing or planting (iplt stage) until September 30;degreeC;function;real;0;1 +tncultmat;average of minimum crop temperatures (tcultmin) between the stages lax and rec;degreeC;c;real;0;0 +tnhc;cumulative normalized time for the mineralisation of humus;d;sc;real;0;0 +tnrc;cumulative normalized time for the mineralisation of organic residues;d;sc;real;0;0 +totapN;cumulative amount of mineral N added by mineral fertilisers and organic fertilisers;kg.ha-1;sc;real;0;0 +totapNres;cumulative amount of mineral N added by organic fertilisers;kg.ha-1;sc;real;0;0 +totir;cumulative amount of irrigation water;mm;function;real;0;0 +tpm(n);water vapour pressure in air;hPa;c;real;n;0 +trg(n);active radiation (entered or calculated);MJ.m-2;c;real;n;0 +trgext(n);exterior radiation;MJ.m-2;c;real;n;0 +trr(n);daily rainfall;mm.d-1;c;real;n;0 +TS(1);mean soil temperature (in layer 1);degreeC;sc;real;1;0 +TS(2);mean soil temperature (in layer 2);degreeC;sc;real;2;0 +TS(3);mean soil temperature (in layer 3);degreeC;sc;real;3;0 +TS(4);mean soil temperature (in layer 4);degreeC;sc;real;4;0 +TS(5);mean soil temperature (in layer 5);degreeC;sc;real;5;0 +tsol(10);temperature in the soil at 10 cm ;degrees;sc;real;0;0 +tsol_mean_0_profsem;daily min soil temperature on the layer 1 to sowing depth;d;p;real;0;1 +tsol_mean_ger_lev_0_dpthsow;mean soil temperature on the layer 1 to sowing depth from germination date to emergence;degreeC.d;p;real;0;1 +tsol_mean_plt_ger_0_dpthsow;mean soil temperature on the layer 1 to sowing depth from sowing date to germination ;degreeC.d;p;real;0;1 +tsol_min_0_profsem;daily mean soil temperature on the layer 1 to sowing depth;d;p;real;0;1 +tsol_min_ger_lev_0_dpthsow;min soil temperature on the layer 1 to sowing depth from germination date to emergence;degreeC.d;p;real;0;1 +tsol_min_plt_ger_0_dpthsow;min soil temperature on the layer 1 to sowing depth from sowing date to germination ;degreeC.d;p;real;0;1 +turfac;turgescence water stress index;0-1;p;real;0;2 +turfac1moy;average turgescence water stress index during the vegetative stage;0-1;p;real;0;1 +turfac2moy;average turgescence water stress index during the reproductive stage;0-1;p;real;0;1 +tustress;reduction factor on leaf growth due to the effective water stress (= min(turfac,innlai));0-1;sc;real;0;0 +tvent(n);mean daily wind speed at 2 m high above soil;m.s-1;c;real;n;0 +udevair;effective temperature for crop development, computed with tair;degreeC.d;p;real;0;1 +udevcult;effective temperature for crop development, computed with tcult;degreeC.d;p;real;0;1 +ulai(n);relative development unit for LAI;0-3;p;real;n;2 +upvt(n);development unit;degreeC.d;p;real;n;0 +urac;daily relative development unit for root growth;1-3;p;real;0;1 +vitmoy;mean canopy growth rate;g.m-2.d-1;p;real;0;2 +xmlch1;thickness of the dry layer created by evaporation from the soil and mulch;cm;sc;real;0;0 +zrac;maximum depth reached by root system;cm;p;real;0;1 +zracmax;maximum rooting depth;cm;p;real;0;1 +varrapforme;Ratio between plant heigth and plant width;factor;p;real;0;2 +rnet_plant;Net radiation for the plant layer;MJ.m-2;p;real;0;1 +ef_n_w_height;effect of water and nitrogen deficit on height (0-1);0-1;p;real;0;2 +potential_height;plant height without stress;cm;p;real;0;2 diff --git a/inst/extdata/src_files/csv/V11.0/profil.csv b/inst/extdata/src_files/csv/V11.0/profil.csv new file mode 100644 index 00000000..03dc363b --- /dev/null +++ b/inst/extdata/src_files/csv/V11.0/profil.csv @@ -0,0 +1,21 @@ +Name;Definition;Unit;Source +ammonium;Amount of ammonium NH4 by layer;kg.ha-1;soil +C_allresidues;total amount of C for all residues by layer;kg.ha-1;sc +Chum;Quantity of C in humus in each layer;kg.ha-1;sc +efnrac;effect of mineral nitrogen on the roots;0-1;plant +humirac;soil dryness on the roots;0-1;plant +hur;soil water content;mm.cm-1;sc +husup_by_cm;water drainage under each layer of 1 cm;mm;sc +lracz;efficient root density profile;cm.cm-3sol;plant +msrac;biomass of roots;t.ha-1;function +N_allresidues;total amount of N for all residues by layer;kgN.ha-1;sc +Nhum;Quantity of N in humus in each layer;kgN.ha-1;sc +nit;profile of soil nitrates NO3;kgN.ha-1;soil +p_rl;percentage of root length in relation to total length;%;function +p_rlf;percentage of fine roots;%;function +p_rlg;percentage of coarse roots;%;function +rl;length of coarse roots plus length of fine roots;cm.cm-2sol;function +rlf;length of fine roots;cm.cm-2sol;plant +rlg;length of coarse roots;cm.cm-2sol;plant +sat;Amount of water remaining in the soil macroporosity by layer mm;mm.cm-1;sc +tsol;profile of soil temperature;degrees.C;sc diff --git a/inst/extdata/src_files/sti/V10.1.0/mod_rapport.sti b/inst/extdata/src_files/sti/V10.0/mod_rapport.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/mod_rapport.sti rename to inst/extdata/src_files/sti/V10.0/mod_rapport.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/mod_rapportA.sti b/inst/extdata/src_files/sti/V10.0/mod_rapportA.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/mod_rapportA.sti rename to inst/extdata/src_files/sti/V10.0/mod_rapportA.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/mod_rapportP.sti b/inst/extdata/src_files/sti/V10.0/mod_rapportP.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/mod_rapportP.sti rename to inst/extdata/src_files/sti/V10.0/mod_rapportP.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/mod_sbanana.sti b/inst/extdata/src_files/sti/V10.0/mod_sbanana.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/mod_sbanana.sti rename to inst/extdata/src_files/sti/V10.0/mod_sbanana.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/usms.xml b/inst/extdata/src_files/sti/V10.0/usms.xml similarity index 98% rename from inst/extdata/src_files/sti/V10.1.0/usms.xml rename to inst/extdata/src_files/sti/V10.0/usms.xml index 29d12b8c..3a49f29e 100644 --- a/inst/extdata/src_files/sti/V10.1.0/usms.xml +++ b/inst/extdata/src_files/sti/V10.0/usms.xml @@ -1,5 +1,5 @@ - + 30 300 diff --git a/inst/extdata/src_files/sti/V10.1.0/usms_example.xml b/inst/extdata/src_files/sti/V10.0/usms_example.xml similarity index 99% rename from inst/extdata/src_files/sti/V10.1.0/usms_example.xml rename to inst/extdata/src_files/sti/V10.0/usms_example.xml index 6a603ed6..3a1fd78c 100644 --- a/inst/extdata/src_files/sti/V10.1.0/usms_example.xml +++ b/inst/extdata/src_files/sti/V10.0/usms_example.xml @@ -1,5 +1,5 @@ - + 286 650 diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace1/mod_saintercrop_pea_barley.sti b/inst/extdata/src_files/sti/V10.0/workspace1/mod_saintercrop_pea_barley.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace1/mod_saintercrop_pea_barley.sti rename to inst/extdata/src_files/sti/V10.0/workspace1/mod_saintercrop_pea_barley.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace1/mod_sgrass.sti b/inst/extdata/src_files/sti/V10.0/workspace1/mod_sgrass.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace1/mod_sgrass.sti rename to inst/extdata/src_files/sti/V10.0/workspace1/mod_sgrass.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace1/mod_smaize.sti b/inst/extdata/src_files/sti/V10.0/workspace1/mod_smaize.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace1/mod_smaize.sti rename to inst/extdata/src_files/sti/V10.0/workspace1/mod_smaize.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace1/mod_spintercrop_pea_barley.sti b/inst/extdata/src_files/sti/V10.0/workspace1/mod_spintercrop_pea_barley.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace1/mod_spintercrop_pea_barley.sti rename to inst/extdata/src_files/sti/V10.0/workspace1/mod_spintercrop_pea_barley.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace2/mod_sproto_rice.sti b/inst/extdata/src_files/sti/V10.0/workspace2/mod_sproto_rice.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace2/mod_sproto_rice.sti rename to inst/extdata/src_files/sti/V10.0/workspace2/mod_sproto_rice.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace2/mod_ssoybean.sti b/inst/extdata/src_files/sti/V10.0/workspace2/mod_ssoybean.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace2/mod_ssoybean.sti rename to inst/extdata/src_files/sti/V10.0/workspace2/mod_ssoybean.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace2/mod_ssunflower.sti b/inst/extdata/src_files/sti/V10.0/workspace2/mod_ssunflower.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace2/mod_ssunflower.sti rename to inst/extdata/src_files/sti/V10.0/workspace2/mod_ssunflower.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace2/mod_swheat.sti b/inst/extdata/src_files/sti/V10.0/workspace2/mod_swheat.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace2/mod_swheat.sti rename to inst/extdata/src_files/sti/V10.0/workspace2/mod_swheat.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace_root/banana/mod_sbanana.sti b/inst/extdata/src_files/sti/V10.0/workspace_root/banana/mod_sbanana.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace_root/banana/mod_sbanana.sti rename to inst/extdata/src_files/sti/V10.0/workspace_root/banana/mod_sbanana.sti diff --git a/inst/extdata/src_files/sti/V10.1.0/workspace_root/wheat/mod_swheat.sti b/inst/extdata/src_files/sti/V10.0/workspace_root/wheat/mod_swheat.sti similarity index 100% rename from inst/extdata/src_files/sti/V10.1.0/workspace_root/wheat/mod_swheat.sti rename to inst/extdata/src_files/sti/V10.0/workspace_root/wheat/mod_swheat.sti diff --git a/inst/extdata/src_files/txt/V11.0/climat.txt b/inst/extdata/src_files/txt/V11.0/climat.txt new file mode 100644 index 00000000..79a95a5c --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/climat.txt @@ -0,0 +1,366 @@ +climais 1996 1 1 1 8.0 11.1 1.2 0.1 17.0 -999.9 -999.9 330.0 +climais 1996 1 2 2 7.2 9.4 1.7 0.4 0.5 -999.9 -999.9 330.0 +climais 1996 1 3 3 2.2 8.6 2.6 0.2 0.5 -999.9 -999.9 330.0 +climais 1996 1 4 4 1.4 8.9 1.6 0.4 2.5 -999.9 -999.9 330.0 +climais 1996 1 5 5 5.2 8.8 0.9 0.4 9.2 -999.9 -999.9 330.0 +climais 1996 1 6 6 3.8 9.5 1.4 0.0 27.0 -999.9 -999.9 330.0 +climais 1996 1 7 7 7.8 12.2 3.1 0.6 2.5 -999.9 -999.9 330.0 +climais 1996 1 8 8 5.9 12.5 4.2 0.7 1.0 -999.9 -999.9 330.0 +climais 1996 1 9 9 8.6 12.1 2.6 0.6 5.5 -999.9 -999.9 330.0 +climais 1996 1 10 10 6.5 8.7 1.4 0.0 7.5 -999.9 -999.9 330.0 +climais 1996 1 11 11 5.7 9.4 1.6 0.2 5.5 -999.9 -999.9 330.0 +climais 1996 1 12 12 6.3 11.7 4.3 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 1 13 13 6.0 9.1 3.1 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 1 14 14 2.5 14.1 3.9 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 1 15 15 6.7 15.2 4.7 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 1 16 16 2.9 13.9 5.1 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 1 17 17 1.9 9.9 3.5 0.1 0.5 -999.9 -999.9 330.0 +climais 1996 1 18 18 -0.6 11.4 5.1 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 1 19 19 0.8 10.5 5.7 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 1 20 20 1.3 11.0 4.1 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 1 21 21 1.7 12.6 4.4 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 1 22 22 6.4 11.7 1.0 0.6 15.5 -999.9 -999.9 330.0 +climais 1996 1 23 23 6.8 12.2 3.2 0.9 13.0 -999.9 -999.9 330.0 +climais 1996 1 24 24 4.4 11.2 4.3 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 1 25 25 2.9 6.2 2.8 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 1 26 26 1.5 3.6 1.7 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 1 27 27 -0.8 4.3 2.3 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 1 28 28 2.1 8.0 3.1 0.1 0.5 -999.9 -999.9 330.0 +climais 1996 1 29 29 4.0 10.1 5.3 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 1 30 30 2.7 11.5 6.6 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 1 31 31 -1.9 2.7 1.7 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 2 1 32 -0.4 9.1 6.5 0.4 3.0 -999.9 -999.9 330.0 +climais 1996 2 2 33 4.2 7.4 1.7 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 2 3 34 -0.5 3.4 2.8 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 2 4 35 -0.5 2.4 3.4 0.6 0.0 -999.9 -999.9 330.0 +climais 1996 2 5 36 -1.2 1.4 5.4 0.6 1.0 -999.9 -999.9 330.0 +climais 1996 2 6 37 -1.6 6.1 2.1 0.3 7.5 -999.9 -999.9 330.0 +climais 1996 2 7 38 0.2 9.1 3.1 1.1 8.5 -999.9 -999.9 330.0 +climais 1996 2 8 39 1.0 8.0 6.4 0.8 0.0 -999.9 -999.9 330.0 +climais 1996 2 9 40 -0.9 8.7 6.0 0.8 1.0 -999.9 -999.9 330.0 +climais 1996 2 10 41 2.2 9.5 5.8 0.7 4.0 -999.9 -999.9 330.0 +climais 1996 2 11 42 2.0 10.0 6.7 0.6 1.5 -999.9 -999.9 330.0 +climais 1996 2 12 43 6.0 11.0 3.8 1.0 10.5 -999.9 -999.9 330.0 +climais 1996 2 13 44 3.6 8.8 5.8 1.0 0.0 -999.9 -999.9 330.0 +climais 1996 2 14 45 1.7 3.2 1.6 1.0 0.0 -999.9 -999.9 330.0 +climais 1996 2 15 46 -0.1 4.3 8.7 1.0 0.0 -999.9 -999.9 330.0 +climais 1996 2 16 47 -2.1 6.8 2.3 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 2 17 48 5.3 9.5 3.6 0.9 0.0 -999.9 -999.9 330.0 +climais 1996 2 18 49 5.4 8.2 1.4 0.7 7.5 -999.9 -999.9 330.0 +climais 1996 2 19 50 1.4 5.2 3.2 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 2 20 51 -3.2 -0.2 3.4 0.7 0.0 -999.9 -999.9 330.0 +climais 1996 2 21 52 -3.8 -1.7 6.6 1.1 0.0 -999.9 -999.9 330.0 +climais 1996 2 22 53 -7.0 2.2 6.2 0.5 1.5 -999.9 -999.9 330.0 +climais 1996 2 23 54 -1.1 7.1 6.4 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 2 24 55 3.1 8.8 3.6 0.8 1.5 -999.9 -999.9 330.0 +climais 1996 2 25 56 4.7 12.7 9.2 2.0 2.5 -999.9 -999.9 330.0 +climais 1996 2 26 57 4.9 6.7 2.2 0.4 3.5 -999.9 -999.9 330.0 +climais 1996 2 27 58 0.1 6.8 5.4 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 2 28 59 0.8 8.2 4.1 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 2 29 60 3.5 7.4 3.5 0.8 0.0 -999.9 -999.9 330.0 +climais 1996 3 1 61 1.4 9.6 10.0 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 3 2 62 2.8 6.4 10.6 1.5 0.0 -999.9 -999.9 330.0 +climais 1996 3 3 63 -0.4 4.9 2.8 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 3 4 64 0.0 6.8 11.7 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 3 5 65 0.1 7.9 4.7 0.7 0.0 -999.9 -999.9 330.0 +climais 1996 3 6 66 3.3 5.4 2.4 0.8 0.0 -999.9 -999.9 330.0 +climais 1996 3 7 67 -1.2 5.7 7.5 0.9 2.0 -999.9 -999.9 330.0 +climais 1996 3 8 68 1.4 7.6 3.3 0.6 5.0 -999.9 -999.9 330.0 +climais 1996 3 9 69 2.2 15.7 13.0 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 3 10 70 1.3 13.6 13.6 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 3 11 71 -1.3 11.1 14.1 1.8 0.0 -999.9 -999.9 330.0 +climais 1996 3 12 72 -2.6 10.0 11.8 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 3 13 73 -0.8 10.6 12.2 2.2 0.0 -999.9 -999.9 330.0 +climais 1996 3 14 74 0.6 14.8 10.5 1.3 5.5 -999.9 -999.9 330.0 +climais 1996 3 15 75 6.4 9.3 2.8 0.5 0.5 -999.9 -999.9 330.0 +climais 1996 3 16 76 5.4 11.9 8.3 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 3 17 77 0.4 12.8 15.4 1.7 0.0 -999.9 -999.9 330.0 +climais 1996 3 18 78 -0.4 13.4 11.2 1.3 0.0 -999.9 -999.9 330.0 +climais 1996 3 19 79 1.3 13.9 14.8 1.9 5.0 -999.9 -999.9 330.0 +climais 1996 3 20 80 7.1 14.3 11.9 2.2 0.0 -999.9 -999.9 330.0 +climais 1996 3 21 81 6.5 13.8 11.4 2.1 0.0 -999.9 -999.9 330.0 +climais 1996 3 22 82 7.7 19.7 15.4 2.3 0.0 -999.9 -999.9 330.0 +climais 1996 3 23 83 7.0 22.7 15.3 2.4 0.0 -999.9 -999.9 330.0 +climais 1996 3 24 84 8.6 23.1 12.8 2.6 3.0 -999.9 -999.9 330.0 +climais 1996 3 25 85 10.7 19.6 16.2 2.8 0.0 -999.9 -999.9 330.0 +climais 1996 3 26 86 9.9 12.6 2.7 0.5 6.0 -999.9 -999.9 330.0 +climais 1996 3 27 87 4.8 8.5 7.5 1.6 0.5 -999.9 -999.9 330.0 +climais 1996 3 28 88 -1.4 10.5 17.3 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 3 29 89 -0.1 11.9 14.3 1.7 0.0 -999.9 -999.9 330.0 +climais 1996 3 30 90 1.8 10.7 13.5 2.1 0.0 -999.9 -999.9 330.0 +climais 1996 3 31 91 -1.7 10.7 16.0 2.0 0.0 -999.9 -999.9 330.0 +climais 1996 4 1 92 3.3 11.2 6.7 2.0 0.5 -999.9 -999.9 330.0 +climais 1996 4 2 93 -1.8 9.8 21.6 2.7 0.0 -999.9 -999.9 330.0 +climais 1996 4 3 94 -3.0 8.4 18.0 2.1 0.0 -999.9 -999.9 330.0 +climais 1996 4 4 95 -4.9 11.3 20.9 2.3 0.0 -999.9 -999.9 330.0 +climais 1996 4 5 96 0.9 12.6 21.6 2.4 0.0 -999.9 -999.9 330.0 +climais 1996 4 6 97 -2.6 17.5 21.2 2.5 0.0 -999.9 -999.9 330.0 +climais 1996 4 7 98 -0.4 17.0 19.0 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 4 8 99 3.3 16.0 19.0 2.6 0.0 -999.9 -999.9 330.0 +climais 1996 4 9 100 1.1 17.3 20.9 2.7 0.0 -999.9 -999.9 330.0 +climais 1996 4 10 101 3.6 14.9 7.3 0.9 1.0 -999.9 -999.9 330.0 +climais 1996 4 11 102 7.9 16.8 12.2 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 4 12 103 4.3 19.5 21.7 3.2 0.0 -999.9 -999.9 330.0 +climais 1996 4 13 104 8.7 16.2 12.1 1.9 1.0 -999.9 -999.9 330.0 +climais 1996 4 14 105 9.3 15.6 10.8 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 4 15 106 9.2 18.7 22.3 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 4 16 107 3.0 20.4 18.3 3.6 1.0 -999.9 -999.9 330.0 +climais 1996 4 17 108 9.1 15.5 16.4 2.1 3.5 -999.9 -999.9 330.0 +climais 1996 4 18 109 4.6 16.1 16.6 1.8 0.0 -999.9 -999.9 330.0 +climais 1996 4 19 110 3.9 22.8 21.7 3.6 0.0 -999.9 -999.9 330.0 +climais 1996 4 20 111 9.4 22.0 21.1 5.4 0.0 -999.9 -999.9 330.0 +climais 1996 4 21 112 10.3 23.3 17.8 5.1 2.0 -999.9 -999.9 330.0 +climais 1996 4 22 113 10.0 23.2 15.2 3.6 10.5 -999.9 -999.9 330.0 +climais 1996 4 23 114 10.1 15.0 17.3 2.6 2.5 -999.9 -999.9 330.0 +climais 1996 4 24 115 5.6 15.3 21.8 2.4 0.0 -999.9 -999.9 330.0 +climais 1996 4 25 116 4.5 15.6 22.9 2.5 0.0 -999.9 -999.9 330.0 +climais 1996 4 26 117 3.1 17.9 25.3 3.5 0.0 -999.9 -999.9 330.0 +climais 1996 4 27 118 6.4 19.7 16.9 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 4 28 119 9.4 20.0 16.4 3.2 0.5 -999.9 -999.9 330.0 +climais 1996 4 29 120 8.9 17.3 21.7 3.5 0.0 -999.9 -999.9 330.0 +climais 1996 4 30 121 3.3 16.1 15.0 2.2 0.5 -999.9 -999.9 330.0 +climais 1996 5 1 122 5.1 13.9 13.1 1.9 12.5 -999.9 -999.9 330.0 +climais 1996 5 2 123 6.9 12.9 13.8 1.9 8.5 -999.9 -999.9 330.0 +climais 1996 5 3 124 8.2 13.7 9.2 1.4 3.0 -999.9 -999.9 330.0 +climais 1996 5 4 125 3.4 15.6 20.5 2.5 0.0 -999.9 -999.9 330.0 +climais 1996 5 5 126 2.7 19.5 26.6 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 5 6 127 6.4 22.1 21.3 3.5 0.0 -999.9 -999.9 330.0 +climais 1996 5 7 128 7.3 18.1 13.1 1.8 8.5 -999.9 -999.9 330.0 +climais 1996 5 8 129 12.4 19.8 14.1 2.9 18.0 -999.9 -999.9 330.0 +climais 1996 5 9 130 7.2 13.1 15.1 2.7 0.0 -999.9 -999.9 330.0 +climais 1996 5 10 131 4.3 13.4 24.4 2.9 0.0 -999.9 -999.9 330.0 +climais 1996 5 11 132 3.9 14.5 20.3 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 5 12 133 4.4 14.8 13.7 2.3 0.0 -999.9 -999.9 330.0 +climais 1996 5 13 134 4.7 13.7 15.4 2.1 0.0 -999.9 -999.9 330.0 +climais 1996 5 14 135 7.5 15.9 22.3 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 5 15 136 8.7 14.4 17.1 2.2 0.0 -999.9 -999.9 330.0 +climais 1996 5 16 137 9.0 20.8 18.6 3.5 4.0 -999.9 -999.9 330.0 +climais 1996 5 17 138 9.5 20.2 17.6 2.7 6.0 -999.9 -999.9 330.0 +climais 1996 5 18 139 11.6 21.4 16.9 3.8 8.0 -999.9 -999.9 330.0 +climais 1996 5 19 140 8.2 15.2 22.5 3.3 1.5 -999.9 -999.9 330.0 +climais 1996 5 20 141 2.5 16.2 15.7 2.2 0.5 -999.9 -999.9 330.0 +climais 1996 5 21 142 4.2 16.3 20.9 2.3 4.5 -999.9 -999.9 330.0 +climais 1996 5 22 143 4.0 18.0 20.3 2.6 2.0 -999.9 -999.9 330.0 +climais 1996 5 23 144 11.2 18.4 11.2 1.9 0.5 -999.9 -999.9 330.0 +climais 1996 5 24 145 9.5 24.5 23.2 3.5 3.5 -999.9 -999.9 330.0 +climais 1996 5 25 146 11.5 14.6 2.8 0.2 22.0 -999.9 -999.9 330.0 +climais 1996 5 26 147 12.7 15.8 10.0 1.6 1.0 -999.9 -999.9 330.0 +climais 1996 5 27 148 11.6 14.8 9.2 1.6 0.5 -999.9 -999.9 330.0 +climais 1996 5 28 149 7.2 20.5 19.9 2.9 0.0 -999.9 -999.9 330.0 +climais 1996 5 29 150 8.6 24.1 29.2 4.3 0.0 -999.9 -999.9 330.0 +climais 1996 5 30 151 10.1 29.0 28.1 6.0 0.0 -999.9 -999.9 330.0 +climais 1996 5 31 152 13.6 19.6 11.9 2.4 2.0 -999.9 -999.9 330.0 +climais 1996 6 1 153 7.2 17.4 16.0 1.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 2 154 8.5 18.3 22.2 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 6 3 155 8.6 21.9 26.8 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 4 156 8.6 24.3 29.1 4.4 0.0 -999.9 -999.9 330.0 +climais 1996 6 5 157 11.9 28.4 29.1 5.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 6 158 13.8 31.3 28.3 6.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 7 159 16.1 30.8 27.8 7.6 2.5 -999.9 -999.9 330.0 +climais 1996 6 8 160 15.5 23.1 17.7 3.3 0.0 -999.9 -999.9 330.0 +climais 1996 6 9 161 12.9 26.7 25.5 4.4 0.0 -999.9 -999.9 330.0 +climais 1996 6 10 162 14.3 27.5 24.7 4.0 0.0 -999.9 -999.9 330.0 +climais 1996 6 11 163 13.7 28.4 26.7 4.4 0.0 -999.9 -999.9 330.0 +climais 1996 6 12 164 13.1 25.8 26.3 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 6 13 165 11.4 24.5 30.2 6.4 0.0 -999.9 -999.9 330.0 +climais 1996 6 14 166 10.7 25.8 30.1 7.0 0.0 -999.9 -999.9 330.0 +climais 1996 6 15 167 12.0 28.2 30.2 8.0 0.0 -999.9 -999.9 330.0 +climais 1996 6 16 168 14.1 29.0 30.2 8.1 0.0 -999.9 -999.9 330.0 +climais 1996 6 17 169 12.9 29.1 29.7 7.2 0.0 -999.9 -999.9 330.0 +climais 1996 6 18 170 11.7 30.0 28.2 6.7 0.0 -999.9 -999.9 330.0 +climais 1996 6 19 171 13.1 29.3 23.4 5.0 1.5 -999.9 -999.9 330.0 +climais 1996 6 20 172 14.9 24.9 22.2 4.5 0.0 -999.9 -999.9 330.0 +climais 1996 6 21 173 12.9 17.0 5.3 0.8 13.0 -999.9 -999.9 330.0 +climais 1996 6 22 174 8.1 19.9 23.1 3.7 0.0 -999.9 -999.9 330.0 +climais 1996 6 23 175 9.5 20.1 22.6 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 24 176 8.8 20.8 24.7 4.5 0.0 -999.9 -999.9 330.0 +climais 1996 6 25 177 10.9 19.7 16.7 3.3 0.0 -999.9 -999.9 330.0 +climais 1996 6 26 178 13.5 23.9 18.8 3.6 0.0 -999.9 -999.9 330.0 +climais 1996 6 27 179 8.4 25.9 26.8 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 6 28 180 10.6 26.1 27.1 4.5 0.0 -999.9 -999.9 330.0 +climais 1996 6 29 181 14.3 22.9 22.2 4.3 0.0 -999.9 -999.9 330.0 +climais 1996 6 30 182 6.9 23.1 28.9 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 7 1 183 13.2 20.0 12.5 2.8 0.0 -999.9 -999.9 330.0 +climais 1996 7 2 184 10.4 20.7 19.0 3.3 0.0 -999.9 -999.9 330.0 +climais 1996 7 3 185 9.1 21.1 8.8 0.9 13.0 -999.9 -999.9 330.0 +climais 1996 7 4 186 15.7 22.4 9.8 2.2 3.0 -999.9 -999.9 330.0 +climais 1996 7 5 187 16.0 21.6 17.9 3.4 2.5 -999.9 -999.9 330.0 +climais 1996 7 6 188 9.8 18.6 18.9 2.8 8.5 -999.9 -999.9 330.0 +climais 1996 7 7 189 10.2 14.6 7.1 1.3 7.0 -999.9 -999.9 330.0 +climais 1996 7 8 190 8.5 21.9 22.6 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 9 191 9.0 22.3 24.3 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 10 192 14.4 21.8 13.5 2.9 0.0 -999.9 -999.9 330.0 +climais 1996 7 11 193 11.5 26.6 27.5 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 12 194 12.7 26.4 25.6 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 13 195 12.4 27.4 23.1 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 14 196 13.9 30.0 28.0 6.0 0.0 -999.9 -999.9 330.0 +climais 1996 7 15 197 16.2 29.4 27.8 6.4 0.0 -999.9 -999.9 330.0 +climais 1996 7 16 198 16.0 29.2 27.9 7.1 0.0 -999.9 -999.9 330.0 +climais 1996 7 17 199 14.2 29.0 28.9 7.9 0.0 -999.9 -999.9 330.0 +climais 1996 7 18 200 13.7 30.6 29.2 8.4 0.0 -999.9 -999.9 330.0 +climais 1996 7 19 201 11.8 30.2 27.7 7.8 0.0 -999.9 -999.9 330.0 +climais 1996 7 20 202 11.5 30.5 28.1 7.5 0.0 -999.9 -999.9 330.0 +climais 1996 7 21 203 11.6 31.6 28.3 7.6 0.0 -999.9 -999.9 330.0 +climais 1996 7 22 204 12.7 34.3 26.7 7.4 0.0 -999.9 -999.9 330.0 +climais 1996 7 23 205 18.9 28.7 22.6 5.9 0.0 -999.9 -999.9 330.0 +climais 1996 7 24 206 12.9 27.1 26.5 4.8 0.0 -999.9 -999.9 330.0 +climais 1996 7 25 207 12.3 27.2 23.8 6.3 0.0 -999.9 -999.9 330.0 +climais 1996 7 26 208 16.1 30.0 24.1 8.0 0.0 -999.9 -999.9 330.0 +climais 1996 7 27 209 15.6 30.2 25.1 7.4 0.0 -999.9 -999.9 330.0 +climais 1996 7 28 210 15.0 28.4 23.6 4.5 0.0 -999.9 -999.9 330.0 +climais 1996 7 29 211 12.3 25.4 18.3 3.3 0.0 -999.9 -999.9 330.0 +climais 1996 7 30 212 13.6 25.6 17.9 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 7 31 213 9.5 26.4 23.5 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 8 1 214 12.3 27.6 22.0 3.6 0.0 -999.9 -999.9 330.0 +climais 1996 8 2 215 15.1 26.8 17.9 4.6 0.0 -999.9 -999.9 330.0 +climais 1996 8 3 216 12.1 27.2 26.1 6.4 0.0 -999.9 -999.9 330.0 +climais 1996 8 4 217 12.4 28.4 20.6 6.6 0.0 -999.9 -999.9 330.0 +climais 1996 8 5 218 10.1 23.5 9.5 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 8 6 219 14.2 21.6 7.7 1.6 10.0 -999.9 -999.9 330.0 +climais 1996 8 7 220 9.6 24.8 21.9 4.2 0.0 -999.9 -999.9 330.0 +climais 1996 8 8 221 8.5 27.5 24.8 5.4 0.0 -999.9 -999.9 330.0 +climais 1996 8 9 222 11.7 27.0 19.5 3.5 1.0 -999.9 -999.9 330.0 +climais 1996 8 10 223 15.0 19.6 6.6 1.2 20.0 -999.9 -999.9 330.0 +climais 1996 8 11 224 15.1 21.5 15.7 3.2 1.5 -999.9 -999.9 330.0 +climais 1996 8 12 225 11.6 21.9 17.1 3.0 0.0 -999.9 -999.9 330.0 +climais 1996 8 13 226 13.1 24.3 20.9 3.7 0.0 -999.9 -999.9 330.0 +climais 1996 8 14 227 11.1 25.4 20.9 4.2 0.0 -999.9 -999.9 330.0 +climais 1996 8 15 228 12.8 26.3 21.8 4.7 0.0 -999.9 -999.9 330.0 +climais 1996 8 16 229 12.3 28.3 24.5 5.6 0.0 -999.9 -999.9 330.0 +climais 1996 8 17 230 12.3 29.3 23.7 5.8 0.0 -999.9 -999.9 330.0 +climais 1996 8 18 231 12.3 30.6 23.7 6.2 0.0 -999.9 -999.9 330.0 +climais 1996 8 19 232 13.2 31.5 19.7 5.2 0.5 -999.9 -999.9 330.0 +climais 1996 8 20 233 17.7 24.5 11.1 2.8 0.5 -999.9 -999.9 330.0 +climais 1996 8 21 234 13.2 18.7 6.4 1.5 8.5 -999.9 -999.9 330.0 +climais 1996 8 22 235 11.3 24.8 19.3 2.9 0.0 -999.9 -999.9 330.0 +climais 1996 8 23 236 15.3 23.8 17.4 4.2 1.5 -999.9 -999.9 330.0 +climais 1996 8 24 237 13.6 22.4 17.0 2.8 3.5 -999.9 -999.9 330.0 +climais 1996 8 25 238 12.3 22.4 14.9 2.5 0.5 -999.9 -999.9 330.0 +climais 1996 8 26 239 10.9 22.8 19.2 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 8 27 240 12.3 21.9 19.0 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 8 28 241 8.6 21.5 18.1 2.4 0.0 -999.9 -999.9 330.0 +climais 1996 8 29 242 9.1 20.5 16.7 2.3 1.0 -999.9 -999.9 330.0 +climais 1996 8 30 243 9.5 21.0 15.3 2.5 0.0 -999.9 -999.9 330.0 +climais 1996 8 31 244 9.0 22.4 17.2 3.2 0.0 -999.9 -999.9 330.0 +climais 1996 9 1 245 8.5 22.3 19.0 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 2 246 8.6 22.6 19.4 4.4 0.0 -999.9 -999.9 330.0 +climais 1996 9 3 247 9.2 23.0 16.9 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 4 248 10.9 26.0 19.7 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 5 249 12.0 26.4 19.2 4.4 0.0 -999.9 -999.9 330.0 +climais 1996 9 6 250 10.1 26.1 20.6 4.6 0.0 -999.9 -999.9 330.0 +climais 1996 9 7 251 7.3 24.2 21.1 5.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 8 252 7.5 22.6 21.2 5.5 0.0 -999.9 -999.9 330.0 +climais 1996 9 9 253 10.6 21.9 20.1 5.0 0.0 -999.9 -999.9 330.0 +climais 1996 9 10 254 7.0 22.4 17.4 4.2 0.0 -999.9 -999.9 330.0 +climais 1996 9 11 255 8.1 22.7 19.0 4.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 12 256 7.1 21.2 18.2 3.5 0.0 -999.9 -999.9 330.0 +climais 1996 9 13 257 9.5 19.4 15.8 3.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 14 258 4.1 20.1 19.1 3.6 0.0 -999.9 -999.9 330.0 +climais 1996 9 15 259 5.7 22.1 19.5 3.8 0.0 -999.9 -999.9 330.0 +climais 1996 9 16 260 8.2 23.1 19.4 4.6 0.0 -999.9 -999.9 330.0 +climais 1996 9 17 261 6.8 23.9 16.3 3.2 0.0 -999.9 -999.9 330.0 +climais 1996 9 18 262 8.0 18.0 6.9 1.4 11.0 -999.9 -999.9 330.0 +climais 1996 9 19 263 9.6 11.6 3.8 0.5 1.0 -999.9 -999.9 330.0 +climais 1996 9 20 264 8.1 18.5 14.0 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 9 21 265 9.9 19.3 8.0 2.1 0.0 -999.9 -999.9 330.0 +climais 1996 9 22 266 8.4 16.3 12.0 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 9 23 267 8.8 17.8 12.6 2.0 0.0 -999.9 -999.9 330.0 +climais 1996 9 24 268 4.5 20.3 14.6 1.7 8.0 -999.9 -999.9 330.0 +climais 1996 9 25 269 11.8 18.8 8.6 1.5 5.0 -999.9 -999.9 330.0 +climais 1996 9 26 270 9.2 18.8 9.3 1.4 2.5 -999.9 -999.9 330.0 +climais 1996 9 27 271 13.0 20.6 10.6 1.7 0.0 -999.9 -999.9 330.0 +climais 1996 9 28 272 6.2 19.6 14.9 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 9 29 273 6.1 22.0 16.1 2.0 0.0 -999.9 -999.9 330.0 +climais 1996 9 30 274 11.3 24.1 14.6 2.1 25.5 -999.9 -999.9 330.0 +climais 1996 10 1 275 10.8 15.9 7.2 1.2 17.5 -999.9 -999.9 330.0 +climais 1996 10 2 276 8.8 15.9 10.1 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 10 3 277 4.0 18.6 13.5 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 10 4 278 9.9 16.2 5.8 0.8 2.5 -999.9 -999.9 330.0 +climais 1996 10 5 279 6.5 15.7 13.9 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 10 6 280 5.2 14.8 12.7 1.6 0.0 -999.9 -999.9 330.0 +climais 1996 10 7 281 3.8 15.5 15.1 1.5 0.0 -999.9 -999.9 330.0 +climais 1996 10 8 282 7.5 16.4 8.7 0.6 0.0 -999.9 -999.9 330.0 +climais 1996 10 9 283 11.2 17.4 9.0 1.4 0.0 -999.9 -999.9 330.0 +climais 1996 10 10 284 6.7 13.5 9.3 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 10 11 285 5.4 16.5 11.5 1.3 0.0 -999.9 -999.9 330.0 +climais 1996 10 12 286 3.8 20.1 12.6 1.7 0.0 -999.9 -999.9 330.0 +climais 1996 10 13 287 13.5 21.5 11.1 3.4 0.0 -999.9 -999.9 330.0 +climais 1996 10 14 288 13.7 18.1 4.8 1.4 2.0 -999.9 -999.9 330.0 +climais 1996 10 15 289 9.8 18.1 10.4 1.5 0.0 -999.9 -999.9 330.0 +climais 1996 10 16 290 3.6 16.0 10.5 0.8 6.5 -999.9 -999.9 330.0 +climais 1996 10 17 291 6.8 14.9 12.2 1.1 0.0 -999.9 -999.9 330.0 +climais 1996 10 18 292 3.5 17.6 6.5 0.9 0.5 -999.9 -999.9 330.0 +climais 1996 10 19 293 11.9 16.8 6.9 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 10 20 294 7.9 18.5 9.2 0.9 0.5 -999.9 -999.9 330.0 +climais 1996 10 21 295 13.6 19.8 3.3 0.6 0.5 -999.9 -999.9 330.0 +climais 1996 10 22 296 9.5 18.3 11.2 1.2 0.0 -999.9 -999.9 330.0 +climais 1996 10 23 297 6.9 23.6 11.8 1.9 0.0 -999.9 -999.9 330.0 +climais 1996 10 24 298 9.0 21.5 10.0 1.7 0.0 -999.9 -999.9 330.0 +climais 1996 10 25 299 11.5 18.7 8.0 1.3 0.0 -999.9 -999.9 330.0 +climais 1996 10 26 300 9.0 15.8 4.9 0.3 1.5 -999.9 -999.9 330.0 +climais 1996 10 27 301 8.3 17.7 8.1 0.9 0.0 -999.9 -999.9 330.0 +climais 1996 10 28 302 9.0 15.9 1.4 0.0 4.0 -999.9 -999.9 330.0 +climais 1996 10 29 303 10.8 14.9 7.0 1.4 0.0 -999.9 -999.9 330.0 +climais 1996 10 30 304 1.8 14.2 9.3 0.7 0.0 -999.9 -999.9 330.0 +climais 1996 10 31 305 0.5 13.8 5.5 0.2 0.5 -999.9 -999.9 330.0 +climais 1996 11 1 306 11.8 14.9 2.4 0.4 1.0 -999.9 -999.9 330.0 +climais 1996 11 2 307 11.1 14.1 2.6 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 11 3 308 10.4 14.0 3.2 0.8 0.0 -999.9 -999.9 330.0 +climais 1996 11 4 309 9.9 12.9 1.4 0.5 14.0 -999.9 -999.9 330.0 +climais 1996 11 5 310 7.4 14.0 7.6 0.9 0.0 -999.9 -999.9 330.0 +climais 1996 11 6 311 6.1 15.5 1.8 0.0 16.0 -999.9 -999.9 330.0 +climais 1996 11 7 312 10.5 15.9 3.9 0.9 3.5 -999.9 -999.9 330.0 +climais 1996 11 8 313 5.6 14.2 6.9 0.6 0.0 -999.9 -999.9 330.0 +climais 1996 11 9 314 2.5 13.6 6.7 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 11 10 315 4.9 9.9 1.8 0.1 17.5 -999.9 -999.9 330.0 +climais 1996 11 11 316 7.5 11.5 2.9 0.4 11.5 -999.9 -999.9 330.0 +climais 1996 11 12 317 7.3 12.6 3.6 0.4 5.5 -999.9 -999.9 330.0 +climais 1996 11 13 318 6.9 10.9 2.5 0.7 0.0 -999.9 -999.9 330.0 +climais 1996 11 14 319 1.8 8.0 5.8 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 11 15 320 2.1 4.5 2.6 0.6 0.5 -999.9 -999.9 330.0 +climais 1996 11 16 321 2.5 5.6 1.2 0.0 0.5 -999.9 -999.9 330.0 +climais 1996 11 17 322 2.5 5.2 1.2 0.2 4.0 -999.9 -999.9 330.0 +climais 1996 11 18 323 2.3 8.1 6.0 0.5 0.0 -999.9 -999.9 330.0 +climais 1996 11 19 324 0.4 8.5 1.0 0.1 26.5 -999.9 -999.9 330.0 +climais 1996 11 20 325 4.6 9.3 5.1 1.0 0.5 -999.9 -999.9 330.0 +climais 1996 11 21 326 0.1 7.9 3.1 0.7 10.0 -999.9 -999.9 330.0 +climais 1996 11 22 327 -0.5 3.0 1.8 0.2 1.0 -999.9 -999.9 330.0 +climais 1996 11 23 328 -1.7 8.3 4.9 0.1 0.5 -999.9 -999.9 330.0 +climais 1996 11 24 329 -1.5 11.1 5.2 0.4 11.0 -999.9 -999.9 330.0 +climais 1996 11 25 330 4.3 12.6 1.5 0.0 6.0 -999.9 -999.9 330.0 +climais 1996 11 26 331 3.8 9.7 5.1 0.3 2.5 -999.9 -999.9 330.0 +climais 1996 11 27 332 3.1 12.3 2.1 0.8 9.0 -999.9 -999.9 330.0 +climais 1996 11 28 333 0.4 7.4 5.1 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 11 29 334 -1.3 11.8 1.0 0.0 8.5 -999.9 -999.9 330.0 +climais 1996 11 30 335 9.2 12.2 1.0 0.4 0.0 -999.9 -999.9 330.0 +climais 1996 12 1 336 3.2 11.7 2.3 0.2 2.0 -999.9 -999.9 330.0 +climais 1996 12 2 337 4.7 10.1 4.0 0.2 0.0 -999.9 -999.9 330.0 +climais 1996 12 3 338 5.5 9.9 2.2 0.5 16.5 -999.9 -999.9 330.0 +climais 1996 12 4 339 6.2 7.3 0.8 0.0 15.5 -999.9 -999.9 330.0 +climais 1996 12 5 340 5.6 6.9 1.1 0.0 10.5 -999.9 -999.9 330.0 +climais 1996 12 6 341 6.0 12.5 2.3 0.3 2.5 -999.9 -999.9 330.0 +climais 1996 12 7 342 4.7 12.0 4.6 0.0 0.5 -999.9 -999.9 330.0 +climais 1996 12 8 343 1.3 7.7 4.8 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 12 9 344 -0.8 1.1 0.9 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 10 345 -0.4 7.1 2.3 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 12 11 346 -0.7 1.7 1.9 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 12 12 347 0.5 11.5 2.3 0.0 3.0 -999.9 -999.9 330.0 +climais 1996 12 13 348 7.1 10.5 1.4 0.1 2.0 -999.9 -999.9 330.0 +climais 1996 12 14 349 2.4 3.3 1.3 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 12 15 350 -3.5 4.9 5.7 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 16 351 -0.4 7.3 2.0 0.3 0.0 -999.9 -999.9 330.0 +climais 1996 12 17 352 2.1 12.7 3.4 0.1 1.0 -999.9 -999.9 330.0 +climais 1996 12 18 353 6.3 13.1 1.8 0.5 3.0 -999.9 -999.9 330.0 +climais 1996 12 19 354 9.0 12.6 1.6 0.2 1.5 -999.9 -999.9 330.0 +climais 1996 12 20 355 7.8 10.9 4.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 21 356 4.1 7.8 1.0 0.0 6.0 -999.9 -999.9 330.0 +climais 1996 12 22 357 6.1 9.1 1.0 0.0 2.0 -999.9 -999.9 330.0 +climais 1996 12 23 358 5.6 9.4 1.7 0.1 0.5 -999.9 -999.9 330.0 +climais 1996 12 24 359 3.2 8.0 1.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 25 360 -1.0 5.0 1.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 26 361 -3.0 3.0 1.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 27 362 -6.6 1.0 4.8 0.1 0.0 -999.9 -999.9 330.0 +climais 1996 12 28 363 -7.1 -0.4 3.6 0.6 0.0 -999.9 -999.9 330.0 +climais 1996 12 29 364 -8.9 -2.0 1.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 30 365 -8.0 -2.0 1.0 0.0 0.0 -999.9 -999.9 330.0 +climais 1996 12 31 366 -8.0 -2.0 1.0 0.0 0.0 -999.9 -999.9 330.0 diff --git a/inst/extdata/src_files/txt/V11.0/ficini.txt b/inst/extdata/src_files/txt/V11.0/ficini.txt new file mode 100644 index 00000000..de17d350 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/ficini.txt @@ -0,0 +1,49 @@ +:nbplantes: +1 +:plante: +snu +0.0 +0.0 +0.0 +code_acti_reserve +2 +0 +0 +0 +0 +0.0 +0.0 +0.0 +:densinitial: +0.0 0.0 0.0 0.0 0.0 +:plante: + + + + +code_acti_reserve +2 +0 +0 +0 +0 + + + +:densinitial: + +:Hinitf: +23.5 21.6 23.9 27.6 0.0 +:NO3initf: +32.0 12.0 9.0 0.0 0.0 +:NH4initf: +0.0 0.0 0.0 0.0 0.0 +:snow: +Sdepth0 +0.0 +Sdry0 +0.0 +Swet0 +0.0 +ps0 +0.0 diff --git a/inst/extdata/src_files/txt/V11.0/ficini_2plt.txt b/inst/extdata/src_files/txt/V11.0/ficini_2plt.txt new file mode 100644 index 00000000..8487a60f --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/ficini_2plt.txt @@ -0,0 +1,49 @@ +:nbplantes: +2 +:plante: +snu +0.0000 +0.0000 +0.0000 +code_acti_reserve +2 +0 +0 +0 +0 +0 +0 +0 +:densinitial: +0.0000 0.0000 0.0000 0.0000 0.0000 +:plante: +snu +0.0000 +0.0000 +0.0000 +code_acti_reserve +2 +0 +0 +0 +0 +0 +0 +0 +:densinitial: +0.0000 0.0000 0.0000 0.0000 0.0000 +:Hinitf: +0.0000 0.0000 0.0000 0.0000 0.0000 +:NO3initf: +30.0000 10.0000 5.0000 0.0000 0.0000 +:NH4initf: +0.0000 0.0000 0.0000 0.0000 0.0000 +:snow: +Sdepth0 +0.0 +Sdry0 +0.0 +Swet0 +0.0 +ps0 +0.0 diff --git a/inst/extdata/src_files/txt/V11.0/ficplt1.txt b/inst/extdata/src_files/txt/V11.0/ficplt1.txt new file mode 100644 index 00000000..5a9d422f --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/ficplt1.txt @@ -0,0 +1,2202 @@ +codeplante +mai +codemonocot +1 +alphaco2 +1.06000 +tdmin +6.00000 +tdmax +32.00000 +codetemp +1 +codegdh +1 +coeflevamf +1.44000 +coefamflax +1.07000 +coeflaxsen +1.00000 +coefsenlan +1.10000 +coeflevdrp +1.13000 +coefdrpmat +1.03000 +coefflodrp +1.00000 +codephot +2 +codephot_part +2 +coderetflo +2 +stressdev +0.20000 +codebfroid +1 +jvcmini +7.00000 +julvernal +274 +tfroid +6.50000 +ampfroid +10.00000 +tdmindeb +5.00000 +tdmaxdeb +25.00000 +codedormance +3 +ifindorm +70 +q10 +3.00000 +idebdorm +300 +codegdhdeb +2 +code_WangEngel +2 +tdoptdeb +11.7 +tgmin +8.0 +codeperenne +1 +codegermin +1 +stpltger +35.00000 +potgermi +-1.60000 +nbjgerlim +50 +propjgermin +1.00000 +codehypo +1 +belong +0.02200 +celong +2.04000 +elmax +8.00000 +nlevlim1 +50 +nlevlim2 +50 +vigueurbat +1.00000 +laiplantule +0.00000 +nbfeuilplant +0 +masecplantule +0.50000 +zracplantule +2.00000 +phyllotherme +70.00000 +laicomp +0.00000 +tcmin +8.00000 +tcmax +32.00000 +tcxstop +35.00000 +codelaitr +1 +vlaimax +2.20000 +pentlaimax +5.50000 +udlaimax +3.00000 +ratiodurvieI +1.00000 +ratiosen +0.80000 +abscission +0.00000 +parazofmorte +13.00000 +innturgmin +0.30000 +dlaimin +0.00000 +codlainet +2 +tustressmin +0.70000 +durviesupmax +0.40000 +codestrphot +2 +phobasesen +12.00000 +dltamsmaxsen +0.01000 +dltamsminsen +0.15000 +alphaphot +200.00000 +tauxrecouvmax +1.00000 +tauxrecouvkmax +1.00000 +pentrecouv +6.30000 +infrecouv +0.85000 +stage_const_height +mat +elongation +1.0 +nw_height +0.0 +code_shape +2 +haut_dev_x0 +685.395497474724 +haut_dev_k +0.0113605979397447 +codetransrad +1 +forme +1 +rapforme +4.00000 +adfol +1.00000 +dfolbas +5.00000 +dfolhaut +5.00000 +nrow +1 +temax +32.00000 +teoptbis +32.00000 +efcroijuv +1.90000 +efcroiveg +3.80000 +efcroirepro +3.80000 +remobres +0.20000 +coefmshaut +0.00000 +slamin +180.000 +envfruit +0.10000 +sea +100.00000 +code_acti_reserve +2 +propresP +0.47 +PropresPN +0.6 +Efremobil +0.05 +Propres +0.10 +tauxmortresP +0.0025 +Parazoper +25 +ParazoTmorte +30 +inilai +0.001 +resplmax +0.66 +codemontaison +2 +codedyntalle +2 +codetranspitalle +1 +SurfApex +0.000005 +SeuilMorTalle +0.02 +SigmaDisTalle +0.1 +VitReconsPeupl +0.001 +SeuilReconsPeupl +800 +MaxTalle +4000.0 +SeuilLAIapex +1.0 +tigefeuilcoupe +5.0 +codeindetermin +1 +cgrain +0.050 +cgrainv0 +0.111 +irazomax +0.566 +codeir +2 +irmax +0.53000 +nboite +10 +allocfrmax +0.60000 +afpf +0.40000 +bfpf +4.32000 +cfpf +0.00000 +dfpf +0.20000 +spfrmin +0.75000 +spfrmax +1.00000 +splaimin +0.20000 +splaimax +1.00000 +codcalinflo +1 +codetremp +1 +tminremp +0.00000 +tmaxremp +40.00000 +sensanox +0.0 +stoprac +lax +sensrsec +0.00000 +contrdamax +0.00000 +rayon +0.02 +codetemprac +2 +codemortalracine +2 +coefracoupe +0.5 +coderacine +2 +zlabour +25.00000 +zpente +110.00000 +zprlim +140.00000 +draclong +5000.000 +debsenrac +1500.000 +lvfront +0.05 +longsperac +11000.000 +codedisrac +2 +kdisrac +0.00158 +alloperirac +0.23 +codazorac +2 +minefnra +0.00000 +minazorac +0.10000 +maxazorac +1.00000 +codtrophrac +3 +repracpermax +0.78 +repracpermin +0.12 +krepracperm +1.72 +repracseumax +0.40000 +repracseumin +0.20000 +krepracseu +1.27000 +code_stress_root +2 +code_rootdeposition +2 +parazorac +-999 +code_diff_root +2 +lvmax +-999 +rapdia +-999 +RTD +-999 +propracfmax +-999 +tletale +-5.00000 +tdebgel +0.00000 +codgellev +1 +nbfgellev +3 +tgellev90 +-4.00000 +codgeljuv +1 +tgeljuv90 +-4.00000 +codgelveg +1 +tgelveg90 +-4.00000 +codgelflo +1 +tgelflo10 +0.00000 +tgelflo90 +-1.00000 +h2ofeuilverte +0.90000 +h2ofeuiljaune +0.15000 +h2otigestruc +0.60000 +h2oreserve +0.70000 +h2ofrvert +0.40000 +tempdeshyd +0.00500 +codebeso +1 +kmax +1.20000 +rsmin +215.00000 +codeintercept +2 +mouillabil +0.00000 +stemflowmax +0.00000 +kstemflow +0.00000 +Vmax1 +0.00180 +Kmabs1 +50.000 +Vmax2 +0.01700 +Kmabs2 +25000.000 +adil +3.50000 +bdil +0.37000 +masecNmax +1.00000 +INNmin +0.30000 +INNimin +-0.50000 +inngrain1 +2.00000 +inngrain2 +2.00000 +bdilmax +0.37 +codeplisoleN +2 +adilmax +5.60 +Nmeta +4.80000 +masecmeta +0.04000 +Nreserve +1.50000 +codeINN +1 +codelegume +1 +stlevdno +150.00000 +stdnofno +500.00000 +stfnofvino +300.00000 +vitno +0.00300 +profnod +40.00000 +concNnodseuil +1.30000 +concNrac0 +1.20000 +concNrac100 +0.40000 +tempnod1 +0.00000 +tempnod2 +30.00000 +tempnod3 +36.00000 +tempnod4 +50.00000 +codefixpot +1 +fixmax +6.00000 +fixmaxveg +30.00000 +fixmaxgr +9.50000 +codazofruit +2 +stadebbchplt +00 +stadebbchger +05 +stadebbchlev +09 +stadebbchamf +35 +stadebbchlax +55 +stadebbchsen +85 +stadebbchflo +65 +stadebbchdrp +71 +stadebbchnou +-99 +stadebbchdebdes +75 +stadebbchmat +89 +stadebbchrec +99 +stadebbchfindorm +-99 +codevar +DK250 +stlevamf +225 +stamflax +450 +stlevdrp +995 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +688 +stsenlan +272 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.313 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4000 +stdrpmat +640 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Pactol +stlevamf +253 +stamflax +507 +stlevdrp +1080 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +730 +stsenlan +190 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.296 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4200 +stdrpmat +600 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Cherif +stlevamf +265 +stamflax +530 +stlevdrp +1115 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12000 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +748 +stsenlan +177 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.33 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +605 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Furio +stlevamf +275 +stamflax +550 +stlevdrp +1145 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12000 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +763 +stsenlan +197 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.33 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +640 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Dunia +stlevamf +285 +stamflax +570 +stlevdrp +1175 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12000 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +778 +stsenlan +197 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.33 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +655 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Volga +stlevamf +288 +stamflax +577 +stlevdrp +1185 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +783 +stsenlan +252 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.322 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +5000 +stdrpmat +715 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Cecilia +stlevamf +300 +stamflax +600 +stlevdrp +1220 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +800 +stsenlan +220 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.348 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +5000 +stdrpmat +700 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +DK604 +stlevamf +300 +stamflax +600 +stlevdrp +1220 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +800 +stsenlan +245 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.33 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +5000 +stdrpmat +725 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Nobilis-DE +stlevamf +233 +stamflax +467 +stlevdrp +1020 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +700 +stsenlan +270 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.313 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +650 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +DK300 +stlevamf +255 +stamflax +510 +stlevdrp +1085 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +738 +stsenlan +222 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.322 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4200 +stdrpmat +640 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +Anjou285 +stlevamf +242 +stamflax +483 +stlevdrp +1045 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +713 +stsenlan +192 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.26 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +585 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +DK312 +stlevamf +260 +stamflax +520 +stlevdrp +1100 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +740 +stsenlan +200 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.313 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4200 +stdrpmat +620 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +DK240 +stlevamf +280 +stamflax +470 +stlevdrp +1030 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +730 +stsenlan +300 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.26 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +750 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +banguy +stlevamf +280 +stamflax +465 +stlevdrp +1015 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +750 +stsenlan +300 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.28 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +780 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +magrite +stlevamf +280 +stamflax +500 +stlevdrp +1080 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.1200 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +730 +stsenlan +300 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.31 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +730 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 +codevar +clarica +stlevamf +280 +stamflax +545 +stlevdrp +1125 +stflodrp +250 +stdrpdes +650 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.12 +bdens +5.00000 +hautbase +0.00000 +hautmax +2.50000 +khaut +0.70 +durvieF +200 +stlaxsen +780 +stsenlan +300 +dlaimax +0.00160 +dlaimaxbrut +0.00160 +innsen +1.0 +rapsenturg +0.0 +extin +0.70 +ktrou +1.00 +temin +8.0 +teopt +24.0 +slamax +250 +tigefeuil +0.25 +pgrainmaxi +0.32 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01100 +deshydbase +0.00800 +nbjgrain +20 +nbgrmin +1500 +nbgrmax +4500 +stdrpmat +790 +vitircarb +0.01030 +vitircarbT +0.0011 +afruitpot +.00000 +dureefruit +.00000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.0 +tgeljuv10 +-1.0 +tgelveg10 +-1.0 +psisto +12 +psiturg +5 +swfacmin +0.1 diff --git a/inst/extdata/src_files/txt/V11.0/fictec1.txt b/inst/extdata/src_files/txt/V11.0/fictec1.txt new file mode 100644 index 00000000..d32429b5 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/fictec1.txt @@ -0,0 +1,276 @@ +nbinterventions +1 +julres coderes qres Crespc CsurNres Nminres eaures +112 1 1.00 42.00 60.00 0.00 0.00 +code_auto_profres +1 +resk +0.14 +resz +5 +nbinterventions +1 +jultrav profres proftrav +112 0.00 25.00 +iplt0 +117 +profsem +5.00000 +densitesem +9.50000 +variete +4 +codetradtec +1 +interrang +2.00000 +orientrang +0.00000 +codedecisemis +2 +nbjmaxapressemis +30 +nbjseuiltempref +15 +nbj_pr_apres_semis +3 +eau_mini_decisemis +10 +humirac_decisemis +0.75 +codestade +2 +ilev +999 +iamf +999 +ilax +999 +isen +999 +ilan +999 +iflo +999 +idrp +999 +imat +999 +irec +999 +effirr +1.00000 +codecalirrig +2 +ratiol +0.00000 +dosimx +40.00000 +doseirrigmin +20.00000 +codedate_irrigauto +3 +datedeb_irrigauto +0 +datefin_irrigauto +0 +stage_start_irrigauto +0 +stage_end_irrigauto +0 +codedateappH2O +2 +nbinterventions +16 +julapI_or_sum_upvt amount +178 20.00 +julapI_or_sum_upvt amount +185 24.00 +julapI_or_sum_upvt amount +193 29.00 +julapI_or_sum_upvt amount +198 29.00 +julapI_or_sum_upvt amount +200 28.00 +julapI_or_sum_upvt amount +204 31.00 +julapI_or_sum_upvt amount +207 21.00 +julapI_or_sum_upvt amount +211 21.00 +julapI_or_sum_upvt amount +214 23.00 +julapI_or_sum_upvt amount +218 18.00 +julapI_or_sum_upvt amount +221 22.00 +julapI_or_sum_upvt amount +232 16.00 +julapI_or_sum_upvt amount +239 16.00 +julapI_or_sum_upvt amount +249 30.00 +julapI_or_sum_upvt amount +257 29.00 +julapI_or_sum_upvt amount +264 20.00 +codlocirrig +1 +locirrig +0 +profmes +120.00000 +concirr +0.11000 +codedateappN +2 +codefracappN +1 +Qtot_N +100 +nbinterventions +1 +julapN_or_sum_upvt absolute_value/% engrais +112 220.00 2 +codlocferti +1 +locferti +0 +irecbutoir +300 +ressuite +straw+roots +code_autoressuite +2 +Stubblevegratio +0 +codceuille +1 +nbceuille +1 +cadencerec +7 +codrecolte +1 +codeaumin +2 +h2ograinmin +0.80000 +h2ograinmax +0.32000 +sucrerec +0.25000 +CNgrainrec +0.02000 +huilerec +0.25000 +coderecolteassoc +2 +codedecirecolte +2 +nbjmaxapresrecolte +15 +codefauche +2 +code_hautfauche_dyn +2 +codetempfauche +1 +codemodfauche +1 +hautcoupedefaut +0.00000 +stadecoupedf +rec +nbinterventions +0 +nbinterventions +0 +codepaillage +1 +couvermulchplastique +0.00000 +albedomulchplastique +0.00000 +codrognage +1 +largrogne +0.00000 +hautrogne +0.00000 +biorognem +0.00000 +codcalrogne +1 +julrogne +0 +margerogne +0.00000 +codeclaircie +1 +nbinterventions +0 +codeffeuil +1 +codhauteff +1 +codcaleffeuil +1 +laidebeff +0.00000 +effeuil +0.00000 +juleffeuil +0 +laieffeuil +0.00000 +codetaille +1 +jultaille +0 +codepalissage +1 +hautmaxtec +0.00000 +largtec +0.50000 +codabri +1 +transplastic +0.70000 +surfouvre1 +0.00000 +julouvre2 +0 +surfouvre2 +0.00000 +julouvre3 +0 +surfouvre3 +0.00000 +codejourdes +2 +juldes +999 +codeDST +2 +dachisel +1.10000 +dalabour +1.30000 +rugochisel +0.00500 +rugolabour +0.05000 +codeDSTtass +2 +profhumsemoir +30.00000 +dasemis +1.60000 +profhumrecolteuse +30.00000 +darecolte +1.60000 +codeDSTnbcouche +2 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/climat.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/climat.txt new file mode 100644 index 00000000..3732260b --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/climat.txt @@ -0,0 +1,274 @@ +reading 2004 1 1 1 1.8 8.4 1.1 -999.9 5.4 2.8 13.8 330.0 +reading 2004 1 2 2 -2.4 6.4 1.0 -999.9 1.8 2.0 11.0 330.0 +reading 2004 1 3 3 -4.1 5.0 1.7 -999.9 0.4 1.1 9.8 330.0 +reading 2004 1 4 4 0.3 8.7 1.7 -999.9 0.2 1.0 13.0 330.0 +reading 2004 1 5 5 0.6 10.6 1.2 -999.9 0.8 1.8 14.0 330.0 +reading 2004 1 6 6 3.0 12.5 3.2 -999.9 3.0 3.3 15.9 330.0 +reading 2004 1 7 7 2.3 10.4 2.1 -999.9 0.2 2.4 14.4 330.0 +reading 2004 1 8 8 4.3 11.1 1.9 -999.9 12.0 4.1 14.6 330.0 +reading 2004 1 9 9 2.3 9.7 2.8 -999.9 0.0 3.4 13.0 330.0 +reading 2004 1 10 10 1.5 12.0 1.6 -999.9 1.0 1.7 13.5 330.0 +reading 2004 1 11 11 3.7 11.7 2.5 -999.9 9.0 5.3 13.5 330.0 +reading 2004 1 12 12 3.0 8.6 2.1 -999.9 8.2 2.5 11.1 330.0 +reading 2004 1 13 13 4.8 10.9 3.2 -999.9 3.4 6.4 12.5 330.0 +reading 2004 1 14 14 1.5 7.1 1.5 -999.9 3.0 3.1 9.5 330.0 +reading 2004 1 15 15 -0.6 9.0 3.0 -999.9 4.6 3.7 9.1 330.0 +reading 2004 1 16 16 1.0 9.0 3.6 -999.9 0.8 5.3 9.5 330.0 +reading 2004 1 17 17 -3.1 8.5 4.1 -999.9 0.0 1.9 8.0 330.0 +reading 2004 1 18 18 -2.7 9.0 5.0 -999.9 0.0 1.6 8.2 330.0 +reading 2004 1 19 19 4.6 10.9 1.8 -999.9 1.0 4.0 11.3 330.0 +reading 2004 1 20 20 8.2 10.4 1.1 -999.9 2.6 1.9 12.3 330.0 +reading 2004 1 21 21 5.8 9.9 1.6 -999.9 0.0 1.5 11.2 330.0 +reading 2004 1 22 22 5.4 8.8 1.0 -999.9 6.2 1.3 10.0 330.0 +reading 2004 1 23 23 6.4 8.4 1.0 -999.9 4.4 0.5 9.8 330.0 +reading 2004 1 24 24 1.2 10.6 5.8 -999.9 0.2 2.3 8.7 330.0 +reading 2004 1 25 25 -3.2 9.9 4.8 -999.9 0.0 0.3 7.3 330.0 +reading 2004 1 26 26 0.3 5.5 2.4 -999.9 0.0 2.5 7.0 330.0 +reading 2004 1 27 27 0.2 6.8 4.2 -999.9 0.0 2.3 7.3 330.0 +reading 2004 1 28 28 -3.9 6.2 4.0 -999.9 0.6 4.1 6.2 330.0 +reading 2004 1 29 29 -3.8 5.7 6.1 -999.9 3.0 2.5 5.8 330.0 +reading 2004 1 30 30 -1.4 6.9 0.7 -999.9 0.2 3.0 6.7 330.0 +reading 2004 1 31 31 7.2 11.7 1.0 -999.9 8.4 5.9 9.7 330.0 +reading 2004 2 1 32 6.9 11.2 3.5 -999.9 8.0 3.7 8.5 330.0 +reading 2004 2 2 33 9.4 14.5 2.4 -999.9 0.8 3.5 10.3 330.0 +reading 2004 2 3 34 11.2 14.8 1.4 -999.9 2.2 6.9 10.9 330.0 +reading 2004 2 4 35 11.4 15.8 4.0 -999.9 1.8 5.5 11.1 330.0 +reading 2004 2 5 36 9.6 14.3 2.2 -999.9 0.4 3.4 10.0 330.0 +reading 2004 2 6 37 6.7 11.3 1.5 -999.9 6.0 3.4 7.6 330.0 +reading 2004 2 7 38 5.3 11.2 6.7 -999.9 0.2 5.8 7.2 330.0 +reading 2004 2 8 39 -1.3 9.9 5.6 -999.9 0.0 4.7 5.5 330.0 +reading 2004 2 9 40 -4.6 8.2 7.3 -999.9 0.0 0.7 4.6 330.0 +reading 2004 2 10 41 -1.0 10.0 5.2 -999.9 0.0 2.5 5.5 330.0 +reading 2004 2 11 42 6.1 13.2 3.2 -999.9 0.0 1.1 7.9 330.0 +reading 2004 2 12 43 6.1 11.8 3.5 -999.9 0.2 0.2 7.5 330.0 +reading 2004 2 13 44 6.0 9.7 1.4 -999.9 0.0 0.4 7.0 330.0 +reading 2004 2 14 45 4.4 11.0 4.9 -999.9 0.6 0.6 6.9 330.0 +reading 2004 2 15 46 3.8 10.5 3.4 -999.9 0.6 0.8 6.6 330.0 +reading 2004 2 16 47 1.8 9.2 3.1 -999.9 0.0 0.3 5.9 330.0 +reading 2004 2 17 48 3.4 8.4 2.4 -999.9 2.0 0.7 5.9 330.0 +reading 2004 2 18 49 2.1 9.3 4.8 -999.9 0.0 2.1 5.9 330.0 +reading 2004 2 19 50 1.9 8.9 9.1 -999.9 0.2 3.8 5.7 330.0 +reading 2004 2 20 51 -2.7 4.9 3.2 -999.9 0.0 4.0 4.3 330.0 +reading 2004 2 21 52 -3.1 7.8 6.6 -999.9 0.2 2.7 4.7 330.0 +reading 2004 2 22 53 -0.5 7.1 4.9 -999.9 0.0 3.8 5.0 330.0 +reading 2004 2 23 54 -3.7 8.1 9.6 -999.9 0.0 2.3 4.7 330.0 +reading 2004 2 24 55 -5.0 6.9 4.0 -999.9 2.2 1.7 4.1 330.0 +reading 2004 2 25 56 -4.5 5.4 8.8 -999.9 0.0 1.5 4.0 330.0 +reading 2004 2 26 57 -4.6 7.1 8.6 -999.9 0.0 1.4 4.2 330.0 +reading 2004 2 27 58 -5.3 6.6 9.9 -999.9 0.0 2.2 4.1 330.0 +reading 2004 2 28 59 -3.6 4.8 3.6 -999.9 0.0 1.4 4.1 330.0 +reading 2004 2 29 60 -4.0 8.1 6.9 -999.9 0.0 2.0 4.5 330.0 +reading 2004 3 1 61 -6.2 10.2 10.7 -999.9 0.0 0.5 4.5 330.0 +reading 2004 3 2 62 -7.4 10.4 11.6 -999.9 0.0 1.3 4.4 330.0 +reading 2004 3 3 63 -5.3 10.7 7.8 -999.9 1.4 1.7 4.7 330.0 +reading 2004 3 4 64 3.9 10.5 3.6 -999.9 0.2 0.1 6.5 330.0 +reading 2004 3 5 65 1.2 12.8 7.3 -999.9 0.0 0.6 6.4 330.0 +reading 2004 3 6 66 2.7 11.7 5.3 -999.9 0.0 1.2 6.5 330.0 +reading 2004 3 7 67 -0.3 10.5 7.7 -999.9 1.8 1.7 5.5 330.0 +reading 2004 3 8 68 -0.9 10.7 6.8 -999.9 0.0 1.6 5.5 330.0 +reading 2004 3 9 69 1.2 9.8 8.5 -999.9 0.0 2.9 5.8 330.0 +reading 2004 3 10 70 -1.3 7.6 7.2 -999.9 0.0 1.8 5.0 330.0 +reading 2004 3 11 71 -0.5 6.9 5.7 -999.9 0.0 2.3 5.1 330.0 +reading 2004 3 12 72 -0.5 5.7 2.3 -999.9 14.2 1.9 3.8 330.0 +reading 2004 3 13 73 2.9 12.5 12.6 -999.9 2.6 3.9 5.3 330.0 +reading 2004 3 14 74 6.5 11.2 3.2 -999.9 6.2 6.3 5.1 330.0 +reading 2004 3 15 75 7.8 13.3 3.9 -999.9 0.8 4.9 5.8 330.0 +reading 2004 3 16 76 9.2 17.9 11.8 -999.9 0.0 4.2 7.3 330.0 +reading 2004 3 17 77 4.0 14.9 6.7 -999.9 0.0 1.3 5.7 330.0 +reading 2004 3 18 78 3.6 14.9 6.0 -999.9 0.2 3.2 5.7 330.0 +reading 2004 3 19 79 6.5 12.4 5.1 -999.9 6.6 6.2 5.1 330.0 +reading 2004 3 20 80 7.4 13.1 4.1 -999.9 2.8 7.6 5.2 330.0 +reading 2004 3 21 81 5.9 12.3 12.7 -999.9 0.2 7.0 5.0 330.0 +reading 2004 3 22 82 2.6 11.4 10.4 -999.9 0.8 2.8 4.4 330.0 +reading 2004 3 23 83 1.7 11.2 10.6 -999.9 3.0 2.0 4.0 330.0 +reading 2004 3 24 84 0.2 11.5 8.1 -999.9 1.2 2.4 3.8 330.0 +reading 2004 3 25 85 -1.3 11.0 10.5 -999.9 0.2 1.2 3.6 330.0 +reading 2004 3 26 86 -0.7 12.3 10.6 -999.9 0.2 1.3 4.0 330.0 +reading 2004 3 27 87 4.6 10.3 4.3 -999.9 0.2 1.1 4.5 330.0 +reading 2004 3 28 88 5.0 9.8 4.2 -999.9 0.0 2.2 4.6 330.0 +reading 2004 3 29 89 1.0 15.7 6.9 -999.9 0.0 0.8 5.0 330.0 +reading 2004 3 30 90 1.4 16.6 18.0 -999.9 0.0 3.1 5.5 330.0 +reading 2004 3 31 91 2.4 20.1 14.7 -999.9 0.0 1.0 6.6 330.0 +reading 2004 4 1 92 7.8 17.7 9.3 -999.9 1.4 1.2 7.3 330.0 +reading 2004 4 2 93 7.1 18.5 11.3 -999.9 1.0 0.6 7.4 330.0 +reading 2004 4 3 94 3.9 14.0 6.8 -999.9 3.6 4.0 5.4 330.0 +reading 2004 4 4 95 6.0 14.0 12.8 -999.9 9.4 5.4 4.9 330.0 +reading 2004 4 5 96 4.9 12.4 10.1 -999.9 1.8 4.5 4.5 330.0 +reading 2004 4 6 97 3.0 10.8 12.2 -999.9 8.2 2.5 3.3 330.0 +reading 2004 4 7 98 2.1 12.5 13.1 -999.9 0.2 2.1 3.5 330.0 +reading 2004 4 8 99 1.2 12.6 12.3 -999.9 0.2 1.5 3.5 330.0 +reading 2004 4 9 100 0.6 15.5 18.5 -999.9 0.0 1.0 4.0 330.0 +reading 2004 4 10 101 5.6 12.6 6.6 -999.9 1.2 1.3 4.3 330.0 +reading 2004 4 11 102 0.1 15.1 8.7 -999.9 0.2 0.2 4.0 330.0 +reading 2004 4 12 103 3.3 19.9 12.3 -999.9 0.0 0.4 5.5 330.0 +reading 2004 4 13 104 3.8 18.7 11.0 -999.9 0.0 1.2 5.6 330.0 +reading 2004 4 14 105 -0.3 18.4 17.1 -999.9 0.0 1.3 5.1 330.0 +reading 2004 4 15 106 1.3 15.9 9.8 -999.9 0.0 1.8 5.1 330.0 +reading 2004 4 16 107 3.1 21.3 18.7 -999.9 0.0 0.9 6.8 330.0 +reading 2004 4 17 108 6.2 15.9 15.3 -999.9 1.2 2.9 6.5 330.0 +reading 2004 4 18 109 3.7 12.5 4.4 -999.9 19.0 2.5 3.4 330.0 +reading 2004 4 19 110 0.5 14.5 17.1 -999.9 0.4 1.8 3.4 330.0 +reading 2004 4 20 111 -1.6 15.0 12.0 -999.9 1.2 1.4 3.3 330.0 +reading 2004 4 21 112 7.4 14.6 4.4 -999.9 7.2 3.0 3.6 330.0 +reading 2004 4 22 113 1.1 19.5 16.1 -999.9 0.0 1.3 3.7 330.0 +reading 2004 4 23 114 2.1 22.4 23.3 -999.9 0.0 0.7 4.6 330.0 +reading 2004 4 24 115 3.5 26.0 22.3 -999.9 0.0 0.5 6.0 330.0 +reading 2004 4 25 116 5.4 23.9 18.8 -999.9 0.0 0.7 6.5 330.0 +reading 2004 4 26 117 3.7 24.1 20.7 -999.9 0.0 0.6 6.7 330.0 +reading 2004 4 27 118 8.2 18.5 14.4 -999.9 6.6 2.1 5.8 330.0 +reading 2004 4 28 119 8.8 12.9 3.7 -999.9 8.8 2.9 3.9 330.0 +reading 2004 4 29 120 5.8 10.0 4.4 -999.9 5.0 2.4 2.8 330.0 +reading 2004 4 30 121 7.1 12.2 2.2 -999.9 4.2 1.9 2.7 330.0 +reading 2004 5 1 122 8.4 14.5 4.8 -999.9 0.2 1.0 3.2 330.0 +reading 2004 5 2 123 6.7 21.0 18.8 -999.9 0.2 1.2 4.2 330.0 +reading 2004 5 3 124 7.0 15.7 8.6 -999.9 8.2 1.4 2.7 330.0 +reading 2004 5 4 125 6.8 14.3 8.4 -999.9 0.0 1.2 2.7 330.0 +reading 2004 5 5 126 7.1 12.5 8.1 -999.9 0.0 2.1 2.8 330.0 +reading 2004 5 6 127 5.4 13.5 8.9 -999.9 0.0 1.3 2.9 330.0 +reading 2004 5 7 128 5.7 15.0 6.4 -999.9 0.0 1.8 3.3 330.0 +reading 2004 5 8 129 5.7 11.1 3.9 -999.9 1.6 2.3 2.8 330.0 +reading 2004 5 9 130 10.0 16.1 6.4 -999.9 0.6 1.2 4.0 330.0 +reading 2004 5 10 131 12.1 19.0 5.1 -999.9 0.0 0.6 4.9 330.0 +reading 2004 5 11 132 8.2 17.1 16.2 -999.9 0.0 1.2 4.5 330.0 +reading 2004 5 12 133 7.0 13.8 8.9 -999.9 0.0 1.5 4.1 330.0 +reading 2004 5 13 134 5.1 18.4 16.4 -999.9 0.0 0.5 4.8 330.0 +reading 2004 5 14 135 8.4 20.1 18.0 -999.9 0.0 0.7 6.2 330.0 +reading 2004 5 15 136 7.5 21.7 22.7 -999.9 0.0 0.7 6.9 330.0 +reading 2004 5 16 137 8.5 23.9 22.1 -999.9 0.0 0.6 8.4 330.0 +reading 2004 5 17 138 7.0 24.4 24.6 -999.9 0.0 0.7 8.9 330.0 +reading 2004 5 18 139 8.9 22.6 24.0 -999.9 0.0 0.7 9.7 330.0 +reading 2004 5 19 140 7.5 23.7 25.0 -999.9 0.0 0.5 10.4 330.0 +reading 2004 5 20 141 12.2 16.4 16.9 -999.9 0.0 0.3 10.0 330.0 +reading 2004 5 21 142 7.7 16.1 14.6 -999.9 0.0 2.1 8.9 330.0 +reading 2004 5 22 143 4.0 16.5 21.6 -999.9 0.0 1.6 8.5 330.0 +reading 2004 5 23 144 2.4 19.6 22.6 -999.9 0.0 0.5 9.3 330.0 +reading 2004 5 24 145 3.8 20.2 21.3 -999.9 0.0 0.7 10.5 330.0 +reading 2004 5 25 146 9.4 19.8 20.2 -999.9 0.0 0.7 13.0 330.0 +reading 2004 5 26 147 10.5 18.2 18.4 -999.9 0.0 1.2 13.4 330.0 +reading 2004 5 27 148 9.0 17.7 22.2 -999.9 0.0 1.5 13.1 330.0 +reading 2004 5 28 149 5.5 20.3 18.6 -999.9 0.0 1.5 13.3 330.0 +reading 2004 5 29 150 12.3 18.6 9.2 -999.9 0.0 1.5 16.1 330.0 +reading 2004 5 30 151 8.9 17.9 14.2 -999.9 0.0 1.3 14.5 330.0 +reading 2004 5 31 152 5.9 19.8 20.4 -999.9 0.0 1.4 14.5 330.0 +reading 2004 6 1 153 11.3 17.6 8.8 -999.9 0.0 0.8 16.4 330.0 +reading 2004 6 2 154 10.4 20.0 24.7 -999.9 0.0 1.7 18.0 330.0 +reading 2004 6 3 155 16.6 20.5 19.2 -999.9 0.0 2.1 23.3 330.0 +reading 2004 6 4 156 15.1 23.4 20.1 -999.9 0.0 2.1 25.3 330.0 +reading 2004 6 5 157 13.0 21.2 9.7 -999.9 0.0 1.1 22.6 330.0 +reading 2004 6 6 158 11.8 23.6 13.9 -999.9 0.0 1.4 24.1 330.0 +reading 2004 6 7 159 10.7 27.4 23.9 -999.9 0.0 0.9 27.4 330.0 +reading 2004 6 8 160 11.4 29.3 25.3 -999.9 0.0 1.8 31.0 330.0 +reading 2004 6 9 161 14.4 23.0 17.7 -999.9 0.0 2.4 28.9 330.0 +reading 2004 6 10 162 14.0 23.4 17.9 -999.9 0.0 2.7 29.8 330.0 +reading 2004 6 11 163 12.2 21.1 21.6 -999.9 0.0 3.2 27.1 330.0 +reading 2004 6 12 164 10.1 21.2 19.2 -999.9 0.0 2.1 26.2 330.0 +reading 2004 6 13 165 9.1 24.9 29.1 -999.9 0.0 1.1 29.6 330.0 +reading 2004 6 14 166 12.4 28.2 26.1 -999.9 0.0 1.2 37.8 330.0 +reading 2004 6 15 167 12.1 26.0 27.3 -999.9 0.0 2.0 36.2 330.0 +reading 2004 6 16 168 10.4 26.1 24.3 -999.9 0.0 2.0 35.6 330.0 +reading 2004 6 17 169 14.8 18.2 13.9 -999.9 0.0 3.2 32.6 330.0 +reading 2004 6 18 170 9.6 18.6 13.8 -999.9 0.0 2.2 28.5 330.0 +reading 2004 6 19 171 4.4 18.8 21.3 -999.9 0.0 1.2 24.7 330.0 +reading 2004 6 20 172 6.4 17.6 17.9 -999.9 0.0 1.9 25.8 330.0 +reading 2004 6 21 173 3.3 18.5 17.8 -999.9 0.0 1.3 24.4 330.0 +reading 2004 6 22 174 5.0 20.4 17.9 -999.9 5.2 1.4 27.2 330.0 +reading 2004 6 23 175 13.6 16.5 5.6 -999.9 7.6 5.7 30.8 330.0 +reading 2004 6 24 176 11.4 18.0 23.6 -999.9 0.0 5.6 31.1 330.0 +reading 2004 6 25 177 9.6 22.1 24.6 -999.9 0.0 2.0 34.3 330.0 +reading 2004 6 26 178 7.3 18.0 7.7 -999.9 1.8 1.1 27.9 330.0 +reading 2004 6 27 179 12.2 21.3 16.4 -999.9 8.6 2.6 35.4 330.0 +reading 2004 6 28 180 7.8 19.5 19.8 -999.9 0.0 2.1 29.6 330.0 +reading 2004 6 29 181 8.8 21.8 21.4 -999.9 0.0 2.1 33.7 330.0 +reading 2004 6 30 182 12.7 20.1 17.0 -999.9 0.4 3.0 36.8 330.0 +reading 2004 7 1 183 9.2 19.1 20.2 -999.9 0.4 3.1 32.4 330.0 +reading 2004 7 2 184 11.2 18.2 17.0 -999.9 8.6 3.2 32.8 330.0 +reading 2004 7 3 185 11.1 19.2 22.1 -999.9 0.0 4.4 34.5 330.0 +reading 2004 7 4 186 9.9 17.9 13.0 -999.9 3.0 1.9 31.8 330.0 +reading 2004 7 5 187 7.4 20.8 21.4 -999.9 0.2 1.0 32.8 330.0 +reading 2004 7 6 188 6.6 24.2 24.2 -999.9 0.0 0.9 36.5 330.0 +reading 2004 7 7 189 9.7 21.8 12.6 -999.9 11.6 3.9 35.8 330.0 +reading 2004 7 8 190 10.7 17.9 9.7 -999.9 3.4 1.9 32.4 330.0 +reading 2004 7 9 191 10.1 18.8 13.1 -999.9 0.0 1.8 33.2 330.0 +reading 2004 7 10 192 6.4 18.1 16.5 -999.9 2.8 1.7 28.8 330.0 +reading 2004 7 11 193 11.0 17.5 9.9 -999.9 0.2 1.3 33.2 330.0 +reading 2004 7 12 194 11.1 18.7 10.6 -999.9 0.0 1.3 35.0 330.0 +reading 2004 7 13 195 7.0 21.1 16.2 -999.9 0.0 1.4 33.7 330.0 +reading 2004 7 14 196 12.0 22.3 11.0 -999.9 1.0 2.9 41.5 330.0 +reading 2004 7 15 197 16.1 24.4 13.8 -999.9 0.0 2.8 51.2 330.0 +reading 2004 7 16 198 16.6 22.3 10.1 -999.9 0.6 2.7 49.2 330.0 +reading 2004 7 17 199 15.5 24.4 13.4 -999.9 0.0 2.2 51.5 330.0 +reading 2004 7 18 200 11.4 21.4 15.7 -999.9 0.2 1.8 41.8 330.0 +reading 2004 7 19 201 7.5 22.7 18.7 -999.9 0.0 1.3 39.1 330.0 +reading 2004 7 20 202 8.0 24.8 13.9 -999.9 0.0 1.5 43.1 330.0 +reading 2004 7 21 203 13.4 21.9 9.6 -999.9 0.0 2.1 47.2 330.0 +reading 2004 7 22 204 14.1 26.9 12.1 -999.9 0.6 1.1 57.0 330.0 +reading 2004 7 23 205 13.3 24.9 23.7 -999.9 0.0 1.8 53.4 330.0 +reading 2004 7 24 206 9.1 23.9 21.3 -999.9 0.0 2.4 46.2 330.0 +reading 2004 7 25 207 11.6 23.4 14.6 -999.9 0.0 2.4 49.9 330.0 +reading 2004 7 26 208 11.7 21.7 11.0 -999.9 0.0 1.4 47.9 330.0 +reading 2004 7 27 209 11.3 23.4 14.8 -999.9 0.0 0.6 50.5 330.0 +reading 2004 7 28 210 9.5 26.8 18.0 -999.9 0.0 0.8 54.0 330.0 +reading 2004 7 29 211 11.0 29.4 19.1 -999.9 0.6 1.7 62.3 330.0 +reading 2004 7 30 212 12.2 25.6 18.8 -999.9 0.0 1.1 58.3 330.0 +reading 2004 7 31 213 10.6 28.6 22.0 -999.9 0.0 0.8 62.0 330.0 +reading 2004 8 1 214 14.5 27.2 18.4 -999.9 0.0 1.6 68.0 330.0 +reading 2004 8 2 215 13.0 28.2 17.0 -999.9 0.0 1.8 68.0 330.0 +reading 2004 8 3 216 13.9 27.6 11.6 -999.9 0.2 1.1 69.3 330.0 +reading 2004 8 4 217 11.6 28.1 16.8 -999.9 0.0 0.8 66.4 330.0 +reading 2004 8 5 218 15.5 29.0 10.9 -999.9 24.2 0.8 71.2 330.0 +reading 2004 8 6 219 14.1 27.8 21.4 -999.9 0.2 1.4 66.8 330.0 +reading 2004 8 7 220 11.8 29.6 14.5 -999.9 0.0 0.8 66.7 330.0 +reading 2004 8 8 221 13.6 30.5 10.5 -999.9 0.0 1.4 73.3 330.0 +reading 2004 8 9 222 16.8 21.9 3.2 -999.9 16.4 0.8 58.6 330.0 +reading 2004 8 10 223 13.5 26.2 15.5 -999.9 11.0 1.3 58.7 330.0 +reading 2004 8 11 224 13.7 24.4 14.1 -999.9 2.4 1.2 56.0 330.0 +reading 2004 8 12 225 15.2 23.9 17.6 -999.9 5.0 1.9 57.5 330.0 +reading 2004 8 13 226 13.7 23.1 13.7 -999.9 0.2 2.1 54.1 330.0 +reading 2004 8 14 227 13.4 24.8 13.7 -999.9 0.0 0.8 57.1 330.0 +reading 2004 8 15 228 12.8 22.9 11.3 -999.9 0.4 1.5 53.2 330.0 +reading 2004 8 16 229 14.1 21.8 8.7 -999.9 3.4 2.2 53.3 330.0 +reading 2004 8 17 230 13.2 23.4 16.0 -999.9 0.2 1.7 55.1 330.0 +reading 2004 8 18 231 14.2 21.7 9.3 -999.9 7.2 2.4 52.9 330.0 +reading 2004 8 19 232 14.0 22.2 12.4 -999.9 7.8 3.0 52.3 330.0 +reading 2004 8 20 233 11.7 21.7 13.0 -999.9 15.8 2.5 45.4 330.0 +reading 2004 8 21 234 11.0 20.3 18.0 -999.9 0.0 1.3 43.0 330.0 +reading 2004 8 22 235 11.3 21.6 14.6 -999.9 2.4 1.1 45.2 330.0 +reading 2004 8 23 236 13.3 21.2 14.3 -999.9 10.4 2.8 46.1 330.0 +reading 2004 8 24 237 14.1 22.2 14.4 -999.9 1.0 3.0 49.2 330.0 +reading 2004 8 25 238 12.3 21.1 13.3 -999.9 3.4 1.8 44.7 330.0 +reading 2004 8 26 239 13.4 20.8 11.6 -999.9 0.2 2.1 46.3 330.0 +reading 2004 8 27 240 11.4 20.8 8.4 -999.9 5.4 2.6 42.9 330.0 +reading 2004 8 28 241 7.5 20.7 13.3 -999.9 0.0 1.0 38.0 330.0 +reading 2004 8 29 242 9.6 18.9 10.7 -999.9 0.0 2.8 38.7 330.0 +reading 2004 8 30 243 11.3 19.8 12.8 -999.9 0.6 2.3 42.5 330.0 +reading 2004 8 31 244 7.8 20.4 16.6 -999.9 0.0 0.9 39.1 330.0 +reading 2004 9 1 245 5.6 22.0 17.2 -999.9 0.0 0.8 38.7 330.0 +reading 2004 9 2 246 7.8 25.4 17.4 -999.9 0.0 0.5 46.8 330.0 +reading 2004 9 3 247 9.2 25.1 17.8 -999.9 0.0 0.9 49.0 330.0 +reading 2004 9 4 248 9.6 27.9 19.2 -999.9 0.0 0.7 54.8 330.0 +reading 2004 9 5 249 11.2 28.2 18.9 -999.9 0.0 0.7 58.9 330.0 +reading 2004 9 6 250 12.1 25.3 16.7 -999.9 0.0 2.5 56.0 330.0 +reading 2004 9 7 251 13.6 24.1 12.9 -999.9 0.0 3.5 57.2 330.0 +reading 2004 9 8 252 13.6 23.6 19.3 -999.9 0.0 3.2 57.1 330.0 +reading 2004 9 9 253 12.1 25.6 17.4 -999.9 0.0 2.1 58.7 330.0 +reading 2004 9 10 254 11.3 21.3 6.1 -999.9 4.6 1.8 49.3 330.0 +reading 2004 9 11 255 12.4 20.8 12.6 -999.9 0.8 4.8 50.7 330.0 +reading 2004 9 12 256 9.3 18.5 12.9 -999.9 3.4 4.5 42.4 330.0 +reading 2004 9 13 257 11.7 18.7 13.6 -999.9 5.4 4.5 45.7 330.0 +reading 2004 9 14 258 10.6 17.6 11.0 -999.9 0.2 4.8 42.9 330.0 +reading 2004 9 15 259 5.0 18.4 14.9 -999.9 0.0 1.6 36.9 330.0 +reading 2004 9 16 260 2.4 18.3 16.0 -999.9 0.0 2.3 34.0 330.0 +reading 2004 9 17 261 13.9 18.1 5.0 -999.9 0.4 3.9 49.4 330.0 +reading 2004 9 18 262 9.7 18.4 6.9 -999.9 2.4 3.7 43.4 330.0 +reading 2004 9 19 263 6.1 17.1 9.7 -999.9 0.0 2.7 37.2 330.0 +reading 2004 9 20 264 11.9 18.8 8.2 -999.9 0.0 5.6 47.9 330.0 +reading 2004 9 21 265 9.7 15.9 11.2 -999.9 0.0 4.1 41.0 330.0 +reading 2004 9 22 266 11.1 18.0 6.6 -999.9 0.0 4.6 46.2 330.0 +reading 2004 9 23 267 9.9 20.7 9.4 -999.9 0.0 3.4 48.8 330.0 +reading 2004 9 24 268 4.3 15.6 13.4 -999.9 0.0 1.4 34.5 330.0 +reading 2004 9 25 269 2.5 15.3 4.8 -999.9 1.8 1.7 32.0 330.0 +reading 2004 9 26 270 7.2 20.6 10.4 -999.9 0.0 2.0 44.8 330.0 +reading 2004 9 27 271 12.4 18.8 4.1 -999.9 0.0 2.1 50.2 330.0 +reading 2004 9 28 272 13.4 18.7 5.4 -999.9 0.0 2.7 51.9 330.0 +reading 2004 9 29 273 12.4 15.0 3.6 -999.9 1.8 0.7 44.4 330.0 +reading 2004 9 30 274 8.0 19.0 7.0 -999.9 1.6 1.3 43.7 330.0 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficini.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficini.txt new file mode 100644 index 00000000..8487a60f --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficini.txt @@ -0,0 +1,49 @@ +:nbplantes: +2 +:plante: +snu +0.0000 +0.0000 +0.0000 +code_acti_reserve +2 +0 +0 +0 +0 +0 +0 +0 +:densinitial: +0.0000 0.0000 0.0000 0.0000 0.0000 +:plante: +snu +0.0000 +0.0000 +0.0000 +code_acti_reserve +2 +0 +0 +0 +0 +0 +0 +0 +:densinitial: +0.0000 0.0000 0.0000 0.0000 0.0000 +:Hinitf: +0.0000 0.0000 0.0000 0.0000 0.0000 +:NO3initf: +30.0000 10.0000 5.0000 0.0000 0.0000 +:NH4initf: +0.0000 0.0000 0.0000 0.0000 0.0000 +:snow: +Sdepth0 +0.0 +Sdry0 +0.0 +Swet0 +0.0 +ps0 +0.0 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt1.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt1.txt new file mode 100644 index 00000000..3e707332 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt1.txt @@ -0,0 +1,612 @@ +codeplante +poi +codemonocot +2 +alphaco2 +1.20000 +tdmin +0.00000 +tdmax +25.00000 +codetemp +2 +codegdh +1 +coeflevamf +1.00000 +coefamflax +1.00000 +coeflaxsen +1.00000 +coefsenlan +1.00000 +coeflevdrp +1.00000 +coefdrpmat +1.00000 +coefflodrp +1.00000 +codephot +2 +codephot_part +2 +coderetflo +2 +stressdev +0.20000 +codebfroid +1 +jvcmini +7.00000 +julvernal +274 +tfroid +6.50000 +ampfroid +10.00000 +tdmindeb +5.00000 +tdmaxdeb +25.00000 +codedormance +3 +ifindorm +70 +q10 +3.00000 +idebdorm +300 +codegdhdeb +2 +code_WangEngel +2 +tdoptdeb +11.7 +tgmin +0.0 +codeperenne +1 +codegermin +1 +stpltger +60.00000 +potgermi +-1.60000 +nbjgerlim +50 +propjgermin +1.00000 +codehypo +1 +belong +0.01150 +celong +4.57010 +elmax +7.21000 +nlevlim1 +10 +nlevlim2 +50 +vigueurbat +1.00000 +laiplantule +2.00000 +nbfeuilplant +0 +masecplantule +0.50000 +zracplantule +2.00000 +phyllotherme +120.00000 +laicomp +0.00000 +tcmin +0.00000 +tcmax +30.00000 +tcxstop +100.00000 +codelaitr +1 +vlaimax +2.20000 +pentlaimax +5.50000 +udlaimax +3.00000 +ratiodurvieI +0.80000 +ratiosen +0.25000 +abscission +0.00000 +parazofmorte +13.00000 +innturgmin +0.30000 +dlaimin +0.00000 +codlainet +1 +tustressmin +0.70000 +durviesupmax +0.40000 +codestrphot +2 +phobasesen +12.00000 +dltamsmaxsen +0.01000 +dltamsminsen +0.15000 +alphaphot +200.00000 +tauxrecouvmax +1.00000 +tauxrecouvkmax +1.00000 +pentrecouv +4.50000 +infrecouv +0.85000 +stage_const_height +mat +elongation +1.0 +nw_height +0.0 +code_shape +2 +haut_dev_x0 +685.395497474724 +haut_dev_k +0.0113605979397447 +codetransrad +2 +forme +1 +rapforme +1.00000 +adfol +1.00000 +dfolbas +5.00000 +dfolhaut +5.00000 +nrow +1 +temax +30.00000 +teoptbis +20.00000 +efcroijuv +1.20000 +efcroiveg +2.70000 +efcroirepro +3.30000 +remobres +0.20000 +coefmshaut +0.00000 +slamin +180.000 +envfruit +0.10000 +sea +0.00000 +code_acti_reserve +2 +propresP +0.47 +PropresPN +0.6 +Efremobil +0.05 +Propres +0.10 +tauxmortresP +0.0025 +Parazoper +27 +ParazoTmorte +30 +inilai +0.001 +resplmax +0.66 +codemontaison +2 +codedyntalle +2 +codetranspitalle +1 +SurfApex +0.000005 +SeuilMorTalle +0.02 +SigmaDisTalle +0.1 +VitReconsPeupl +0.001 +SeuilReconsPeupl +800 +MaxTalle +4000.0 +SeuilLAIapex +1.0 +tigefeuilcoupe +5.0 +codeindetermin +1 +cgrain +0.031 +cgrainv0 +0.000 +irazomax +0.650 +codeir +1 +irmax +0.65000 +nboite +10 +allocfrmax +0.90000 +afpf +0.50000 +bfpf +5.00000 +cfpf +0.00000 +dfpf +0.20000 +spfrmin +0.75000 +spfrmax +1.00000 +splaimin +0.20000 +splaimax +1.00000 +codcalinflo +1 +codetremp +1 +tminremp +8.00000 +tmaxremp +40.00000 +sensanox +0.00000 +stoprac +lax +sensrsec +0.40000 +contrdamax +0.34000 +rayon +0.02 +codetemprac +2 +codemortalracine +2 +coefracoupe +0.5 +coderacine +2 +zlabour +22.00000 +zpente +45.00000 +zprlim +80.00000 +draclong +30.000 +debsenrac +1000.000 +lvfront +0.05000 +longsperac +3300.000 +codedisrac +2 +kdisrac +0.00158 +alloperirac +0.23 +codazorac +2 +minefnra +0.00000 +minazorac +0.10000 +maxazorac +1.00000 +codtrophrac +3 +repracpermax +1.00000 +repracpermin +0.03000 +krepracperm +0.00300 +repracseumax +1.00000 +repracseumin +0.03000 +krepracseu +0.00300 +code_stress_root +2 +code_rootdeposition +2 +parazorac +-999 +code_diff_root +2 +lvmax +-999 +rapdia +-999 +RTD +-999 +propracfmax +-999 +tletale +-25.00000 +tdebgel +-4.00000 +codgellev +2 +nbfgellev +2 +tgellev90 +-20.00000 +codgeljuv +2 +tgeljuv90 +-20.00000 +codgelveg +2 +tgelveg90 +-10.00000 +codgelflo +2 +tgelflo10 +-4.50000 +tgelflo90 +-6.50000 +h2ofeuilverte +0.90000 +h2ofeuiljaune +0.15000 +h2otigestruc +0.60000 +h2oreserve +0.70000 +h2ofrvert +0.55000 +tempdeshyd +0.00500 +codebeso +2 +kmax +1.30000 +rsmin +100.00000 +codeintercept +2 +mouillabil +0.55000 +stemflowmax +0.00000 +kstemflow +0.00000 +Vmax1 +0.01200 +Kmabs1 +50.000 +Vmax2 +0.12000 +Kmabs2 +20000.000 +adil +5.08000 +bdil +0.32000 +masecNmax +1.00000 +INNmin +0.30000 +INNimin +-0.50000 +inngrain1 +0.30000 +inngrain2 +0.90000 +bdilmax +0.32000 +codeplisoleN +2 +adilmax +8.00000 +Nmeta +6.47000 +masecmeta +0.04000 +Nreserve +0.50000 +codeINN +1 +codelegume +2 +stlevdno +0.00000 +stdnofno +2000.00000 +stfnofvino +0.00000 +vitno +1.00000 +profnod +30.00000 +concNnodseuil +6.00000 +concNrac0 +2.70000 +concNrac100 +0.04000 +tempnod1 +0.00000 +tempnod2 +15.00000 +tempnod3 +25.00000 +tempnod4 +35.00000 +codefixpot +2 +fixmax +8.90000 +fixmaxveg +30.00000 +fixmaxgr +9.50000 +codazofruit +1 +stadebbchplt +00 +stadebbchger +05 +stadebbchlev +09 +stadebbchamf +-99 +stadebbchlax +-99 +stadebbchsen +-99 +stadebbchflo +65 +stadebbchdrp +-99 +stadebbchnou +-99 +stadebbchdebdes +-99 +stadebbchmat +89 +stadebbchrec +99 +stadebbchfindorm +-99 +codevar +baccara +stlevamf +230 +stamflax +418 +stlevdrp +900 +stflodrp +216 +stdrpdes +700 +jvc +0 +stdordebour +0 +sensiphot +-999 +phobase +-999 +phosat +-999 +adens +-0.45 +bdens +10.00000 +hautbase +0.00000 +hautmax +0.65000 +khaut +0.70 +durvieF +160.0 +stlaxsen +350.0 +stsenlan +280.0 +dlaimax +0.00047 +dlaimaxbrut +0.00035 +innsen +0.35 +rapsenturg +0.50 +extin +0.85 +ktrou +1.00 +temin +0.0 +teopt +15.0 +slamax +350 +tigefeuil +0.00 +pgrainmaxi +0.35 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.02200 +deshydbase +0.00800 +nbjgrain +15 +nbgrmin +447 +nbgrmax +3500 +stdrpmat +490.0 +vitircarb +0.022 +vitircarbT +0 +afruitpot +520 +dureefruit +750 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.12 +tgellev10 +-4.0 +tgeljuv10 +-10.0 +tgelveg10 +-4.5 +psisto +10 +psiturg +2 +swfacmin +0.1 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt2.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt2.txt new file mode 100644 index 00000000..353684d6 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/ficplt2.txt @@ -0,0 +1,718 @@ +codeplante +esc +codemonocot +1 +alphaco2 +1.20000 +tdmin +0.00000 +tdmax +28.00000 +codetemp +2 +codegdh +1 +coeflevamf +1.00000 +coefamflax +1.00000 +coeflaxsen +1.00000 +coefsenlan +1.00000 +coeflevdrp +1.00000 +coefdrpmat +1.00000 +coefflodrp +1.00000 +codephot +1 +codephot_part +2 +coderetflo +1 +stressdev +0.22000 +codebfroid +1 +jvcmini +7.00000 +julvernal +274 +tfroid +6.50000 +ampfroid +10.00000 +tdmindeb +5.00000 +tdmaxdeb +25.00000 +codedormance +3 +ifindorm +70 +q10 +3.00000 +idebdorm +300 +codegdhdeb +2 +code_WangEngel +2 +tdoptdeb +11.7 +tgmin +0.0 +codeperenne +1 +codegermin +1 +stpltger +50.00000 +potgermi +-1.60000 +nbjgerlim +50 +propjgermin +1.00000 +codehypo +1 +belong +0.01200 +celong +3.20000 +elmax +8.00000 +nlevlim1 +10 +nlevlim2 +50 +vigueurbat +1.00000 +laiplantule +0.00000 +nbfeuilplant +0 +masecplantule +0.50000 +zracplantule +2.00000 +phyllotherme +120.00000 +laicomp +0.30400 +tcmin +0.00000 +tcmax +40.00000 +tcxstop +100.00000 +codelaitr +1 +vlaimax +1.80000 +pentlaimax +5.50000 +udlaimax +3.00000 +ratiodurvieI +0.80000 +ratiosen +0.80000 +abscission +0.00000 +parazofmorte +13.00000 +innturgmin +-0.65000 +dlaimin +0.00000 +codlainet +1 +tustressmin +0.70000 +durviesupmax +0.00000 +codestrphot +2 +phobasesen +12.00000 +dltamsmaxsen +0.01000 +dltamsminsen +0.15000 +alphaphot +200.00000 +tauxrecouvmax +1.00000 +tauxrecouvkmax +1.00000 +pentrecouv +4.50000 +infrecouv +0.85000 +stage_const_height +mat +elongation +1.0 +nw_height +0.0 +code_shape +2 +haut_dev_x0 +685.395497474724 +haut_dev_k +0.0113605979397447 +codetransrad +2 +forme +1 +rapforme +2.60000 +adfol +1.00000 +dfolbas +5.00000 +dfolhaut +5.00000 +nrow +1 +temax +40.00000 +teoptbis +17.00000 +efcroijuv +3.52500 +efcroiveg +4.70000 +efcroirepro +4.70000 +remobres +0.20000 +coefmshaut +0.00000 +slamin +180.000 +envfruit +0.10000 +sea +0.00000 +code_acti_reserve +2 +propresP +0.47 +PropresPN +0.6 +Efremobil +0.05 +Propres +0.10 +tauxmortresP +0.0025 +Parazoper +27 +ParazoTmorte +30 +inilai +0.001 +resplmax +0.66 +codemontaison +2 +codedyntalle +2 +codetranspitalle +1 +SurfApex +0.000005 +SeuilMorTalle +0.02 +SigmaDisTalle +0.1 +VitReconsPeupl +0.001 +SeuilReconsPeupl +800 +MaxTalle +4000.0 +SeuilLAIapex +1.0 +tigefeuilcoupe +5.0 +codeindetermin +1 +cgrain +0.036 +cgrainv0 +0.000 +irazomax +0.813 +codeir +1 +irmax +0.60000 +nboite +10 +allocfrmax +0.60000 +afpf +0.40000 +bfpf +4.32000 +cfpf +0.00000 +dfpf +0.20000 +spfrmin +0.75000 +spfrmax +1.00000 +splaimin +0.20000 +splaimax +1.00000 +codcalinflo +1 +codetremp +2 +tminremp +0.00000 +tmaxremp +32.00000 +sensanox +1.00000 +stoprac +sen +sensrsec +0.50000 +contrdamax +0.55000 +rayon +0.02 +codetemprac +2 +codemortalracine +2 +coefracoupe +0.5 +coderacine +2 +zlabour +22.00000 +zpente +100.00000 +zprlim +160.00000 +draclong +80.000 +debsenrac +1000.000 +lvfront +0.05000 +longsperac +24062.000 +codedisrac +2 +kdisrac +0.00158 +alloperirac +0.23 +codazorac +2 +minefnra +0.00000 +minazorac +0.10000 +maxazorac +1.00000 +codtrophrac +3 +repracpermax +1.00000 +repracpermin +0.06000 +krepracperm +1.02000 +repracseumax +1.00000 +repracseumin +0.06000 +krepracseu +1.02000 +code_stress_root +2 +code_rootdeposition +2 +parazorac +-999 +code_diff_root +2 +lvmax +-999 +rapdia +-999 +RTD +-999 +propracfmax +-999 +tletale +-10.00000 +tdebgel +-1.60000 +codgellev +2 +nbfgellev +2 +tgellev90 +-9.00000 +codgeljuv +2 +tgeljuv90 +-4.50000 +codgelveg +2 +tgelveg90 +-4.50000 +codgelflo +2 +tgelflo10 +4.00000 +tgelflo90 +0.00000 +h2ofeuilverte +0.90000 +h2ofeuiljaune +0.15000 +h2otigestruc +0.60000 +h2oreserve +0.70000 +h2ofrvert +0.40000 +tempdeshyd +0.00500 +codebeso +2 +kmax +1.00000 +rsmin +100.00000 +codeintercept +2 +mouillabil +0.00000 +stemflowmax +0.00000 +kstemflow +0.00000 +Vmax1 +0.00180 +Kmabs1 +50.000 +Vmax2 +0.05000 +Kmabs2 +25000.000 +adil +5.35000 +bdil +0.44000 +masecNmax +1.54000 +INNmin +0.36000 +INNimin +-0.50000 +inngrain1 +0.03000 +inngrain2 +1.20000 +bdilmax +0.44000 +codeplisoleN +2 +adilmax +8.50000 +Nmeta +6.47000 +masecmeta +0.04000 +Nreserve +1.50000 +codeINN +1 +codelegume +1 +stlevdno +150.00000 +stdnofno +500.00000 +stfnofvino +300.00000 +vitno +0.00300 +profnod +30.00000 +concNnodseuil +2.70000 +concNrac0 +2.70000 +concNrac100 +0.04000 +tempnod1 +0 +tempnod2 +15.00000 +tempnod3 +25.00000 +tempnod4 +35.00000 +codefixpot +1 +fixmax +8.90000 +fixmaxveg +30.00000 +fixmaxgr +9.50000 +codazofruit +1 +stadebbchplt +00 +stadebbchger +05 +stadebbchlev +09 +stadebbchamf +35 +stadebbchlax +55 +stadebbchsen +85 +stadebbchflo +65 +stadebbchdrp +71 +stadebbchnou +-99 +stadebbchdebdes +75 +stadebbchmat +89 +stadebbchrec +99 +stadebbchfindorm +-99 +codevar +cork +stlevamf +380 +stamflax +240 +stlevdrp +650 +stflodrp +0 +stdrpdes +700 +jvc +0 +stdordebour +0 +sensiphot +0 +phobase +6.3 +phosat +20 +adens +-0.60 +bdens +7.00000 +hautbase +0.00000 +hautmax +0.92000 +khaut +0.70 +durvieF +200.0 +stlaxsen +312. +stsenlan +300. +dlaimax +0.00044 +dlaimaxbrut +0.00044 +innsen +0.17 +rapsenturg +0.50 +extin +0.50 +ktrou +2.00 +temin +0.0 +teopt +15.0 +slamax +350 +tigefeuil +4.00 +pgrainmaxi +0.055 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01450 +deshydbase +0.00800 +nbjgrain +30 +nbgrmin +6000 +nbgrmax +20702.0 +stdrpmat +800 +vitircarb +0.0107 +vitircarbT +0 +afruitpot +0 +dureefruit +2000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.14 +tgellev10 +-1.8 +tgeljuv10 +-2.0 +tgelveg10 +-2.0 +psisto +15 +psiturg +4 +swfacmin +0.1 +codevar +scarlett +stlevamf +400 +stamflax +350 +stlevdrp +940 +stflodrp +0 +stdrpdes +700 +jvc +0 +stdordebour +0 +sensiphot +0 +phobase +6.3 +phosat +20 +adens +-0.6 +bdens +7.00000 +hautbase +0.00000 +hautmax +0.92000 +khaut +0.70 +durvieF +200.0 +stlaxsen +312.0 +stsenlan +243.0 +dlaimax +0.00044 +dlaimaxbrut +0.00044 +innsen +0.17 +rapsenturg +0.50 +extin +0.50 +ktrou +2.00 +temin +0.0 +teopt +15.0 +slamax +350 +tigefeuil +4.00 +pgrainmaxi +0.044 +vitpropsucre +0.00000 +vitprophuile +0.00000 +vitirazo +0.01450 +deshydbase +0.00800 +nbjgrain +30 +nbgrmin +6000 +nbgrmax +14538.0 +stdrpmat +350 +vitircarb +0.0107 +vitircarbT +0 +afruitpot +10 +dureefruit +2000 +stdrpnou +-999 +nbinflo +-999 +inflomax +-999 +pentinflores +-999 +croirac +0.15 +tgellev10 +-1.8 +tgeljuv10 +-2.0 +tgelveg10 +-2.0 +psisto +15 +psiturg +4 +swfacmin +0.1 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec1.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec1.txt new file mode 100644 index 00000000..3ebbaa1c --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec1.txt @@ -0,0 +1,242 @@ +nbinterventions +1 +julres coderes qres Crespc CsurNres Nminres eaures +70 1 2.33 42.00 80.00 0.00 0.00 +code_auto_profres +1 +resk +0.14 +resz +5 +nbinterventions +1 +jultrav profres proftrav +70 0.00 20.00 +iplt0 +77 +profsem +4.00000 +densitesem +110.00000 +variete +1 +codetradtec +1 +interrang +0.24000 +orientrang +2.36000 +codedecisemis +2 +nbjmaxapressemis +30 +nbjseuiltempref +15 +nbj_pr_apres_semis +3 +eau_mini_decisemis +10 +humirac_decisemis +0.75 +codestade +1 +ilev +98 +iamf +138 +ilax +999 +isen +999 +ilan +999 +iflo +152 +idrp +164 +imat +202 +irec +999 +effirr +1.00000 +codecalirrig +2 +ratiol +0.00000 +dosimx +40.00000 +doseirrigmin +20.00000 +codedate_irrigauto +3 +datedeb_irrigauto +0 +datefin_irrigauto +0 +stage_start_irrigauto +0 +stage_end_irrigauto +0 +codedateappH2O +2 +nbinterventions +0 +codlocirrig +1 +locirrig +0 +profmes +90.00000 +concirr +0.00000 +codedateappN +2 +codefracappN +1 +Qtot_N +100 +nbinterventions +0 +codlocferti +2 +locferti +2 +irecbutoir +365 +ressuite +straw+roots +code_autoressuite +2 +Stubblevegratio +0 +codceuille +1 +nbceuille +1 +cadencerec +7 +codrecolte +2 +codeaumin +2 +h2ograinmin +0.80000 +h2ograinmax +0.14000 +sucrerec +0.25000 +CNgrainrec +0.02000 +huilerec +0.25000 +coderecolteassoc +2 +codedecirecolte +2 +nbjmaxapresrecolte +15 +codefauche +2 +code_hautfauche_dyn +2 +codetempfauche +1 +codemodfauche +1 +hautcoupedefaut +0.00000 +stadecoupedf +rec +nbinterventions +0 +nbinterventions +0 +codepaillage +1 +couvermulchplastique +0.00000 +albedomulchplastique +0.00000 +codrognage +1 +largrogne +0.00000 +hautrogne +0.00000 +biorognem +0.00000 +codcalrogne +1 +julrogne +0 +margerogne +0.00000 +codeclaircie +1 +nbinterventions +0 +codeffeuil +1 +codhauteff +1 +codcaleffeuil +1 +laidebeff +0.00000 +effeuil +0.00000 +juleffeuil +0 +laieffeuil +0.00000 +codetaille +1 +jultaille +0 +codepalissage +1 +hautmaxtec +0.00000 +largtec +0.50000 +codabri +1 +transplastic +0.70000 +surfouvre1 +0.00000 +julouvre2 +0 +surfouvre2 +0.00000 +julouvre3 +0 +surfouvre3 +0.00000 +codejourdes +2 +juldes +999 +codeDST +2 +dachisel +1.10000 +dalabour +1.30000 +rugochisel +0.00500 +rugolabour +0.05000 +codeDSTtass +2 +profhumsemoir +30.00000 +dasemis +1.60000 +profhumrecolteuse +30.00000 +darecolte +1.60000 +codeDSTnbcouche +2 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec2.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec2.txt new file mode 100644 index 00000000..a9ed99c8 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/fictec2.txt @@ -0,0 +1,242 @@ +nbinterventions +1 +julres coderes qres Crespc CsurNres Nminres eaures +70 1 2.33 42.00 80.00 0.00 0.00 +code_auto_profres +1 +resk +0.14 +resz +5 +nbinterventions +1 +jultrav profres proftrav +70 0.00 20.00 +iplt0 +77 +profsem +4.00000 +densitesem +200.00000 +variete +2 +codetradtec +1 +interrang +0.24000 +orientrang +2.36000 +codedecisemis +2 +nbjmaxapressemis +30 +nbjseuiltempref +15 +nbj_pr_apres_semis +3 +eau_mini_decisemis +10 +humirac_decisemis +0.75 +codestade +1 +ilev +93 +iamf +999 +ilax +154 +isen +999 +ilan +999 +iflo +167 +idrp +167 +imat +208 +irec +999 +effirr +1.00000 +codecalirrig +2 +ratiol +0.00000 +dosimx +40.00000 +doseirrigmin +20.00000 +codedate_irrigauto +3 +datedeb_irrigauto +0 +datefin_irrigauto +0 +stage_start_irrigauto +0 +stage_end_irrigauto +0 +codedateappH2O +2 +nbinterventions +0 +codlocirrig +1 +locirrig +0 +profmes +90.00000 +concirr +0.00000 +codedateappN +2 +codefracappN +1 +Qtot_N +100 +nbinterventions +0 +codlocferti +2 +locferti +2 +irecbutoir +365 +ressuite +straw+roots +code_autoressuite +2 +Stubblevegratio +0 +codceuille +1 +nbceuille +1 +cadencerec +7 +codrecolte +2 +codeaumin +2 +h2ograinmin +0.80000 +h2ograinmax +0.14000 +sucrerec +0.25000 +CNgrainrec +0.02000 +huilerec +0.25000 +coderecolteassoc +2 +codedecirecolte +2 +nbjmaxapresrecolte +15 +codefauche +2 +code_hautfauche_dyn +2 +codetempfauche +1 +codemodfauche +1 +hautcoupedefaut +0.00000 +stadecoupedf +rec +nbinterventions +0 +nbinterventions +0 +codepaillage +1 +couvermulchplastique +0.00000 +albedomulchplastique +0.00000 +codrognage +1 +largrogne +0.00000 +hautrogne +0.00000 +biorognem +0.00000 +codcalrogne +1 +julrogne +0 +margerogne +0.00000 +codeclaircie +1 +nbinterventions +0 +codeffeuil +1 +codhauteff +1 +codcaleffeuil +1 +laidebeff +0.00000 +effeuil +0.00000 +juleffeuil +0 +laieffeuil +0.00000 +codetaille +1 +jultaille +0 +codepalissage +1 +hautmaxtec +0.00000 +largtec +0.50000 +codabri +1 +transplastic +0.70000 +surfouvre1 +0.00000 +julouvre2 +0 +surfouvre2 +0.00000 +julouvre3 +0 +surfouvre3 +0.00000 +codejourdes +2 +juldes +999 +codeDST +2 +dachisel +1.10000 +dalabour +1.30000 +rugochisel +0.00500 +rugolabour +0.05000 +codeDSTtass +2 +profhumsemoir +30.00000 +dasemis +1.60000 +profhumrecolteuse +30.00000 +darecolte +1.60000 +codeDSTnbcouche +2 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/new_travail.usm b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/new_travail.usm new file mode 100644 index 00000000..f8cbedfe --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/new_travail.usm @@ -0,0 +1,42 @@ +:codesimul +culture +:codoptim +0 +:codesuite +0 +:nbplantes +2 +:nom +intercrop_pea_barley +:datedebut +70 +:datefin +274 +:finit +orgpoi_ini.xml +:numsol +1 +:nomsol +Limon-Paris +:fstation +readcasj_sta.xml +:fclim1 +readingj.2004 +:fclim2 +readingj.2004 +:nbans +1 +:culturean +1 +:fplt1 +proto_pea_InterCrop_plt.xml +:ftec1 +piadan4_tec.xml +:flai1 +null +:fplt2 +proto_barley_InterCrop_plt.xml +:ftec2 +aiadan4_tec.xml +:flai2 +null diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/param.sol b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/param.sol new file mode 100644 index 00000000..6202641b --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/param.sol @@ -0,0 +1,8 @@ + 1 Limon-Paris 13.0 0.1000 30.0000 7.6000 7.0000 0.0000 0.2000 9.0000 0.0000 200.0000 50.0000 0.5000 60.0000 5.0000 0.0100 0.0000 0.65000 0.3300 + 1 2 2 2 2 2 2 2 + 1 10.0000 0.0000 0.0000 0.0000 1.0000 10.0000 20 2.0000 + 1 10.00 20.50 9.00 1.40 0.00 1 50.00 1 + 1 40.00 19.50 9.00 1.50 0.00 1 50.00 1 + 1 70.00 19.50 9.00 1.50 0.00 1 50.00 1 + 1 40.00 20.50 9.00 1.50 0.00 1 50.00 1 + 1 40.00 20.50 10.00 1.50 0.00 1 50.00 1 \ No newline at end of file diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/prof.mod b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/prof.mod new file mode 100644 index 00000000..00510174 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/prof.mod @@ -0,0 +1,4 @@ +2 +tsol(iz) +10 +01 01 2000 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/rap.mod b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/rap.mod new file mode 100644 index 00000000..d64396c2 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/rap.mod @@ -0,0 +1,15 @@ +1 +1 +2 +1 +rec +masec(n) +mafruit +iflos +imats +irecs +laimax +cprecip +cet +QNplante +Qles diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/station.txt b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/station.txt new file mode 100644 index 00000000..717333cb --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/station.txt @@ -0,0 +1,88 @@ +zr +2.50000 +NH3ref +0.00000 +concrr +0.02 +latitude +51.00000 +patm +1000.00000 +aclim +20.00000 +codeetp +3 +alphapt +1.26000 +codeclichange +1 +codaltitude +1 +altistation +440.00000 +altisimul +800.00000 +gradtn +-0.50000 +gradtx +-0.55000 +altinversion +500.00000 +gradtninv +1.30000 +cielclair +0.80000 +codadret +1 +ombragetx +-1.40000 +ra +50.00000 +albveg +0.23000 +aangst +0.18000 +bangst +0.62000 +corecTrosee +1.00000 +codecaltemp +1 +codernet +2 +coefdevil +0.70000 +aks +6.00000 +bks +0.50000 +cvent +0.16000 +phiv0 +0.00400 +coefrnet +0.59000 +codemodlsnow +3 +tsmax +-2 +trmax +1 +DKmax +1.50000 +Kmin +2 +Tmf +0.5 +SWrf +0.01 +Pns +100 +E +0.02 +prof +10 +tminseuil +-0.5 +tmaxseuil +0 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempopar.sti b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempopar.sti new file mode 100644 index 00000000..e0bf9ac7 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempopar.sti @@ -0,0 +1,1038 @@ +codeinnact +1 +codeh2oact +1 +codeminopt +2 +iniprofil +2 +codeprofmes +1 +codeinitprec +1 +codemsfinal +1 +codeactimulch +1 +codefrmur +1 +codemicheur +1 +codeoutscient +2 +codeseprapport +2 +separateurrapport +; +codesensibilite +2 +codesnow +2 +flagecriture +31 +parsurrg +0.48000 +coefb +0.08150 +proprac +0.20000 +y0msrac +0.70000 +dacohes +0.70000 +daseuilbas +1.40000 +daseuilhaut +2.00000 +beta +1.40000 +lvopt +0.50000 +difN +0.04500 +plNmin +10.00000 +irrlev +20.00000 +QNpltminINN +0.00000 +codesymbiose +2 +codefxn +2 +tmin_mineralisation +0.0 +FTEMh +0.12000 +FTEMha +25.00000 +TREFh +15.00000 +FTEMr +0.10300 +FTEMra +12.00000 +TREFr +15.00000 +GMIN1 +0.0007 +GMIN2 +0.02519 +GMIN3 +0.015 +GMIN4 +0.11200 +GMIN5 +8.50000 +GMIN6 +0.06000 +GMIN7 +11.00000 +Wh +0.10500 +pHminvol +5.50000 +pHmaxvol +8.50000 +Vabs2 +2.00000 +Xorgmax +400.00000 +hminm +0.25000 +hoptm +0.90000 +alphaph +0.00500 +dphvolmax +1.00000 +phvols +8.60000 +fhminsat +0.50000 +fredkN +0.25000 +fredlN +0.50000 +fNCbiomin +0.04000 +fredNsup +0.50000 +Primingmax +3.00000 +hminn +0.30 +hoptn +0.90 +pHminnit +4 +pHmaxnit +7.2 +nh4_min +1.0 +pHminden +5.6 +pHmaxden +9.2 +wfpsc +0.62 +tdenitopt_gauss +47 +scale_tdenitopt +25 +Kd +148 +kdesat +3.0 +code_vnit +1 +fnx +0.80 +vnitmax +27.3 +Kamm +24 +code_tnit +2 +tnitmin +5.0 +tnitopt +30.0 +tnitopt2 +35.0 +tnitmax +58.0 +tnitopt_gauss +32.5 +scale_tnitopt +16.0 +code_rationit +2 +rationit +0.0016 +code_hourly_wfps_nit +1 +code_pdenit +1 +cmin_pdenit +1.0 +cmax_pdenit +6.0 +min_pdenit +1.0 +max_pdenit +20.0 +code_ratiodenit +2 +ratiodenit +0.20 +code_hourly_wfps_denit +1 +pminruis +5.00000 +diftherm +0.00537 +bformnappe +0.77000 +rdrain +1.00000 +psihumin +-1.50000 +psihucc +-0.03000 +prophumtasssem +1.20000 +prophumtassrec +1.00000 +codhnappe +1 +distdrain +1000.00 +proflabour +30.0 +proftravmin +5.00000 +codetycailloux +2 +masvolcx +2.20000 +hcccx +7.00000 +masvolcx +1.80000 +hcccx +16.00000 +masvolcx +2.10000 +hcccx +11.00000 +masvolcx +2.30000 +hcccx +5.00000 +masvolcx +2.50000 +hcccx +3.00000 +masvolcx +2.65000 +hcccx +1.00000 +masvolcx +2.30000 +hcccx +5.00000 +masvolcx +2.20000 +hcccx +5.00000 +masvolcx +1.50000 +hcccx +26.00000 +masvolcx +0.00000 +hcccx +0.00000 +codetypeng +1 +engamm +0.50000 +orgeng +46.00000 +deneng +0.15000 +voleng +0.15000 +engamm +0.75000 +orgeng +42.00000 +deneng +0.13000 +voleng +0.30000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.35000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.35000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.25000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.25000 +engamm +0.00000 +orgeng +25.00000 +deneng +0.20000 +voleng +0.00000 +engamm +0.50000 +orgeng +0.20000 +deneng +0.05000 +voleng +0.05000 +codetypres +21 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.06400 +bkres +-0.26000 +awb +28.80000 +bwb +-228.00000 +cwb +11.50000 +ahres +36.50000 +bhres +1305.00000 +kbio +0.00250 +yres +0.90000 +CNresmin +12.00000 +CNresmax +27.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.08000 +bkres +-0.48000 +awb +33.00000 +bwb +-400.00000 +cwb +9.50000 +ahres +1.00000 +bhres +29.40000 +kbio +0.00150 +yres +0.82000 +CNresmin +15.00000 +CNresmax +20.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.06400 +bkres +0.05000 +awb +12.70000 +bwb +-58.00000 +cwb +6.20000 +ahres +10.00000 +bhres +329.00000 +kbio +0.00270 +yres +0.62000 +CNresmin +6.00000 +CNresmax +20.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.70000 +bkres +0.00000 +awb +5.5000 +bwb +0.00000 +cwb +5.5000 +ahres +0.18000 +bhres +0.00000 +kbio +0.011000 +yres +0.42000 +CNresmin +5.00000 +CNresmax +8.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.14000 +bkres +0.00000 +awb +5.50000 +bwb +0.00000 +cwb +5.50000 +ahres +0.05000 +bhres +0.00000 +kbio +0.00350 +yres +0.54000 +CNresmin +3.00000 +CNresmax +4.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.05000 +albedomulchresidus +0.08000 +Qmulchdec +1.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.06400 +bkres +-0.26000 +awb +28.80000 +bwb +-228.00000 +cwb +11.50000 +ahres +36.50000 +bhres +1305.00000 +kbio +0.002500 +yres +0.90000 +CNresmin +12.00000 +CNresmax +27.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.08000 +bkres +-0.48000 +awb +33.00000 +bwb +-400.00000 +cwb +9.50000 +ahres +1.00000 +bhres +29.40000 +kbio +0.001500 +yres +0.82000 +CNresmin +15.00000 +CNresmax +20.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.06400 +bkres +0.05000 +awb +12.70000 +bwb +-58.00000 +cwb +6.20000 +ahres +10.00000 +bhres +329.00000 +kbio +0.002700 +yres +0.62000 +CNresmin +6.00000 +CNresmax +20.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.70000 +bkres +0.00000 +awb +5.5000 +bwb +0.00000 +cwb +5.5000 +ahres +0.18000 +bhres +0.00000 +kbio +0.01100 +yres +0.42000 +CNresmin +5.00000 +CNresmax +8.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.14000 +bkres +0.00000 +awb +5.50000 +bwb +0.00000 +cwb +5.50000 +ahres +0.05000 +bhres +0.00000 +kbio +0.003500 +yres +0.54000 +CNresmin +3.00000 +CNresmax +4.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.030000 +bkres +1.13000 +awb +15.20000 +bwb +-80.00000 +cwb +7.80000 +ahres +0.91000 +bhres +25.90000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.030000 +bkres +1.13000 +awb +15.20000 +bwb +-80.00000 +cwb +7.80000 +ahres +0.91000 +bhres +25.90000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempoparv6.sti b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempoparv6.sti new file mode 100644 index 00000000..642302d2 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/tempoparv6.sti @@ -0,0 +1,50 @@ +codepluiepoquet +2 +nbjoursrrversirrig +15 +codecalferti +2 +ratiolN +0.00000 +dosimxN +40.00000 +codetesthumN +1 +codeNmindec +2 +rapNmindec +0.00100 +fNmindecmin +0.10000 +codetrosee +1 +codeSWDRH +2 +option_pature +2 +coderes_pature +3 +pertes_restit_ext +0.2 +Crespc_pature +7.4 +Nminres_pature +0.45 +eaures_pature +87.0 +coef_calcul_qres +7.53 +engrais_pature +3 +coef_calcul_doseN +16.25 +code_CsurNsol_dynamic +2 +humirac +1 +code_ISOP +2 +code_pct_legume +2 +pct_legum +0.5 diff --git a/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/var.mod b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/var.mod new file mode 100644 index 00000000..9a91098d --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/intercrop_pea_barley/var.mod @@ -0,0 +1,69 @@ +lai(n) +masec(n) +mafruit +HR(1) +HR(2) +HR(3) +HR(4) +HR(5) +resmes +drain +esol +et +zrac +tcult +AZnit(1) +AZnit(2) +AZnit(3) +AZnit(4) +AZnit(5) +Qles +QNplante +azomes +chargefruit +AZamm(1) +AZamm(2) +AZamm(3) +AZamm(4) +AZamm(5) +CNgrain +concNO3les +drat +fapar +hauteur +Hmax +humidite +LRACH(1) +LRACH(2) +LRACH(3) +LRACH(4) +LRACH(5) +mafrais +pdsfruitfrais +Qdrain +rnet +QNgrain +psibase +mabois +H2Orec +mafeuiljaune +mafeuilverte +humirac_mean +tempeff +deltai(n) +ulai(n) +tustress +efdensite +densite +exolai +dltams(n) +remobilj +exofac +exobiom +inn +innlai +inns +turfac +swfac +Qminh +Qminr diff --git a/inst/extdata/src_files/txt/V11.0/new_travail.usm b/inst/extdata/src_files/txt/V11.0/new_travail.usm new file mode 100644 index 00000000..8d003590 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/new_travail.usm @@ -0,0 +1,36 @@ +:codesimul +culture +:codoptim +0 +:codesuite +0 +:nbplantes +1 +:nom +maize +:datedebut +112 +:datefin +360 +:finit +mais_ini.xml +:numsol +1 +:nomsol +solmais +:fstation +climaisj_sta.xml +:fclim1 +climaisj.1996 +:fclim2 +climaisj.1996 +:nbans +1 +:culturean +1 +:fplt1 +corn_plt.xml +:ftec1 +Mais_tec.xml +:flai1 +null diff --git a/inst/extdata/src_files/txt/V11.0/param.sol b/inst/extdata/src_files/txt/V11.0/param.sol new file mode 100644 index 00000000..0177613c --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/param.sol @@ -0,0 +1,8 @@ + 1 solmais 22.0 0.1200 35.0000 1.0000 7.0000 0.0000 0.2000 0.0000 0.0000 200.0000 50.0000 0.5000 60.0000 5.0000 0.0100 0.0000 0.65000 0.3300 + 1 2 2 2 2 2 2 2 + 1 10.0000 0.0000 0.0000 0.0000 1.0000 10.0000 20 2.0000 + 1 25.00 22.50 8.50 1.16 0.00 1 50.00 10 + 1 30.00 25.40 11.60 1.29 0.00 1 50.00 10 + 1 35.00 25.80 15.30 1.15 0.00 1 50.00 10 + 1 30.00 28.70 19.00 0.91 0.00 1 50.00 10 + 1 0.00 0.00 0.00 0.00 0.00 1 50.00 10 \ No newline at end of file diff --git a/inst/extdata/src_files/txt/V11.0/param.sti b/inst/extdata/src_files/txt/V11.0/param.sti new file mode 100644 index 00000000..8f313c61 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/param.sti @@ -0,0 +1,3 @@ +1 +stlevamf +220.000000 diff --git a/inst/extdata/src_files/txt/V11.0/station.txt b/inst/extdata/src_files/txt/V11.0/station.txt new file mode 100644 index 00000000..cc44407f --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/station.txt @@ -0,0 +1,88 @@ +zr +2.50000 +NH3ref +0.00000 +concrr +0.02 +latitude +45.00000 +patm +1000.00000 +aclim +20.000000 +codeetp +1 +alphapt +1.26000 +codeclichange +1 +codaltitude +1 +altistation +440.00000 +altisimul +800.00000 +gradtn +-0.50000 +gradtx +-0.55000 +altinversion +500.00000 +gradtninv +1.30000 +cielclair +0.80000 +codadret +1 +ombragetx +-1.40000 +ra +50.00000 +albveg +0.23000 +aangst +0.18000 +bangst +0.62000 +corecTrosee +1.00000 +codecaltemp +1 +codernet +2 +coefdevil +0.70000 +aks +6.00000 +bks +0.50000 +cvent +0.16000 +phiv0 +0.00400 +coefrnet +0.59000 +codemodlsnow +3 +tsmax +-2 +trmax +1 +DKmax +1.50000 +Kmin +2 +Tmf +0.5 +SWrf +0.01 +Pns +100 +E +0.02 +prof +10 +tminseuil +-0.5 +tmaxseuil +0 diff --git a/inst/extdata/src_files/txt/V11.0/tempopar.sti b/inst/extdata/src_files/txt/V11.0/tempopar.sti new file mode 100644 index 00000000..e0bf9ac7 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/tempopar.sti @@ -0,0 +1,1038 @@ +codeinnact +1 +codeh2oact +1 +codeminopt +2 +iniprofil +2 +codeprofmes +1 +codeinitprec +1 +codemsfinal +1 +codeactimulch +1 +codefrmur +1 +codemicheur +1 +codeoutscient +2 +codeseprapport +2 +separateurrapport +; +codesensibilite +2 +codesnow +2 +flagecriture +31 +parsurrg +0.48000 +coefb +0.08150 +proprac +0.20000 +y0msrac +0.70000 +dacohes +0.70000 +daseuilbas +1.40000 +daseuilhaut +2.00000 +beta +1.40000 +lvopt +0.50000 +difN +0.04500 +plNmin +10.00000 +irrlev +20.00000 +QNpltminINN +0.00000 +codesymbiose +2 +codefxn +2 +tmin_mineralisation +0.0 +FTEMh +0.12000 +FTEMha +25.00000 +TREFh +15.00000 +FTEMr +0.10300 +FTEMra +12.00000 +TREFr +15.00000 +GMIN1 +0.0007 +GMIN2 +0.02519 +GMIN3 +0.015 +GMIN4 +0.11200 +GMIN5 +8.50000 +GMIN6 +0.06000 +GMIN7 +11.00000 +Wh +0.10500 +pHminvol +5.50000 +pHmaxvol +8.50000 +Vabs2 +2.00000 +Xorgmax +400.00000 +hminm +0.25000 +hoptm +0.90000 +alphaph +0.00500 +dphvolmax +1.00000 +phvols +8.60000 +fhminsat +0.50000 +fredkN +0.25000 +fredlN +0.50000 +fNCbiomin +0.04000 +fredNsup +0.50000 +Primingmax +3.00000 +hminn +0.30 +hoptn +0.90 +pHminnit +4 +pHmaxnit +7.2 +nh4_min +1.0 +pHminden +5.6 +pHmaxden +9.2 +wfpsc +0.62 +tdenitopt_gauss +47 +scale_tdenitopt +25 +Kd +148 +kdesat +3.0 +code_vnit +1 +fnx +0.80 +vnitmax +27.3 +Kamm +24 +code_tnit +2 +tnitmin +5.0 +tnitopt +30.0 +tnitopt2 +35.0 +tnitmax +58.0 +tnitopt_gauss +32.5 +scale_tnitopt +16.0 +code_rationit +2 +rationit +0.0016 +code_hourly_wfps_nit +1 +code_pdenit +1 +cmin_pdenit +1.0 +cmax_pdenit +6.0 +min_pdenit +1.0 +max_pdenit +20.0 +code_ratiodenit +2 +ratiodenit +0.20 +code_hourly_wfps_denit +1 +pminruis +5.00000 +diftherm +0.00537 +bformnappe +0.77000 +rdrain +1.00000 +psihumin +-1.50000 +psihucc +-0.03000 +prophumtasssem +1.20000 +prophumtassrec +1.00000 +codhnappe +1 +distdrain +1000.00 +proflabour +30.0 +proftravmin +5.00000 +codetycailloux +2 +masvolcx +2.20000 +hcccx +7.00000 +masvolcx +1.80000 +hcccx +16.00000 +masvolcx +2.10000 +hcccx +11.00000 +masvolcx +2.30000 +hcccx +5.00000 +masvolcx +2.50000 +hcccx +3.00000 +masvolcx +2.65000 +hcccx +1.00000 +masvolcx +2.30000 +hcccx +5.00000 +masvolcx +2.20000 +hcccx +5.00000 +masvolcx +1.50000 +hcccx +26.00000 +masvolcx +0.00000 +hcccx +0.00000 +codetypeng +1 +engamm +0.50000 +orgeng +46.00000 +deneng +0.15000 +voleng +0.15000 +engamm +0.75000 +orgeng +42.00000 +deneng +0.13000 +voleng +0.30000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.35000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.35000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.25000 +engamm +1.00000 +orgeng +38.00000 +deneng +0.10000 +voleng +0.25000 +engamm +0.00000 +orgeng +25.00000 +deneng +0.20000 +voleng +0.00000 +engamm +0.50000 +orgeng +0.20000 +deneng +0.05000 +voleng +0.05000 +codetypres +21 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.06400 +bkres +-0.26000 +awb +28.80000 +bwb +-228.00000 +cwb +11.50000 +ahres +36.50000 +bhres +1305.00000 +kbio +0.00250 +yres +0.90000 +CNresmin +12.00000 +CNresmax +27.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.08000 +bkres +-0.48000 +awb +33.00000 +bwb +-400.00000 +cwb +9.50000 +ahres +1.00000 +bhres +29.40000 +kbio +0.00150 +yres +0.82000 +CNresmin +15.00000 +CNresmax +20.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.06400 +bkres +0.05000 +awb +12.70000 +bwb +-58.00000 +cwb +6.20000 +ahres +10.00000 +bhres +329.00000 +kbio +0.00270 +yres +0.62000 +CNresmin +6.00000 +CNresmax +20.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.70000 +bkres +0.00000 +awb +5.5000 +bwb +0.00000 +cwb +5.5000 +ahres +0.18000 +bhres +0.00000 +kbio +0.011000 +yres +0.42000 +CNresmin +5.00000 +CNresmax +8.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.14000 +bkres +0.00000 +awb +5.50000 +bwb +0.00000 +cwb +5.50000 +ahres +0.05000 +bhres +0.00000 +kbio +0.00350 +yres +0.54000 +CNresmin +3.00000 +CNresmax +4.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.37000 +albedomulchresidus +0.10000 +Qmulchdec +1.00000 +CroCo +1.00000 +akres +0.00000 +bkres +0.60000 +awb +30.10000 +bwb +-275.00000 +cwb +6.00000 +ahres +0.91000 +bhres +16.20000 +kbio +0.01220 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +1.00000 +mouillabilmulch +0.40000 +kcouvmlch +0.05000 +albedomulchresidus +0.08000 +Qmulchdec +1.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.06400 +bkres +-0.26000 +awb +28.80000 +bwb +-228.00000 +cwb +11.50000 +ahres +36.50000 +bhres +1305.00000 +kbio +0.002500 +yres +0.90000 +CNresmin +12.00000 +CNresmax +27.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.08000 +bkres +-0.48000 +awb +33.00000 +bwb +-400.00000 +cwb +9.50000 +ahres +1.00000 +bhres +29.40000 +kbio +0.001500 +yres +0.82000 +CNresmin +15.00000 +CNresmax +20.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.06400 +bkres +0.05000 +awb +12.70000 +bwb +-58.00000 +cwb +6.20000 +ahres +10.00000 +bhres +329.00000 +kbio +0.002700 +yres +0.62000 +CNresmin +6.00000 +CNresmax +20.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.70000 +bkres +0.00000 +awb +5.5000 +bwb +0.00000 +cwb +5.5000 +ahres +0.18000 +bhres +0.00000 +kbio +0.01100 +yres +0.42000 +CNresmin +5.00000 +CNresmax +8.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.14000 +bkres +0.00000 +awb +5.50000 +bwb +0.00000 +cwb +5.50000 +ahres +0.05000 +bhres +0.00000 +kbio +0.003500 +yres +0.54000 +CNresmin +3.00000 +CNresmax +4.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.09800 +bkres +0.76000 +awb +15.40000 +bwb +-76.00000 +cwb +7.80000 +ahres +0.73000 +bhres +10.20000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +0.00000 +akres +0.00000 +bkres +0.00000 +awb +0.00000 +bwb +0.00000 +cwb +0.00000 +ahres +0.00000 +bhres +0.00000 +kbio +0.00000 +yres +0.00000 +CNresmin +0.00000 +CNresmax +0.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.030000 +bkres +1.13000 +awb +15.20000 +bwb +-80.00000 +cwb +7.80000 +ahres +0.91000 +bhres +25.90000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 +CroCo +1.00000 +akres +0.030000 +bkres +1.13000 +awb +15.20000 +bwb +-80.00000 +cwb +7.80000 +ahres +0.91000 +bhres +25.90000 +kbio +0.007600 +yres +0.62000 +CNresmin +8.00000 +CNresmax +100.00000 +qmulchruis0 +0.00000 +mouillabilmulch +0.00000 +kcouvmlch +0.00000 +albedomulchresidus +0.00000 +Qmulchdec +0.00000 diff --git a/inst/extdata/src_files/txt/V11.0/tempoparv6.sti b/inst/extdata/src_files/txt/V11.0/tempoparv6.sti new file mode 100644 index 00000000..642302d2 --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/tempoparv6.sti @@ -0,0 +1,50 @@ +codepluiepoquet +2 +nbjoursrrversirrig +15 +codecalferti +2 +ratiolN +0.00000 +dosimxN +40.00000 +codetesthumN +1 +codeNmindec +2 +rapNmindec +0.00100 +fNmindecmin +0.10000 +codetrosee +1 +codeSWDRH +2 +option_pature +2 +coderes_pature +3 +pertes_restit_ext +0.2 +Crespc_pature +7.4 +Nminres_pature +0.45 +eaures_pature +87.0 +coef_calcul_qres +7.53 +engrais_pature +3 +coef_calcul_doseN +16.25 +code_CsurNsol_dynamic +2 +humirac +1 +code_ISOP +2 +code_pct_legume +2 +pct_legum +0.5 diff --git a/inst/extdata/src_files/txt/V11.0/var.mod b/inst/extdata/src_files/txt/V11.0/var.mod new file mode 100644 index 00000000..9a91098d --- /dev/null +++ b/inst/extdata/src_files/txt/V11.0/var.mod @@ -0,0 +1,69 @@ +lai(n) +masec(n) +mafruit +HR(1) +HR(2) +HR(3) +HR(4) +HR(5) +resmes +drain +esol +et +zrac +tcult +AZnit(1) +AZnit(2) +AZnit(3) +AZnit(4) +AZnit(5) +Qles +QNplante +azomes +chargefruit +AZamm(1) +AZamm(2) +AZamm(3) +AZamm(4) +AZamm(5) +CNgrain +concNO3les +drat +fapar +hauteur +Hmax +humidite +LRACH(1) +LRACH(2) +LRACH(3) +LRACH(4) +LRACH(5) +mafrais +pdsfruitfrais +Qdrain +rnet +QNgrain +psibase +mabois +H2Orec +mafeuiljaune +mafeuilverte +humirac_mean +tempeff +deltai(n) +ulai(n) +tustress +efdensite +densite +exolai +dltams(n) +remobilj +exofac +exobiom +inn +innlai +inns +turfac +swfac +Qminh +Qminr diff --git a/inst/extdata/src_files/xml/examples/V10.0/file_plt.xml b/inst/extdata/src_files/xml/examples/V10.0/file_plt.xml index a23a98da..4bd46c44 100644 --- a/inst/extdata/src_files/xml/examples/V10.0/file_plt.xml +++ b/inst/extdata/src_files/xml/examples/V10.0/file_plt.xml @@ -219,11 +219,11 @@ + 0 + + no + 1.0 + 0.0 + + - + 0 @@ -253,7 +269,7 @@ -999 -999 - + @@ -263,14 +279,15 @@ 0.30000 0.02 - - @@ -337,26 +356,26 @@ -25.00000 -4.00000 @@ -411,11 +430,11 @@ @@ -469,8 +488,8 @@ 999 0 700 + 0 - -999 -999 @@ -520,14 +539,14 @@ 6000 999 999 - + 0.011 -999 -999 -999 -999 - + -999 -999 -999 @@ -556,5 +575,4 @@ - - + \ No newline at end of file diff --git a/inst/extdata/src_files/xml/examples/V10.1.0/file_sta.xml b/inst/extdata/src_files/xml/examples/V11.0/file_sta.xml similarity index 99% rename from inst/extdata/src_files/xml/examples/V10.1.0/file_sta.xml rename to inst/extdata/src_files/xml/examples/V11.0/file_sta.xml index ed322d7d..cf8b7582 100644 --- a/inst/extdata/src_files/xml/examples/V10.1.0/file_sta.xml +++ b/inst/extdata/src_files/xml/examples/V11.0/file_sta.xml @@ -1,5 +1,5 @@ - + 2.50000 0.00000 diff --git a/inst/extdata/src_files/xml/examples/V10.1.0/file_tec.xml b/inst/extdata/src_files/xml/examples/V11.0/file_tec.xml similarity index 80% rename from inst/extdata/src_files/xml/examples/V10.1.0/file_tec.xml rename to inst/extdata/src_files/xml/examples/V11.0/file_tec.xml index e5947d04..e426fcf7 100644 --- a/inst/extdata/src_files/xml/examples/V10.1.0/file_tec.xml +++ b/inst/extdata/src_files/xml/examples/V11.0/file_tec.xml @@ -1,15 +1,15 @@ - + - - - - - - - + + + + + + + 112 @@ -23,18 +23,20 @@ - - - - + + + 112 @@ -52,8 +54,14 @@ 2.00000 0.00000 + - + @@ -79,7 +87,7 @@ 999 999 - + @@ -95,21 +103,21 @@ 0 - - + 0 + 0 - + - - + + 178 @@ -179,8 +187,8 @@ - + \ No newline at end of file diff --git a/inst/extdata/src_files/xml/examples/V10.1.0/param_gen.xml b/inst/extdata/src_files/xml/examples/V11.0/param_gen.xml similarity index 98% rename from inst/extdata/src_files/xml/examples/V10.1.0/param_gen.xml rename to inst/extdata/src_files/xml/examples/V11.0/param_gen.xml index d118e176..98794224 100644 --- a/inst/extdata/src_files/xml/examples/V10.1.0/param_gen.xml +++ b/inst/extdata/src_files/xml/examples/V11.0/param_gen.xml @@ -1,5 +1,5 @@ - + 31 + + 0.2 + - 0.48000 + 0.48000 + 0.83 0.08150 diff --git a/inst/extdata/src_files/xml/examples/V10.1.0/param_newform.xml b/inst/extdata/src_files/xml/examples/V11.0/param_newform.xml similarity index 99% rename from inst/extdata/src_files/xml/examples/V10.1.0/param_newform.xml rename to inst/extdata/src_files/xml/examples/V11.0/param_newform.xml index 86d79e2a..c6ae78c9 100644 --- a/inst/extdata/src_files/xml/examples/V10.1.0/param_newform.xml +++ b/inst/extdata/src_files/xml/examples/V11.0/param_newform.xml @@ -1,5 +1,5 @@ - + - + -999.9 - + -999.9 - - + 999 + roots - + -999.9 - + -999.9 - - + 999 + roots - + roots - + roots - + roots