//--------------------------------------------------------------------- private void LogEvent(int currentTime, Event windEvent) { log.WriteLine("{0},\"{1}\",{2},{3},{4},{5:0.0}", currentTime, windEvent.StartLocation, windEvent.Size, windEvent.SitesDamaged, windEvent.CohortsKilled, windEvent.Severity); }
//--------------------------------------------------------------------- public static Event Initiate(ActiveSite site, int windTimestep) { IEcoregion ecoregion = Model.Core.Ecoregion[site]; IEventParameters eventParms = windEventParms[ecoregion.Index]; double eventProbability = (windTimestep * Model.Core.CellArea) / (eventParms.RotationPeriod * eventParms.MeanSize); if (Random.GenerateUniform() <= eventProbability) { Event windEvent = new Event(site, ComputeSizeHectares(eventParms)); windEvent.Spread(Model.Core.CurrentTime); return windEvent; } else return null; }