![]() |
LandscapeDNDC 1.37.0
|
Functions | |
| build_parent_map (root=xmlparameters) | |
| find_species (root, mnemonic) | |
| _get_from_default (root, name_lower) | |
| get_par (name, species_mnemonic, root=xmlparameters, parent_map=parent_map) | |
| get_par (_name, _type='mean') | |
| Helpers. | |
| weibull (_x, _p1, _p2, _p3=1.0) | |
| Response functions. | |
| temp (_x, _p1, _p2) | |
| get_par_range (_name) | |
| plot_response_row (_ax, _func, _x, _names, _xlabel, _ylabel, _xlim=None, _ylim=None, _legend=False) | |
| plot_response (_filename, _func, _x, _names, _xlabel, _ylabel, _xlim=None, _ylim=None, _legend=False, _adjust=None) | |
| plot_single (_filename, _func, _x, _xlabel, _ylabel, _xlim=None, _ylim=None) | |
| t_kernel (_x, _t_opt, _gauss_exp, _e0, _q10) | |
| t_microbial_e0 (_x, _gauss_exp, _t_opt, _e0) | |
| t_microbial_q10 (_x, _gauss_exp, _t_opt, _q10) | |
| ph_logistic (_x, _ph_50, _width) | |
| ph_bell (_x, _half_width, _exponent, _ph_opt) | |
| ph_cutoff (_fact) | |
| t_logistic (_x, _t_50, _width) | |
| aged_cn (_cn, _cn_undamped, _exponent) | |
| depth_logistic (_z, _z_50, _steepness) | |
| get_par (_name, _xml) | |
| Helpers. | |
Variables | |
| fig = plt.figure( figsize=(7, 4)) | |
| zs = np.array([temp(x, t1, t2) * weibull(y, w1, w2, w3) for x,y in zip(np.ravel(X), np.ravel(Y))]) zs = np.array([2.0 / (1.0/temp(x, t1, t2) + 1.0/weibull(y, w1, w2, w3)) for x,y in zip(np.ravel(X), np.ravel(Y))]) Z = zs.reshape(X.shape) | |
| temp = np.arange(30, 50, 0.1) | |
| _xlim | |
| Microbial processes. | |
| _ylim | |
| Nitrification. | |
| p1 = get_par('METRX_F_CHEMODENIT_T_1') | |
| Decomposition and humification. | |
| p_mix = get_par('METRX_F_PERTUBATION_MIX') | |
| Bioturbation (D_eff_dailyturbation_sl) response factors (constants are hard-coded in soilchemistry-metrx-physics-chemistry.cpp) | |
Response functions of MeTrX plotted for the doxygen documentation. Parameter values (mean, min, max) are read from resources/parameters-site.xml, figures are written to ../figures/.
|
protected |
Fallback: get parameter from species mnemonic='none'.
References find_species().
Referenced by get_par().


| figures.aged_cn | ( | _cn, | |
| _cn_undamped, | |||
| _exponent ) |
C:N modifier of the aged pool turnover (site parameters _CN_1, _CN_2). MeTrX_decomposition: min(1, (CN_1 / (C:N))^CN_2), i.e. undamped up to a C:N of CN_1 and increasingly damped above it.
References get_par(), plot_response(), plot_response_row(), and plot_single().

| figures.build_parent_map | ( | root = xmlparameters | ) |
Build a dict: child_element -> parent_element.
References build_parent_map().
Referenced by build_parent_map(), and get_par().


| figures.depth_logistic | ( | _z, | |
| _z_50, | |||
| _steepness ) |
Depth damping of methane production (site parameters _DEPTH_1 = 50 % depth, _DEPTH_2).
References plot_response().

| figures.find_species | ( | root, | |
| mnemonic ) |
Return the first <species> element with the given mnemonic.
Referenced by _get_from_default(), and get_par().

| figures.get_par | ( | _name | , |
| _type | = 'mean' ) |
Helpers.
Return value ('mean'), 'min' or 'max' of a site parameter. | figures.get_par | ( | _name, | |
| _type = 'mean' ) |
Helpers.
Return value ('mean'), 'min' or 'max' of a site parameter. References get_par(), and weibull().

| figures.get_par | ( | name, | |
| species_mnemonic, | |||
| root = xmlparameters, | |||
| parent_map = parent_map ) |
name: parameter name (string), e.g. 'aejm' species_mnemonic: e.g. ':corns:' or ':poaceae:' root: root <speciesparameters> element parent_map: optional precomputed parent map (for efficiency)
References _get_from_default(), build_parent_map(), find_species(), and get_par().
Referenced by aged_cn(), get_par(), get_par(), and get_par_range().


| figures.get_par_range | ( | _name | ) |
Return dictionary with mean, min and max of a site parameter.
References get_par().
Referenced by plot_response_row().


| figures.ph_bell | ( | _x, | |
| _half_width, | |||
| _exponent, | |||
| _ph_opt ) |
MeTrX_get_fact_ph_bell (arguments in order of site parameters _1, _2, _3).
| figures.ph_cutoff | ( | _fact | ) |
Processes with pH response below FACT_PH_MIN are not calculated (SoilChemistryMeTrX::FACT_PH_MIN).
References plot_response().
Referenced by t_logistic().


| figures.ph_logistic | ( | _x, | |
| _ph_50, | |||
| _width ) |
MeTrX_get_fact_ph_logistic: increasing with pH for _width > 0, decreasing for _width < 0.
Referenced by t_logistic().

| figures.plot_response | ( | _filename, | |
| _func, | |||
| _x, | |||
| _names, | |||
| _xlabel, | |||
| _ylabel, | |||
| _xlim = None, | |||
| _ylim = None, | |||
| _legend = False, | |||
| _adjust = None ) |
Plot response with sensitivity to each parameter (see plot_response_row) and save figure.
References plot_response_row().
Referenced by aged_cn(), depth_logistic(), ph_cutoff(), and t_logistic().


| figures.plot_response_row | ( | _ax, | |
| _func, | |||
| _x, | |||
| _names, | |||
| _xlabel, | |||
| _ylabel, | |||
| _xlim = None, | |||
| _ylim = None, | |||
| _legend = False ) |
Plot _func(x, *parameters) on a row of axes. The first panel shows the response with all parameters at their mean value. Each further panel varies one parameter between min (blue), mean (black) and max (red) while the other parameters are kept at their mean value.
References get_par_range().
Referenced by aged_cn(), and plot_response().


| figures.plot_single | ( | _filename, | |
| _func, | |||
| _x, | |||
| _xlabel, | |||
| _ylabel, | |||
| _xlim = None, | |||
| _ylim = None ) |
Plot response without parameter variation and save figure.
Referenced by aged_cn().

| figures.t_kernel | ( | _x, | |
| _t_opt, | |||
| _gauss_exp, | |||
| _e0, | |||
| _q10 ) |
MeTrX_get_fact_t_microbial, the temperature response shared by all rate processes. Below the optimum a Q10 (_q10 > 0) or a Lloyd & Taylor form (_e0 > 0) applies, above it and otherwise a gaussian. Arguments in the order of the C++ function.
References temp.
Referenced by t_microbial_e0(), and t_microbial_q10().

| figures.t_logistic | ( | _x, | |
| _t_50, | |||
| _width ) |
Temperature inhibition of nosZ (site parameters _T_1 = half response, _T_2 = width).
References ph_cutoff(), ph_logistic(), and plot_response().

| figures.t_microbial_e0 | ( | _x, | |
| _gauss_exp, | |||
| _t_opt, | |||
| _e0 ) |
Kernel with Lloyd & Taylor below the optimum (site parameters _T_EXP_1, _T_EXP_2, _T_E0).
References t_kernel().

| figures.t_microbial_q10 | ( | _x, | |
| _gauss_exp, | |||
| _t_opt, | |||
| _q10 ) |
Kernel with a Q10 below the optimum (site parameters _T_EXP_1, _T_EXP_2, _Q10).
References t_kernel().

| figures.temp | ( | _x | , |
| _p1 | , | ||
| _p2 | ) |
Gaussian around the optimum _p2 with width _p1, used above the optimum by the kernel.
|
protected |
Microbial processes.
Methane production and oxidation.
Denitrification.
|
protected |
Nitrification.
Anaerobic volume fraction and pore connectivity.
| figures.fig = plt.figure( figsize=(7, 4)) |
zs = np.array([temp(x, t1, t2) * weibull(y, w1, w2, w3) for x,y in zip(np.ravel(X), np.ravel(Y))]) zs = np.array([2.0 / (1.0/temp(x, t1, t2) + 1.0/weibull(y, w1, w2, w3)) for x,y in zip(np.ravel(X), np.ravel(Y))]) Z = zs.reshape(X.shape)
ax.plot_surface(X, Y, Z, cmap="winter", rstride=1, cstride=1) ax.set_title('Temperature-moisture factor') ax.set_xlabel('T [oC]') ax.set_ylabel('wfps [-]') ax.set_zlabel('response [-]') plt.savefig(script_dir+"/../figures/temp_moist.png")
| figures.temp = np.arange(30, 50, 0.1) |
Gaussian around the optimum _p2 with width _p1, used above the optimum by the kernel.
Referenced by t_kernel().