Exemple #1
0
Common::Common()
{	
	//get coefficients, Zhiqiang, 2011-8-10

	//N uptake shape coefficient, Line 287-298, readplant.f
	getNPShapeParameter(&(m_biomassNFraction1),&(m_biomassNFraction2),&(m_biomassNFraction3),
		&(m_biomassNShapeCoefficient1),&(m_biomassNShapeCoefficient2));

	//P uptake shape coefficient, Line 303-314, readplant.f
	getNPShapeParameter(&(m_biomassPFraction1),&(m_biomassPFraction2),&(m_biomassPFraction3),
		&(m_biomassPShapeCoefficient1),&(m_biomassPShapeCoefficient2));

	//CO2 radiation-use efficiency adjust shape coefficient, Line 270-279, readplant.f
	if(m_secondCO2Concentration == 330.0f) m_secondCO2Concentration = 660.0f;
	getScurveShapeParameter(
		m_radiationUseEfficiency * 0.01f,
		m_secondBiomassEnergyRatio * 0.01f,
		330.0f,
		m_secondCO2Concentration,
		&(m_CO2ShapeCoefficient1),
		&(m_CO2ShapeCoefficient2));

	//optimal leaf area development curve shape coefficient, Line 264, readplant.f
	getScurveShapeParameter(
		m_x1,m_x2,
		m_y1,m_y2,
		&(m_LAIShapeCoefficient1),
		&(m_LAIShapeCoefficient2));
}
float PGCommon::NPBiomassFraction(float x1, float x2, float x3, float frPHU)
{
    float ShapeCoefficient1 = 0.f;
    float ShapeCoefficient2 = 0.f;
    getNPShapeParameter(x1, x2, x3, &(ShapeCoefficient1), &(ShapeCoefficient2));
    return getNPFraction(x1, x3, ShapeCoefficient1, ShapeCoefficient2, frPHU);
}