Example #1
0
# crop growth dates/times and coefficients

crop = 'corn'
plant = datetime.datetime(2000, 4, 15)
emergence = 30
growth = 50
full = 60
late = 40
Ki = 0.30
Km = 1.15
Kl = 0.40

# add the information to the etcalculator and calculate the PET time series

calculator.add_crop(crop, plant, emergence, growth, full, late, Ki, Km, Kl)
calculator.hourly_PET(crop, start, end)

# crop growth dates/times and coefficients

crop = 'soybeans'
plant = datetime.datetime(2000, 5, 15)
emergence = 20
growth = 30
full = 60
late = 30
Ki = 0.40
Km = 1.15
Kl = 0.55

# add the information to the etcalculator and calculate the PET time series
Example #2
0
calculator.add_crop(crop, plant, emergence, growth, full, late, Ki, Km, Kl)

# calculate the daily crop coefficient time series from the start to the end

calculator.calculate_daily_crop(crop, start, end)

# the calculator stores all daily crop coefficient time series in a dictionary
# structure with keys by crop name and values as start datetime and data

start, Kc = calculator.dailyKcs[crop]

# the calculator can extend the reference ET timeseries and the crop coefficient
# to estimate crop-specific PET time series

calculator.hourly_PET(crop, start, end)

# the calculator stores all the hourly crop coefficient time series in a
# dictionary structure with crop name as keys and start and data as values

start, PET = calculator.hourlyPETs[crop]

# aggregate the hourly to daily values

PET = [sum(PET[i : i + 24]) for i in range(0, len(PET), 24)]

from matplotlib import pyplot, dates, ticker

fig = pyplot.figure()
sub = pyplot.subplot2grid((5, 1), (0, 0))