energy_methods.ccya#
Climate Change Yield Assessment (CCYA), Ascencio Vásquez (2021), §7.5.
Monthly climate-to-yield calibration, separate irradiance/temperature/power
effects, and cumulative comparisons with measured annual yields. See
docs/ccya.md for the thesis equation map and explicit implementation choices.
No data acquisition, calendar conversion, or degradation-rate inference occurs.
- class energy_methods.ccya.LinearSiteAdaptation(slope, intercept, training_min, training_max, training_rows)[source]#
Bases:
objectOLS map from modelled monthly means to measured monthly means (§7.5.1).
- Parameters:
slope (float)
intercept (float)
training_min (float)
training_max (float)
training_rows (int)
- slope: float#
- intercept: float#
- training_min: float#
- training_max: float#
- training_rows: int#
- energy_methods.ccya.fit_site_adaptation(modelled, measured)[source]#
Fit y = a*x+b to supplied, already aligned monthly pairs.
All pairs must be finite. Constant predictors or nonpositive slopes fail; no missing-data imputation or silent fallback to identity is performed.
- Parameters:
modelled (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
measured (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
- Return type:
- class energy_methods.ccya.CCYAConfig(gamma_per_c=-0.0045, ross_c_m2_w=0.03, rolling_years=10, min_calibration_years=2)[source]#
Bases:
objectThermal defaults from thesis p. 161; rates are fractions, not percentages.
- Parameters:
gamma_per_c (float)
ross_c_m2_w (float)
rolling_years (int)
min_calibration_years (int)
- gamma_per_c: float#
- ross_c_m2_w: float#
- rolling_years: int#
- min_calibration_years: int#
- class energy_methods.ccya.CCYAResult(monthly, annual, metadata)[source]#
Bases:
objectMonthly decomposition and annual/cumulative metrics for one scenario/member.
- Parameters:
monthly (DataFrame)
annual (DataFrame)
metadata (dict[str, object])
- monthly: DataFrame#
- annual: DataFrame#
- metadata: dict[str, object]#
- class energy_methods.ccya.CCYAModel(config, ghi_adaptation, temperature_adaptation, daily_yield_per_ghi, reference_module_temperature_c, historical_annual_yields, monthly_ghi_min, monthly_ghi_max, calibration_start, calibration_end)[source]#
Bases:
objectFrozen monthly response calibrated only on the supplied historical overlap.
- Parameters:
config (CCYAConfig)
ghi_adaptation (LinearSiteAdaptation)
temperature_adaptation (LinearSiteAdaptation)
daily_yield_per_ghi (FloatArray)
reference_module_temperature_c (FloatArray)
historical_annual_yields (FloatArray)
monthly_ghi_min (FloatArray)
monthly_ghi_max (FloatArray)
calibration_start (str)
calibration_end (str)
- config: CCYAConfig#
- ghi_adaptation: LinearSiteAdaptation#
- temperature_adaptation: LinearSiteAdaptation#
- daily_yield_per_ghi: FloatArray#
- reference_module_temperature_c: FloatArray#
- historical_annual_yields: FloatArray#
- monthly_ghi_min: FloatArray#
- monthly_ghi_max: FloatArray#
- calibration_start: str#
- calibration_end: str#
- to_dict()[source]#
Export coefficients, calibration bounds, units and attribution as JSON data.
- Return type:
dict[str, object]
- project(climate, *, scenario, degradation_per_year=0.0, age_at_start_years=0.0, power_factors=None)[source]#
Assess complete future years for one site/model/member/scenario.
Inputs: monthly all-hours mean GHI (W/m²), ambient temperature (°C), native-calendar days. Linear power retention is 1-rate*age, with age sampled at each operating year’s start. Alternatively pass an explicitly aligned monthly power-retention series for a nonlinear degradation path. No scenario probabilities, stochastic simulation or extrapolation cap are implied. Nonphysical negative predictions raise, rather than clip.
- Parameters:
climate (DataFrame)
scenario (str)
degradation_per_year (float)
age_at_start_years (float)
power_factors (Series | None)
- Return type:
- energy_methods.ccya.fit_ccya(measured, historical_climate, *, config=CCYAConfig(gamma_per_c=-0.0045, ross_c_m2_w=0.03, rolling_years=10, min_calibration_years=2))[source]#
Calibrate CCYA on an exact, explicit historical overlap of full years.
Both inputs require a monthly PeriodIndex and columns ghi_wm2, temperature_c, days. Measured data also need monthly total dc_yield_kwh_kwp, normalized with qualified DC STC capacity. Inputs must already be coverage-qualified; missing months/values fail. Model calendars may differ from the observed calendar, because fitting uses mean daily yield.
The invariant response scales each calendar month’s centroid daily yield proportionally to raw modelled GHI. This is an explicit implementation choice for the seasonal relationship illustrated in thesis Figure 7.13.
- Parameters:
measured (DataFrame)
historical_climate (DataFrame)
config (CCYAConfig)
- Return type: