Created
November 16, 2014 08:10
-
-
Save Kirubaharan/29f3bd1055c26d7927e4 to your computer and use it in GitHub Desktop.
phenology
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from phenology import * | |
| data2011 = np.loadtxt('/Users/User/data2011.txt') | |
| # Define variables | |
| doy = data2011[:,0] | |
| temp = data2011[:,1] | |
| tbase = 10. | |
| tmax = 40. | |
| # Calculate AGDD | |
| agdd = calculate_gdd( temp, tbase=tbase, tmax=tmax ) | |
| # First subplot is Hainich (DE) | |
| fig = plt.figure() | |
| plt.plot(doy, temp, '-r') | |
| plt.plot(doy, agdd, 'g') | |
| plt.xlabel("DoY") | |
| plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You already have temperature so just use the calculate_gdd function from phenology library to calculate gdd and then plot it with your data.