Tabular reporting of legacy simulation statistics.
More...
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include "headers.h"
#include "lid.h"
|
| void | writeSubcatchRunoff () |
| | Write subcatchment runoff totals, peak flows and runoff coefficients.
|
| |
| void | writeGroundwater (void) |
| | Write subcatchment groundwater balances and final states.
|
| |
| void | writeSubcatchLoads () |
| | Write subcatchment pollutant washoff loads and system totals.
|
| |
| void | writeNodeDepths () |
| | Writes simulation statistics for nodes to report file.
|
| |
| void | writeNodeFlows () |
| | Writes flow statistics for nodes to report file.
|
| |
| void | writeNodeSurcharge () |
| | Write node surcharge durations and maximum crown/rim clearances.
|
| |
| void | writeNodeFlooding () |
| | Write node flooding duration, peak rate, volume and ponding.
|
| |
| void | writeStorageVolumes () |
| | Writes simulation statistics for storage units to report file.
|
| |
| void | writeOutfallLoads () |
| | Write outfall flow frequency, volume and pollutant-loading statistics.
|
| |
| void | writeLinkFlows () |
| | Writes simulation statistics for links to report file.
|
| |
| void | writeFlowClass () |
| | Writes flow classification for each conduit to report file.
|
| |
| void | writeLinkSurcharge () |
| | Write conduit full-flow and capacity-limited durations.
|
| |
| void | writePumpFlows () |
| | Writes simulation statistics for pumps to report file.
|
| |
| void | writeLinkLoads () |
| | Write per-link pollutant loads accumulated during routing.
|
| |
| void | statsrpt_writeReport () |
| | Reports simulation summary statistics.
|
| |
Tabular reporting of legacy simulation statistics.
- Author
- Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com (OpenSWMM maintenance and extensions)
- Copyright
- Copyright (c) 2026 Caleb Buahin. OpenSWMM contributions only; original EPA SWMM credits are retained.
- License
- Apache-2.0 for OpenSWMM contributions; original EPA SWMM provenance is retained.
◆ _CRT_SECURE_NO_DEPRECATE
| #define _CRT_SECURE_NO_DEPRECATE |
◆ WRITE
Value:
void report_writeLine(const char *line)
Writes a line of text to the report file.
Definition report.c:211
◆ writeFlowClass()
| void writeFlowClass |
( |
void | | ) |
|
Writes flow classification for each conduit to report file.
◆ writeGroundwater()
| void writeGroundwater |
( |
void | | ) |
|
Write subcatchment groundwater balances and final states.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Normalizes accumulated mean moisture/water-table values by elapsed runoff seconds; that duration must be positive. Outputs authored depth, flow and elevation units with dimensionless moisture.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeLinkFlows()
| void writeLinkFlows |
( |
void | | ) |
|
Writes simulation statistics for links to report file.
◆ writeLinkLoads()
| void writeLinkLoads |
( |
void | | ) |
|
Write per-link pollutant loads accumulated during routing.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Converts internal loading to authored mass units and uses log10 values for COUNT pollutants. Does not alter accumulated link loads.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeLinkSurcharge()
| void writeLinkSurcharge |
( |
void | | ) |
|
Write conduit full-flow and capacity-limited durations.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Excludes dummy/nonconduit links and untouched records. Durations use hours with a 0.01-hour report minimum on included rows.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeNodeDepths()
| void writeNodeDepths |
( |
void | | ) |
|
Writes simulation statistics for nodes to report file.
◆ writeNodeFlooding()
| void writeNodeFlooding |
( |
void | | ) |
|
Write node flooding duration, peak rate, volume and ponding.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Excludes outfalls and unflooded nodes. Uses hours, authored flow/volume units and either ponding depth or volume according to routing method.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeNodeFlows()
| void writeNodeFlows |
( |
void | | ) |
|
Writes flow statistics for nodes to report file.
◆ writeNodeSurcharge()
| void writeNodeSurcharge |
( |
void | | ) |
|
Write node surcharge durations and maximum crown/rim clearances.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Excludes outfalls and unsurcharged nodes; durations are hours and clearances use authored length units. Prints a no-surcharge message when empty.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeOutfallLoads()
| void writeOutfallLoads |
( |
void | | ) |
|
Write outfall flow frequency, volume and pollutant-loading statistics.
- Precondition
- Frpt.file, outfall statistics, report counts and model arrays are initialized; ReportStepCount is positive when outfall statistics are written.
Reads global results and emits authored flow/volume/mass units, including log-count pollutant loads. Allocates and frees a temporary total load array; allocation and output failures are not returned as a status. No table is written when the model contains no outfall nodes.
◆ writePumpFlows()
| void writePumpFlows |
( |
void | | ) |
|
Writes simulation statistics for pumps to report file.
◆ writeStorageVolumes()
| void writeStorageVolumes |
( |
void | | ) |
|
Writes simulation statistics for storage units to report file.
◆ writeSubcatchLoads()
| void writeSubcatchLoads |
( |
void | | ) |
|
Write subcatchment pollutant washoff loads and system totals.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Allocates/frees a temporary pollutant-total array and silently skips output on allocation failure. COUNT pollutants are displayed as log10 loads.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ writeSubcatchRunoff()
| void writeSubcatchRunoff |
( |
void | | ) |
|
Write subcatchment runoff totals, peak flows and runoff coefficients.
- Precondition
- Frpt.file, global model arrays, statistics and report unit settings are initialized for the current completed/reportable simulation.
Uses accumulated volumes divided by each nonzero subcatchment area for rainfall-depth units, and authored flow/volume units for aggregate runoff.
- Note
- Uses shared state without parameters; does not close or flush the report stream, and does not return a status for fprintf failures.
◆ LinkStats
◆ MaxOutfallFlow
◆ MaxRunoffFlow
◆ NodeInflow
◆ NodeOutflow
◆ NodeStats
◆ OutfallStats
◆ PumpStats
◆ RoutingTimeSpan
◆ StorageStats
◆ SubcatchStats