Class SimpleRootResidues
- All Implemented Interfaces:
net.simplace.sim.util.FWSimFieldContainer
The component takes daily dead root biomass per layer and adds living roots per layer on harvest.
NPK content of dead and living roots is distributed proportionally to the layers.
Calculation
Total dead root TDR and total living root biomass TLR are calculated from the inputs iDeadRootsRatePerLayer \(DR_i\) and iLivingRootsPerLayer \(LR_i\) \[ TDR = \sum_{i=1}^n DR_i \\ TLR = \sum_{i=1}^n LR_i \]
DeadRootsRatePerLayer \(R_i\) is calculated as:
\[ R_i = \begin{cases} DR_i + LR_i & \text{if } DoHarvest \\ DR_i & \text{else} \end{cases} \]
DeadRootsCRatePerLayer \(RC_i\) is calculated as:
\[ RC_i = \begin{cases} 0.5 \cdot DR_i + 0.5 \cdot LR_i & \text{if } DoHarvest \\ 0.5 \cdot DR_i & \text{else} \end{cases} \]
DeadRootsNRatePerLayer \(RN_i\) is calculated using iDeadRootsNRate \(DRN\) and iLivingRootsN \(LRN\):
\[ RN_i = \begin{cases} DR_i\cdot \frac{DRN}{TDR} + LR_i \cdot \frac{LRN}{TLR} & \text{if } DoHarvest \\ DR_i\cdot \frac{DRN}{TDR} & \text{else} \end{cases} \]
For P and K the P and K dead root rates are calculated accordingly:
\[ RP_i = \begin{cases} DR_i\cdot \frac{DRP}{TDR} + LR_i \cdot \frac{LRK}{TLR} & \text{if } DoHarvest \\ DR_i\cdot \frac{DRP}{TDR} & \text{else} \end{cases} \]
\[ RK_i = \begin{cases} DR_i\cdot \frac{DRK}{TDR} + LR_i \cdot \frac{LRK}{TLR} & \text{if } DoHarvest \\ DR_i\cdot \frac{DRK}{TDR} & \text{else} \end{cases} \]
Notice
The component is sensitive to the order. It has to run after root and plant NPK components, as it takes root biomass and NPK content as inputs.
On the other hand it uses the values also on harvest - when root and NPK components may have reset their states already.
A possible solution to this problem is to use following relative order
- root and plant NPK components
- harvest managmenet
- SimpleRootResidues
- Author:
- Gunther Krauss, guntherkrauss@uni-bonn.de
Component Variables
| Content Type | Name | Description | Data Type | Unit | Min Value | Max Value | Default Value |
|---|---|---|---|---|---|---|---|
| input | iDeadRootsKRate | Daily rate of dead roots K | DOUBLE | g/(m2 d) | - | - | 0.0 |
| input | iDeadRootsNRate | Daily rate of dead roots N | DOUBLE | g/(m2 d) | - | - | 0.0 |
| input | iDeadRootsPRate | Daily rate of dead roots P | DOUBLE | g/(m2 d) | - | - | 0.0 |
| input | iDeadRootsRatePerLayer | Daily rate of dead roots per layer | DOUBLEARRAY | g/(m2 d) | - | - | - |
| input | iDoHarvest | If true, living biomass that is not removed is added to the dead biomass rate | BOOLEAN | - | - | false | |
| input | iLivingRootsK | Weight of roots K | DOUBLE | g/m2 | - | - | 0.0 |
| input | iLivingRootsN | Weight of roots N | DOUBLE | g/m2 | - | - | 0.0 |
| input | iLivingRootsP | Weight of roots P | DOUBLE | g/m2 | - | - | 0.0 |
| input | iLivingRootsPerLayer | Weight of roots per layer | DOUBLEARRAY | g/m2 | - | - | - |
| out | DeadRootsCRatePerLayer | Daily dead roots C rate per layer, possibly incremented by roots when plant harvested | DOUBLEARRAY | g/(m2 d) | - | - | - |
| out | DeadRootsKRatePerLayer | Daily dead roots K rate per layer, possibly incremented by roots when plant harvested | DOUBLEARRAY | g/(m2 d) | - | - | - |
| out | DeadRootsNRatePerLayer | Daily dead roots N rate per layer, possibly incremented by roots when plant harvested | DOUBLEARRAY | g/(m2 d) | - | - | - |
| out | DeadRootsPRatePerLayer | Daily dead roots P rate per layer, possibly incremented by roots when plant harvested | DOUBLEARRAY | g/(m2 d) | - | - | - |
| out | DeadRootsRatePerLayer | Daily dead roots rate per layer, possibly incremented by roots when plant harvested | DOUBLEARRAY | g/(m2 d) | - | - | - |
-
Nested Class Summary
Nested classes/interfaces inherited from class net.simplace.sim.model.FWSimComponent
net.simplace.sim.model.FWSimComponent.TEST_STATE -
Field Summary
Fields inherited from class net.simplace.sim.model.FWSimComponent
iFieldMap, iFrequence, iInputMap, iJexlRule, iMasterComponentGroup, iName, iOrderNumber, isComponentGroup, iSimComponentElement, iSimModel, iVarMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected net.simplace.sim.model.FWSimComponentclone(net.simplace.sim.util.FWSimVarMap aVarMap) Create the FWSimVariables as interface for this SimComponentfillTestVariables(int aParamIndex, net.simplace.sim.model.FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm.protected voidinit()Initializes the fields by getting input and output FWSimVariables from VarMapprotected voidprocess()Process the algorithm and write the results back to VarMapMethods inherited from class net.simplace.sim.model.FWSimComponent
addVariable, bind, checkCondition, createSimComponent, createSimComponent, createSimComponent, createSimComponent, doProcess, getConstantVariables, getContentType, getCreateFormXML, getDescription, getEditFormXML, getFieldMap, getFrequence, getFrequenceRuleScript, getInputs, getInputVariables, getMasterComponentGroup, getName, getOrderNumber, getOutputVariables, getVariable, getVariableField, getVarMap, initialize, isConditionCheck, isVariableAvailable, performLinks, performLinks, readInputs, removeVariable, reset, runComponentTest, setVariablesDefault, toComponentLinkingXML, toDocXML, toGroupXML, toOutputDefinitionXML, toResourcesDataXML, toResourcesDefinitionXML, toString, toXML, writeVarInfos
-
Constructor Details
-
SimpleRootResidues
public SimpleRootResidues()Empty constructor used by class.forName()
-
-
Method Details
-
createVariables
Create the FWSimVariables as interface for this SimComponent- Specified by:
createVariablesin interfacenet.simplace.sim.util.FWSimFieldContainer- Specified by:
createVariablesin classnet.simplace.sim.model.FWSimComponent- See Also:
-
init
protected void init()Initializes the fields by getting input and output FWSimVariables from VarMap- Specified by:
initin classnet.simplace.sim.model.FWSimComponent- See Also:
-
process
protected void process()Process the algorithm and write the results back to VarMap- Specified by:
processin classnet.simplace.sim.model.FWSimComponent- See Also:
-
fillTestVariables
public HashMap<String,net.simplace.sim.util.FWSimVariable<?>> fillTestVariables(int aParamIndex, net.simplace.sim.model.FWSimComponent.TEST_STATE aDefineOrCheck) called for single component test to check the components algorithm.- Specified by:
fillTestVariablesin classnet.simplace.sim.model.FWSimComponent
-
clone
protected net.simplace.sim.model.FWSimComponent clone(net.simplace.sim.util.FWSimVarMap aVarMap) - Specified by:
clonein classnet.simplace.sim.model.FWSimComponent- See Also:
-