Hello Ecolog-gers!

Anyone have ideas on how to calculate accumulated degree days for a larger 
dataset?

The data I'm working with consists of daily maximum and minimum air temperature 
readings from a few score of sites across Pennsylvania over the last 20 years.  
What I want to do is to calculate accumulated degree days for each year at each 
site.  I'm going with calendar year for simplicity's sake.  I know how to 
calculate degree days, it's the accumulation part I'm stumbling on.  And I know 
how to sum degree days for each year and each station - that's easy.  I also 
know how to calculate time-lagged running averages, but that's not really what 
I'm aiming for here.  I want the degrees days to accumulate each successive 
(Julian) day at each station for each year, and to start over accumulating for 
each new station and/or year combination.  That is to say, for 1 May 2008 at 
the Chalk Hill site, I want to sum all the degree days from 1 January 2008 to 
30 April 2008 at that site.  The only way I'm presently aware of to do this is 
"by hand" in Excel, and that's not really practical given the size of the 
dataset I'm working with and temporal allocation considerations imposed by 
mortality.  Does any one know of a script (R? SAS?) to do this?  I can envision 
some, but they get unwieldy pretty quick.  Or is a way this can be done with a 
database query?

Any thoughts would be much appreciated!

Smiles
=]  Brian

Brian A. Chalfant | -ologist
Pennsylvania Department of Environmental Protection
Rachel Carson State Office Building
400 Market Street | Harrisburg, PA 17101
Phone: 717.787.9639 | Fax: 717.772.3249
www.depweb.state.pa.us<http://www.depweb.state.pa.us/>

Reply via email to