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

SERC


Installation

git clone https://github.com/your-username/solar-radiation.git
cd SERC
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.0.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.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: solar_radiation-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 af004361c48509322b70dfdf472461822113f4a3841d81a487dbe893bfa7dc04
MD5 e05d7591e7ab83c46441b79d2c9f95fe
BLAKE2b-256 c172441308dd4f011df27db0754318fc4d55638bee4702bfd2c34caf5cabbe4f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: solar_radiation-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 410977f988f5046140f1eb1d050c25f05564612ba1706255ab9f87f56c0ec075
MD5 076dc3a1d9441dc12dba5e40599c6890
BLAKE2b-256 9790c6349afbf03003991a9d3b08377f97500604138edf0a2eee1fde9a017e41

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