18#ifndef OPENSWMM_GAGE_HPP
19#define OPENSWMM_GAGE_HPP
Structure-of-Arrays (SoA) storage for subcatchments.
constexpr double ONE_SECOND
One second in days.
Definition Gage.hpp:35
double getReportRainfall(const SimulationContext &ctx, int gage_idx, double report_date)
Query a gage's rainfall at a specific report date.
Definition Gage.cpp:270
void updateAllGages(SimulationContext &ctx, double current_time)
Process all gages for one timestep.
Definition Gage.cpp:110
double getPastRain(const GageState &state, int hours)
Get past n-hour rainfall total.
Definition Gage.cpp:101
void updatePastRain(GageState &state, double current_time)
Update past n-hour rainfall accumulation.
Definition Gage.cpp:85
RainType
Definition Gage.hpp:42
@ INTENSITY
Definition Gage.hpp:43
@ VOLUME
Definition Gage.hpp:44
@ CUMULATIVE
Definition Gage.hpp:45
PrecipSplit splitPrecip(const SimulationContext &ctx, std::size_t sub)
Split a subcatchment's gage precipitation into rain and snow.
Definition Gage.cpp:51
constexpr int MAXPASTRAIN
Max past hours tracked.
Definition Gage.hpp:36
double convertRainfall(double raw_value, GageState &state)
Convert raw rainfall value based on rain type.
Definition Gage.cpp:22
Definition NodeCoupling.cpp:15
Central, reentrant simulation context.
Definition SimulationContext.hpp:292
double past_rain_time
Time of last past-rain update.
Definition Gage.hpp:67
double rain_interval
Rain recording interval (seconds)
Definition Gage.hpp:62
double rainfall
Current rainfall intensity (project units/sec)
Definition Gage.hpp:53
double past_rain_accum
Accumulator for current hour.
Definition Gage.hpp:66
double scale_factor
Rainfall scaling factor (1.0 = no scaling)
Definition Gage.hpp:59
double snow_factor
Snow catch factor.
Definition Gage.hpp:58
double adjust_factor
Monthly/seasonal adjustment factor.
Definition Gage.hpp:61
double past_rain[MAXPASTRAIN]
Past hourly rainfall totals.
Definition Gage.hpp:65
double total_precip
rainfall + snowfall
Definition Gage.hpp:55
RainType rain_type
Definition Gage.hpp:63
double snowfall
Current snowfall intensity (project units/sec)
Definition Gage.hpp:54
double api_rainfall
API-overridden rainfall (-1 = no override)
Definition Gage.hpp:57
double rain_accum
Cumulative rain accumulator (for CUMULATIVE type)
Definition Gage.hpp:56
double units_factor
Unit conversion factor.
Definition Gage.hpp:60
Result of splitting a gage's precipitation for one subcatchment.
Definition Gage.hpp:86
double snowfall
Snowfall (ft/sec, internal units)
Definition Gage.hpp:88
double rainfall
Rainfall (ft/sec, internal units)
Definition Gage.hpp:87