| Stable Release | |
| Docs Build | |
| Documentation | |
| Unit Tests | |
| Code Coverage | |
| 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.
- 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
Insolation.jl is a registered Julia package. To install it, open the Julia REPL and run:
using Pkg
Pkg.add("Insolation")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.