Example #1
0
# parse the GHCND data for pan evaporation observations and store the file
# paths (the ETCalculator will automatically extract the data from the file)

evaporations = []

for k, v in processor.metadata.ghcndstations.items():

    if v['evap'] > 0: evaporations.append(k)

# the ETCalculator has a few public plotting methods including a plot similar
# to the first example (daily ET)

filename = '{}/referenceET'.format(output)

# the plotET method has a few optional keyword arguments including a dictionary
# of GHCND stations for comparing the model with pan evaporation data,
# start and end dates, and some other plotting parameters but using
# hourly estimates aggregated to a daily time step

calculator.plotET(stations=evaporations, output=filename, show=True)

# the "dayofyear" plot converts long time series to the water year
# (Oct 1, Year -- Sept 30, Year + 1). these plots provide a useful way to
# examine long-term trends in hydrology of the watershed

filename = '{}/dayofyearET'.format(output)

# note that there appears to be an error in the Upper Marlboro dataset in 2000

calculator.plotdayofyear(stations=evaporations, output=filename, show=True)
Example #2
0
# paths (the ETCalculator will automatically extract the data from the file)

evaporations = []

for k, v in processor.metadata.ghcndstations.items():

    if v['evap'] > 0: evaporations.append(k)

# the ETCalculator has a few public plotting methods including a plot similar
# to the first example (daily ET) 

filename = '{}/referenceET'.format(output)

# the plotET method has a few optional keyword arguments including a dictionary
# of GHCND stations for comparing the model with pan evaporation data, 
# start and end dates, and some other plotting parameters but using 
# hourly estimates aggregated to a daily time step

calculator.plotET(stations = evaporations, output = filename, show = True)

# the "dayofyear" plot converts long time series to the water year 
# (Oct 1, Year -- Sept 30, Year + 1). these plots provide a useful way to 
# examine long-term trends in hydrology of the watershed

filename = '{}/dayofyearET'.format(output)

# note that there appears to be an error in the Upper Marlboro dataset in 2000

calculator.plotdayofyear(stations = evaporations, output = filename, 
                         show = True)