diff --git a/seaduck/eulerian.py b/seaduck/eulerian.py index 6381e21..170d748 100644 --- a/seaduck/eulerian.py +++ b/seaduck/eulerian.py @@ -2,7 +2,6 @@ import logging import numpy as np -import xarray as xr from seaduck.get_masks import get_masked from seaduck.kernel_weight import KnW, _find_pk_4d, _translate_to_tendency @@ -257,6 +256,7 @@ def from_bool_array( self.ocedata["Vol"] except KeyError: self.ocedata._add_missing_vol() + self.tp = self.ocedata.tp inds = np.where(bool_array) try: @@ -305,7 +305,7 @@ def from_bool_array( if isinstance(t, (int, float, np.floating)): t = np.ones(self.N, float) * t elif isinstance(t, np.ndarray): - if len(t)!=self.N: + if len(t) != self.N: raise ValueError("Mismatch between input t and final particle number") if t is not None: self.t = copy.deepcopy(t) diff --git a/seaduck/lagrangian.py b/seaduck/lagrangian.py index 738f0c4..0ef2e02 100644 --- a/seaduck/lagrangian.py +++ b/seaduck/lagrangian.py @@ -102,7 +102,7 @@ def __init__( ): Position.__init__(self) if "bool_array" in kwarg.keys(): - self.from_bool_array(kwarg) + self.from_bool_array(**kwarg) else: self.from_latlon(**kwarg) @@ -866,7 +866,7 @@ def to_list_of_time( for i, tl in enumerate(stops): timestr = str(np.datetime64(round(tl), "s")) logging.info(timestr) - # print(timestr) + print(timestr) if self.save_raw: # save the very start of everything. self.note_taking(stamp=15)