c$Author: fredfox $ c$Date: 2001-07-03 19:00:00 $ c$Revision: 1.1.2.1 $ c$Source: /weru/cvs/weps/weps.src/hydro/airtempsin.for,v $ real*4 function airtempsin(tsec, tmax, tmin) c + + + PURPOSE + + + c Returns the value of air temperature as a function of time of day c using a sinusoidal approximation of temperature through the daily c maximum and daily minimum, which are assumed to occur at 6pm and c 6am respectively. c + + + ARGUMENT DECLARATIONS + + + real*4 tsec, tmax, tmin c + + + ARGUMENT DEFINITIONS + + + c tsec - time of day with 0 at midnight (seconds) c tmax - daily maximum temperature (C) c tmin - daily minimum temperature (C) C*** LOCAL DECLARATIONS *** real*4 pi, halfperiod parameter( pi = 3.1415927 ) parameter( halfperiod = 43200 ) airtempsin = 0.5*(tmax + tmin & + (tmax-tmin)*sin(pi*(tsec/halfperiod +1.0))) return end