add code to phenology script

Transfers existing code from previous work. Still needs to be cleaned up
to be functional.