![]() |
libTheSky
Routines to compute sky positions of Sun, Moon, planets and more
|
Daylight procedures. More...
Functions/Subroutines | |
real(double) function | extinction_sun_airmass (airmass) |
Compute an approximation for the bolometric atmospheric extinction factor for the Sun with a given air mass. | |
real(double) function | extinction_sun (alt) |
Compute an approximation for the bolometric atmospheric extinction factor for the Sun with a given altitude. | |
subroutine | solar_radiation (alt, beam_norm, beam_horiz) |
Compute the normal and horizontal beam (direct) solar radiation for a given altitude of the Sun, assuming a cloudless sky (and sea level) | |
subroutine | clearsky_bird (alt, io, rsun, press, uo, uw, ta5, ta3, ba, k1, rg, itot, idir, idif, igr) |
A simplified clear-sky model for direct and diffuse insolation on horizontal surfaces (a.k.a. as the Bird model) | |
subroutine | diffuse_radiation_perez87 (doy, alt, surfincl, theta, gbeam_n, gdif_hor, gdif_inc, gdif_inc_is, gdif_inc_cs, gdif_inc_hz) |
Compute diffuse radiation on an inclined surface using the older (1987) Perez model. | |
real(double) function | project_sunlight_on_surface (beta, gamma, sunaz, sunalt) |
Compute the projection factor of direct solar radiation (DNI) on a (sloped) surface. | |
Daylight procedures.
subroutine thesky_daylight::clearsky_bird | ( | real(double), intent(in) | alt, |
real(double), intent(in), optional | io, | ||
real(double), intent(in), optional | rsun, | ||
real(double), intent(in), optional | press, | ||
real(double), intent(in), optional | uo, | ||
real(double), intent(in), optional | uw, | ||
real(double), intent(in), optional | ta5, | ||
real(double), intent(in), optional | ta3, | ||
real(double), intent(in), optional | ba, | ||
real(double), intent(in), optional | k1, | ||
real(double), intent(in), optional | rg, | ||
real(double), intent(out), optional | itot, | ||
real(double), intent(out), optional | idir, | ||
real(double), intent(out), optional | idif, | ||
real(double), intent(out), optional | igr ) |
A simplified clear-sky model for direct and diffuse insolation on horizontal surfaces (a.k.a. as the Bird model)
alt | Sun altitude above the horizon (rad) |
Io | Solar 'constant' (W/m^2 - optional, default: 1361.5) |
Rsun | Sun distance (AU - optional, default: 1) |
Press | Air pressure at the observer's site, corrected for altitude (hPa - optional, default: 1013) |
Uo | Ozone abundance in a vertical column (cm - optional, default: 0.34) |
Uw | Percipitable water-vapor abundance in a vertical column (cm - optional, default: 1.42) |
Ta5 | Aerosol optical depth from surface in vertical path at 500 nm (optional, default: 0.2661) |
Ta3 | Aerosol optical depth from surface in vertical path at 380 nm (optional, default: 0.3538) |
Ba | Aerosol forward-scattering ratio (optional, 0.82-0.86, default: 0.84) |
K1 | Aerosol-absorptance constant (optional, rural: 0.0933, urban: 0.385, default: 0.1) |
Rg | Ground albedo (optional, fraction - default: 0.2) |
Itot | Total insolation on a horizontal surface (W/m^2 - optional) (output) |
Idir | Direct (beam) insolation on a horizontal surface (W/m^2 - optional) (output) |
Idif | Diffuse insolation on a horizontal surface (W/m^2 - optional) (output) |
Igr | Ground-reflection insolation from a horizontal surface (W/m^2 - optional) (output) |
Definition at line 165 of file daylight.f90.
subroutine thesky_daylight::diffuse_radiation_perez87 | ( | integer, intent(in) | doy, |
real(double), intent(in) | alt, | ||
real(double), intent(in) | surfincl, | ||
real(double), intent(in) | theta, | ||
real(double), intent(in) | gbeam_n, | ||
real(double), intent(in) | gdif_hor, | ||
real(double), intent(out) | gdif_inc, | ||
real(double), intent(out), optional | gdif_inc_is, | ||
real(double), intent(out), optional | gdif_inc_cs, | ||
real(double), intent(out), optional | gdif_inc_hz ) |
Compute diffuse radiation on an inclined surface using the older (1987) Perez model.
DoY | Day of year (Nday) |
alt | Altitude of the Sun (radians) |
surfIncl | Surface inclination wrt horizontal (radians) - 0 = horizontal, pi/2 = vertical |
theta | Angle between surface normal vector and Sun position vector (radians) |
Gbeam_n | Beam (direct) normal radiation (W/m2; in the direction of the Sun) |
Gdif_hor | Diffuse radiation on a horizontal surface (W/m2) |
Gdif_inc | Diffuse irradiation on the inclined surface (W/m2) (output) |
Gdif_inc_is | Diffuse irradiation on the inclined surface - isotropic part (optional; W/m2) (output) |
Gdif_inc_cs | Diffuse irradiation on the inclined surface - circumsolar part (optional; W/m2) (output) |
Gdif_inc_hz | Diffuse irradiation on the inclined surface - horizon-band part (optional; W/m2) (output) |
Definition at line 284 of file daylight.f90.
real(double) function thesky_daylight::extinction_sun | ( | real(double), intent(in) | alt | ) |
Compute an approximation for the bolometric atmospheric extinction factor for the Sun with a given altitude.
alt | TRUE altitude of the Sun (radians) |
extinction_sun | The approximated bolometric atmospheric extinction factor for the Sun |
Definition at line 91 of file daylight.f90.
References thesky_visibility::airmass(), extinction_sun(), and extinction_sun_airmass().
Referenced by extinction_sun(), and solar_radiation().
real(double) function thesky_daylight::extinction_sun_airmass | ( | real(double), intent(in) | airmass | ) |
Compute an approximation for the bolometric atmospheric extinction factor for the Sun with a given air mass.
airmass | Airmass for the position of the Sun |
extinction_sun_airmass | The approximated bolometric atmospheric extinction factor for the Sun |
Definition at line 48 of file daylight.f90.
References extinction_sun_airmass().
Referenced by extinction_sun(), and extinction_sun_airmass().
real(double) function thesky_daylight::project_sunlight_on_surface | ( | real(double), intent(in) | beta, |
real(double), intent(in) | gamma, | ||
real(double), intent(in) | sunaz, | ||
real(double), intent(in) | sunalt ) |
Compute the projection factor of direct solar radiation (DNI) on a (sloped) surface.
This function returns the projection factor of direct sunlight on a surface with given orientation, useful for e.g. insolation on solar panels, solar collectors or windows. The projection factor equals the cosine of the angle between the normal vector of the surface and the position vector of the Sun.
beta | Inclination angle of the surface (w.r.t. the horizontal) (radians) |
gamma | Azimuth angle of the surface (0=south, pi/2=west, ±pi=north, -pi/2=east) (radians) |
sunAz | Azimuth of the Sun (0=south, pi/2=west, ±pi=north, -pi/2=east) (radians) |
sunAlt | Apparent altitude of the Sun (radians) |
project_sunlight_on_surface | The projection factor for direct solar radiation (DNI) on a (sloped) surface (0-1). |
Definition at line 433 of file daylight.f90.
References project_sunlight_on_surface().
Referenced by project_sunlight_on_surface().
subroutine thesky_daylight::solar_radiation | ( | real(double), intent(in) | alt, |
real(double), intent(out) | beam_norm, | ||
real(double), intent(out), optional | beam_horiz ) |
Compute the normal and horizontal beam (direct) solar radiation for a given altitude of the Sun, assuming a cloudless sky (and sea level)
alt | TRUE altitude of the Sun (radians) |
beam_norm | Normal beam radiation, perpendicular to the position vector of the Sun (W/m2) (output) |
beam_horiz | Beam radiation on a horizontal surface (W/m2) (output) |
Definition at line 117 of file daylight.f90.
References extinction_sun().