hefty 0.2.1__tar.gz → 0.3.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hefty
3
- Version: 0.2.1
3
+ Version: 0.3.1
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
@@ -14,8 +14,8 @@ Classifier: Topic :: Scientific/Engineering
14
14
  Requires-Python: >=3.11
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: herbie-data[scikit-learn]>=2026.3.0
18
- Requires-Dist: pvlib>=0.13.1
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 |
@@ -220,7 +223,7 @@ Those outputs could then be directly passed as inputs to `hefty.solar.get_solar_
220
223
 
221
224
  Model delays are more than just a fixed time: they can vary by lead time and by cycle time. And some cycles have different total run lengths and interval size for some models. `adjust_forecast_datetimes` adjusts for all of this for you.
222
225
 
223
- Delays calculated in `adjust_forecast_datetimes` are based on experiments in this gist https://gist.github.com/williamhobbs/9585ff5d1248ab5de4d9e8665d7c8ea6 (which will hopefully one day be cleaned up and added to this repo somehow), documentation published by ECMWF, and this cool dashboard by dynamical.org https://dynamical.org/status/.
226
+ Delays calculated in `adjust_forecast_datetimes` are based on experiments in this notebook [docs/forecast_model_delays.ipynb](docs/forecast_model_delays.ipynb) (or see this markdown version, [docs/forecast_model_delays.md](docs/forecast_model_delays.md)), documentation published by ECMWF, and this cool dashboard by dynamical.org https://dynamical.org/status/.
224
227
 
225
228
  ## Local disk space
226
229
  The current version of hefty keeps copies of downloaded grib files on your local storage. This can result in a large amount of disk space being used up. Future versions of hefty may change this (see [issue #70](https://github.com/williamhobbs/hefty/issues/70)), but for now, users may need to monitor storage space and manually delete files if needed.
@@ -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 |
@@ -198,7 +201,7 @@ Those outputs could then be directly passed as inputs to `hefty.solar.get_solar_
198
201
 
199
202
  Model delays are more than just a fixed time: they can vary by lead time and by cycle time. And some cycles have different total run lengths and interval size for some models. `adjust_forecast_datetimes` adjusts for all of this for you.
200
203
 
201
- Delays calculated in `adjust_forecast_datetimes` are based on experiments in this gist https://gist.github.com/williamhobbs/9585ff5d1248ab5de4d9e8665d7c8ea6 (which will hopefully one day be cleaned up and added to this repo somehow), documentation published by ECMWF, and this cool dashboard by dynamical.org https://dynamical.org/status/.
204
+ Delays calculated in `adjust_forecast_datetimes` are based on experiments in this notebook [docs/forecast_model_delays.ipynb](docs/forecast_model_delays.ipynb) (or see this markdown version, [docs/forecast_model_delays.md](docs/forecast_model_delays.md)), documentation published by ECMWF, and this cool dashboard by dynamical.org https://dynamical.org/status/.
202
205
 
203
206
  ## Local disk space
204
207
  The current version of hefty keeps copies of downloaded grib files on your local storage. This can result in a large amount of disk space being used up. Future versions of hefty may change this (see [issue #70](https://github.com/williamhobbs/hefty/issues/70)), but for now, users may need to monitor storage space and manually delete files if needed.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hefty"
7
- version = "0.2.1"
7
+ version = "0.3.1"
8
8
  description = "Some (relatively) lightweight short-term energy forecasting tools for solar, wind, and load."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -19,8 +19,8 @@ classifiers = [
19
19
  "Topic :: Scientific/Engineering",
20
20
  ]
21
21
  dependencies = [
22
- "herbie-data[scikit-learn] >= 2026.3.0",
23
- "pvlib >= 0.13.1",
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
- hrrr_coursen_window=None, priority=None):
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
- hrrr_coursen_window : int or None, default None
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 hrrr_coursen_window is not None:
149
- ds = ds.coarsen(x=hrrr_coursen_window,
150
- y=hrrr_coursen_window,
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