@@ -27,6 +27,7 @@ Module HSPFOutputReports
2727 Private pRunUci As Boolean = False 'Anurag added this option if the user wants this program to run the uci as well
2828 Private pModelQAQC As Boolean = False
2929 Private pSDateJ, pEDateJ As Double
30+ Private pSeasonStartMonth, pSeasonEndMonth As Integer 'for load allocation reports
3031 Private pOutFolderName As String
3132 Private pMultiSimulation As Boolean = False
3233 Private pAdditionalGraphs As Boolean = False
@@ -158,6 +159,8 @@ Module HSPFOutputReports
158159 Using lProgress As New ProgressLevel
159160 pSDateJ = StartUp.DateTimePicker1.Value.ToOADate()
160161 pEDateJ = StartUp.DateTimePicker2.Value.ToOADate() + 1
162+ pSeasonStartMonth = StartUp.cboStartMonth.SelectedIndex + 1 'for load allocation reports
163+ pSeasonEndMonth = StartUp.cboEndMonth.SelectedIndex + 1
161164
162165 'get echo file name from files block
163166 Dim lHspfEchoFileName As String = pTestPath & "hspfecho.out" 'Get the default name of echo file
@@ -683,8 +686,33 @@ Module HSPFOutputReports
683686 Dim lReport7LoadingRates As New atcReport.ReportText
684687 Dim lDataForBarGraphs As New atcCollection
685688
689+ 'pbd season handling here
690+ Dim lSeasonStartMonth As Integer = pSeasonStartMonth
691+ Dim lSeasonEndMonth As Integer = pSeasonEndMonth
692+ Dim lSeasonsLabel As String = ""
693+ Dim lSeasonScenarioResults As New atcDataSource
694+ Dim lSeasons As New atcSeasonsYearSubset(lSeasonStartMonth, 1 , lSeasonEndMonth, 31 )
695+ Dim lSeasonsMonth As New atcSeasonsMonth()
696+ Dim lSeasonFrac As Double = 0.0
697+ For lMon As Integer = lSeasonStartMonth To lSeasonEndMonth
698+ lSeasonFrac += lSeasonsMonth.SeasonYearFraction(lMon)
699+ Next
700+ lSeasons.SeasonSelected( 0 ) = False 'outside
701+ lSeasons.SeasonSelected( 1 ) = True 'inside
702+ If lSeasonStartMonth <> 1 Or lSeasonEndMonth <> 12 Then
703+ lSeasonsLabel = "for months " & MonthName(lSeasonStartMonth) & " thru " & MonthName(lSeasonEndMonth)
704+ For Each lTimeseries As atcTimeseries In lScenarioResults.DataSets
705+ Dim lSplitTS As atcTimeseriesGroup = lSeasons.Split(lTimeseries, Nothing )
706+ lSplitTS( 1 ) = lSplitTS( 1 ) * lSeasonFrac
707+ lSeasonScenarioResults.AddDataSet(lSplitTS( 1 ))
708+ Next
709+ Else
710+ lSeasonScenarioResults = lScenarioResults
711+ End If
712+
686713 HspfSupport.ConstituentBudget.Report(aHspfUci, lConstituent, aOperationTypes, pBaseName,
687- lScenarioResults, pOutputLocations, aRunMade, pSDateJ, pEDateJ, lConstProperties,
714+ lSeasonScenarioResults, pOutputLocations, aRunMade,
715+ pSDateJ, pEDateJ, lConstProperties, lSeasonsLabel,
688716 lReport1ReachBudget,
689717 lReport2NPSLoads,
690718 lReport3LoadAllocationAll,
0 commit comments