/// <summary>Set this root organ's biomass state.</summary> /// <param name="rootWt">The DM amount of root biomass (kg/ha).</param> /// <param name="rootN">The amount of N in root biomass (kg/ha).</param> /// <param name="rootDepth">The depth of root zone (mm).</param> public void SetBiomassState(double rootWt, double rootN, double rootDepth) { Depth = rootDepth; CalculateRootZoneBottomLayer(); var rootBiomassWt = MathUtilities.Multiply_Value(CurrentRootDistributionTarget(), rootWt); var rootBiomassN = MathUtilities.Multiply_Value(rootBiomassWt, MathUtilities.Divide(rootN, rootWt, 0.0, Epsilon)); Live.SetBiomass(rootBiomassWt, rootBiomassN); var blankArray = MathUtilities.Multiply_Value(CurrentRootDistributionTarget(), 0.0); Dead.SetBiomass(blankArray, blankArray); // assumes there's no dead material }