Soil Water Balance (SWB2)
|
Functions/Subroutines | |
real(c_double) function | daylight_hours (domega_s) |
Calculate the number of daylight hours at a location. | |
elemental real(c_double) function | extraterrestrial_radiation__ra (dlatitude, ddelta, domega_s, ddsubr) |
Calculate extraterrestrial radiation given latitude and time of year. | |
real(c_double) function | net_shortwave_radiation__rns (drs, dalbedo) |
Calculate net shortwave radiation. | |
elemental real(c_double) function | solar_declination_simple__delta (idayofyear, inumdaysinyear) |
Calculate the solar declination for a given day of the year. | |
elemental real(c_double) function | solar_declination__delta (idayofyear, inumdaysinyear) |
Calculate the solar declination for a given day of the year. | |
elemental real(c_double) function | relative_earth_sun_distance__d_r (idayofyear, inumdaysinyear) |
Calculate the inverse relative Earth-Sun distance for a given day of the year. | |
elemental real(c_double) function | sunrise_sunset_angle__omega_s (dlatitude, ddelta) |
Calculate sunrise/sunset angle, in RADIANS. | |
real(c_double) function | solar_radiation_hargreaves__rs (dra, ftmin, ftmax) |
Calculate shortwave solar radiation. | |
elemental real(c_float) function | estimate_percent_of_possible_sunshine__psun (ftmax, ftmin) |
Estimate percent of possible sunshine. | |
real(c_double) function | clear_sky_solar_radiation__rso (dra, das, dbs) |
Calculate clear sky solar radiation. | |
real(c_double) function | clear_sky_solar_radiation_noab__rso (dra, felevation) |
Calculate the clear sky solar radiation. | |
elemental real(c_double) function | solar_radiation__rs (dra, das, dbs, fpctsun) |
Calculate solar radiation by means of the Angstrom formula. | |
elemental real(c_double) function | net_longwave_radiation__rnl (ftmin, ftmax, drs, drso) |
Calculate net longwave radiation flux. | |
elemental real(c_double) function | day_angle__gamma (idayofyear, inumdaysinyear) |
Calculate the day angle in RADIANS. | |
real(c_double) function | solar_altitude__alpha (dtheta_z) |
Calculate the solar altitude given the zenith angle. | |
real(c_double) function | zenith_angle__theta_z (dlatitude, ddelta, domega) |
Calculate solar zenith angle given latitude, declination, and (optionally) hour angle. | |
real(c_double) function | azimuth_angle__psi (ralpha, rlatitude, rdelta) |
Calculate solar azimuth angle. |
Variables | |
real(c_float) | earth_sun_dist_dr |
real(c_float) | solar_declination_delta |
real (c_double) function solar_calculations::azimuth_angle__psi | ( | real (c_double), intent(in) | ralpha, |
real (c_double), intent(in) | rlatitude, | ||
real (c_double), intent(in) | rdelta ) |
Calculate solar azimuth angle.
[in] | rAlpha | Solar altitude angle, in RADIANS. |
[in] | rLatitude | Latitude of location for which estimate is being made, in RADIANS. |
[in] | rDelta | Solar declination angle, in RADIANS. |
rPsi | Solar azimuth angle, in RADIANS. |
Definition at line 597 of file solar_calculations.F90.
real (c_double) function solar_calculations::clear_sky_solar_radiation__rso | ( | real (c_double), intent(in) | dra, |
real (c_double), intent(in), optional | das, | ||
real (c_double), intent(in), optional | dbs ) |
Calculate clear sky solar radiation.
Calculate the clear sky solar radiation (i.e. when rPctSun = 100, n/N=1. Required for computing net longwave radiation.
[in] | dRa | Extraterrestrial radiation, in MJ / m**2 / day |
[in] | dAs | Solar radiation regression constant, expressing the fraction of extraterrestrial radiation that reaches earth on OVERCAST days. |
[in] | sBs | Solar radiation regression constant. As + Bs express the fraction of extraterrestrial radiation that reaches earth on CLEAR days. |
dRso | Clear sky solar radiation, in MJ / m**2 / day |
Definition at line 349 of file solar_calculations.F90.
real (c_double) function solar_calculations::clear_sky_solar_radiation_noab__rso | ( | real (c_double), intent(in) | dra, |
real (c_float), intent(in) | felevation ) |
Calculate the clear sky solar radiation.
Calculate the clear sky solar radiation (i.e. when rPctSun = 100, n/N=1. Required for computing net longwave radiation. For use when no regression coefficients (A, B) are known.
[in] | dRa | Extraterrestrial radiation, in MJ / m**2 / day |
[in] | fElevation | Elevation, in METERS above sea level |
dRso | Clear sky solar radiation, in MJ / m**2 / day |
Definition at line 397 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::day_angle__gamma | ( | integer (c_int), intent(in) | idayofyear, |
integer (c_int), intent(in) | inumdaysinyear ) |
Calculate the day angle in RADIANS.
This function expresses the integer day number as an angle (in radians). Output values range from 0 (on January 1st) to just less than \( 2\pi \) on December 31st.
[in] | iDayOfYear | Current day of the year. |
[in] | iNumDaysInYear | Number of days in the current year. |
dGamma | Day angle in RADIANS. |
Definition at line 503 of file solar_calculations.F90.
real (c_double) function solar_calculations::daylight_hours | ( | real (c_double), intent(in) | domega_s | ) |
Calculate the number of daylight hours at a location.
[in] | dOmega_s | Sunset hour angle in Radians. |
rN | Number of daylight hours. |
Definition at line 24 of file solar_calculations.F90.
elemental real (c_float) function solar_calculations::estimate_percent_of_possible_sunshine__psun | ( | real (c_float), intent(in) | ftmax, |
real (c_float), intent(in) | ftmin ) |
Estimate percent of possible sunshine.
This function follows from equation 5 in "The Rational Use of the FAO Blaney-Criddle substituting the rearranged Hargreaves solar radiation formula into equation 5 results in the formulation below
[in] | fTMax | Maximum daily air temperature, in °K |
[in] | fTMin | Minimum daily air temperature, in °K |
fPsun | Percentage of possible sunshine, dimensionless percentage |
Definition at line 307 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::extraterrestrial_radiation__ra | ( | real (c_double), intent(in) | dlatitude, |
real (c_double), intent(in) | ddelta, | ||
real (c_double), intent(in) | domega_s, | ||
real (c_double), intent(in) | ddsubr ) |
Calculate extraterrestrial radiation given latitude and time of year.
[in] | dLatitude | Latitude of grid cell in RADIANS. |
[in] | dDelta | Solar declination in RADIANS. |
[in] | dOmega_s | Sunset hour angle in RADIANS. |
[in] | dDsubR | Inverse relative distance Earth-Sun. |
rRa | Extraterrestrial radiation in MJ / m**2 / day. |
Definition at line 76 of file solar_calculations.F90.
elemental real(c_double) function solar_calculations::net_longwave_radiation__rnl | ( | real(c_float), intent(in) | ftmin, |
real(c_float), intent(in) | ftmax, | ||
real(c_double), intent(in) | drs, | ||
real(c_double), intent(in) | drso ) |
Calculate net longwave radiation flux.
[in] | fTMin | Minimum daily air temperature, in °C |
[in] | fTMax | Maximum daily air temperature, in °C |
[in] | dRs | Measured or calculated shortwave solar radiation, in MJ / m**2 / day |
[in] | dRso | Calculated clear-sky radiation, in MJ / m**2 / day |
dRnl | Net longwave solar radiation flux (incoming minus outgoing), in MJ / m**2 / day |
Definition at line 459 of file solar_calculations.F90.
real(c_double) function solar_calculations::net_shortwave_radiation__rns | ( | real(c_double), intent(in) | drs, |
real(c_double), intent(in) | dalbedo ) |
Calculate net shortwave radiation.
[in] | dRs | Incoming shortwave solar radiation, in MJ / m**2 / day |
[in] | dAlbedo | Albedo or canopy reflection coefficient; 0.23 for grass reference crop |
dRns | Net shortwave radiation, in MJ / m**2 / day |
Definition at line 112 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::relative_earth_sun_distance__d_r | ( | integer (c_int), intent(in) | idayofyear, |
integer (c_int), intent(in) | inumdaysinyear ) |
Calculate the inverse relative Earth-Sun distance for a given day of the year.
[in] | iDayOfYear | Integer day of the year (January 1 = 1) |
[in] | iNumDaysInYear | Number of days in the current year |
dDsubR | Relative Earth-Sun distance |
Definition at line 214 of file solar_calculations.F90.
real (c_double) function solar_calculations::solar_altitude__alpha | ( | real (c_double), intent(in) | dtheta_z | ) |
Calculate the solar altitude given the zenith angle.
[in] | rTheta_z | Solar zenith angle for given location and time, in RADIANS |
rAlpha | Solar altitude angle for given location and time, in RADIANS |
Definition at line 522 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::solar_declination__delta | ( | integer (c_int), intent(in) | idayofyear, |
integer (c_int), intent(in) | inumdaysinyear ) |
Calculate the solar declination for a given day of the year.
[in] | iDayOfYear | Integer day of the year (January 1 = 1) |
[in] | iNumDaysInYear | Number of days in the current year |
dDelta | Solar declination, in RADIANS |
Definition at line 167 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::solar_declination_simple__delta | ( | integer (c_int), intent(in) | idayofyear, |
integer (c_int), intent(in) | inumdaysinyear ) |
Calculate the solar declination for a given day of the year.
[in] | iDayOfYear | Integer day of the year (January 1 = 1) |
[in] | iNumDaysInYear | Number of days in the current year |
dDelta | Solar declination, in RADIANS |
Definition at line 138 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::solar_radiation__rs | ( | real (c_double), intent(in) | dra, |
real (c_double), intent(in) | das, | ||
real (c_double), intent(in) | dbs, | ||
real (c_double), intent(in) | fpctsun ) |
Calculate solar radiation by means of the Angstrom formula.
[in] | dRa | Extraterrestrial radiation in MJ / m**2 / day |
[in] | dAs | Solar radiation regression constant, expressing the fraction of extraterrestrial radiation that reaches earth on OVERCAST days. |
[in] | dBs | Solar radiation regression constant. As + Bs express the fraction of extraterrestrial radiation that reaches earth on CLEAR days. |
[in] | fPctSun | Percent of TOTAL number of sunshine hours during which the sun actually shown. |
fRs | Solar radiation in MJ / m**2 / day |
@notes Implementation follows equation 35, Allen and others (1998).
Reference: Allen, R.G., and others, 1998, FAO Irrigation and Drainage Paper No. 56, "Crop Evapotranspiration (Guidelines for computing crop water requirements)", Food and Agriculture Organization, Rome, Italy.
Definition at line 428 of file solar_calculations.F90.
real (c_double) function solar_calculations::solar_radiation_hargreaves__rs | ( | real (c_double), intent(in) | dra, |
real (c_float), intent(in) | ftmin, | ||
real (c_float), intent(in) | ftmax ) |
Calculate shortwave solar radiation.
Calculates the solar radiation using Hargreave's radiation formula. For use when percent possible daily sunshine value is not available.
[in] | dRa | Extraterrestrial radiation, in MJ / m**2 / day |
[in] | rTMin | Minimum daily air temperature, in °C |
[in] | rTMax | Maximum daily air temperature, in °C |
dRa | Solar radiation, in MJ / m**2 / day |
Definition at line 274 of file solar_calculations.F90.
elemental real (c_double) function solar_calculations::sunrise_sunset_angle__omega_s | ( | real (c_double), intent(in) | dlatitude, |
real (c_double), intent(in) | ddelta ) |
Calculate sunrise/sunset angle, in RADIANS.
[in] | dLatitude | Latitude, in RADIANS |
[in] | dDelta | Solar declination, in RADIANS |
dOmega_s | Sunset angle, in RADIANS |
Definition at line 245 of file solar_calculations.F90.
real (c_double) function solar_calculations::zenith_angle__theta_z | ( | real (c_double), intent(in) | dlatitude, |
real (c_double), intent(in) | ddelta, | ||
real (c_double), intent(in), optional | domega ) |
Calculate solar zenith angle given latitude, declination, and (optionally) hour angle.
Calculate solar zenith. Solar zenith angle is the angle between a point directly overhead and the center of the sun's disk.
[in] | rLatitude | Latitude of location for which estimate is being made, in RADIANS |
[in] | rDelta | Solar declination angle, in RADIANS |
[in] | rOmega | [OPTIONAL] Hour angle, measured at the celestial pole between the observer's meridian and the solar meridian, in RADIANS. |
rTheta_z | Solar zenith angle for given location and time, in RADIANS |
Definition at line 557 of file solar_calculations.F90.
real (c_float) solar_calculations::earth_sun_dist_dr |
Definition at line 9 of file solar_calculations.F90.
real (c_float) solar_calculations::solar_declination_delta |
Definition at line 10 of file solar_calculations.F90.