spectral_sky_from_epw
Reconstructs a 1nm spectral sky from an EPW hour, returning a canonical dict. Optionally computes ground-glow for tilted receivers using custom albedo, engine, and atmospheric options.
Instructions
Physical spectral sky (1nm direct + sky-diffuse) reconstructed from an EPW hour.
Returns the canonical record as a dict. If surface_tilt_deg is given, also returns the spectral ground-glow term for that receiver tilt. spectral_albedo (len 401, 380-780nm @1nm) overrides the default gray albedo — pass import_geometry(...)["ground_albedo"] to couple scene ground reflectance to the sky ground-glow term. engine: spectrl2 (default) | smarts (requires SMARTSPATH).
Opt-in refinements (defaults reproduce prior output): ozone_mode='climatology' computes ozone from the EPW LOCATION lat/lon + date (van Heuklon 1979); aerosol_g overrides the 0.65 asymmetry; aod_anchor_nm converts a declared-wavelength AOD (e.g. 550) to tau500 via the Angstrom exponent. smarts_aerosol (engine="smarts" only): None/"rural" (default) or "user" to make the Ångström exponent + asymmetry factor settable via the SMARTS Card 8 USER aerosol model. cloud_variant: which SEDES1 cloud CCM to apply to the sky-diffuse spectrum — 'reanchored' (default, byte-identical to omitting this arg) | 'verbatim' (faithful Fig.11 CCM) | 'seed' (legacy eyeballed 9-anchor seed) | 'local' (your own locally-fitted CCM, requires ccm_coeffs). ccm_coeffs: path to a fitted CCM CSV (from sedes1_fit) — required when cloud_variant='local'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | Yes | ||
| epw | Yes | ||
| hour | Yes | ||
| month | Yes | ||
| engine | No | spectrl2 | |
| aerosol_g | No | ||
| overrides | No | ||
| ccm_coeffs | No | ||
| ozone_mode | No | ||
| aod_anchor_nm | No | ||
| cloud_variant | No | ||
| smarts_aerosol | No | ||
| spectral_albedo | No | ||
| surface_tilt_deg | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||