Skip to content

Commit

Permalink
env: get env along trajectory for certain depth
Browse files Browse the repository at this point in the history
  • Loading branch information
gauteh committed Apr 23, 2024
1 parent 31e09c1 commit 9adc5d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions opendrift/models/basemodel/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ def get_environment(self, variables, time, lon, lat, z, profiles=None, profiles_

return env.view(np.recarray), env_profiles, missing

def get_variables_along_trajectory(self, variables, lons, lats, times):
def get_variables_along_trajectory(self, variables, lons, lats, times, z=0):
self.finalize()
data = {'time': times, 'lon': lons, 'lat': lats}
for var in variables:
Expand All @@ -942,7 +942,7 @@ def get_variables_along_trajectory(self, variables, lons, lats, times):
self.time = time
d = self.get_environment(lon=np.atleast_1d(lons[i]),
lat=np.atleast_1d(lats[i]),
z=np.atleast_1d(0),
z=np.atleast_1d(z),
time=time,
variables=variables,
profiles=None)
Expand Down

0 comments on commit 9adc5d6

Please sign in to comment.