energy_methods.strata_impact#
STRATA output sampling and explicitly hypothetical energy screening.
SCREAM units and cube layout follow NVIDIA’s released STRATA writer. These functions do not run inference, diagnose wind height, or predict asset failures.
- class energy_methods.strata_impact.StormExposure(asset, wind_speed_ms, precipitation_mm_h, temperature_c, wind_alert, precipitation_alert, illustrative_availability)[source]#
Bases:
objectOne asset’s exposure and illustrative production multiplier.
- Parameters:
asset (str)
wind_speed_ms (float)
precipitation_mm_h (float)
temperature_c (float)
wind_alert (bool)
precipitation_alert (bool)
illustrative_availability (float)
- asset: str#
- wind_speed_ms: float#
- precipitation_mm_h: float#
- temperature_c: float#
- wind_alert: bool#
- precipitation_alert: bool#
- illustrative_availability: float#
- energy_methods.strata_impact.screen_asset(asset, *, eastward_wind_ms, northward_wind_ms, precipitation_mm_h, temperature_c, wind_threshold_ms=20.0, rain_threshold_mm_h=15.0)[source]#
Apply hypothetical 15% wind / 5% rain power reductions, additive.
The legacy
illustrative_availabilityname is a scenario power multiplier, not technical availability, failure probability, or an observed loss.- Parameters:
asset (str)
eastward_wind_ms (float)
northward_wind_ms (float)
precipitation_mm_h (float)
temperature_c (float)
wind_threshold_ms (float)
rain_threshold_mm_h (float)
- Return type:
- energy_methods.strata_impact.precipitation_flux_to_mm_h(flux_m_s)[source]#
Convert SCREAM liquid-water-equivalent m/s to mm/h (not kg/m²/s).
- Parameters:
flux_m_s (float)
- Return type:
float
- class energy_methods.strata_impact.GridCell(face, x, y, latitude, longitude, distance_km)[source]#
Bases:
objectPositional cube indices and great-circle distance to a requested site.
- Parameters:
face (int)
x (int)
y (int)
latitude (float)
longitude (float)
distance_km (float)
- face: int#
- x: int#
- y: int#
- latitude: float#
- longitude: float#
- distance_km: float#
- energy_methods.strata_impact.nearest_strata_cell(dataset, *, latitude, longitude, max_distance_km=25.0, rows_per_chunk=64)[source]#
Find a cell on a sphere without loading the global weather fields.
Scan latitude/longitude in bounded face-row chunks. Longitudes in either -180..180 or 0..360 work across the dateline. Invalid cells are ignored; missing coverage or a cell farther than the explicit limit raises an error. This is nearest-cell sampling, without interpolation or terrain correction.
- Parameters:
dataset (Dataset)
latitude (float)
longitude (float)
max_distance_km (float)
rows_per_chunk (int)
- Return type:
- energy_methods.strata_impact.sample_strata_output(dataset, *, face, x, y, step=0, time=0, wind_level=None)[source]#
Sample a single cell using positional indices (legacy interface).
wind_levelis a positional index here. Preferextract_strata_timeseriesfor label-based model-level selection and explicit valid timestamps.- Parameters:
dataset (Dataset)
face (int)
x (int)
y (int)
step (int)
time (int)
wind_level (int | None)
- Return type:
dict[str, float]
- energy_methods.strata_impact.extract_strata_timeseries(dataset, *, cell, wind_level, time_index=0)[source]#
Extract all lead times for one cell and one initialization.
wind_levelis a coordinate label, e.g. 30, NOT position 30 or a height. Native timedeltas and explicitly second-valued numericstepcoordinates are supported. Valid time = initialization + lead.interval_hoursspans the previous saved lead (zero for the start); rates are endpoint samples, so multiplying by this duration is only rectangular quadrature.- Parameters:
dataset (Dataset)
cell (GridCell)
wind_level (int)
time_index (int)
- Return type:
DataFrame
- energy_methods.strata_impact.paired_error_metrics(predicted, reference)[source]#
MAE, RMSE and signed bias on exact paired timestamps, with no silent drop.
The caller supplies SCREAM simulation truth at the same sites, model level and valid times. Historical STRATA simulation dates cannot be validated against observed weather on those calendar dates.
- Parameters:
predicted (Series)
reference (Series)
- Return type:
dict[str, float | int]
- energy_methods.strata_impact.energy_scenario(weather, baseline_mw, *, wind_threshold_ms, rain_threshold_mm_h=15.0, wind_reduction=0.15, rain_reduction=0.05, price_eur_mwh=60.0)[source]#
Apply explicit scenario reductions to external baseline interval-mean MW.
Wind at a model level is only a sensitivity proxy. No turbine power curve, hub-height extrapolation, PV irradiance or failure probabilities are inferred. EUR values are gross energy value, excluding contracts and mitigation costs.
- Parameters:
weather (DataFrame)
baseline_mw (ndarray)
wind_threshold_ms (float)
rain_threshold_mm_h (float)
wind_reduction (float)
rain_reduction (float)
price_eur_mwh (float)
- Return type:
DataFrame