sparta-solar: Clear-sky Solar Irradiance with the SPARTA Radiative Transfer Model
A Python library to compute clear-sky solar irradiance at the ground surface using the Solar PArameterization of the Radiative Transfer of the Atmosphere (SPARTA) radiative transfer model, with built-in access to multiple atmospheric databases (Copernicus CAMS Radiative Service via SODA, hourly NASA MERRA-2 data via Google Earth Engine, and a daily dataset curated and maintained as part of the sparta-solar library on a dedicated Hugging Face dataset).
Quick install
pip install sparta-solar
or with uv:
uv add sparta-solar
Quick examples
At individual sites:
import pandas as pd
from spartasolar.atmosphere import merra2_daily
times = pd.date_range("2020-06-15", periods=24, freq="h")
atmos = merra2_daily.at_sites(
times=times,
latitude=36.72, # or a sequence of latitudes...
longitude=-4.42) # ... and longitudes
result = atmos.compute()
print(result)
On a regular spatial grid:
lats = np.arange(-60, 60.1, 1)
lons = np.arange(-90, 90.1, 1)
atmos = merra2_daily.on_regular_grid(
times=times,
latitude=lats,
longitude=lons)
result = atmos.compute()
print(result)
Documentation
Full documentation — installation guide, user guide, quick reference, and API reference — is available at https://jararias.github.io/sparta-solar
Citation
@article{ruizarias2023sparta,
author = {Ruiz-Arias, Jose A.},
title = {{SPARTA}: Solar parameterization for the radiative transfer of the cloudless atmosphere},
journal = {Renewable and Sustainable Energy Reviews},
volume = {188},
pages = {113833},
year = {2023},
doi = {10.1016/j.rser.2023.113833}
}
License
CC BY-NC-SA 4.0 — free for non-commercial use with attribution.
Metadata
Release files for sparta-solar 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sparta_solar-0.2.2.tar.gz | 9.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sparta_solar-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 MB
Release files / sparta_solar-0.2.2.tar.gz
| Download URL | sparta_solar-0.2.2.tar.gz |
|---|---|
| Size | 9.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2da2212facfb34595dbd307bb1f4228807b2964ad007d78bee7c83d766f61ce0
|
|
BLAKE2b-256 checksum How to use checksums |
e4ce3d2c66deb086d8604358803d83f05c0f5425cd920c58e6474ff0a3207018
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / sparta_solar-0.2.2-py3-none-any.whl
| Download URL | sparta_solar-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9ef6d8c7a308460df4f605d1cec8d3e7f75adf35c095c35b81d5e0dce611b8f
|
|
BLAKE2b-256 checksum How to use checksums |
685f81659b371036e865652e6f17d4c4be54dd96b1f19424efbe4f8be7fbd3e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|