fetch3.nhl_transpiration.NHL_functions.calc_zenith_angle#
- calc_zenith_angle(doy, lat, long, time_offset, time_of_day, zenith_method='CN')#
Calculates the solar zenith angle, based on Campbell & Norman, 1998.
Also has options for 2 alternate methods: use a constant zenith angle of 0 (i.e. pretend the sun is always directly overhead), or replicate the results of the FETCH2 NHL code (which is missing an adjustment for longitude).
- Parameters:
doy (int) – Day of year (Ordinal day, e.g. 1 = Jan 1)
lat (float) – Latitude
long (float) – Longitude (Needs to be negative for deg W, positive for deg E)
time_offset (int) – Time offset [in hours] for local standard time zone, e.g, for Pacific Standard Time, time_offset = -8
time_of_day (float) – Time of day (hours) in local standard time
zenith_method (str) –
- Method to use for the calculations. Options are:
”CN” - Campbell & Norman 1998
”constant” - constant zenith angle of 0
”fetch2” - replicate the results of the FETCH2 NHL code
Note (Be sure that time of day and time offset are in local standard time, not daylight savings) –
- Returns:
zenith_angle_deg
- Return type:
zenith angle of the sun [degrees]