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

Commit

Permalink
Fixing problem with CDIP data types
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleresterly committed Oct 25, 2017
1 parent 20ef833 commit 0b96d6b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions WDRT/ESSC.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def __getNonParaCopulaParams(self,Ndata, max_T, max_Hs):

# Nonparametric PDF for T
temp = sm.nonparametric.KDEUnivariate(T)
temp.fit(bw = bwT)

temp.fit(bw = bwT.astype(np.double))
f_t = temp.evaluate(pts_t)

# Nonparametric CDF for Hs
Expand Down Expand Up @@ -2487,7 +2488,7 @@ def __fetchCDIP(self,savePath,proxy):
urllib.urlretrieve (url, filePath)
self.__processCDIPData(filePath)

def __loadCDIP(self, filePath = None):
def loadCDIP(self, filePath = None):
"""
Loads the Hs and T values of the given site from the .nc file downloaded from
http://cdip.ucsd.edu/
Expand Down Expand Up @@ -2524,8 +2525,8 @@ def __processCDIPData(self,filePath):
except IOError:
raise IOError("Could not find data for CDIP site: " + self.buoyNum)

self.Hs = data["waveHs"][:]
self.T = data["waveTa"][:]
self.Hs = np.array(data["waveHs"][:], dtype = np.double)
self.T = np.array(data["waveTa"][:], dtype = np.double)
data.close()

#Some CDIP buoys record data every half hour rather than every hour
Expand Down

0 comments on commit 0b96d6b

Please sign in to comment.