OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
Global Raingage Methods

Global raingage methods. More...

Collaboration diagram for Global Raingage Methods:

Functions

int gage_readParams (int gageIndex, char *tok[], int ntoks)
 Reads rain gage parameters from a line of input data.
 
void gage_validate (int gageIndex)
 Checks for valid rain gage parameters.
 
void gage_initState (int gageIndex)
 Initializes state of a rain gage.
 
void gage_setState (int gageIndex, DateTime aDate)
 Updates state of rain gage for specified date.
 
double gage_getPrecip (int gageIndex, double *rainfall, double *snowfall)
 Determines whether gage's recorded rainfall is rain or snow.
 
void gage_setReportRainfall (int gageIndex, DateTime aDate)
 Sets the rainfall value reported at the current reporting time.
 
DateTime gage_getNextRainDate (int gageIndex, DateTime aDate)
 Finds the next date from specified date when rainfall occurs.
 
void gage_updatePastRain (int gageIndex, int tStep)
 Updates past MAXPASTRAIN hourly rain totals.
 
double gage_getPastRain (int gageIndex, int hrs)
 Retrieves rainfall total over some previous number of hours.
 

Detailed Description

Global raingage methods.

Function Documentation

◆ gage_getNextRainDate()

DateTime gage_getNextRainDate ( int  gageIndex,
DateTime  aDate 
)

Finds the next date from specified date when rainfall occurs.

Parameters
[in]gageIndexRain gage index
[in]aDateCurrent date/time
Returns
Returns next date when rainfall occurs

◆ gage_getPastRain()

double gage_getPastRain ( int  j,
int  n 
)

Retrieves rainfall total over some previous number of hours.

Parameters
[in]gageIndexRain gage index
[in]hrsNumber of hours
Returns
Returns cumulative rain volume (inches or mm) in last n hours
Here is the caller graph for this function:

◆ gage_getPrecip()

double gage_getPrecip ( int  gageIndex,
double *  rainfall,
double *  snowfall 
)

Determines whether gage's recorded rainfall is rain or snow.

Parameters
[in]gageIndexRain gage index
[out]rainfallRainfall rate (ft/sec)
[out]snowfallSnowfall rate (ft/sec)
Returns
Returns Total precipitation (ft/sec)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gage_initState()

void gage_initState ( int  j)

Initializes state of a rain gage.

Parameters
[in]gageIndexRain gage index
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gage_readParams()

int gage_readParams ( int  gageIndex,
char *  tok[],
int  ntoks 
)

Reads rain gage parameters from a line of input data.

Parameters
[in]gageIndexGage index
[in]tokArray of string tokens
[in]ntoksNumber of tokens
Returns
Error code

Data formats are: Name RainType RecdFreq SCF TIMESERIES SeriesName Name RainType RecdFreq SCF FILE FileName Station Units StartDate

Here is the call graph for this function:

◆ gage_setReportRainfall()

void gage_setReportRainfall ( int  gageIndex,
DateTime  reportDate 
)

Sets the rainfall value reported at the current reporting time.

Parameters
[in]gageIndexRain gage index
[in]aDateCurrent date/time

◆ gage_setState()

void gage_setState ( int  gageIndex,
DateTime  aDate 
)

Updates state of rain gage for specified date.

Parameters
[in]gageIndexRain gage index
[in]aDateA calendar date/time
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gage_updatePastRain()

void gage_updatePastRain ( int  gageIndex,
int  tStep 
)

Updates past MAXPASTRAIN hourly rain totals.

Parameters
[in]gageIndexRain gage index
[in]tStepTime step (sec)

pastRain[0] is past rain volume prior to 1 hour, pastRain[n] is past rain volume after n hours, pastInterval is time since last hour was reached.

Parameters
[in]gageIndexRain gage index
[in]tStepTime step (sec)
Note
pastRain[0] is past rain volume prior to 1 hour, pastRain[n] is past rain volume after n hours, pastInterval is time since last hour was reached.
Here is the caller graph for this function:

◆ gage_validate()

void gage_validate ( int  gageIndex)

Checks for valid rain gage parameters.

Parameters
[in]gageIndexGage index
Note
Assumes that any time series used by the gage has been previously validated
Here is the call graph for this function:
Here is the caller graph for this function: