Commit 3bafff4d authored by Carl Schreck's avatar Carl Schreck
Browse files

Goodnight

parent 3eb0face
......@@ -49,14 +49,19 @@ class Ibtracs:
is_eligible = is_main & is_tropical & is_strong
neligible = np.sum(is_eligible, axis=1)
ind_eligible = np.argmax(is_eligible,1)
retval = False & is_eligible
# retval = False & is_eligible
retval = (np.zeros(is_eligible.shape, dtype=bool))
# retval = xr.DataArray(np.zeros(is_eligible.shape, dtype=bool))
# print(retval)
for i,j in enumerate(ind_eligible):
if neligible[i] > 0:
retval[i,j] = True
retval['oned'] = np.any(retval, axis=1)
# print(np.c_[self.ds.sid.values[retval1d],self.ds.usa_wind.values[retval],lmi[retval1d]])
# retval_oned = np.any(retval, axis=1)
# print(np.c_[self.ds.sid.values[retval_oned],
# self.ds.usa_wind.values[retval],lmi[retval_oned]])
return(retval)
def check_basin(self, target_basin='NA'):
target_basin = target_basin.upper()
# Handle special cases
......@@ -91,8 +96,8 @@ class Ibtracs:
#US_EC will require point in polygon
#manual function: http://www.ariel.com.au/a/python-point-int-poly.html
#https://automating-gis-processes.github.io/CSC18/lessons/L4/point-in-polygon.html
else
retval = target_basin == self.ds.basin
else:
retval = target_basin.encode() == self.ds.basin
return(retval)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment