Skip to content

Insolation.jl calculates solar radiation and solar geometry, including solar zenith angle, azimuth angle, and incoming solar radiation (insolation) at the top of atmosphere, for climate science and Earth system modeling applications.

License

Notifications You must be signed in to change notification settings

CliMA/Insolation.jl

Repository files navigation

Insolation.jl Logo

Insolation.jl

Stable Release version
Docs Build docs build
Documentation dev
Unit Tests unit tests
Code Coverage codecov
Downloads downloads

Insolation.jl is a Julia package for calculating solar radiation and solar geometry. It provides efficient and accurate computations of solar zenith angle, azimuth angle, and incoming solar radiation (insolation) for climate science and Earth system modeling applications.

Features

  • Solar Geometry Calculations: Compute solar zenith angle, azimuth angle, and declination for any location and time
  • Insolation Computations: Calculate instantaneous and daily-averaged incoming solar radiation at the top of atmosphere
  • Orbital Parameters: Support for time-varying orbital parameters using the Laskar et al. (2004) solution for paleoclimate applications
  • Planetary Flexibility: Works for Earth by default, but applicable to any planetary body with configurable orbital and physical parameters
  • Type-Generic: Supports different number types (Float32, Float64) for performance optimization
  • Climate Model Integration: Built for use with ClimaAtmos.jl, RRTMGP.jl, and other CliMA packages

Installation

Insolation.jl is a registered Julia package. To install it, open the Julia REPL and run:

using Pkg
Pkg.add("Insolation")

Quick Start

using Insolation
using Dates
using ClimaParams

# Calculate insolation for a specific location and time
FT = Float64
lat = FT(40.0)    # degrees North
lon = FT(-105.0)  # degrees East
date = DateTime(2024, 6, 21, 12, 0, 0)  # Summer solstice, noon

# Create Earth parameters with default values
params = InsolationParameters(FT)

# Calculate instantaneous insolation with solar geometry
F, S, μ, ζ = insolation(date, lat, lon, params)
# F: TOA insolation [W m⁻²]
# S: Solar flux [W m⁻²]  
# μ: Cosine of solar zenith angle
# ζ: Solar azimuth angle [radians]

# Calculate daily-averaged insolation
F_daily, S_daily, μ_daily = daily_insolation(date, lat, params)

For more detailed examples and API documentation, see the documentation.

About

Insolation.jl calculates solar radiation and solar geometry, including solar zenith angle, azimuth angle, and incoming solar radiation (insolation) at the top of atmosphere, for climate science and Earth system modeling applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 12

Languages