Skip to content

Process wind data to visualize wind speed, using a typhoon near Taiwan as an example

Notifications You must be signed in to change notification settings

jhjanicki/TW_typhoon_wind_visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Visualize wind speed, focus on typhoon in Taiwan

Process

  1. Load in necessary libraries
  2. Load in netcdf file using the netCDF4 library
  3. Get the u_wind and v_wind variables: dataset.variables['u'][:], dataset.variables['v'][:]
  4. calculate the wind speed: wind_speed = np.sqrt(u_wind2 + v_wind2)
  5. Get the lats and lons: dataset.variables['latitude'][:], dataset.variables['longitude'][:]
  6. Create color maps: i.e. my_cmap = plt.colormaps['twilight']
  7. Use maplotlib to plot contours: plt.contourf(lons, lats, wind_speed, 60, transform=ccrs.PlateCarree())
  8. IF don't want a global map, set the extent like this: ax.set_extent([118, 130, 15, 35], crs=ccrs.PlateCarree())
  9. Add arrows using on top of map using maplotlib quiver: plt.quiver(lons, lats, u_wind, v_wind, scale=800, color='k')

Data

NOAA

  1. Parameters: GFS sflux, UGRID, VGRID, 1 hybrid level
  2. We will get a GRIB file, will need to convert it to a .nc file

Some other wind sources:

Some example outputs (testing different colors)

Global map

Screenshot 2023-07-10 at 15 06 33

Global map with Robinson projection

Screenshot 2023-07-13 at 15 56 25

Map zoomed into Taiwan

Screenshot 2023-07-13 at 15 56 38

About

Process wind data to visualize wind speed, using a typhoon near Taiwan as an example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published