Catchment Class

Abstract catchment class.

Definition

Namespace: DHI.Mike1D.RainfallRunoffModule
Assembly: DHI.Mike1D.RainfallRunoffModule (in DHI.Mike1D.RainfallRunoffModule.dll) Version: 24.0.0.0 (11.1.1.1111)
C#
public abstract class Catchment : ICatchment, 
	IDoubleProxy, IQuantityProxy, IDoubleTimeProxy, ICalibratable, ICatchmentSWQ, 
	ICatchmentData
Inheritance
Object    Catchment
Derived
Implements
ICalibratable, IDoubleProxy, IDoubleTimeProxy, IQuantityProxy, ICatchment, ICatchmentData, ICatchmentSWQ

Constructors

Catchment(String) Catchment constructor
Catchment(String, String) Catchment constructor

Properties

AdditionalFlow Additional constant flow added to the total runoff Unit: [m3/s] Default: 0
Area Total area of catchment Type: Catchment area Unit: [m2] Default: 1e8 (100 km2)
AreaInSquareKm Full area of catchment Type: Catchment area Unit: [km2] Default: 100
BoundarySourceRainfall Rainfall boundary source
CatchmentGeometry Get and set the list of coordinates of the catchment

The sequence of coordinates can represent one or more polygons. It is interpreted as follows:

  • Polygons are stored in sequence.
  • A polygon is stored with the outer ring first, and any holes following immediately.
  • Any polygon ring (outer or inner) is represented as a string of coordinates, starting and ending with the same coordinate.
  • Any polygon that is clockwise is assumed to be an outer polygon.
  • Any polygon that is counter-clockwise is assumed to be a hole in the most recent outer polygon. A hole must be fully contained by the most recent outer polygon and not overlap other holes.

CatchmentName A overall data interface for cathcment data, containing data properties that are common for all catchments.

This interface contains data and parameters for setting up a catchment model, and represents as such only setup data. Computational variables and methods are not included in this interface. It can be used to explore data and parameters required when setting up the catchment model.

CenterPoint Get and set the central point of the catchment
CheckPoints A set of check points in time that must be hit by the catchments.
ClientName 
CurrentTime Current time of catchment
EffectiveArea Effective area. The effective area is the area that collects water. Can be smaller than total area, eg for Linear Reservoir or when LIDs are present.
EffectiveTimeStep Time step used in the simulation, it may change. It is set initially in Prepare to TimeStep, and can be updated by individual catchment models when required, i.e. it may differ from TimeStep.
EndTime Return the end time of the catchment simulation. This is set during prepare, and the catchment must make sure not to run beyond this time.
MaximumFlow Maximum runoff flow
MinimumFlow Minimum runoff flow
MinTime Minimum time the catchment should be able to provide values. The catchment will cache or recalculate values from MinTime to EndTime. MinTime must be updated ("dragged behind" time of calculation) from the caller to allow the catchment to discard cached values.
ModelId Catchment model ID. Unique id.
MonthlyStatistics Dictionary of statistics as a function of year and month
NameObsolete
ObservedData Observed data. Used for creating calibration plots and for auto-calibration reference data.
PeriodicStatistics Class for catchment periodic statistics
Persons Number of person equivalent in the catchment, used with catchment discharge source boundary
Runoff Total runoff from catchment at present time step. Unit: [m^3/s]
RuntimeDiagnostics Get the Diagnostics instance for a Catchment. Used during runtime.
StartTime Start time of catchment data - the earliest time for which the catchment can return data
Obsolete
StatisticsPreviousTimeStepWeight Weight of the previous time step when calculating statistics.
StatisticsPreviousTimeStepWeightRunoff Weight of the previous time step when calculating statistics for Runoff and AdditionalFlow.
StatisticsType Periodic statistics type for catchments
StormWaterLIDs List of Lids
TimeOfMaximumFlow Time of minimum runoff flow
TimeOfMinimumFlow Time of maximum runoff flow
TimeStep Time step used by the catchment model
TotalAdditionalInflowVolume Total volume of additional inflow
TotalLossVolume Total infiltration into this catchment (integrated over time)
TotalRainfallVolume Total rainfall on this catchment (integrated over time)
TotalRunoffVolume Total runoff from this catchment (integrated over time)
TSBuffer Set the TSBuffer to use in this catchment
UseHotStartFile Flag telling if initial conditions is taken from a hotstart file Default: false
UseLegacyLIDs Flag specifying whether to use legacy LID implementation.
VolumeOnGroundAdded Volume of water added to catchment after a time step. This water will be eventually routed.
YearlyStatistics Dictionary of statistics as a function of year

Methods

Accepts 
AddToOffers 
ApplyBoundary(ICatchmentSourceBoundary) Apply a boundary to this catchment
ApplyBoundary(CatchmentSourceBoundaryTypes, IBoundarySource) Apply a boundary to this catchment
ApplyBoundary(GlobalSourceBoundaryTypes, GlobalGeoLocatedSource) Apply a boundary to this catchment
ApplyBoundaryLIDs(GlobalGeoLocatedSource) Apply boundary to LID's in catchment
ApplyBoundaryLIDs(ICatchmentSourceBoundary) Apply boundary to LID's in catchment
ApplyBoundaryLIDs(CatchmentSourceBoundaryTypes, IBoundarySource) Apply boundary to LID's in catchment
ApplyBoundaryLIDs(GlobalSourceBoundaryTypes, GlobalGeoLocatedSource) Apply boundary to LID's in catchment
BoundaryTypeIsAdditive Return true if boundaries of the specified type are additive; the contributions of two discharge boundaries add up, while two temperature boundaries do not.
CalculateStatistics Calculate statistics on catchment.
CreatePeriodicStat Creates and instance of statistics for a period.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Destructor
(Overrides ObjectFinalize)
FinalizeTimeStep Finalizes the time step for the catchment.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetPeriodicStat Get or create a RRYearlyStat object for the specified period.
GetRequiredTypes Get the type of boundary required by this catchment
GetTypeGets the Type of the current instance.
(Inherited from Object)
Initialize Initialize Rainfall Runoff model. Sets up static data.
InitializePlugins Initializes the cathcment plugins.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Offers List of data types that is offered and can be used in GetValue
PerformTimeStep This procedure forwards the calculation with one time step.
Prepare Prepare Rainfall Runoff model. Sets up dynamic data so that the model is ready for first time step.
PrepareForTimeStep Prepares the catchment for the time step.
PreparePlugins Prepares the cathcment plugins.
PrepareSource Prepare boundary source.
PrepareState Prepare state, especially time
ReadBufferState Read current state of catchment value buffer
ReadPluginStates Read current state of plugins
Reset Reset the catchment and set the current time.
ResetBoundaries Remove boundaries applied in previous runs
StateUpdated If state has been updated from outside, call this method to recalculate state dependent parameters.
TakeTimeStep This procedure is the one actually calculating the new time step.
TimeOffers List of data types that is offered and can be used in GetValue
TimeOfNextUpdate Return the time of next update. Used for PostTimeStepEvent event in Catchments. If a catchment uses variable timesteps, then this function must be overridden!!
Obsolete
TimeValueGetter Get value getter for the specified data quantity
ToStringReturns a string that represents the current object.
(Overrides ObjectToString)
TriggerPostTimeStepEvent Trigger the PostTimeStepEvent, called at end of a time step.
Type The type of catchment: NAM, Urban A etc
Update Update internal state of catchment to time Time()
UpdateCheckPointTime Updates check point time.
UpdateRouting Updates the routing for the catchment.
UpdateRunoffMinMaxStatistics Update time and values of minimum/maximum flow.
UpdateStorage Updates the storage for the catchment.
UpdateTime Update time, setting _timeNew to _timeOld + _effectiveTimeStep. This method will assue that _timeNew does not go beyond _endTime, by modifying _effectiveTimeStep. Before calling UpdateTime, be sure that _effectiveTimeStep is set.
UpdateTimeStepUsingCheckPoint Updates the present time if it is greater than the check point time.
Validate Validate that the catchment is set up correctly
ValidateLIDs Validate all LIDs in catchment
ValueGetter Get value setter for the specified data quantity
ValueSetter 
VolumeInCatchment Volume of water stored in catchment after previous time step.
VolumeInCatchmentAtStart Volume of water stored in catchment after previous time step.
WriteBufferState Write current state of catchment value buffer
WritePluginStates Write current state of plugins

Events

PostTimeStepEvent Event that is triggered every time the catchment has finished a new time step

Fields

_additionalFlow Additional constant flow added to the total runoff Unit: [m3/s] Default: 0
_additionalFlowOld Additional constant flow at start of time step
_area Total area of catchment. Type: Catchment area. Unit: [m2]. Default: 1e8 (100 km2).
_boundarySourceEvaporation Evaporation boundary source
_boundarySourceRainfall Rainfall boundary source
_boundarySourceTemperature Temperature boundary source
_checkPointTime The most recent check point time.
_effectiveTimeStep Time step used in the simulation, it may change. It is set in Prepare to _timeStep, and can be updated by individual catchment models when required, i.e. it may differ from _timeStep.
_endTime Return the end time of the catchment simulation. This is set during prepare, and the catchment must make sure not to run beyond this time.
_maximumFlow Maximum flow
_minimumFlow Minimum flow
_minTime Proteced MinTime
_offerDelegates List of delegates, matching list of _offers
_offers List of datatypes offered in GetValue
_runoff Total runoff from catchment at present time step. Unit: [m^3/s]
_runtimeDiagnostics Diagnostics instance for a Catchment. Used during runtime.
_startTime Protected start time of catchment data - the earliest time for which the catchment can return data
_stormwaterLIDs List of Lids
_timeNew Variable holding information on the latest calculated time
_timeOfLastUpdate Last time the state of this catchment was updated (Update(DateTime) was called)
_timeOfMaximumFlow Time of maximum flow
_timeOfMinimumFlow Time of minimum flow
_timeOld Variable holding information on the latest calculated time
_timeStep Time step used in the simulation, or initial time step if the time step can change.
_totalAdditionalInflowVolume Total volume of additional inflow
_totalLossVolume Total volume of loss
_totalRainfallVolume Total volume of rain
_totalRunoffVolume Total volume of runoff
_tsBuffer TSBuffer to use when accessing time series objects Set in Catchments.Add(). If not set, then the inheritors must create a TSBuffer before using it.
_useHotStartFile Flag telling if initial conditions is taken from a hotstart file Default: false
_volumeOnGroundAdded Volume on ground added after UpdateStorage
_volumeOnGroundAfterRouting Volume on ground after routing
_volumeOnGroundBeforeRouting Volume on ground before routing
CatchmentPlugins List of catchment plugins
conversionFromMmHourMeterSec 
conversionFromMmToMeter 
ValueBuffer 

Extension Methods

Getter

From the proxy, return an FuncTResult for the specified quantity.

It returns the first quantity of that type that is offered, and null if the quantity is not offered.


(Defined by ProxyExtensions)
Getter

From the proxy, return an FuncTResult for the specified quantity.

It returns the first quantity of that type that is offered, and null if the quantity is not offered.


(Defined by ProxyExtensions)
Getters Returns a set of FuncTResult for the quantity. We can return several quantities with the same id (usually they will differ in their description). If the quantity is not offerent, an empty list is returned.
(Defined by ProxyExtensions)
GettersFraction Returns a set of FuncT, TResult for the quantity. We can return several quantities with the same id (usually they will differ in their description). If the quantity is not offerent, an empty list is returned.
(Defined by ProxyExtensions)
GetterUnboxed

From the proxy, return an FuncTResult for the specified quantity.

It returns the first quantity of that type that is offered, and null if the quantity is not offered.


(Defined by ProxyExtensions)
NTSGeometry Create a NetToplogySuite (NTS) geometry from the CatchmentGeometry.

Depending on the coordinates, the returned IGeometry is either a NTS Polygon or NTS MultiPolygon.

Check out CatchmentGeometry for how the sequence of coordinates is interpreted


(Defined by RRExtensions)
NTSGeometry Create a NetToplogySuite (NTS) geometry from the CatchmentGeometry.

Depending on the coordinates, the returned IGeometry is either a NTS Polygon or NTS MultiPolygon.

Check out CatchmentGeometry for how the sequence of coordinates is interpreted


(Defined by RRExtensions)
Setter

From the proxy, return an IDoubleGetSet for the specified quantity.

It returns the first quantity of that type that is accepted, and null if the quantity is not accepted.


(Defined by ProxyExtensions)
TimeValueGetter

From the proxy, return an FuncT, TResult for the specified quantity.

It returns the first quantity of that type that is offered, and null if the quantity is not offered.


(Defined by ProxyExtensions)

See Also