The National Estuarine Research Reserve System (NERRS) has a plethora of time series data freely and openly available. These data sets include meteorological parameters (air temperature, precipitation, etc.), water quality parameters (water temperature, salinity, dissolved oxygen, etc.), and nutrients for the NERRS reserves shown in Figure 1. You can access this data here.

Since the study area of this project is Chesapeake Bay, we will be looking at the unique ecosystems represented by the Maryland and Virginia reserves.

Now that we have data, what can we do with it? For this post, I will show an example of how I have been looking at the **atmospheric temperature data** at the Jug Bay, MD and Taskinas Creek, VA sites.

Using R (a computer language), I have plotted all of the temperature data. One of our goals for this project is to calculate the extreme climate indices and to assess if magnitude and frequency of extreme weather events have changed in Chesapeake Bay.

Air temperature is collected every 15 minutes at these sites, and many of the extreme climate indices need daily temperature values. This means that there are 96 data points for every 1 day! We can use the package “zoo” in R to get the average daily temperature.

Here is a simplified sample of the R script I have been using for the date (Date) and air temperature (ATemp) variables:

#create a zoo object for air temperature ordered by the date.

#zoo combines air temperature and date into an object (Temp), so we have a nice, ordered, time series.

**Temp <- zoo(ATemp,Date))**

#now we can use zoo to *apply* our desired function using the rollapply function

**Tmean<- rollapply(Temp, 96, mean, by = 96)**

#In this function, the mean air temperature was taken for a window of 96 data points and does not overlap. The result: we take the average temperature daily, trimming the time series from 96 points per day to 1 (average value).

While the trend between the 15 minute data and daily mean is the same, visually the lines are now “thinner” and we can see the general, mean trend in the data. As expected, temperature for both MD and VA follow a seasonal cycle where the temperature is warmer in the summer and cooler in the winter (no surprise there!). It also appears to vary year-to-year (more on this later!).

However, by calculating a mean temperature, the highs and lows all changed (compare the y-axes between Figures 2 and 4 and Figures 3 and 5). Not ideal if the goal is to look at extreme values! So, instead of calculating the mean daily temperature, we want to calculate the **daily maximum and minimum temperatures**. We can do this using R just like the mean calculation above.

#Rollapply using the function max and min. Tmax is the daily highest temperature and Tmin is the daily lowest temperature.

**Tmax <- rollapply(Temp, 96, max, by = 96)**

**Tmin <- rollapply(Temp, 96, min, by = 96)**

There! Here is a new way to look at the same data. In a nutshell, Figures 6 and 7 show you the range of temperatures you could have experienced in a single day at Jug Bay, MD and Taskinas Creek, VA.

Why did I separate the data into a max and min temperature? Think about it from this perspective: when you get a weather forecast for a day, the meteorologist will often give the high and low temperature in addition to the average temperature so we can be prepared.

For example, the average daily temperature at Jug Bay on July 7, 2013 was 77°F (24.8°C). If you dressed only for this temperature, you would be sweating away when the daily high temperature hit 89°F (31.5°C). I clearly remember this day because it was my wedding…and I remember that 90°C period!

These are neat Kari! It looks to me like maybe the Tmin minima are more homogeneous (more similar) across the sites than the Tmax maxima. We can quantify this by correlating them, and learn about whether the factors driving low winter temperatures are more likely to occur throughout the region as compared with the forcing that causes really hot days.