Global raingage methods.
More...
|
| 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.
|
| |
Global raingage methods.
◆ gage_getNextRainDate()
Finds the next date from specified date when rainfall occurs.
- Parameters
-
| [in] | gageIndex | Rain gage index |
| [in] | aDate | 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] | gageIndex | Rain gage index |
| [in] | hrs | Number of hours |
- Returns
- Returns cumulative rain volume (inches or mm) in last n hours
◆ gage_getPrecip()
| double gage_getPrecip |
( |
int |
gageIndex, |
|
|
double * |
rainfall, |
|
|
double * |
snowfall |
|
) |
| |
Determines whether gage's recorded rainfall is rain or snow.
- Parameters
-
| [in] | gageIndex | Rain gage index |
| [out] | rainfall | Rainfall rate (ft/sec) |
| [out] | snowfall | Snowfall rate (ft/sec) |
- Returns
- Returns Total precipitation (ft/sec)
◆ gage_initState()
| void gage_initState |
( |
int |
j | ) |
|
Initializes state of a rain gage.
- Parameters
-
| [in] | gageIndex | Rain gage index |
◆ gage_readParams()
| int gage_readParams |
( |
int |
gageIndex, |
|
|
char * |
tok[], |
|
|
int |
ntoks |
|
) |
| |
Reads rain gage parameters from a line of input data.
- Parameters
-
| [in] | gageIndex | Gage index |
| [in] | tok | Array of string tokens |
| [in] | ntoks | Number of tokens |
- Returns
- Error code
Data formats are: Name RainType RecdFreq SCF TIMESERIES SeriesName Name RainType RecdFreq SCF FILE FileName Station Units StartDate
◆ gage_setReportRainfall()
| void gage_setReportRainfall |
( |
int |
gageIndex, |
|
|
DateTime |
reportDate |
|
) |
| |
Sets the rainfall value reported at the current reporting time.
- Parameters
-
| [in] | gageIndex | Rain gage index |
| [in] | aDate | Current date/time |
◆ gage_setState()
| void gage_setState |
( |
int |
gageIndex, |
|
|
DateTime |
aDate |
|
) |
| |
Updates state of rain gage for specified date.
- Parameters
-
| [in] | gageIndex | Rain gage index |
| [in] | aDate | A calendar date/time |
◆ gage_updatePastRain()
| void gage_updatePastRain |
( |
int |
gageIndex, |
|
|
int |
tStep |
|
) |
| |
Updates past MAXPASTRAIN hourly rain totals.
- Parameters
-
| [in] | gageIndex | Rain gage index |
| [in] | tStep | Time 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] | gageIndex | Rain gage index |
| [in] | tStep | 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.
◆ gage_validate()
| void gage_validate |
( |
int |
gageIndex | ) |
|
Checks for valid rain gage parameters.
- Parameters
-
- Note
- Assumes that any time series used by the gage has been previously validated