rmacroliteDegradation-methods: Fetch or set substance degradation paremeters in an imported...

Description Usage Arguments Value

Description

Fetch or set substance degradation paremeters in an imported MACRO par-file: DT50 [days], reference temperature at which the DT50 was measured [degrees Celcius], pF at which the DT50 was measured [log10(cm)], the exponent of the temperature response and the exponent of the moisture response (The DT50 is assigned to four parameters DEGMAL, DEGMAS, DEGMIL and DEGMIS, and the other parameters are TREF, PF1, TRESP and EXPB in MACRO par-files, respectively). The function either fetches all these parameters or set them all at once.

Usage

1
2
3
4
5
6
7
8
9
rmacroliteDegradation(x, ...)

## S3 method for class 'macroParFile'
rmacroliteDegradation(x, ...)

rmacroliteDegradation( x, dt50_depth_f = NULL, ... ) <- value

## S3 replacement method for class 'macroParFile'
rmacroliteDegradation(x, dt50_depth_f = NULL, ...) <- value

Arguments

x

A macroParFile, as imported with rmacroliteImportParFile-methods

...

Additional parameters passed to specific methods. Currently not used.

dt50_depth_f

A vector of numeric-values with as many values as layers in the imported par-file x. When not NULL, the dt50 of each layer will be set as dt50 * dt50_depth_f corresponding to the layer, where dt50 is the value of the substance half life as given in the parameter value. If NULL (the default), dt50_depth_f is calculated internally from the original degradation parameters in x. Please notice that when calculated internally, dt50_depth_f is rounded to 4-digits, to avoid problems of numerical accuracy.

value

Vector of five numeric-value, optionally with named "dt50", "dt50_ref_temp", "dt50_pf", "exp_temp_resp" and "exp_moist_resp" (observe the lowercase). Value of the degradation parameters (see above) to be set in the par-file x.

Value

Returns a list with two items, "layer" (layer-specific parameters) and "site" (site-specific parameters, i.e. parameters that do not vary with depth or with the crop). "layer" is a data.frame with the following columns layer_no, dt50 and dt50_depth_f, (Layer number, DT50 [days] and the depth factor of the DT50 (DT50 horizon/ DT50 first horizon), respectively). dt50_depth_f is not a MACRO input parameters and is here calculated from the dt50 of different horizons. "site" is a vector of named numeric values with the follwing items dt50_ref_temp, dt50_pf, exp_temp_resp and exp_moist_resp (reference temperature at which the DT50 was measured [degrees Celcius], pF at which the DT50 was measured [log10(cm)], the exponent of the temperature response, the exponent of the moisture response)


julienmoeys/rmacrolite documentation built on May 22, 2019, 6:31 p.m.