windmap
See Wind Interpolation Methods for the three methods EarthSHAB uses to interpolate wind from discrete forecast pressure levels to the balloon’s continuous altitude, how to pick between them, and side-by-side hodographs showing how each one behaves.
This is file generates a 3d windrose plot for a particular coordinate and timestamp. The polar plot displays information on wind speed and direction at various altitudes in a visual format
- class windmap.Windmap[source]
-
- plotWind2(hour_index, lat, lon, num_interpolations=100, interpolation='linear')[source]
Plots a 3D windrose by interpolating wind speed and direction between pressure levels.
- Parameters:
hour_index (int) – Time index from forecast file
lat (float) – Latitude coordinate [deg]
lon (float) – Longitude coordinate [deg]
num_interpolations (int) – Points to interpolate between adjacent pressure levels (linear) or total sample points across the full altitude range (spline)
interpolation (str) –
'linear'interpolates speed and direction between adjacent pressure levels with angle-wrap correction (default);'spline'fits a CubicSpline across all pressure levels for smoother, continuous curves
- Returns:
3D windrose plot
- Return type:
matplotlib.plot
- plotWindMethod(hour_index, lat, lon, method='linear_full', alt_step=100.0, ax=None, vmin=None, vmax=None, alt_max=None, show_title=True)[source]
3D polar windrose for a single production interpolation method.
Same visual conventions as
plotWind2()(polar projection, radius = altitude, angle = bearing, color = wind speed), but the wind profile is interpolated using the named production method fromconfig_earth.forecast['wind_interpolation']instead of the ad-hoc visualization-only schemes inplotWind2. This makes the panel a faithful picture of what the simulator actually sees with that method.- Parameters:
method (str) –
'linear_neighbors','linear_full', or'spline_full'alt_step (float) – Altitude sample spacing [m] for the dense query grid
ax – Optional pre-existing polar matplotlib Axes
vmin – Color-scale lower bound for wind speed [m/s] (shared bounds across panels)
vmax – Color-scale upper bound for wind speed [m/s]
alt_max – Outer radial limit [m] (shared across panels)
- Returns:
(Figure, PathCollection) — the scatter handle lets the caller attach a colorbar
- plotWindMethodsComparison(hour_index, lat, lon, alt_step=100.0)[source]
Three side-by-side polar windrose panels — one per production interpolation method — with shared color and radial scales.
- windVectorToBearing(u, v, h)[source]
Converts U-V wind data at specific heights to angular and radial components for polar plotting.
- Parameters:
u (float64 array) – U-Vector Wind Component from Forecast
v (float64 array) – V-Vector Wind Component from Forecast
h (float64 array) – Corresponding Converted Altitudes (m) from Forecast
- Returns:
Array of bearings, radius, colors, and color map for plotting
- Return type:
array