Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Attention: The newest changes should be on top -->

- MNT: Rename `radius` to `radius_function` in `CylindricalTank` and `SphericalTank`; old `radius=` keyword argument now raises `DeprecationWarning` [#957](https://github.com/RocketPy-Team/RocketPy/pull/957)

### Removed

- MNT: Remove redundant, unused per-level `wind_heading`/`wind_direction` functions from `EnvironmentAnalysis` pressure-level data (derivable from `wind_velocity_x`/`wind_velocity_y`) [#1041](https://github.com/RocketPy-Team/RocketPy/pull/1041)

### Fixed

- BUG: fix NaN in ND linear interpolation outside convex hull [#926](https://github.com/RocketPy-Team/RocketPy/issues/926)
Expand Down
39 changes: 0 additions & 39 deletions rocketpy/environment/environment_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,6 @@ def __init_data_parsing_units(self):
"height_ASL": "m",
"pressure": "hPa",
"temperature": "K",
"wind_direction": "deg",
"wind_heading": "deg",
"wind_speed": "m/s",
"wind_velocity_x": "m/s",
"wind_velocity_y": "m/s",
Expand Down Expand Up @@ -570,8 +568,6 @@ def __parse_pressure_level_data(self):
Must compute the following for each date and hour available in the dataset:
- pressure = Function(..., inputs="Height Above Ground Level (m)", outputs="Pressure (Pa)")
- temperature = Function(..., inputs="Height Above Ground Level (m)", outputs="Temperature (K)")
- wind_direction = Function(..., inputs="Height Above Ground Level (m)", outputs="Wind Direction (Deg True)")
- wind_heading = Function(..., inputs="Height Above Ground Level (m)", outputs="Wind Heading (Deg True)")
- wind_speed = Function(..., inputs="Height Above Ground Level (m)", outputs="Wind Speed (m/s)")
- wind_velocity_x = Function(..., inputs="Height Above Ground Level (m)", outputs="Wind Velocity X (m/s)")
- wind_velocity_y = Function(..., inputs="Height Above Ground Level (m)", outputs="Wind Velocity Y (m/s)")
Expand Down Expand Up @@ -722,39 +718,6 @@ def __parse_pressure_level_data(self):
)
dictionary[date_string][hour_string]["wind_speed"] = wind_speed_function

# Create function for wind heading levels
wind_heading_array = (
np.arctan2(wind_velocity_x_array, wind_velocity_y_array)
* (180 / np.pi)
% 360
)

wind_heading_points_array = np.array(
[height_above_ground_level_array, wind_heading_array]
).T
wind_heading_function = Function(
wind_heading_points_array,
inputs="Height Above Ground Level (m)",
outputs="Wind Heading (Deg True)",
extrapolation="constant",
)
dictionary[date_string][hour_string]["wind_heading"] = wind_heading_function

# Create function for wind direction levels
wind_direction_array = (wind_heading_array - 180) % 360
wind_direction_points_array = np.array(
[height_above_ground_level_array, wind_direction_array]
).T
wind_direction_function = Function(
wind_direction_points_array,
inputs="Height Above Ground Level (m)",
outputs="Wind Direction (Deg True)",
extrapolation="constant",
)
dictionary[date_string][hour_string]["wind_direction"] = (
wind_direction_function
)

return (dictionary, lat0, lat1, lon0, lon1)

@property
Expand Down Expand Up @@ -985,8 +948,6 @@ def converted_pressure_level_data(self):
conversion_dict = {
"pressure": self.unit_system["pressure"],
"temperature": self.unit_system["temperature"],
"wind_direction": self.unit_system["angle"],
"wind_heading": self.unit_system["angle"],
"wind_speed": self.unit_system["wind_speed"],
"wind_velocity_x": self.unit_system["wind_speed"],
"wind_velocity_y": self.unit_system["wind_speed"],
Expand Down
Loading