hefty 0.2.0__tar.gz → 0.3.0__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.
- {hefty-0.2.0/src/hefty.egg-info → hefty-0.3.0}/PKG-INFO +7 -4
- {hefty-0.2.0 → hefty-0.3.0}/README.md +3 -0
- {hefty-0.2.0 → hefty-0.3.0}/pyproject.toml +4 -4
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty/custom.py +5 -5
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty/solar.py +346 -874
- hefty-0.3.0/src/hefty/utilities.py +1590 -0
- hefty-0.3.0/src/hefty/wind.py +190 -0
- {hefty-0.2.0 → hefty-0.3.0/src/hefty.egg-info}/PKG-INFO +7 -4
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty.egg-info/SOURCES.txt +8 -1
- hefty-0.3.0/src/hefty.egg-info/requires.txt +4 -0
- hefty-0.3.0/tests/test_adjust_forecast_datetimes.py +43 -0
- hefty-0.3.0/tests/test_get_solar_forecast.py +174 -0
- hefty-0.3.0/tests/test_get_solar_forecast_ensemble.py +141 -0
- hefty-0.3.0/tests/test_get_solar_forecast_fast.py +235 -0
- hefty-0.3.0/tests/test_get_wind_forecast.py +47 -0
- hefty-0.3.0/tests/test_model_input_formatter.py +190 -0
- hefty-0.3.0/tests/test_pv_model.py +87 -0
- hefty-0.2.0/src/hefty/utilities.py +0 -855
- hefty-0.2.0/src/hefty/wind.py +0 -352
- hefty-0.2.0/src/hefty.egg-info/requires.txt +0 -4
- {hefty-0.2.0 → hefty-0.3.0}/LICENSE +0 -0
- {hefty-0.2.0 → hefty-0.3.0}/setup.cfg +0 -0
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty/__init__.py +0 -0
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty/pv_model.py +0 -0
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty.egg-info/dependency_links.txt +0 -0
- {hefty-0.2.0 → hefty-0.3.0}/src/hefty.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hefty
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Some (relatively) lightweight short-term energy forecasting tools for solar, wind, and load.
|
|
5
5
|
Author: Will Hobbs
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -11,11 +11,11 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: Topic :: Scientific/Engineering
|
|
14
|
-
Requires-Python:
|
|
14
|
+
Requires-Python: <3.14,>=3.11
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE
|
|
17
|
-
Requires-Dist: herbie-data[scikit-learn]>=2026.
|
|
18
|
-
Requires-Dist: pvlib>=0.
|
|
17
|
+
Requires-Dist: herbie-data[scikit-learn]>=2026.9.2
|
|
18
|
+
Requires-Dist: pvlib>=0.16.1
|
|
19
19
|
Requires-Dist: pandas>=3.0.0
|
|
20
20
|
Requires-Dist: urllib3>=2.6.0
|
|
21
21
|
Dynamic: license-file
|
|
@@ -132,6 +132,7 @@ The [examples](examples) folder contains several example Jupyter notebooks.
|
|
|
132
132
|
- [ensemble_example.ipynb](examples/ensemble_example.ipynb): Examples of multi-member ensembles with IFS, AIFS, and GEFS.
|
|
133
133
|
- [wind_example.ipynb](examples/wind_example.ipynb): A basic wind resource forecast example using a few models, including converting the data to a format compatible with `windpowerlib`*.
|
|
134
134
|
- [erbs_vs_dirindex.ipynb](examples/erbs_vs_dirindex.ipynb): A comparison of Erbs and DIRINDEX irradiance decomposition models using SURFRAD measurements.
|
|
135
|
+
- [dynamical_example.ipynb](examples\dynamical_example.ipynb): Examples using [dynamical.org](https://dynamical.org) as a data source (`priority`), which can be about 10X faster than other options, but with just a few limitations.
|
|
135
136
|
|
|
136
137
|
\* https://github.com/wind-python/windpowerlib/
|
|
137
138
|
|
|
@@ -144,6 +145,8 @@ fit inside the listed span for the selected cycle. Use
|
|
|
144
145
|
`adjust_forecast_datetimes()` to select an initialization time and lead-time
|
|
145
146
|
combination that satisfies cycle-specific limits. Note that these forecast model schedules/features can change over time, and the `get_fcast_definition` function in `hefty.utilities` is intended to record these changes.
|
|
146
147
|
|
|
148
|
+
>Note that [dynamical.org](https://dynamical.org) (when using `priority='dynamical'`) does not currently have all initialization times and historical data for all models, and `get_fcast_definition` and `adjust_forecast_datetimes()` do not yet account for this. See [dynamical_example.ipynb](examples/dynamical_example.ipynb), the table in [Issue #64](https://github.com/williamhobbs/hefty/issues/64#issuecomment-4939703931), and https://dynamical.org/catalog/ for more info.
|
|
149
|
+
|
|
147
150
|
| Model | Forecast type | Function support | Cycles | Available forecast span | Forecast-hour steps |
|
|
148
151
|
| --- | --- | --- | --- | --- | --- |
|
|
149
152
|
| `hrrr` | NOAA HRRR deterministic NWP | Solar, wind | Hourly; `00z`, `06z`, `12z`, and `18z` have extended range | `0`-`18` h; extended cycles: `0`-`48` h | 1 h |
|
|
@@ -110,6 +110,7 @@ The [examples](examples) folder contains several example Jupyter notebooks.
|
|
|
110
110
|
- [ensemble_example.ipynb](examples/ensemble_example.ipynb): Examples of multi-member ensembles with IFS, AIFS, and GEFS.
|
|
111
111
|
- [wind_example.ipynb](examples/wind_example.ipynb): A basic wind resource forecast example using a few models, including converting the data to a format compatible with `windpowerlib`*.
|
|
112
112
|
- [erbs_vs_dirindex.ipynb](examples/erbs_vs_dirindex.ipynb): A comparison of Erbs and DIRINDEX irradiance decomposition models using SURFRAD measurements.
|
|
113
|
+
- [dynamical_example.ipynb](examples\dynamical_example.ipynb): Examples using [dynamical.org](https://dynamical.org) as a data source (`priority`), which can be about 10X faster than other options, but with just a few limitations.
|
|
113
114
|
|
|
114
115
|
\* https://github.com/wind-python/windpowerlib/
|
|
115
116
|
|
|
@@ -122,6 +123,8 @@ fit inside the listed span for the selected cycle. Use
|
|
|
122
123
|
`adjust_forecast_datetimes()` to select an initialization time and lead-time
|
|
123
124
|
combination that satisfies cycle-specific limits. Note that these forecast model schedules/features can change over time, and the `get_fcast_definition` function in `hefty.utilities` is intended to record these changes.
|
|
124
125
|
|
|
126
|
+
>Note that [dynamical.org](https://dynamical.org) (when using `priority='dynamical'`) does not currently have all initialization times and historical data for all models, and `get_fcast_definition` and `adjust_forecast_datetimes()` do not yet account for this. See [dynamical_example.ipynb](examples/dynamical_example.ipynb), the table in [Issue #64](https://github.com/williamhobbs/hefty/issues/64#issuecomment-4939703931), and https://dynamical.org/catalog/ for more info.
|
|
127
|
+
|
|
125
128
|
| Model | Forecast type | Function support | Cycles | Available forecast span | Forecast-hour steps |
|
|
126
129
|
| --- | --- | --- | --- | --- | --- |
|
|
127
130
|
| `hrrr` | NOAA HRRR deterministic NWP | Solar, wind | Hourly; `00z`, `06z`, `12z`, and `18z` have extended range | `0`-`18` h; extended cycles: `0`-`48` h | 1 h |
|
|
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hefty"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
8
8
|
description = "Some (relatively) lightweight short-term energy forecasting tools for solar, wind, and load."
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.11"
|
|
10
|
+
requires-python = ">=3.11,<3.14"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="Will Hobbs" },
|
|
13
13
|
]
|
|
@@ -19,8 +19,8 @@ classifiers = [
|
|
|
19
19
|
"Topic :: Scientific/Engineering",
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"herbie-data[scikit-learn] >= 2026.
|
|
23
|
-
"pvlib >= 0.
|
|
22
|
+
"herbie-data[scikit-learn] >= 2026.9.2",
|
|
23
|
+
"pvlib >= 0.16.1",
|
|
24
24
|
"pandas >= 3.0.0",
|
|
25
25
|
"urllib3 >= 2.6.0",
|
|
26
26
|
]
|
|
@@ -9,7 +9,7 @@ def get_custom_forecast(latitude, longitude, init_date, run_length,
|
|
|
9
9
|
lead_time_to_start=0, period=3, model='gfs',
|
|
10
10
|
product='pgrb2.0p25', search_str=':TMP:2 m above',
|
|
11
11
|
member='avg', attempts=2, hrrr_hour_middle=True,
|
|
12
|
-
|
|
12
|
+
hrrr_coarsen_window=None, priority=None):
|
|
13
13
|
"""
|
|
14
14
|
Get a custom forecast for one or several sites from one of several
|
|
15
15
|
NWPs. This function uses Herbie [1]_.
|
|
@@ -63,7 +63,7 @@ def get_custom_forecast(latitude, longitude, init_date, run_length,
|
|
|
63
63
|
integrated hourly forecast that is centered in the middle of the
|
|
64
64
|
hour.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
hrrr_coarsen_window : int or None, default None
|
|
67
67
|
If model is 'hrrr', optional setting that is the x and y window size
|
|
68
68
|
for coarsening the xarray dataset, effectively applying spatial
|
|
69
69
|
smoothing to the HRRR model. The HRRR has a native resolution of
|
|
@@ -145,9 +145,9 @@ def get_custom_forecast(latitude, longitude, init_date, run_length,
|
|
|
145
145
|
# calculate wind speed from u and v components
|
|
146
146
|
ds = ds.herbie.with_wind('both')
|
|
147
147
|
|
|
148
|
-
if model == 'hrrr' and
|
|
149
|
-
ds = ds.coarsen(x=
|
|
150
|
-
y=
|
|
148
|
+
if model == 'hrrr' and hrrr_coarsen_window is not None:
|
|
149
|
+
ds = ds.coarsen(x=hrrr_coarsen_window,
|
|
150
|
+
y=hrrr_coarsen_window,
|
|
151
151
|
boundary='trim').mean()
|
|
152
152
|
|
|
153
153
|
# use pick_points for single point or list of points
|