Exemple #1
0
        //---------------------------------------------------------------------
        //private static void WriteAnnualLog(IEcoregion ecoregion, int year, AnnualClimate_Monthly annualClimateMonthly, AnnualClimate_Daily annualClimate_Daily)
        private static void WriteAnnualLog(IEcoregion ecoregion, int year, AnnualClimate_Monthly annualClimateMonthly)
        {
            AnnualLog.Clear();
            AnnualLog al = new AnnualLog();

            //al.SimulationPeriod = TBD
            al.Time           = year;
            al.EcoregionName  = ecoregion.Name;
            al.EcoregionIndex = ecoregion.Index;
            //if (future_allData_granularity == TemporalGranularity.Daily)
            //    al.BeginGrow = annualClimate_Daily.BeginGrowing;
            //else
            al.BeginGrow = annualClimateMonthly.BeginGrowing;
            //if (future_allData_granularity == TemporalGranularity.Daily)
            //    al.EndGrow = annualClimate_Daily.EndGrowing;
            //else
            al.EndGrow = annualClimateMonthly.EndGrowing;
            al.TAP     = annualClimateMonthly.TotalAnnualPrecip;
            al.MAT     = annualClimateMonthly.MeanAnnualTemperature;
            al.PDSI    = Future_MonthlyData[year][ecoregion.Index].PDSI;
            // VS: might need FWI in annual climate
            //al.FWI = Future_MonthlyData[year][ecoregion.Index].FWI;

            AnnualLog.AddObject(al);
            AnnualLog.WriteToFile();
        }
        //---------------------------------------------------------------------
        private static void WriteAnnualLog(IEcoregion ecoregion, int year, AnnualClimate_Monthly annualClimateMonthly)
        {
            AnnualLog.Clear();
            AnnualLog al = new AnnualLog();

            //al.SimulationPeriod = TBD
            al.Time = year;
            al.EcoregionName = ecoregion.Name;
            al.EcoregionIndex = ecoregion.Index;
            al.BeginGrow = annualClimateMonthly.BeginGrowing;
            al.EndGrow = annualClimateMonthly.EndGrowing;
            al.TAP = annualClimateMonthly.TotalAnnualPrecip;
            al.MAT = annualClimateMonthly.MeanAnnualTemperature;
            al.PDSI = Future_MonthlyData[year][ecoregion.Index].PDSI;

            AnnualLog.AddObject(al);
            AnnualLog.WriteToFile();
        }