@@ -105,8 +105,7 @@ class Field:
105105 def _interp_template (
106106 self ,
107107 ti : int ,
108- ei : int ,
109- bcoords : np .ndarray ,
108+ position : dict [str , tuple [int , float | np .ndarray ]],
110109 tau : np .float32 | np .float64 ,
111110 t : np .float32 | np .float64 ,
112111 z : np .float32 | np .float64 ,
@@ -316,8 +315,8 @@ def eval(self, time: datetime, z, y, x, particle=None, applyConversion=True):
316315
317316 try :
318317 tau , ti = _search_time_index (self , time )
319- bcoords , _ei = self .grid .search (z , y , x , ei = _ei )
320- value = self ._interp_method (self , ti , _ei , bcoords , tau , time , z , y , x )
318+ position = self .grid .search (z , y , x , ei = _ei )
319+ value = self ._interp_method (self , ti , position , tau , time , z , y , x )
321320
322321 if np .isnan (value ):
323322 # Detect Out-of-bounds sampling and raise exception
@@ -445,14 +444,14 @@ def eval(self, time: datetime, z, y, x, particle=None, applyConversion=True):
445444
446445 try :
447446 tau , ti = _search_time_index (self .U , time )
448- bcoords , _ei = self .grid .search (z , y , x , ei = _ei )
447+ position = self .grid .search (z , y , x , ei = _ei )
449448 if self ._vector_interp_method is None :
450- u = self .U ._interp_method (self .U , ti , _ei , bcoords , tau , time , z , y , x )
451- v = self .V ._interp_method (self .V , ti , _ei , bcoords , tau , time , z , y , x )
449+ u = self .U ._interp_method (self .U , ti , position , tau , time , z , y , x )
450+ v = self .V ._interp_method (self .V , ti , position , tau , time , z , y , x )
452451 if "3D" in self .vector_type :
453- w = self .W ._interp_method (self .W , ti , _ei , bcoords , tau , time , z , y , x )
452+ w = self .W ._interp_method (self .W , ti , position , tau , time , z , y , x )
454453 else :
455- (u , v , w ) = self ._vector_interp_method (self , ti , _ei , bcoords , time , z , y , x )
454+ (u , v , w ) = self ._vector_interp_method (self , ti , position , time , z , y , x )
456455
457456 # print(u,v)
458457 if applyConversion :
0 commit comments