Application Programming Interface (APIs)
Documenting the public user interface
Orbital Parameters
Insolation.orbital_params
— Methodorbital_params(od::OrbitalData, dt::FT) where {FT <: Real}
Parameters are interpolated from the values given in the Laskar 2004 dataset using a cubic spline interpolation.
See OrbitalData
.
Insolation.OrbitalData
— TypeOrbitalData
The parameters vary due to Milankovitch cycles.
Orbital parameters from the Laskar 2004 paper are lazily downloaded from Caltech Box to the orbital_parameters_dataset_path(artifact_dir)
path where artifact_dir
is the path and filename to save the artifacts toml file.
Zenith Angle
Insolation.daily_zenith_angle
— Methoddaily_zenith_angle(date::DateTime,
data0::DateTime,
od::OrbitalData,
latitude::FT,
param_set::IP.AIP;
eot_correction::Bool=true,
milankovitch::Bool=true) where {FT <: Real}
Returns the effective zenith angle corresponding to the diurnally averaged insolation and earth-sun distance at a particular latitude given the date.
param_set
is an AbstractParameterSet from ClimaParams.jl.
eot_correction
is an optional Boolean keyword argument that defaults to true when set to true the equation of time correction is turned on. This switch functionality is implemented for easy comparisons with reanalyses.
milankovitch
is an optional Boolean keyword argument that defaults to true when set to true the orbital parameters are calculated for the given DateTime, when set to false the orbital parameters at the J2000 epoch from ClimaParams are used.
Insolation.distance_declination_hourangle
— Methoddistance_declination_hourangle(
date::DateTime,
date0::DateTime,
(ϖ, γ, e)::Tuple{FT, FT, FT},
param_set::IP.AIP,
eot_correction::Bool,
) where {FT}
Returns the earth-sun distance (m), declination angle (radians) and hour angle (radians), at 0ᵒ longitude, given the current datetime, epoch datetime, longitude of the perihelion at epoch
, obliquity at epoch
, eccentricity at epoch
, and eot_correction
.
Insolation.instantaneous_zenith_angle
— Methodinstantaneous_zenith_angle(
d::FT,
δ::FT,
η_UTC::FT,
longitude::FT,
latitude::FT,
) where {FT}
Returns the zenith angle (radians), azimuthal angle (radians) and Earth-Sun distance (m) at a particular longitude (degrees) and latitude (degrees) given Earth-Sun distance (m), declination angle (radians), and hour angle (radians) at 0ᵒ longitude.
Insolation
Insolation.insolation
— Methodinsolation(θ::FT, d::FT, param_set::IP.AIP) where {FT <: Real}
Returns the insolation given the zenith angle and earth-sun distance param_set is an AbstractParameterSet from ClimaParams.jl.
Insolation.solar_flux_and_cos_sza
— Methodsolar_flux_and_cos_sza(date::DateTime,
date0::DateTime,
od::OrbitalData,
longitude::FT,
latitude::FT,
param_set::IP.AIP) where {FT <: Real}
Returns the top-of-atmosphere (TOA) solar flux, i.e. the total solar irradiance (TSI) weighted by the earth-sun distance and cos(solar zenith angle) for input to RRTMGP.jl param_set is an AbstractParameterSet from ClimaParams.jl.