Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Fixing accuracy of generated .txt files
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleresterly committed Dec 13, 2017
1 parent e529d9b commit ba3ec39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WDRT/ESSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -3098,6 +3098,7 @@ def loadFromText(self, dirPath = None):
buoy46022 = ESSC.Buoy('46022','NDBC')
buoy46022.loadFromText()
'''

dateVals = []
spectralVals = []
numLines = 0
Expand Down Expand Up @@ -3263,7 +3264,7 @@ def saveAsTxt(self, savePath = "./Data/"):

freqLine = "YYYY MM DD hh"
for j in range(len(self.freqList[i])):
freqLine += (" " + "%2.3f" % self.freqList[i][j])
freqLine += (" " + "%2.4f" % self.freqList[i][j])
freqLine += "\n"
swdFile.write(freqLine)
for j in range(len(self.dateList)):
Expand All @@ -3280,7 +3281,7 @@ def saveAsTxt(self, savePath = "./Data/"):
bFile = True
break
swdLine = ' '.join("%0*d" % (2,dateVal) for dateVal in self.dateList[j + dateIndexDiff]) + " "
swdLine += " ".join("%5s" % val for val in self.swdList[i][j]) + "\n"
swdLine += " ".join("%6s" % val for val in self.swdList[i][j]) + "\n"
swdFile.write(swdLine)


Expand Down

0 comments on commit ba3ec39

Please sign in to comment.