View source: R/solar_geometry.R
solar_position | R Documentation |
Solar position
solar_position(
x,
UTC = "UTC",
yday = "yday",
hour = "hour",
lon = "lon",
lat = "lat",
integral_steps = 1,
keep.all = TRUE,
verbose = getOption("merra2.verbose"),
...
)
x |
data.frame with MERRA-2 subset |
UTC |
name (string) of the column in x with date and time in UTC format |
yday |
optional name of column in x with the day of the year (consistent with UTC time), will be used if "UTC" is not provided |
hour |
optional, the name of column with hour of the day (0 to 23, UTC time assumed) |
lon |
longitude of the location |
lat |
latitude of the location |
integral_steps |
integer number of steps for calculation of solar_time, hour_angle, and zenith within an hour, and the logical variable; default is 2 (start and the end of every hour) |
keep.all |
if TRUE, the interim variables declination, eq_time, solar_time, and hour_angle will be added to x and returned |
verbose |
List or data.frame with estimated following solar geometry variables:
Solar declination (\mjseqn\theta_d) \mjsdeqn\theta_d = \frac23.45\pi180\sin\big(2\pi\frac284+n365\big)
Equation of time (\mjseqnE_qt) \mjsdeqn E_qt = \begincases -14.2\sin\big(\frac\pi(n+7)111\big)& & 1 \leq n \leq 106\newline 4.0\sin\big(\frac\pi(n-106)59\big)& & 107 \leq n \leq 166\newline -6.5\sin\big(\frac\pi(n-166)80\big)& & 167 \leq n \leq 246\newline 16.4\sin\big(\frac\pi(n-247)113\big)& & 247 \leq n \leq 365 \endcases
Apparent solar time (\mjseqnT_solar) \mjsdeqnT_solar = T_UTC+\fracE_qt60+longitude/15
Hour angle (\mjseqn\theta_hr) \mjsdeqn\theta_hr = \fracT_solar-1212\pi
Zenith angle \mjsdeqnzenith = \arccos\big(\sin(latitude)\sin(\theta_d)+\cos(latitude)\cos(\theta_d)\cos(\theta_hr)\big)
Azimuth angle
\mjsdeqn
azimuth = \begincases
\arcsin(A)& & A \geq 0, B \geq 0\newline
180-\arcsin(A)& & B < 0\newline
360+\arcsin(A)& & A < 0, B \geq 0
\endcases
where
\mjseqnn - \textday of the year
\mjseqnA = \sin(azimuth) =
-\frac\sin(\theta_hr)\cos(\theta_d)\sin(zenith)
\mjseqnB = \cos(azimuth) = \frac\sin(\theta_d)-
\sin(latitude)\cos(zenith)\cos(latitude)\sin(zenith)
NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.