Beispiel #1
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary> Initializes a new instance of the WaterSimDCDC.Generic.SurfaceModel class.</summary>
        /// <param name="TheBaseUSGSData"> Information describing the base usgs.</param>
        ///-------------------------------------------------------------------------------------------------

        public SurfaceModel(UnitData TheBaseUSGSData) : base()
        {
            FUSGSData = TheBaseUSGSData;
            if (FUSGSData != null)
            {
                RegionNumber = FUSGSData.UnitCount;
            }
            if (RegionNumber > 0)
            {
                // OK get the orignal USGS water by region
                FBaseSurfaceWater = new BasinRegionWater(RegionNumber);
                FBaseSurfaceWater.AvailableWater = FUSGSData.BaseUnitData(UDI.SurfaceWaterFld);
                // OK create the output water
                FTheOutputWater = new SurfaceWaterOutput();
            }
        }
Beispiel #2
0
        ///-------------------------------------------------------------------------------------------------
        /// <summary> Runs the River Model with the given input data.</summary>
        ///
        /// <remarks> Quay, 6/19/2020.</remarks>
        ///
        /// <param name="InputData"> Information describing the input.</param>
        ///
        /// <returns> A RiverModelOutput.</returns>
        ///-------------------------------------------------------------------------------------------------

        public override RiverModelOutput Run(RiverModelInput InputData)
        {
            SurfaceWaterOutput FSurfaceWater = null;

            // Check if inpout is right
            if (InputData is SurfaceWaterInput)
            {
                double TotalSurface = 0;
                foreach (int Value in FBaseSurfaceWater.AvailableWater)
                {
                    TotalSurface += (double)Value;
                }
                double DroughtValue = (double)(InputData as SurfaceWaterInput).DroughtAdjust / 100;
                double TempSurface  = TotalSurface * DroughtValue;
                FSurfaceWater.TotalSurfaceWater = Convert.ToInt32(TempSurface);
            }
            return(FSurfaceWater);
        }