energy_analysis.climate_comparison.site#
One-site climate context with bounded nearest-source lookup and full provenance.
Nearest points provide screening context, not an assertion that a site occupies the same climate cell. No interpolation, refitting or silent nearest-valid search.
- energy_analysis.climate_comparison.site.site_climate_profile(latitude, longitude, *, catalogues, source_metadata, jrc_model=None, radius_km=50.0)[source]#
Return all four schemes, native row fields, distances, metadata and uses.
cataloguesusesjrc,ml21,pvczkeys and normalized reader outputs; KGPV reference labels are carried in ML21. Supply full catalogues for arbitrary sites.source_metadatarequires source, period and resolution for every supplied table; extra provenance fields are retained.Distances use a mean-radius sphere and an inclusive caller-selected radius. All equally nearest rows are returned, including coincident rounded PVCZ coordinates. Conflicting labels yield
ambiguouswith no selected code. A nearest row with missing features stays missing; a farther complete row cannot substitute for it. Empty, out-of-radius and absent sources are explicit.- Parameters:
latitude (float)
longitude (float)
catalogues (dict[str, DataFrame])
source_metadata (dict[str, dict[str, Any]])
jrc_model (ClimateClusterModel | None)
radius_km (float)
- Return type:
dict[str, Any]
- energy_analysis.climate_comparison.site.load_site_example(directory)[source]#
Load verified, full-field Rengo subsets and the existing global JRC model.
- Parameters:
directory (Path)
- Return type:
tuple[dict[str, DataFrame], dict[str, Any], ClimateClusterModel]