@@ -266,17 +266,14 @@ def eval(self, time: datetime, z, y, x, particle=None, applyConversion=True):
266266 if np .isnan (value ):
267267 # Detect Out-of-bounds sampling and raise exception
268268 _raise_field_out_of_bound_error (z , y , x )
269- else :
270- return value
271269
272270 except (FieldSamplingError , FieldOutOfBoundError , FieldOutOfBoundSurfaceError ) as e :
273271 e .add_note (f"Error interpolating field '{ self .name } '." )
274272 raise e
275273
276274 if applyConversion :
277- return self .units .to_target (value , z , y , x )
278- else :
279- return value
275+ value = self .units .to_target (value , z , y , x )
276+ return value
280277
281278 def __getitem__ (self , key ):
282279 self ._check_velocitysampling ()
@@ -359,7 +356,6 @@ def eval(self, time: datetime, z, y, x, particle=None, applyConversion=True):
359356 else :
360357 (u , v , w ) = self ._vector_interp_method (self , ti , position , time , z , y , x )
361358
362- # print(u,v)
363359 if applyConversion :
364360 u = self .U .units .to_target (u , z , y , x )
365361 v = self .V .units .to_target (v , z , y , x )
0 commit comments