private void UpdateWB()
        {
            WaterBalanceComponents.Clear();

            for (int i = 0; i < 8; i++)
            {
                string name = _waterBody.Output.Items[i].Name;
                if (_waterBody.Output.Items[i].Values.Count() > 0)
                {
                    double d = _waterBody.Output.Items[i].GetSiValue(StorageTimeStart, StorageTimeEnd);
                    if (Math.Abs(d) > 0)
                    {
                        WaterBalanceComponents.Add(new KeyValuePair <string, double>(name, d));
                    }
                }
            }
            StorageTime = (int)_waterBody.Output.GetStorageTime(StorageTimeStart, StorageTimeEnd).TotalDays / 365;
        }
Beispiel #2
0
        private void UpdateWB()
        {
            WaterBalanceComponents.Clear();
            WaterBalanceComponents.Add(new KeyValuePair <string, double>("Outflow", _lake.Output.Outflow.GetSiValue(StorageTimeStart, StorageTimeEnd)));
            WaterBalanceComponents.Add(new KeyValuePair <string, double>("Evaporation", -_lake.Output.Evaporation.GetSiValue(StorageTimeStart, StorageTimeEnd)));
            double sources     = _lake.Output.Sources.GetSiValue(StorageTimeStart, StorageTimeEnd);
            double groundwater = ((GroundWaterBoundary)_lake.GroundwaterBoundaries.First()).Output.Items[0].GetSiValue(StorageTimeStart, StorageTimeEnd);

            if (_lake.Output.Inflow.Items.Count > 0)
            {
                double inflow = _lake.Output.Inflow.GetSiValue(StorageTimeStart, StorageTimeEnd);
                WaterBalanceComponents.Add(new KeyValuePair <string, double>("Inflow", inflow));
            }

            WaterBalanceComponents.Add(new KeyValuePair <string, double>("Precipitation", sources - groundwater));
            WaterBalanceComponents.Add(new KeyValuePair <string, double>("Groundwater", groundwater));

            StorageTime = (int)_lake.Output.GetStorageTime(StorageTimeStart, StorageTimeEnd).TotalDays / 365;
        }