Loading
Fix SWMM node output unit labels and data bugs
This fixes critical bugs in the custom report_Nodes_TRITON() function that was causing unit label mismatches and data inconsistencies between the .rpt file and individual node output files. Bug fixes: - Fix reversed unit labels: US units were showing metric labels (M3/S, M) and metric units were showing imperial labels (FT3/S, FT) - Fix wrong output index: Was using sequential 'k' counter instead of Node[j].rptFlag - 1, causing data to be read from wrong nodes - Only create output files for nodes where rptFlag is set Changes: - Use FlowUnitWords[FlowUnits] for correct flow unit labels (CFS, CMS) - Use proper conditional (UnitSystem == US ? "FT" : "M") for length units - Use k = Node[j].rptFlag - 1 for correct binary output file index - Move rptFlag check before file creation to avoid unnecessary empty files - Add NULL check for file opening - Fix inconsistent indentation