!$Author: joelevin $ !$Date: 2011-03-24 11:33:26 -0500 (Thu, 24 Mar 2011) $ !$Revision: 11724 $ !$HeadURL: https://svn.weru.ksu.edu/weru/weps1/trunk/weps.src/src/lib_hydro/airtempsin.for $ real function airtempsin(tsec, tmax, tmin) ! + + + PURPOSE + + + ! Returns the value of air temperature as a function of time of day ! using a sinusoidal approximation of temperature through the daily ! maximum and daily minimum, which are assumed to occur at 6pm and ! 6am respectively. ! + + + ARGUMENT DECLARATIONS + + + real tsec, tmax, tmin ! + + + ARGUMENT DEFINITIONS + + + ! tsec - time of day with 0 at midnight (seconds) ! tmax - daily maximum temperature (C) ! tmin - daily minimum temperature (C) !*** LOCAL DECLARATIONS *** real pi, halfperiod parameter( pi = 3.1415927 ) parameter( halfperiod = 43200 ) airtempsin = 0.5*(tmax + tmin & & + (tmax-tmin)*sin(pi*(tsec/halfperiod +1.0))) return end