energy_analysis.strata#
Reproducible STRATA-to-asset study and local-output command line workflow.
Run python -m energy_analysis.strata --demo --output artifacts/strata.
The demo creates synthetic native-layout arrays; it never invokes STRATA.
- energy_analysis.strata.synthetic_inputs()[source]#
Create a deterministic 24-hour fixture with the STRATA output schema.
One small synthetic face covers Canary coordinates; this is not a real cube mesh or forecast. Two model-level labels expose label-versus-index mistakes.
- Return type:
tuple[Dataset, DataFrame]
- energy_analysis.strata.sample_assets(dataset, assets, *, wind_level, time_index=0, max_distance_km=25.0)[source]#
Return weather and a reusable, auditable asset-to-cell mapping.
- Parameters:
dataset (Dataset)
assets (DataFrame)
wind_level (int)
time_index (int)
max_distance_km (float)
- Return type:
tuple[DataFrame, DataFrame]
- energy_analysis.strata.demo_baseline(weather, assets)[source]#
Synthetic interval-mean power plan, separate from STRATA weather.
- Parameters:
weather (DataFrame)
assets (DataFrame)
- Return type:
ndarray
- energy_analysis.strata.compare_reference(weather, reference)[source]#
Score exact site/time/model-level pairs; also show first-lead persistence.
Input reference CSV must contain asset, valid_time, wind_model_level, wind_speed_ms, precipitation_mm_h and temperature_c. No partial joins.
- Parameters:
weather (DataFrame)
reference (DataFrame)
- Return type:
DataFrame
- energy_analysis.strata.scenario_summary(scenario)[source]#
Sum energy/value and endpoint threshold exposure hours per asset.
- Parameters:
scenario (DataFrame)
- Return type:
DataFrame
- energy_analysis.strata.plot_weather(weather)[source]#
Three shared-time panels for model-level wind, rain rate and temperature.
- Parameters:
weather (DataFrame)
- Return type:
Figure
- energy_analysis.strata.write_results(output, weather, cells, *, provenance, scenario=None, metrics=None)[source]#
Export CSVs, a plot and a manifest with hashes of the sampled artifacts.
- Parameters:
output (Path)
weather (DataFrame)
cells (DataFrame)
provenance (dict[str, object])
scenario (DataFrame | None)
metrics (DataFrame | None)
- Return type:
None