示例#1
0
        //---------------------------------------------------------------------
        private static void Write(IClimateRecord[,] TimestepData, int year, string period)
        {
            //spinup_allData.
            foreach (IEcoregion ecoregion in Climate.ModelCore.Ecoregions)
            {
                if (ecoregion.Active)
                {
                    for (int month = 0; month < 12; month++)
                    {
                        MonthlyLog.Clear();
                        MonthlyLog ml = new MonthlyLog();

                        ml.SimulationPeriod = period;
                        ml.Time             = year;
                        ml.Month            = month + 1;
                        ml.EcoregionName    = ecoregion.Name;
                        ml.EcoregionIndex   = ecoregion.Index;
                        ml.min_airtemp      = TimestepData[ecoregion.Index, month].AvgMinTemp;
                        ml.max_airtemp      = TimestepData[ecoregion.Index, month].AvgMaxTemp;
                        ml.std_temp         = TimestepData[ecoregion.Index, month].StdDevTemp;
                        ml.ppt     = TimestepData[ecoregion.Index, month].AvgPpt;
                        ml.std_ppt = TimestepData[ecoregion.Index, month].StdDevPpt;

                        MonthlyLog.AddObject(ml);
                        MonthlyLog.WriteToFile();
                    }
                }
            }
        }
示例#2
0
        //---------------------------------------------------------------------
        private static void Write(IClimateRecord[,] TimestepData, int year, string period)
        {

            //spinup_allData.
            foreach (IEcoregion ecoregion in Climate.ModelCore.Ecoregions)
            {
                if (ecoregion.Active)
                {
                    for (int month = 0; month < 12; month++)
                    {
                        MonthlyLog.Clear();
                        MonthlyLog ml = new MonthlyLog();

                        ml.SimulationPeriod = period;
                        ml.Time = year;
                        ml.Month = month + 1;
                        ml.EcoregionName = ecoregion.Name;
                        ml.EcoregionIndex = ecoregion.Index;
                        ml.min_airtemp = TimestepData[ecoregion.Index, month].AvgMinTemp;
                        ml.max_airtemp = TimestepData[ecoregion.Index, month].AvgMaxTemp;
                        ml.std_temp = TimestepData[ecoregion.Index, month].StdDevTemp;
                        ml.ppt = TimestepData[ecoregion.Index, month].AvgPpt;
                        ml.std_ppt = TimestepData[ecoregion.Index, month].StdDevPpt;

                        MonthlyLog.AddObject(ml);
                        MonthlyLog.WriteToFile();

                    }
                }
            }

        }