Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs for instantaneous_zenith_angle function. #55

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 39 additions & 22 deletions src/ZenithAngleCalc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,6 @@ function distance_declination_hourangle(
return d, δ, η_UTC
end

"""
instantaneous_zenith_angle(date::DateTime,
od::OrbitalData,
longitude::FT,
latitude::FT,
param_set::IP.AIP;
eot_correction::Bool=true,
milankovitch::Bool=true) where {FT <: Real}

Returns the zenith angle and earth-sun distance
at a particular longitude and latitude on the given date (and time UTC)
given orbital parameters: obliquity, longitude of perihelion, and eccentricity
param_set is an AbstractParameterSet from CLIMAParameters.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 CLIMAParameters are used.
"""
function instantaneous_zenith_angle(
date::DateTime,
epoch_string,
Expand Down Expand Up @@ -143,6 +121,26 @@ function instantaneous_zenith_angle(
return θ, ζ, d
end

"""
instantaneous_zenith_angle(date::DateTime,
od::OrbitalData,
longitude::FT,
latitude::FT,
param_set::IP.AIP;
eot_correction::Bool=true,
) where {FT}

Returns the zenith angle and earth-sun distance
at a particular longitude and latitude on the given date (and time UTC)
given orbital parameters: obliquity, longitude of perihelion, and eccentricity
param_set is an AbstractParameterSet from CLIMAParameters.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.

Orbital parameters are computed using the `Milankovitch` method.
"""
function instantaneous_zenith_angle(
date::DateTime,
od::OrbitalData,
Expand All @@ -166,6 +164,25 @@ function instantaneous_zenith_angle(
)
end

"""
instantaneous_zenith_angle(date::DateTime,
longitude::FT,
latitude::FT,
param_set::IP.AIP;
eot_correction::Bool=true,
) where {FT}

Returns the zenith angle and earth-sun distance
at a particular longitude and latitude on the given date (and time UTC)
given orbital parameters: obliquity, longitude of perihelion, and eccentricity
param_set is an AbstractParameterSet from CLIMAParameters.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.

Orbital parameters at the J2000 epoch from CLIMAParameters are used.
"""
function instantaneous_zenith_angle(
date::DateTime,
longitude::FT,
Expand Down
Loading