Skip to content

Commit

Permalink
Fix lon/lat file for genesis day (#91)
Browse files Browse the repository at this point in the history
* Add validation check to GenerateDistributions
* fix to jdays data
  • Loading branch information
greatrussian committed May 12, 2020
1 parent 5a54388 commit 5f83ae6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions StatInterface/GenerateDistributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ def allDistributions(self, lonLat, parameterList, parameterName=None,

self.pName = parameterName

if len(self.pList) != len(self.lonLat):
errmsg = ("Parameter data and "
"Lon/Lat data are not the same length "
"for {}.".format(parameterName))
self.logger.critical(errmsg)
raise IndexError(errmsg)

maxCellNum = stats.maxCellNum(self.gridLimit, self.gridSpace)

# Writing CDF dataset for all individual cell number into files
Expand Down
2 changes: 1 addition & 1 deletion StatInterface/StatInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def kdeGenesisDate(self):
log.debug('Reading data from %s',
pjoin(self.processPath, 'jdays'))
pList = pjoin(self.processPath, 'jdays')
lonLat = pjoin(self.processPath, 'init_lon_lat')
lonLat = pjoin(self.processPath, 'origin_lon_lat')
kde = KDEParameters.KDEParameters(self.kdeType)
#kde.generateGenesisDateCDF(jdays, lonLat, bw=14,
# genesisKDE=pjoin(self.processPath,
Expand Down

0 comments on commit 5f83ae6

Please sign in to comment.