###
### Week 3: Playing around with energy functions
# Save the file PriestlyTaylorEquations.r to your working directory
# (what-ever you chose that to be)
setwd("E:/Soil and Water Lab/TA/Ecohydrology 2012/Week3")
source("PriestlyTaylorEquations.r")
## Let's look at some of the functions that we've just loaded:
EstCloudiness
PotentialSolar
# Can you estimate the cloudiness for Ithaca given today's weather predictions?
# How about the solar radiation at the edge of the atmosphere?
NetRad
## Can we edit this to make it more useful to us?
## Let's put in default values for some of the less-used parameters
# Problem 1:
# Find max and min temperature data for Ithaca
# Use this to calculate the PET for this month using the function
# PETfromTemp, note: Ithaca's latitude is 42.4405556
# Problem 2:
# Plot net radiation calculated from the function NetRad for
# Morgan Monroe Forest, IN in 2006 (lat = 39.32315 ).
# You can find a csv with data on this site in the
# If you are interested in optimizing the results of a function, you can use
# this package might be useful to you
install.packages("DEoptim")
library(DEoptim)
# Find the help file for this
# To think about: can you use this to optimize your T-M model?