read_param: Read STICS input parameters

View source: R/read_param.R

read_paramR Documentation

Read STICS input parameters

Description

Read STICS model input parameters from a pre-existing STICS input file. Generally used after calling set_usm().

Usage

read_param(dirpath = getwd(), param = NULL, ...)

read_ini(filepath = "ficini.txt")

read_general(filepath = "tempopar.sti")

read_tmp(filepath = "tempoparv6.sti")

read_plant(filepath = "ficplt1.txt", variety = NULL, max_variety = 30)

read_tec(
  filepath = "fictec1.txt",
  several_fert = T,
  several_thin = T,
  is_pasture = F
)

read_soil(filepath = "param.sol")

read_station(filepath = "station.txt")

read_usm(filepath = "new_travail.usm")

read_out_var(filepath = "var.mod")

Arguments

dirpath

Directory path

param

Parameter name. Optional, if not provided, the function return an object with all parameters

...

Helper to pass arguments from read_param() to the other functions

filepath

File path

variety

Integer (index of the variety) or character (name of the variety) to filter by variety.

max_variety

Maximum number of variety authorized (this is only for STICS compatibility)

several_fert

Is there several fertilization in the USM ?

several_thin

Is there several thinning in the USM ?

is_pasture

Is the plant a pasture ?

Value

A list of all parameters:

ini

Initialization parameters

general

General parameters

tec

Technical parameters

plant

Plant parameters

soil

Soil parameters

station

Station parameters

output

The output variables the user require from STICS

The function can return several sub-lists for each plant and tec if mixed crops, numbered by usage

Note

Users generally only use read_param that identify parameters for other functions and call them.

See Also

set_param().

Examples

## Not run: 
# Read the interrow distance parameter:

library(sticRs)
read_param(param='interrang')


## End(Not run)


VEZY/sticRs documentation built on Oct. 26, 2023, 7:37 a.m.