Skip to content

Commit

Permalink
flake8 syntax update
Browse files Browse the repository at this point in the history
  • Loading branch information
frodedinessen committed Apr 11, 2024
1 parent 0bcf317 commit 91f6f84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions sarwind/sarwind.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,9 @@ def _calculate_wind(self):
# TODO: Replace U and V bands with pixelfunctions
u = -windspeed*np.sin((180.0 - self['winddirection'])*np.pi/180.0)
v = windspeed*np.cos((180.0 - self['winddirection'])*np.pi/180.0)
self.add_band(array=u, parameters={
'wkv': 'eastward_wind',
'time': wind_direction_time,
})
self.add_band(array=u, parameters={'wkv': 'eastward_wind',
'time': wind_direction_time,}
)
self.add_band(array=v, parameters={'wkv': 'northward_wind', 'time': wind_direction_time})

# set winddir_time to global metadata
Expand Down
2 changes: 1 addition & 1 deletion utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def plot_wind_map(w, vmin=0, vmax=20, title=None):
cb = True
mlon, mlat = w.get_geolocation_grids()
da = xr.DataArray(np.sqrt(np.square(w['U']) + np.square(w['V'])),
dims=["y", "x"],
dims=["y", "x"],
coords={"lat": (("y", "x"), mlat), "lon": (("y", "x"), mlon)})
da.plot.pcolormesh("lon", "lat", ax=ax1, vmin=vmin, vmax=vmax, cmap=cmocean.cm.balance,
add_colorbar=cb)
Expand Down

0 comments on commit 91f6f84

Please sign in to comment.