/// <summary>Adds a given amount of detached root material (DM and N) to the soil's FOM pool, per layer.</summary> /// <param name="amountDM">The DM amount to detach (kg/ha).</param> /// <param name="amountN">The N amount to detach (kg/ha).</param> public void DetachBiomass(double[] amountDM, double[] amountN) { if (amountDM.Sum() + amountN.Sum() > 0.0) { FOMLayerLayerType[] FOMdataLayer = new FOMLayerLayerType[dmByLayer.Length]; for (int layer = 0; layer < dmByLayer.Length; layer++) { FOMType fomData = new FOMType(); fomData.amount = amountDM[layer]; fomData.N = amountN[layer]; fomData.C = fomData.amount * carbonFractionInDM; fomData.P = 0.0; // P not considered here fomData.AshAlk = 0.0; // Ash not considered here FOMLayerLayerType layerData = new FOMLayerLayerType(); layerData.FOM = fomData; layerData.CNR = 0.0; // not used here layerData.LabileP = 0.0; // not used here FOMdataLayer[layer] = layerData; } FOMLayerType FOMData = new FOMLayerType(); FOMData.Type = species.Name; FOMData.Layer = FOMdataLayer; nutrient.DoIncorpFOM(FOMData); } }
/// <summary>Adds a given amount of detached root material (DM and N) to the soil's FOM pool.</summary> /// <param name="amountDM">The DM amount to send (kg/ha)</param> /// <param name="amountN">The N amount to send (kg/ha)</param> public override void DetachBiomass(double amountDM, double amountN) { if (amountDM + amountN > 0.0) { FOMLayerLayerType[] FOMdataLayer = new FOMLayerLayerType[nLayers]; for (int layer = 0; layer < nLayers; layer++) { FOMType fomData = new FOMType(); fomData.amount = amountDM * FractionWt[layer]; fomData.N = amountN * FractionWt[layer]; fomData.C = amountDM * CarbonFractionInDM * FractionWt[layer]; fomData.P = 0.0; // P not considered here fomData.AshAlk = 0.0; // Ash not considered here FOMLayerLayerType layerData = new FOMLayerLayerType(); layerData.FOM = fomData; layerData.CNR = 0.0; // not used here layerData.LabileP = 0.0; // not used here FOMdataLayer[layer] = layerData; } FOMLayerType FOMData = new FOMLayerType(); FOMData.Type = speciesName; FOMData.Layer = FOMdataLayer; nutrientModel.DoIncorpFOM(FOMData); } }