Skip to content

Commit

Permalink
Update wind.py
Browse files Browse the repository at this point in the history
Allow messy input files
  • Loading branch information
Sierd committed Mar 12, 2024
1 parent eb16cdf commit bda20c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aeolis/wind.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def interpolate(s, p, t):
if p['process_wind'] and p['wind_file'] is not None:
# defining the wind inputs the same as the timestep speeds up the simulation significantly
if (np.any(p['wind_file'][:,0]==t)):
s['uw'][:,:] = p['wind_file'][p['wind_file'][:,0]==t,1]
s['udir'][:,:] = p['wind_file'][p['wind_file'][:,0]==t,2]
s['uw'][:,:] = p['wind_file'][p['wind_file'][:,0]==t,1][0] # this extra bracket is needed to accound for messy input files
s['udir'][:,:] = p['wind_file'][p['wind_file'][:,0]==t,2][0]

# alternatively, wind inputs are interpolated based on a circular interpolation.
# this is more time expensive
Expand Down

0 comments on commit bda20c6

Please sign in to comment.