public SimDateTimeRangeStats(EarthModel earth)
        {
            MeanValues = new Atmosphere(earth, false, float.Epsilon);
            MinValues  = new Atmosphere(earth, false, float.MaxValue);
            MaxValues  = new Atmosphere(earth, false, float.MinValue);

            MeanValuesSFC = new SurfaceLevel(earth, false, float.Epsilon);
            MinValuesSFC  = new SurfaceLevel(earth, false, float.MaxValue);
            MaxValuesSFC  = new SurfaceLevel(earth, false, float.MinValue);
        }
예제 #2
0
        public SimDateTimeRange(EarthModel earth, SimDateTime dtStart, SimDateTime dtEnd)
        {
            this.Start = dtStart;
            this.End   = dtEnd;
            this.Earth = earth;

            AtmList = new List <Atmosphere>();
            SfcList = new List <SurfaceLevel>();

            for (SimDateTime sdt = dtStart; sdt.CompareTo(dtEnd) <= 0; sdt = sdt.AddHours(earth.SnapshotLength))
            {
                Atmosphere   atm = null;
                SurfaceLevel sfc = null;

                try
                {
                    earth.SetUTC(sdt);
                    atm = new Atmosphere(earth, true);
                    sfc = new SurfaceLevel(earth, true);
                }
                catch
                {
                    atm = null;
                    sfc = null;
                }

                if (atm != null)
                {
                    AtmList.Add(atm);
                }
                if (sfc != null)
                {
                    SfcList.Add(sfc);
                }
            }
        }
 public void ProcessSfcSnapshot(SurfaceLevel sfc)
 {
     MeanValuesSFC.Add(sfc);
     MinValuesSFC.GetMin(sfc);
     MaxValuesSFC.GetMax(sfc);
 }