Skip to content

Commit

Permalink
Update in HSPFOutputReports and ParameterListing
Browse files Browse the repository at this point in the history
HSPFRan is set to False by default.
Updated parameter listings program.
Updated the earlier EXP+ package.
  • Loading branch information
mishranurag committed Apr 14, 2017
1 parent 882f597 commit 9e183dd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
3 changes: 2 additions & 1 deletion HSPEXP/HSPFOutputReports.vb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ Module HSPFOutputReports
lEchoFileisinFilesBlock = True
Else
Logger.Msg("The ECHO file is not available for this model. Please check if model ran successfully last time", vbCritical)
End
Return
End If
Exit For
Expand All @@ -197,7 +198,7 @@ Module HSPFOutputReports



Dim HSPFRan As Boolean = True
Dim HSPFRan As Boolean = False
Using echoFileReader As StreamReader = File.OpenText(lHspfEchoFileName)
While Not echoFileReader.EndOfStream
Dim nextLine As String = echoFileReader.ReadLine()
Expand Down
Binary file modified HSPEXP/Output/HSPEXP+1.30SetUp.exe
Binary file not shown.
21 changes: 17 additions & 4 deletions HSPEXP/modListUCIParameters.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Imports atcUtility
Imports atcUCI
Imports System.Collections.Specialized
Imports MapWinUtility

Public Module modListUCIParameters
Private pPERLND As atcCollection
Expand All @@ -14,25 +15,37 @@ Public Module modListUCIParameters
Dim s As String = ""
Dim ModelName As String = IO.Path.GetFileNameWithoutExtension(aHSPFUCI.Name)
Dim ParameterList As System.IO.StreamWriter
Dim NumberOfReaches As Integer = 0
ParameterList = My.Computer.FileSystem.OpenTextFileWriter(lOutputFolder & "\" & ModelName & "_RCHRES_ParameterList.txt", False)
ParameterList.WriteLine("Parameter list for " & ModelName)

For Each lOperation As HspfOperation In aHSPFUCI.OpnSeqBlock.Opns
If lOperation.Name = "RCHRES" AndAlso Not pRCHRES.Contains(lOperation.Id) Then
pRCHRES.Add(lOperation.Id)
NumberOfReaches += 1
End If
Next

ParameterList.WriteLine("Number Of Reaches in the UCI File = " & NumberOfReaches)
ParameterList.WriteLine("OperationType, OperationID, TableName, PrameterName, ParameterValue")

For Each lOperation As HspfOperation In aHSPFUCI.OpnSeqBlock.Opns
If lOperation.Name = "RCHRES" Then
For Each lTable As HspfTable In lOperation.Tables

For Each lparm As HspfParm In lTable.Parms
ParameterList.WriteLine(lOperation.Name & ", " & lOperation.Id & ", " & lTable.Name & ", " & lparm.Name & ", " & lparm.Value)

Next
Next
End If
Next

ParameterList.Close()


End Sub

Sub ListReachParametersForAllUCIFiles(ByVal lFolderName As String)
lFolderName = "C:\Dropbox (RESPEC)\Basins\data\DO_TMDL_Research\UCI_Files"
lFolderName = "C:\Dropbox (RESPEC)\Basins\data\DO_TMDL_Research\UCI_Files\AR_OK_UCI"
Dim lUCIFileNames As New NameValueCollection
AddFilesInDir(lUCIFileNames, lFolderName, False, "*.uci")
Dim pUci As atcUCI.HspfUci
Expand All @@ -45,7 +58,7 @@ Public Module modListUCIParameters
Try
pUci.FastReadUciForStarter(pHspfMsg, lUCIFile)
Catch ex As Exception

Logger.Msg(ex.ToString, MsgBoxStyle.Critical, "UCI Reading Issue!")
End Try

ListReachParameters(pUci, lFolderName)
Expand Down

0 comments on commit 9e183dd

Please sign in to comment.