예제 #1
0
        /// <summary>Copy constructor</summary>
        public ThermalTimeState(ThermalTimeState toCopy, bool copyAll)
        {
            _parametersIO = new ParametersIO(this);

            for (int i = 0; i < Enum.GetNames(typeof(Delta)).Length; i++)
            {
                _deltaTT[i] = toCopy._deltaTT[i];
                _cumulTT[i] = toCopy._cumulTT[i];
            }
            if (copyAll) //by default nothing is copied to improve performances ( only the output needed to be saved must be copied)
            {
                _minTair = toCopy._minTair;

                _maxTair = toCopy._maxTair;

                _minTshoot = toCopy._minTshoot;

                _maxTshoot = toCopy._maxTshoot;

                _minTsoil = toCopy._minTsoil;

                _maxTsoil = toCopy._maxTsoil;

                _phaseValue = toCopy._phaseValue;
                //Debug
                if (toCopy._hourlyShootTemperature == null)
                {
                    _hourlyShootTemperature = null;
                }
                else
                {
                    for (int i = 0; i < 24; i++)
                    {
                        _hourlyShootTemperature[i] = toCopy._hourlyShootTemperature[i];
                    }
                }

                if (toCopy._hourlyAirTemperature == null)
                {
                    _hourlyAirTemperature = null;
                }
                else
                {
                    for (int i = 0; i < 24; i++)
                    {
                        _hourlyAirTemperature[i] = toCopy._hourlyAirTemperature[i];
                    }
                }
            }
        }
        /// <summary>No parameters constructor</summary>
        public States()
        {
            _parametersIO = new ParametersIO(this);

            _rhoCanopyDir = new Dictionary <int, double>();
            _k1_dir       = new Dictionary <int, double>();
            _k_dir        = new Dictionary <int, double>();

            for (int i = 0; i < 24; i++)
            {
                _rhoCanopyDir.Add(i, 0.0);
                _k1_dir.Add(i, 0.0);
                _k_dir.Add(i, 0.0);
            }
        }
예제 #3
0
 /// <summary>copy constructor</summary>
 public PhenologyState(PhenologyState toCopy, bool copyAll)
 {
     _parametersIO = new ParametersIO(this);
     _phase_       = (toCopy._phase_ != null) ? new Phase(toCopy._phase_) : null;
     _Calendar     = (toCopy._Calendar != null) ? new Calendar(toCopy._Calendar) : null;
     _currentdate  = toCopy._currentdate;
     _cumulTT      = toCopy._cumulTT;
     _DayLength    = toCopy._DayLength;
     _DeltaTT      = toCopy._DeltaTT;
     _GrainCumulTT = toCopy._GrainCumulTT;
     _GAI          = toCopy._GAI;
     _LeafNumber   = toCopy._LeafNumber;
     //_TagPhenoWarnOut = toCopy._TagPhenoWarnOut;
     _FinalLeafNumber            = toCopy._FinalLeafNumber;
     _Phyllochron                = toCopy._Phyllochron;
     _Vernaprog                  = toCopy._Vernaprog;
     _currentZadokStage          = toCopy._currentZadokStage;
     _CanopyShootNumber          = toCopy._CanopyShootNumber;
     _TillerNumber               = toCopy._TillerNumber;
     _AverageShootNumberPerPlant = toCopy._AverageShootNumberPerPlant;
     tilleringProfile            = new List <double>();
     for (int i = 0; i < toCopy.tilleringProfile.Count; i++)
     {
         tilleringProfile.Add(toCopy.tilleringProfile[i]);
     }
     leafTillerNumberArray = new List <double>();
     for (int i = 0; i < toCopy.leafTillerNumberArray.Count; i++)
     {
         leafTillerNumberArray.Add(toCopy.leafTillerNumberArray[i]);
     }
     if (copyAll)
     {
         _Ntip = toCopy._Ntip;
         _hasLastPrimordiumAppeared = toCopy._hasLastPrimordiumAppeared;
         _isMomentRegistredZC_39    = toCopy._isMomentRegistredZC_39;
         _cumulTTFromZC_39          = toCopy._cumulTTFromZC_39;
         _cumulTTFromZC_91          = toCopy._cumulTTFromZC_91;
         _cumulTTFromZC_65          = toCopy._cumulTTFromZC_65;
         _IsLatestLeafInternodeLengthPotPositive = toCopy._IsLatestLeafInternodeLengthPotPositive;
         _HasFlagLeafLiguleAppeared    = toCopy._HasFlagLeafLiguleAppeared;
         _MinFinalNumber               = toCopy._MinFinalNumber;
         _cumulTTPhenoMaizeAtEmergence = toCopy._cumulTTPhenoMaizeAtEmergence;
         _hasZadokStageChanged         = toCopy._hasZadokStageChanged;
     }
 }
예제 #4
0
 /// <summary>No parameters constructor</summary>
 public EnergyBalanceState()
 {
     _parametersIO = new ParametersIO(this);
 }
 /// <summary>No parameters constructor</summary>
 public Rates()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #6
0
 /// <summary>No parameters constructor</summary>
 public ThermalTimeState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #7
0
 public PhenologyAuxiliary()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #8
0
 public PhenologyExogenous()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #9
0
 /// <summary>No parameters constructor</summary>
 public MaizeLeafState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #10
0
        public MeteoState(MeteoState toCopy, bool copyAll)
        {
            _parametersIO = new ParametersIO(this);

            _dayLengthHorizonZero = toCopy.dayLengthHorizonZero;
            _dayLength            = toCopy.dayLength;
            _photoperiod          = toCopy.photoperiod;
            _radTopAtm            = toCopy.radTopAtm;
            _radTopAtmHorizonZero = toCopy.radTopAtmHorizonZero;
            _HSlope = toCopy.HSlope;
            _saturationVaporPressure = toCopy.saturationVaporPressure;
            _VPDair       = toCopy.VPDair;
            _VPDairCanopy = toCopy.VPDairCanopy;

            _RH = new double[24];
            _hourlyAirTemperature = new double[24];
            _hourlyVPDAir         = new double[24];
            _hourlyRadiation      = new double[24];
            _hourlySolarElevation = new double[24];
            _hourlyWindSpeed      = new double[24];

            for (int i = 0; i < 24; i++)
            {
                _hourlyRadiation[i] = toCopy.hourlyRadiation[i];
            }
            for (int i = 0; i < 24; i++)
            {
                _hourlyIdir[i] = toCopy.hourlyRadiation[i];
            }
            for (int i = 0; i < 24; i++)
            {
                _hourlyIdiff[i] = toCopy.hourlyRadiation[i];
            }
            for (int i = 0; i < 24; i++)
            {
                _hourlySolarElevation[i] = toCopy._hourlySolarElevation[i];
            }
            for (int i = 0; i < 24; i++)
            {
                _hourlyWindSpeed[i] = toCopy._hourlyWindSpeed[i];
            }

            if (toCopy.calculateHourly == 1)
            {
                for (int i = 0; i < 24; i++)
                {
                    _RH[i] = toCopy.RH[i];
                    _hourlyAirTemperature[i] = toCopy.hourlyAirTemperature[i];
                    _hourlyVPDAir[i]         = toCopy.hourlyVPDAir[i];
                }
            }

            if (copyAll)
            {
                _calculateHourly     = toCopy.calculateHourly;
                _minTair             = toCopy.minTair;
                _maxTair             = toCopy.maxTair;
                _meanTair            = toCopy.meanTair;
                _minShootTemperature = toCopy.minShootTemperature;
                _maxShootTemperature = toCopy.maxShootTemperature;
                _dayOfYear           = toCopy.dayOfYear;
                _vaporPressure       = toCopy.vaporPressure;
                _solarRadiation      = toCopy.solarRadiation;
            }

            _dailyMeanWindSpeed = toCopy._dailyMeanWindSpeed;

            _dailyMaxWindSpeed = toCopy._dailyMaxWindSpeed;

            _dailyMinWindSpeed = toCopy._dailyMinWindSpeed;
        }
예제 #11
0
 /// <summary>No parameters constructor</summary>
 public MeteoState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #12
0
 /// <summary>No parameters constructor</summary>
 public ClassName()
 {
     _parametersIO = new ParametersIO(this);
 }
 public SnowAuxiliary()
 {
     _parametersIO = new ParametersIO(this);
 }
 public SnowState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #15
0
 public EnergyBalanceAuxiliary()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #16
0
        /// <summary>Copy constructor</summary>
        public EnergyBalanceState(EnergyBalanceState toCopy, bool copyAll)
        {
            _parametersIO = new ParametersIO(this);
            if (copyAll) //by default nothing is copied to improve performances ( only the output needed to be saved must be copied)
            {
                _deficitOnTopLayers = toCopy._deficitOnTopLayers;

                _minTair = toCopy._minTair;

                _maxTair = toCopy._maxTair;

                _solarRadiation = toCopy._solarRadiation;

                _extraSolarRadiation = toCopy._extraSolarRadiation;

                _vaporPressure = toCopy._vaporPressure;

                _tau = toCopy._tau;

                _hslope = toCopy._hslope;

                _plantHeight = toCopy._plantHeight;

                _wind = toCopy._wind;

                _VPDair = toCopy._VPDair;

                _isWindVpDefined = toCopy._isWindVpDefined;

                _elevation = toCopy._elevation;

                _netRadiation = toCopy._netRadiation;

                _diffusionLimitedEvaporation = toCopy._diffusionLimitedEvaporation;

                _energyLimitedEvaporation = toCopy._energyLimitedEvaporation;

                _evapoTranspirationPriestlyTaylor = toCopy._evapoTranspirationPriestlyTaylor;

                _evapoTranspirationPenman = toCopy._evapoTranspirationPenman;

                _potentialTranspiration = toCopy._potentialTranspiration;

                _conductance = toCopy._conductance;

                _soilEvaporation = toCopy._soilEvaporation;

                _potentialEvapoTranspiration = toCopy._potentialEvapoTranspiration;

                _soilHeatFlux = toCopy._soilHeatFlux;

                _cropHeatFlux = toCopy._cropHeatFlux;

                _minCanopyTemperature = toCopy._minCanopyTemperature;

                _maxCanopyTemperature = toCopy._maxCanopyTemperature;

                _evapoTranspiration = toCopy._evapoTranspiration;

                _wc3cm = toCopy._wc3cm;

                _Ntip = toCopy._Ntip;

                _netRadiationEquivalentEvaporation = toCopy._netRadiationEquivalentEvaporation;

                _hourlyTemp = new double[24];

                _hourlyCanopyTemperature = new double[24];

                _hourlyVPDair = new double[24];

                _hourlySolarRadiation = new double[24];

                _hourlyVPDairLeaf = new double[24];

                _VPDeq = new double[24];

                _RH = new double[24];

                for (int i = 0; i < 24; i++)
                {
                    _hourlyTemp[i] = toCopy._hourlyTemp[i];
                    _hourlyCanopyTemperature[i] = toCopy._hourlyCanopyTemperature[i];
                    _hourlyVPDair[i]            = toCopy._hourlyVPDair[i];
                    _hourlySolarRadiation[i]    = toCopy._hourlySolarRadiation[i];
                    _hourlyVPDairLeaf[i]        = toCopy._hourlyVPDairLeaf[i];
                    _VPDeq[i] = toCopy._VPDeq[i];
                    _RH[i]    = toCopy._RH[i];
                }
            }
        }
예제 #17
0
 /// <summary>No parameters constructor</summary>
 public WheatLAIState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #18
0
 /// <summary>No parameters constructor</summary>
 public PhenologyState()
 {
     _parametersIO = new ParametersIO(this);
     _phase_       = new Phase();
     _Calendar     = new Calendar();
 }
 public PhenologyState()
 {
     _parametersIO = new ParametersIO(this);
 }
예제 #20
0
 /// <summary>No parameters constructor</summary>
 public Exogenous()
 {
     _parametersIO = new ParametersIO(this);
 }