summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--windy/point_forecast.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/windy/point_forecast.py b/windy/point_forecast.py
index 8ee4fe2..f840d97 100644
--- a/windy/point_forecast.py
+++ b/windy/point_forecast.py
@@ -133,15 +133,6 @@ class Prediction:
def parameters(self) -> tuple:
return self._response.parameters
- def levels(self, parameter) -> tuple:
- return self._response.levels(parameter)
-
- def level(self, parameter, level) -> int:
- return self._response.level(parameter, level)
-
- def at(self, parameter, level):
- return self._response.raw_predictions[parameter][self._index][self.level(parameter, level)]
-
def __iter__(self):
return iter(self.parameters)
@@ -152,9 +143,8 @@ class Prediction:
class Response:
"""
Parses raw JSON response from Windy's API to allow easier access to prepared pint-based vertical profiles of
- each of the parameters from the requested forecast scope. Values are first keyed by the parameter name
- (each of the self.parameters), then indexed by the predictions (respectively to self.timestamps), and then
- indexed in numpy array by the levels (respectively to self.levels(parameter)).
+ each of the parameters from the requested forecast scope. Profiles are accessed by the parameter name (each
+ of the self.parameters) and then indexed by the predictions time (respectively to self.timestamps).
Wrapper to access parameters of a certain prediction time point is available:
@@ -201,7 +191,6 @@ class Response:
pass
profiles.append(np.array(profile) * units[parameter])
self.raw_predictions[parameter] = profiles
- self._levels = levels
def __len__(self):
return len(self.timestamps)
@@ -210,12 +199,6 @@ class Response:
def parameters(self) -> tuple:
return tuple(self.raw_predictions.keys())
- def levels(self, parameter) -> tuple:
- return self._levels[parameter]
-
- def level(self, parameter, level) -> int:
- return self.levels(parameter).index(Level(level))
-
def predictions(self) -> Prediction:
"""
Yields Prediction for each time point available in this Response.