windborne 1.2.6__tar.gz → 1.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {windborne-1.2.6 → windborne-1.2.7}/PKG-INFO +1 -1
- {windborne-1.2.6 → windborne-1.2.7}/pyproject.toml +1 -1
- {windborne-1.2.6 → windborne-1.2.7}/windborne/__init__.py +2 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/cli.py +11 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/forecasts_api.py +17 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/PKG-INFO +1 -1
- {windborne-1.2.6 → windborne-1.2.7}/README.md +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/setup.cfg +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/api_request.py +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/data_api.py +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/observation_formatting.py +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/track_formatting.py +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne/utils.py +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/SOURCES.txt +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/dependency_links.txt +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/entry_points.txt +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/requires.txt +0 -0
- {windborne-1.2.6 → windborne-1.2.7}/windborne.egg-info/top_level.txt +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "windborne"
|
7
|
-
version = "1.2.
|
7
|
+
version = "1.2.7"
|
8
8
|
description = "A Python library for interacting with WindBorne Data and Forecasts API"
|
9
9
|
readme = {file = "README.md", content-type = "text/markdown"}
|
10
10
|
authors = [
|
@@ -22,6 +22,7 @@ from .data_api import (
|
|
22
22
|
from .forecasts_api import (
|
23
23
|
get_point_forecasts,
|
24
24
|
get_initialization_times,
|
25
|
+
get_historical_initialization_times,
|
25
26
|
get_forecast_hours,
|
26
27
|
get_generation_times,
|
27
28
|
|
@@ -64,6 +65,7 @@ __all__ = [
|
|
64
65
|
|
65
66
|
"get_point_forecasts",
|
66
67
|
"get_initialization_times",
|
68
|
+
"get_historical_initialization_times",
|
67
69
|
"get_forecast_hours",
|
68
70
|
"get_generation_times",
|
69
71
|
|
@@ -19,6 +19,7 @@ from . import (
|
|
19
19
|
|
20
20
|
get_point_forecasts,
|
21
21
|
get_initialization_times,
|
22
|
+
get_historical_initialization_times,
|
22
23
|
get_forecast_hours,
|
23
24
|
get_generation_times,
|
24
25
|
get_full_gridded_forecast,
|
@@ -170,6 +171,8 @@ def main():
|
|
170
171
|
'dewpoint_2m',
|
171
172
|
'wind_u_10m',
|
172
173
|
'wind_v_10m',
|
174
|
+
'wind_u_100m',
|
175
|
+
'wind_v_100m',
|
173
176
|
'pressure_msl',
|
174
177
|
'500/temperature',
|
175
178
|
'500/wind_u',
|
@@ -249,6 +252,11 @@ def main():
|
|
249
252
|
initialization_times_parser.add_argument('-i', '--intracycle', action='store_true', help='Use the intracycle forecast')
|
250
253
|
initialization_times_parser.add_argument('-e', '--ens-member', help='Ensemble member (eg 1 or mean)')
|
251
254
|
|
255
|
+
# Historical Initialization Times Command
|
256
|
+
hist_initialization_times_parser = subparsers.add_parser('hist_init_times', help='Get available historical initialization times')
|
257
|
+
hist_initialization_times_parser.add_argument('-i', '--intracycle', action='store_true', help='Use the intracycle forecast')
|
258
|
+
hist_initialization_times_parser.add_argument('-e', '--ens-member', help='Ensemble member (eg 1 or mean)')
|
259
|
+
|
252
260
|
# Forecast Hours Command
|
253
261
|
forecast_hours_parser = subparsers.add_parser('forecast_hours', help='Get available forecast hours for WeatherMesh')
|
254
262
|
forecast_hours_parser.add_argument('-i', '--intracycle', action='store_true', help='Use the intracycle forecast')
|
@@ -458,6 +466,9 @@ def main():
|
|
458
466
|
elif args.command == 'init_times':
|
459
467
|
get_initialization_times(print_response=True, ensemble_member=args.ens_member, intracycle=args.intracycle)
|
460
468
|
|
469
|
+
elif args.command == 'hist_init_times':
|
470
|
+
get_historical_initialization_times(print_response=True, ensemble_member=args.ens_member, intracycle=args.intracycle)
|
471
|
+
|
461
472
|
elif args.command == 'forecast_hours':
|
462
473
|
get_forecast_hours(print_response=True, ensemble_member=args.ens_member, intracycle=args.intracycle)
|
463
474
|
|
@@ -301,6 +301,23 @@ def get_initialization_times(print_response=False, ensemble_member=None, intracy
|
|
301
301
|
return response
|
302
302
|
|
303
303
|
|
304
|
+
def get_historical_initialization_times(print_response=False, ensemble_member=None, intracycle=False):
|
305
|
+
"""
|
306
|
+
Get historical initialization times for forecasts from our archive
|
307
|
+
These may be higher latency to fetch and cannot be used for custom point forecasting
|
308
|
+
"""
|
309
|
+
params = {
|
310
|
+
'ens_member': ensemble_member,
|
311
|
+
'intracycle': intracycle
|
312
|
+
}
|
313
|
+
response = make_api_request(f"{FORECASTS_API_BASE_URL}/historical_initialization_times.json", params=params)
|
314
|
+
|
315
|
+
if print_response:
|
316
|
+
print("Available historical initialization times:")
|
317
|
+
for time in response:
|
318
|
+
print(f" - {time}")
|
319
|
+
|
320
|
+
|
304
321
|
def get_forecast_hours(print_response=False, ensemble_member=None, intracycle=False):
|
305
322
|
"""
|
306
323
|
Get available forecast hours for WeatherMesh
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|