Skip to main content

solar-radiation is a high-resolution solar irradiance calculator that computes extraterrestrial solar radiation flux at user-defined time intervals.

Project description

solar-radiation


Installation

pip install solar-radiation

If you have Poetry

git clone https://github.com/Hiksang/solar-radiation.git
cd solar-radiation
poetry install

If you don't have Poetry:

pip install poetry

Quick Start

from serc.solar_radiation import calculate_extraterrestrial_radiation
import datetime

df = calculate_extraterrestrial_radiation(
    latitude=37.5665,           # Seoul
    longitude=126.9780,
    start_date=datetime.date(2025, 6, 21),
    end_date=datetime.date(2025, 6, 21),
    time_interval="1h",
    timezone="Asia/Seoul",      # IANA timezone name (e.g., "Asia/Seoul", "UTC", "America/New_York")
)

print(df)

Main Functions

calculate_extraterrestrial_radiation Calculates extraterrestrial solar radiation over user-specified date ranges and intervals.

Parameters:

latitude (float): Latitude of location (degrees)

longitude (float): Longitude of location (degrees)

start_date (datetime.date): Start date

end_date (datetime.date): End date

time_interval (str): Time interval ('1m', '5m', '15m', '30m', '1h', '4h', '12h', '1d')

timezone (str): Timezone in IANA format (e.g., "Asia/Seoul", "UTC")

surface_tilt (float): Surface tilt from horizontal (degrees)

surface_azimuth (float): Surface azimuth (degrees from south)

only_daytime (bool): If True, only returns daytime values

return_Gon (bool): If True, include extraterrestrial normal irradiance (G_on)

return_solar_angles (bool): If True, include solar elevation and azimuth

Returns:

A Pandas DataFrame with:

datetime

G_o (W/m²)

(Optional) G_on (W/m²)

(Optional) solar_elevation (degrees)

(Optional) solar_azimuth (degrees)

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

solar_radiation-0.1.1.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

solar_radiation-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file solar_radiation-0.1.1.tar.gz.

File metadata

  • Download URL: solar_radiation-0.1.1.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.0 Darwin/24.4.0

File hashes

Hashes for solar_radiation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0966bd39d596ac6e914e704f9fe9fcc95210e8bdf67f4c50ba650376eb2156dc
MD5 05fd81d053719c00a97d88cb5d2e1cf7
BLAKE2b-256 9424f62eb964cdd5292e15477dee765bca44fdb2aa39aa295b7b9aa02eacb592

See more details on using hashes here.

File details

Details for the file solar_radiation-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: solar_radiation-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.0 Darwin/24.4.0

File hashes

Hashes for solar_radiation-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e7fe42c16aa9598cb47b8cf6bf29d1b91c1568cd85081ece57c58cd95293e7b8
MD5 124c6ad203f444a96591a3d736ba9b7f
BLAKE2b-256 cd1572363c50ffe50397c003ae3cb38ed4c4675bf89003e9b830063eb440db17

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