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).
Licence: sparta-solar is distributed under CC BY-NC-SA 4.0. It is free to use, share and adapt for research and other non-commercial purposes, with attribution and under the same licence. Commercial use is not permitted without a separate agreement with the author.
Quick install
pip install sparta-solar
or with uv:
uv add sparta-solar
Note that the distribution is named sparta-solar, but the Python package is imported as spartasolar:
import spartasolar
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:
import numpy as np
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 research and other non-commercial use, with attribution and under the same licence. Commercial use is not permitted without a separate agreement with the author.
Metadata
Release files for sparta-solar 0.2.3
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.3.tar.gz | 9.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sparta_solar-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 MB
Release files / sparta_solar-0.2.3.tar.gz
| Download URL | sparta_solar-0.2.3.tar.gz |
|---|---|
| Size | 9.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad99719b1b00623b62a19479fdc5f41f5e5f6fc3b745c9adb837fd4fc0fd5b38
|
|
BLAKE2b-256 checksum How to use checksums |
1f4776ac097d235f855474437cd1b809742d05c7c2a14d135eca1e1769194421
|
| 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.3-py3-none-any.whl
| Download URL | sparta_solar-0.2.3-py3-none-any.whl |
|---|---|
| Size | 9.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b2609909cda6e4a5c3a6607a44daf645945e89a7eed8222bf0d8713c91cb813
|
|
BLAKE2b-256 checksum How to use checksums |
7ecaed8a5da21ac44f20f8be9e1e3bd313b3584650bfccb472ff2bef5b1b2011
|
| 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}
|