Learn R Programming

EcoHydRology (version 0.3.7)

slopefactor: Slope Factor

Description

Adjusts solar radiation for land slope and aspect relative to the sun, 1=level ground

Usage

slopefactor(lat, Jday, slope, aspect)

Arguments

lat
latitdue [rad]
Jday
Julian date or day of the year [day]
slope
slope of the ground [rad]
aspect
ground aspect [rad from north]

Value

    Examples

    Run this code
    ##---- Should be DIRECTLY executable !! ----
    ##-- ==>  Define data, use random,
    ##--	or do  help(data=index)  for the standard data sets.
    
    ## The function is currently defined as
    function(lat,Jday,slope,aspect){
    # slopefactor: adjusts solar radiation for land slope and aspect relative to the sun, 1=level ground
    
    #lat: latitdue [rad]
    #Jday: Julian date or day of the year [day]
    #slope: slope of the ground [rad]
    #aspect: ground aspect [rad from north]
    
    return(cos(slope)-sin(slope)*1/tan(solarangle(lat,Jday))*cos(aspect-solaraspect(lat,Jday)))
      }

    Run the code above in your browser using DataLab