/// <summary>Calculate the amtospheric potential evaporation rate for each zone</summary> private void CalculateEo(ZoneMicroClimate ZoneMC) { ISoilWater zoneSoilWater = Apsim.Find(ZoneMC.zone, typeof(ISoilWater)) as ISoilWater; ISurfaceOrganicMatter zoneSurfaceOM = Apsim.Find(ZoneMC.zone, typeof(ISurfaceOrganicMatter)) as ISurfaceOrganicMatter; double CoverGreen = 0; for (int j = 0; j <= ZoneMC.Canopies.Count - 1; j++) { if (ZoneMC.Canopies[j].Canopy != null) { CoverGreen += (1 - CoverGreen) * ZoneMC.Canopies[j].Canopy.CoverGreen; } } if (weather != null && zoneSoilWater != null && zoneSurfaceOM != null) { zoneSoilWater.Eo = AtmosphericPotentialEvaporationRate(weather.Radn, weather.MaxT, weather.MinT, zoneSoilWater.Salb, zoneSurfaceOM.Cover, CoverGreen); } }
/// <summary>Constructor.</summary> /// <param name="clockModel">The clock model.</param> /// <param name="zoneModel">The zone model.</param> /// <param name="minHeightDiffForNewLayer">Minimum canopy height diff for new layer.</param> public MicroClimateZone(Clock clockModel, Zone zoneModel, double minHeightDiffForNewLayer) { clock = clockModel; Zone = zoneModel; MinimumHeightDiffForNewLayer = minHeightDiffForNewLayer; canopyModels = Apsim.ChildrenRecursively(Zone, typeof(ICanopy)).Cast <ICanopy>(); modelsThatHaveCanopies = Apsim.ChildrenRecursively(Zone, typeof(IHaveCanopy)).Cast <IHaveCanopy>(); soilWater = Apsim.Find(Zone, typeof(ISoilWater)) as ISoilWater; surfaceOM = Apsim.Find(Zone, typeof(ISurfaceOrganicMatter)) as ISurfaceOrganicMatter; }
/// <summary>Constructor.</summary> /// <param name="clockModel">The clock model.</param> /// <param name="weatherModel">The weather model.</param> /// <param name="zoneModel">The zone model.</param> public MicroClimateZone(Clock clockModel, IWeather weatherModel, Zone zoneModel) { clock = clockModel; weather = weatherModel; Zone = zoneModel; canopyModels = Apsim.ChildrenRecursively(Zone, typeof(ICanopy)).Cast <ICanopy>(); modelsThatHaveCanopies = Apsim.ChildrenRecursively(Zone, typeof(IHaveCanopy)).Cast <IHaveCanopy>(); soilWater = Apsim.Find(Zone, typeof(ISoilWater)) as ISoilWater; surfaceOM = Apsim.Find(Zone, typeof(ISurfaceOrganicMatter)) as ISurfaceOrganicMatter; }
/// <summary>Constructor.</summary> /// <param name="clockModel">The clock model.</param> /// <param name="zoneModel">The zone model.</param> /// <param name="minHeightDiffForNewLayer">Minimum canopy height diff for new layer.</param> public MicroClimateZone(Clock clockModel, Zone zoneModel, double minHeightDiffForNewLayer) { clock = clockModel; Zone = zoneModel; MinimumHeightDiffForNewLayer = minHeightDiffForNewLayer; canopyModels = Zone.FindAllDescendants <ICanopy>().ToList(); modelsThatHaveCanopies = Zone.FindAllDescendants <IHaveCanopy>().ToList(); soilWater = Zone.FindInScope <ISoilWater>(); surfaceOM = Zone.FindInScope <ISurfaceOrganicMatter>(); }