コード例 #1
0
 private void OnPlantSowing(object sender, SowingParameters data)
 {
     Reset();
     Params = calcCAMPVrnRates.CalcCultivarParams(FLNparams, EnvData);
     summary.WriteMessage(this, "The following FLN parameters were used for " + data.Cultivar, MessageType.Diagnostic);
     summary.WriteMessage(this, "FLN LV = " + FLNparams.LV.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "FLN SV = " + FLNparams.SV.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "FLN LN = " + FLNparams.LN.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "FLN SN = " + FLNparams.SN.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "The following Vrn expression rate parameters have been calculated", MessageType.Diagnostic);
     summary.WriteMessage(this, "BaseDVrn1 = " + Params.BaseDVrn1.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "MaxDVrn1  = " + Params.MaxDVrn1.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "MaxIpVrn2 = " + Params.MaxIpVrn2.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "MaxDpVrn2 = " + Params.MaxDpVrn2.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "BaseDVrn3 = " + Params.BaseDVrn3.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "MaxDVrn3  = " + Params.MaxDVrn3.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "MaxDVrnX  = " + Params.MaxDVrnX.ToString(), MessageType.Diagnostic);
     summary.WriteMessage(this, "IntFLNvsTSHS     = " + Params.IntFLNvsTSHS.ToString(), MessageType.Diagnostic);
 }
コード例 #2
0
        /// <summary>
        /// Takes observed (or estimated) final leaf numbers for genotype with (V) and without (N) vernalisation in long (L)
        /// and short (S) photoperiods and works through calculation scheme and assigns values for vrn expresson parameters
        /// </summary>
        /// <param name="FLNset">Set of Final leaf number observations (or estimations) for genotype</param>
        /// <param name="EnvData">Controlled environment conditions used when observing FLN set</param>
        /// <returns>CultivarRateParams</returns>
        public CultivarRateParams CalcCultivarParams(
            FinalLeafNumberSet FLNset, FLNParameterEnvironment EnvData)

        {
            //////////////////////////////////////////////////////////////////////////////////////
            // Get some parameters organized and set up structure for results
            //////////////////////////////////////////////////////////////////////////////////////

            // Initialise structure to hold vern rate coefficients
            CultivarRateParams Params = new CultivarRateParams();

            // Get some other parameters from phenology
            double      maxLAR   = phenology.FindChild <IFunction>("MaxLAR").Value();
            double      minLAR   = phenology.FindChild <IFunction>("MinLAR").Value();
            double      PTQhf    = phenology.FindChild <IFunction>("PTQhf").Value();
            LARPTQmodel LARmodel = phenology.FindChild <LARPTQmodel>("LARPTQmodel");

            //Calculate base phyllochron
            Params.BasePhyllochron = 1 / LARmodel.CalculateLAR(1.0, maxLAR, minLAR, PTQhf);

            //////////////////////////////////////////////////////////////////////////////////////
            // Calculate phase durations (in Base Phyllochrons)
            //////////////////////////////////////////////////////////////////////////////////////

            // Base phyllochron duration of Emergence (EmergBP)
            double EmergBP = EnvData.TtEmerge / Params.BasePhyllochron;

            //Haun stage duration of vernalisation treatment period
            double VrnTreatTtDurat = EnvData.VrnTreatTemp * EnvData.VrnTreatDuration;
            double VernTreatBP     = VrnTreatTtDurat / Params.BasePhyllochron;

            // The soonest a wheat plant may exhibit vern saturation
            double MinVSBP = ConvertHStoBP(1.1);

            // Minimum Haun stage duration from vernalisation saturation to terminal spikelet under long day conditions (MinHSVsTs)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            // Assume maximum of 3, Data from Lincoln CE (CRWT153) showed varieties that harve a high TSHS hit VS ~3HS prior to TS
            double MinBPVsTs = Math.Min(ConvertHStoBP(3.0), (ConvertHStoBP(FLNset.LV) - MinVSBP) / 2.0);

            // The HS duratin from Vern sat to final leaf under long Pp vernalised treatment
            double VSBP_FL_LV = ConvertHStoBP(FLNset.LV) - MinVSBP - MinBPVsTs;

            // The Intercept of the assumed relationship between FLN and TSHS for genotype (IntFLNvsTSHS)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            Params.IntFLNvsTSHS = Math.Min(2.85, VSBP_FL_LV / 1.1);

            // Calculate Terminal spikelet duration (TSHS) for each treatment from FLNData
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double TSBP_LV = ConvertHStoBP(camp.calcTSHS(FLNset.LV, Params.IntFLNvsTSHS));
            double TSBP_LN = ConvertHStoBP(camp.calcTSHS(FLNset.LN, Params.IntFLNvsTSHS));
            double TSBP_SV = ConvertHStoBP(camp.calcTSHS(FLNset.SV, Params.IntFLNvsTSHS));
            double TSBP_SN = ConvertHStoBP(camp.calcTSHS(FLNset.SN, Params.IntFLNvsTSHS));

            // Photoperiod sensitivity (PPS) is the difference between TSBP at 8 and 16 h pp under full vernalisation.
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double PPS = Math.Max(0, TSBP_SV - TSBP_LV);

            // Vernalisation Saturation duration (VSBP) for each environment from TSBP and photoperiod response
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            // Terminal spikelet duration less the minimum duration from VS to TS under long day treatment
            double VSBP_LV = Math.Max(MinVSBP, TSBP_LV - MinBPVsTs);
            double VSBP_LN = Math.Max(MinVSBP, TSBP_LN - MinBPVsTs);
            // Terminal spikelet duration less the minimum duration from VS to TS and the photoperiod extension of VS to TS under short day treatment
            double VSBP_SV = Math.Max(MinVSBP, TSBP_SV - (MinBPVsTs + PPS));
            double VSBP_SN = Math.Max(MinVSBP, TSBP_SN - (MinBPVsTs + PPS));

            ////////////////////////////////////////////////////////////////////////
            // Calculate Photoperiod sensitivities
            ////////////////////////////////////////////////////////////////////////

            // Maximum delta for Upregulation of Vrn3 (MaxDVrn3)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            // Occurs under long Pp conditions, Assuming Vrn3 increases from 0 - VernSatThreshold between VS to TS and this takes
            // MinBPVsTs under long Pp conditions.
            Params.MaxDVrn3 = camp.VrnSatThreshold / MinBPVsTs;


            // Base delta for upredulation of Vrn3 (BaseDVrn3)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            // Occurs under short Pp conditions, Assuming Vrn3 increases from 0 - VernSatThreshold from VS to TS
            // and this take MinBPVSTs plus the additional BP from short Pp delay.
            Params.BaseDVrn3 = camp.VrnSatThreshold / (MinBPVsTs + PPS);

            //// Under long day conditions Vrn3 expresses at its maximum rate and plant moves quickley from VS to TS.
            //// Genotypic variation in MaxDVrn3 will contribute to differences in earlyness per se
            //// Under shord day condition Vrn3 expressssion may be slower, taking longer to get from VS to TS
            //// Photoperiod sensitiviey of a genotype is determined by differences in BaseVrn3 and MaxVrn3.
            //// if the two values are the same the genotype will not show photoperiod sensitivity
            //// the greater the difference the more resonse the genotype will show to photoperiod

            //////////////////////////////////////////////////////////////////
            // Calculate Base development rate
            //////////////////////////////////////////////////////////////////

            // Base delta for upregulation of Vrn1 (BaseDVrn1)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            // The rate of expression is calculated as the amount of expression divided by the duration
            // Under short Pp treatment Vrn2 is absent so the amount of Vrn1 expression required for VS to occur is given by VernalisationThreshold
            // Under non vernalising conditions Vrn1 expression will happen at the base rate.
            // VrnX expression is absent in short days so baseVrn1 is the only contributor to the timing of VS
            // BaseVrn1 expression starts when the seed is imbibed so the duration of expression is emergence plus VS
            Params.BaseDVrn1 = camp.VrnSatThreshold / (VSBP_SN + EmergBP);

            // Genotypic variation in BaseDVrn1 contributes to intrinsic earlyness.
            // A genotype with high BaseDVrn1 will reach VS quickly regardless of vernalisation exposure
            // A genotype with low BaseDVrn1 will reach VS slowly if not vernalised but the duration of VS may be decreased
            // by exposure to vernalising temperatures depending on cold vernalisation sensitivity

            //////////////////////////////////////////////////////////////////////////////////////////
            // Cold Vernalisation Sensitivity Calculations
            //////////////////////////////////////////////////////////////////////////////////////////

            // Calcualtions of vernalisation sensitivity use data from short Pp treatments because Vrn2 and Vrnx are absent
            // in these conditions and measured vernalistion response will be the result of Vrn1 expression alone.

            // Vernalisation Sensitivity (VS) measured simply as the difference between SV and SN treatuemnts
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double VS = VSBP_SN - VSBP_SV;

            // To determine the effects of vernalisation treatment on Vrn1 expression we need to seperate these from baseVrn1 expression
            // BaseVrn1 expression at VSBP ('BaseVrn1AtVSBP_SV')
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double BaseVrn1AtVSBP_SV = (VSBP_SV + EmergBP) * Params.BaseDVrn1;

            // Any accelleration in VS due to cold exposure under short Photoperiod will be due to methatalated Vrn1 expression
            // The amount of Vrn1 required for VS is given by the Vernalisation Threshold so the amount of methalated Vrn expression
            // at VS must be this threshold less the amount of vrn1 contributed by base Vrn1 expression over this duration
            // Methalated Cold Vrn1 expression under short Pp vernalisiation treatment (MethColdVern1AtTrans_SV)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double MethColdVern1AtTrans_SV = Math.Max(0.0, camp.VrnSatThreshold - BaseVrn1AtVSBP_SV);

            // Cold Vrn 1 expression must first be upregulated to a methalation threshold and any further expression beyond this
            // threshold is methalated into a persistant vernalisation response.  Thus the total expression of cold Vrn1 due to
            // the vernalisation treatment applied is givin by MethColdVern1AtTrans_SV plus the Methalation Threshold
            // Cold Vern1 expression at VSBP under short Pp vernalised conditions (ColdVrn1AtVSBP_SV)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double ColdVrn1AtVSBP_SV = camp.MethalationThreshold + MethColdVern1AtTrans_SV;

            // The Base Phyllochron duration over which vernalisation temperatures will have an effect is the minimum of the cold
            // treatment duration (VernTreatBP) and the BP when vernalisation occurs as cold exposure after this is irrelevent
            // Effective BP duration of cold treatment (EffectiveColdBP)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double EffectiveColdBP = Math.Min(VSBP_SV + EmergBP, VernTreatBP);

            // Then we calculate the rate as the amount divided by the duration
            // Rate of cold Vrn1 expression at the vernalisation treatment temperture ('DVrn1AtVrnTreatTemp')
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double DVrn1AtVrnTreatTemp = ColdVrn1AtVSBP_SV / EffectiveColdBP;

            // This rate is dependent on the temperature of the duration treatment and can be extrapolated to the maximum rate (at 0oC)
            // using the exponential funciton proposed by Brown etal 2013 Annals of Botany.
            // dVrn1 = MaxdVrn1 * np.exp(k*VrnTreatTemp) as DVrn1 At VrnTreatTemp' is known
            // MaxDVrn1 is set to vero for genotypes with VS < 0.5 as these varieties are insensitive and calculated rates of MaxDVrn1 are simply amplifying noise
            // Maximum upregulation delta Vrn1 (MaxDVrn1)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            if (VS > 0)
            {
                Params.MaxDVrn1 = DVrn1AtVrnTreatTemp / Math.Exp(camp.k * EnvData.VrnTreatTemp);
            }
            else
            {
                Params.MaxDVrn1 = 0.0;
            }

            // Genotypic variation in MaxDVrn1 combine with BaseDVrn1 to determine cold temperature vernalisatin sensitiviy
            // A genotype with low BaseDVrn1 and high MaxDVrn1 will show high vernalisation sensitivity and sensitivity will decline
            // either BaseDVrn1 increasees of MaxDVrn1 decreases.

            ////////////////////////////////////////////////////////////////////////////
            // Photoperiod effects on vernalisation
            ////////////////////////////////////////////////////////////////////////////

            // The parameters calculated above deal with photoperiod sensitivity in fully vernalised crops and vernalisation sensitivity
            // under short photoperiod where cold is the only factor driving vernalisation response.
            // Under long days photoperiod can also interact with vernalisation, either slowing the rate of vernalisation or speding it up

            // Vernalisation photoperiod sensitivy parameter (VPPS) is calculated to determine what effect photoperiod will have.
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double VPPS = 1 - ((VSBP_LN + EmergBP) * Params.BaseDVrn1);

            // Genotypes that have a negative VPPS demonstrate short day vernalisation.  Under long days vernalisation requirement is reduced
            // This is caused by the expression of Vrn2 which must be blocked by additional expression of Vrn1 meaning vernalisation takes longer.
            // The assumed mechanisum for Vrn2 is that it is expressed to a potential level and that one unit of Vrn1 will block the effective
            // expression of Vrn2 so actual Vrn2 expression will always be lower than potential
            // We can make some assumptions about the amounts of Vrn2 expression under long Pp conditions to calcualte rates
            // Firstly, under un-vernalised conditions we can calculate the potential Vrn2 expression simply from
            // the amount of BaseVrn1 expression up to VSBP

            // Potential Vern2 expression at VS under long Pp UnVerrnalised treatment (pVrn2AtVSBP_LV)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double pVrn2AtVSBP_LN = (VSBP_LN + EmergBP) * Params.BaseDVrn1;

            // Under full vernalised treatment Vrn2 expression must be less than or equal to VernalisationThreshold at the time of VS.
            // If we assume it is equal to VernalisationThreshold this provides us with another amount of pVrn2
            // Potential Vern2 expression at VS under long Pp Vernalised treatment (pVrn2AtVSBP_LV)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double pVrn2AtVSBP_LV = camp.VrnSatThreshold;

            // If we regress these two potential Vrn2 amounts against their durations to VS the slope give us a rate of Vrn2 expression
            // The resulting rate needs to always be less than BaseDVrn1 so Vrn1 can catch up with Vrn2 to cause vernalisation
            // the amount of Vrn2 needs to quickly exceed BaseDVrn1 soon after emergence to achieve a delay in VS.
            // The intercept of the regression quantifys how much Vrn2 would be expressed at emergence.

            // Initial potential Vrn2 at emergence (IPVrn2) and potential Vrn2 rate there after (DpVrn2)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            Params.MaxIpVrn2 = 0;
            Params.MaxDpVrn2 = 0;

            //Vrn2 parameters only relevent for genotypes with nevaitve VPPS and a low BaseDVrn1.  Genotypes with a high base
            if (VPPS < 0) //and (BaseDVrn1 < 0.4):
            {
                if (VSBP_LN - VSBP_LV == 0)
                {
                    Params.MaxIpVrn2 = pVrn2AtVSBP_LN;
                }
                else
                {
                    Params.MaxDpVrn2 = Math.Max(0, (pVrn2AtVSBP_LN - pVrn2AtVSBP_LV) / (VSBP_LN - VSBP_LV));
                    Params.MaxIpVrn2 = (pVrn2AtVSBP_LV) - (VSBP_LV * Params.MaxDpVrn2);
                    if (Params.MaxDpVrn2 >= (Params.BaseDVrn1 * 0.99)) //If DpVrn2 exceeds baseVrn1 we need to do some forcing so it doesn't
                    {
                        double BaseVrn1AtVSBP_LV = (VSBP_LV + EmergBP) * Params.BaseDVrn1;
                        Params.MaxDpVrn2 = Math.Max(0, (pVrn2AtVSBP_LN - (BaseVrn1AtVSBP_LV * 1.2)) / (VSBP_LN - VSBP_LV));
                        Params.MaxIpVrn2 = (pVrn2AtVSBP_LN) - (VSBP_LN * Params.MaxDpVrn2);
                    }
                }
            }

            // Genotypes that have a positive VPPS show an acelleration of vernalisation under long day conditions.
            // The molecular mechanium for this is uncertain so we attrubute it to VrnX
            // Under Long Pp unvernalised varieties will reach VS BP sooner than BaseVrn1 expresion determines.
            // BaseVrn1 expression at VS under long Pp unvernalised treatment (BaseVrn1AtVSBP_LN)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            double BaseVrn1AtVSBP_LN = Math.Min(camp.VrnSatThreshold, (VSBP_LN + EmergBP) * Params.BaseDVrn1);

            // If we assume the expression of VrnX upregulates Vrn1 an equivelent amount then the amount of VrnX expression can be
            // Estimated as the difference between Base Vrn1 at VS and the Vernalisation threshold.  The duration of expression is
            // VSBP assuming VrnX is expressed from emergence until VS.
            // Maximum rate of Vrnx Expression (MaxDVrnX)
            // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            Params.MaxDVrnX = (camp.VrnSatThreshold - BaseVrn1AtVSBP_LN) / (VSBP_LN);

            return(Params);
        }
コード例 #3
0
ファイル: CalcCAMPVrnRates.cs プロジェクト: chuankang/ApsimX
        /// <summary>
        /// works through calculation scheme and assigns values to each parameter
        /// </summary>
        /// <param name="FLNset">Final leaf number set observations (or estimations) for cultivar</param>
        /// <param name="TreatmentTtDuration">Thermal time duration of vernalisation treatment</param>
        /// <param name="TtEmerge">Thermal time from imbibing to emergence</param>
        /// <param name="Tt">Temperature during vernalisatin treatment</param>
        /// <returns></returns>
        public CultivarRateParams CalcCultivarParams(
            FinalLeafNumberSet FLNset,
            double TreatmentTtDuration, double TtEmerge, double Tt)

        {
            CultivarRateParams Params = new CultivarRateParams();

            //Haun stage duration of vernalisation treatment period
            double VernTreatHS = TreatmentTtDuration / (camp.BasePhyllochron * 0.75);
            // Haun stage equivelents from imbibing to Emergence
            double EmergHS = TtEmerge / (camp.BasePhyllochron * 0.75);
            // Haun stage duration from vernalisation saturation to terminal spikelet under long day conditions
            double L_HSVsTs = 3.0;

            // Calculate TSHS for each envronment set from FLNData
            double TSHS_LV = camp.calcTSHS(FLNset.LV);
            double TSHS_LN = camp.calcTSHS(FLNset.LN);
            double TSHS_SV = camp.calcTSHS(FLNset.SV);
            double TSHS_SN = camp.calcTSHS(FLNset.SN);

            // Photoperiod sensitivity (PPS)
            // the difference between TSHS at 8 and 16 h pp under
            //full vernalisation.
            double PPS = Math.Max(0, TSHS_SV - TSHS_LV);

            // Maximum delta for Upregulation of Vrn3 (MaxDVrn3)
            // Occurs under long Pp conditions
            // Assuming Vrn3 increases from 0 - 1 between VS to TS and this takes
            // 3 HS under long Pp conditions.
            double MaxDVrn3 = 1.0 / L_HSVsTs;

            // Base delta for upredulation of Vrn3 (BaseDVrn3)
            // Occurs under short Pp conditions
            // Assuming Vrn3 infreases from 0 - 1 from VS to TS
            // and this take 3 HS plus the additional HS from short Pp delay.
            Params.BaseDVrn3 = 1.0 / (L_HSVsTs + PPS);

            // Vernalistion Saturation Haun Stage under 8h Nil vern conditins  (VSHS8hNil)
            // Determine how many HS it would take to express Vrn3 == 1.0
            // and subtract this from TSHS8hNill.
            // Bound to CompetenceHS as Vernalisation won't occur before this.
            double VSHS_SN = Math.Max(camp.CompetenceHS, TSHS_SN - (L_HSVsTs + PPS));

            // Base delta for upregulation of Vrn1 (BaseDVrn1)
            // Occurs under non vernalising conditions
            // Assuming Vernalisation saturation occurs when Vrn1 == Vrn1Target
            // under short Pp (no Vrn2) Vrn1Target = 1.0.
            // Need to include time from imbib to emerge in duration
            Params.BaseDVrn1 = 1.0 / (VSHS_SN + EmergHS);

            // Vernalisation Saturation Haun Stage under 16h Nil vern conditions (VSHS16hNil)
            // Assuming Vern saturation occurs 3.0 HS before TSHS16hNil
            // 3.0 is HS from VS to TS under long Pp conditions
            // Bound to CompetenceHS as Vernalisation won't occur before this.
            double VSHS_LN = Math.Max(camp.CompetenceHS, TSHS_LN - L_HSVsTs);

            // Long day Increase in Vrn1Target (Vrn1TargetInc)
            // The extention in VSHS due to the action of Vrn2 under long days
            // Work out how much VSHS is delayed under long Pp conditions.
            // Multiply this by BaseDVrn1 to get how much more Vrn1 was
            // expressed before vernalisation
            double L_Vrn1TargetInc = (VSHS_LN - VSHS_SN) * Params.BaseDVrn1;

            // Maximum delta for upregulation of Vrn2 (MaxDVrn2)
            // Occurs under long day conditions
            // LDVrnTargetInc is divided by the HS duration of Vrn2 expression
            // which goes from CompetenceHS to VS.
            Params.MaxDVrn2 = Math.Max(0.0, MathUtilities.Divide(L_Vrn1TargetInc, (VSHS_LN - camp.CompetenceHS), 0));

            // Vernalistion Saturation Haun Stage under 8h Full vern conditions (VSHS8hFull)
            // Assuming VSHS occurs 3 HS pluss the HS delay from short Pp prior
            // prior to TSHS
            // Bound to CompetenceHS as Vernalisation won't occur before this.
            double VSHS_SV = Math.Max(camp.CompetenceHS, TSHS_SV - (L_HSVsTs + PPS));

            // Number of Haun stages from the end of treatment until Vernalisation saturation
            // Under 8 H full vern conditions (TransToVSHS8hFull)
            double TransToVSHS_SV = Math.Max(0, VSHS_SV + EmergHS - VernTreatHS);

            // The amount of methalated Vrn1 at the time of transition from vern treatment (MethVern1@Trans)
            // Under 8h when VrnTarget will be 1.0
            // VrnTarget less the amount of Vrn1 that expressed after transition
            double MethVern1AtTrans = Math.Max(0, 1.0 - TransToVSHS_SV * Params.BaseDVrn1);

            // BaseVer1 expressed at transition from vernalisation treatment
            double BaseVrn1AtTrans = Math.Min(0, VernTreatHS * Params.BaseDVrn1);

            // Methalated Cold upredulated Vrn1 expression at the time of transition (MethColdVrn1@Trans)
            // Subtract out BasedVrn1 expression up to transition
            double MethColdVrn1AtTrans = Math.Max(0.0, MethVern1AtTrans - BaseVrn1AtTrans);

            // The timing at which methalation started
            // relative to transition from vernalising treatments (RelativeMethTiming)
            double RelativeMethTiming = 1.0 - MethColdVrn1AtTrans;

            // The amount of BaseVrn1 that had expressed at the time methalation of ColdVrn1 started
            double BaseVern1AtMeth = BaseVrn1AtTrans * RelativeMethTiming;

            // Cold induced delta upregulation of Vrn1 at treatment temperature ('DVrn1@Tt')
            // Methalation of Cold upregulated Vrn1 occurs when
            // ColdUpRegVrn1 > Vrn1Target
            // Vrn1Target will be 1.0 in 8 hour conditions
            // so ColdUpRegVrn1 at transition will be:
            // 1.0 - BaseVern1@Meth + MethColdVrn1@Trans.
            // divide by treatment HS duration to give rate
            double DVrn1AtTt = MathUtilities.Divide((1.0 - BaseVern1AtMeth + MethColdVrn1AtTrans), VernTreatHS, 0);

            // Maximum upregulation delta Vrn1 (MUdVrn1)
            // The rate of dVrn1/HS at 0oC.  Calculate by rearanging UdVrn1 equation
            // UdVrn1 = MUdVrn1 * np.exp(k*Tt) as UdVrn1@Tt is known
            Params.MaxDVrn1 = MathUtilities.Divide(DVrn1AtTt, Math.Exp(camp.k * Tt), 0);

            return(Params);
        }
コード例 #4
0
ファイル: CAMP.cs プロジェクト: peter-devoil/ApsimX
 /// <summary>
 /// Called externally to recalculate phenology parameters
 /// </summary>
 /// <param name="overRideFLNParams"></param>
 public void ResetVernParams(FinalLeafNumberSet overRideFLNParams)
 {
     Params = calcCAMPVrnRates.CalcCultivarParams(overRideFLNParams, EnvData);
 }
コード例 #5
0
ファイル: CAMP.cs プロジェクト: RobZys/ApsimX
 private void OnSowing(object sender, EventArgs e)
 {
     Reset();
     Params = calcCAMPVrnRates.CalcCultivarParams(FLNparams, EnvData);
 }