Skip to main content

Solar PArameterization for the Radiative Transfer of the Atmosphere

Project description

logo

sparta-solar: Clear-sky Solar Irradiance with the SPARTA Radiative Transfer Model

Python Version Tests Coverage License

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparta_solar-0.2.0.tar.gz (9.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparta_solar-0.2.0-py3-none-any.whl (9.8 MB view details)

Uploaded Python 3

File details

Details for the file sparta_solar-0.2.0.tar.gz.

File metadata

  • Download URL: sparta_solar-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for sparta_solar-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e173407b174c2c5ec9e35cef60cd236c9754b5bdbca9baef0dd9e51b0b0f641c
MD5 6583119302b018f5a88c78ab61dd61ed
BLAKE2b-256 3d4768f0ba3619d6f1ea93b6bdf4ddfe2fa2b8eaf20888477809076627ca1c83

See more details on using hashes here.

File details

Details for the file sparta_solar-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sparta_solar-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f48a66dba58df9106856e54556ad32d2639df50401a9490f18e748bbbbffab8e
MD5 744140d7692c7c3b415409082a0cf46f
BLAKE2b-256 3f8db5445390cbef44daaed152a23770cf6b1a09f73af8188529269cb0146521

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page