subroutine aspect(deglat,azm,avgsl) c c +++PURPOSE+++ c This subroutine calculates the aspect of the hill slope c relative to the sun angle which impinges upon it. This c information is needed in order to calculate the amount of c solar radiation striking the sloping surface. c c Author(s): Cully Hession and Bruce Lucord, USDA-ARS-NCSRL c Revised by John Witte, UofMn WCES @ USDA-ARS-NCSRL c Date: 03/22/93 c Verified and tested by Reza Savabi, USDA-ARS, NSERL 317-494-5051 c August 1994 c +++ARGUMENT DECLARATIONS+++ real avgsl, azm, deglat c c +++ARGUMENT DEFINITIONS+++ c avgsl - The slope of the equivalent slope surface (m/m). c azm - Direction slope is facing. Units are degrees from North. c deglat - Latitude of the slope segment. Measured in degrees from c the equator (positive values = N; negative values =S) c c +++COMMON BLOCKS+++ include 'cangie.inc' c modify: radinc, radlat, eqlat, delong c c +++LOCAL VARIABLES+++ real rdaz, pi c c +++LOCAL DEFINITIONS+++ c rdaz - Land aspect of the slope segment in units of radians. c pi - The estimated value of pi = 22/7. c c +++END SPECIFICATIONS+++ c -- Convert avgsl and azimuth to radians... c -- Make sure that avgsl is in units of decimal percent! pi = 3.141593 radinc = atan(avgsl) * pi / 180.0 rdaz = azm * pi / 180.0 radlat = deglat * pi / 180.0 c -- Calculate the Equivalent Lat. and Long values... eqlat = asin(cos(radinc) * sin(radlat) + (sin(radinc) 1 * cos(radlat) * cos(rdaz))) delong = atan( (sin(radinc) * sin(rdaz)) / (cos(radinc) 1 * cos(radlat) - sin(radinc) * sin(radlat) * cos(rdaz)) ) return end