OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
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 j)
 Initializes state of a rain gage.
 
void gage_setState (int j, DateTime t)
 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 reportDate)
 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 j, int n)
 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
Implementation arguments
  • gageIndex (in): Rain gage index
  • aDate (in): Current 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]jRain gage index
[in]nNumber of hours
Returns
Returns cumulative rain volume (inches or mm) in last n hours
Implementation arguments
  • j (in): Rain gage index
  • n (in): Number 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)
Implementation arguments
  • gageIndex (in): Rain gage index
  • rainfall (out): Rainfall rate (ft/sec)
  • snowfall (out): Snowfall 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]jRain gage index
Implementation arguments
  • j (in): Rain 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

Implementation arguments
  • gageIndex (in): Gage index
  • tok (in): Array of string tokens
  • ntoks (in): Number 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]reportDateCurrent date/time
Implementation arguments
  • gageIndex (in): Rain gage index
  • reportDate (in): Current date/time

◆ gage_setState()

void gage_setState ( int j,
DateTime t )

Updates state of rain gage for specified date.

Parameters
[in]jRain gage index
[in]tA calendar date/time
Implementation arguments
  • j (in): Rain gage index.
  • t (in): A 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.

Implementation arguments
  • gageIndex (in): Rain gage index
  • tStep (in): Time 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
Implementation arguments
  • gageIndex (in): Gage 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: