MCNP-Rainfall-pH

NOTE - this is a work in progress!!! Last update May 27, 2015

First, thank you to Bob Carson for giving me the link to the rainfall data at Mammoth Cave National Park back when I was working on a projected that I needed rainfall pH for the area. Back in the late 80s and early 90s when I worked as a ranger at Mammoth Cave National Park Acid Rain was a big topic so I decided to dig a little deeper. Note the data is from National Atmospheric Deposition Program Station KY10 located at Houchin Meadow inside Mammoth Cave National Park.

First - Graph the data

The graphs – graphs are great for looking at data!! Below is graph of the pH data from September 2002 to December 2014. The line is a Locally Weighted Scatterplot Smoothing (LOWESS) trend line. You will notice that late 2006 early 2007 there is an upturn of the data. This was done in the R program.

I also used R to construct notched box plots of the data. If you are not used to using Notched Box Plots, they aren't hard and are a great way to view datat.

  • The line in the center is the Median,

  • The "Notch" around this shows a 95% confidence around the median,

  • The top and bottom of the box show the interquartile range (the middle 50% of the data),

  • The lines above and below show more or less the upper and lower limits (if the data is normal they will include 99% of the data)

The big thing is if the notches of 2 boxes do not over lap, there is strong evidence that the data are from 2 different populations.

If you want to read more about notched box plotts click the link.

The gest of the graph is that the data is very similar from 2002 to 2007. 2008 -2013 show an increase.

Second - Do the stats. Note the following have not be updated for the 2014 data

Checking for Trends – I used a program called ProUCL to calculate the Mann-Kendall test at the 95% confidence level. I first did it for each year and then for all the data as one group but there was no much noise and too little change in an years data. So I looked that the 2 parts of the curve, 2002-2005 and 2007-2013. This showed showed no trends. All the other and the entire database as one showed an increasing pH.

So what caused the change???

I was wondering what would cause such a change so I emailed Mr. Carson. He said this change could be traced back to TVA. He said that TVA had been upgrading it's coal fired power plants and between 2006 to 2009 had concentrated on the Paradise Plant.

Below is the code used to generate these graphs.

Load up the data

setwd("c:/R")

#Load data.

mydata <- read.table("pH-plot-data.csv", header=TRUE, check.names=FALSE, sep=",",)

attach(mydata)

# Code for Scatter Plot with Smoothing Curve

# Code for Scatter Plot with Smoothing Curve

#Plots the data

plot(Year,pH)

# Apply loess smoothing using the default span value of 0.8. You can change the curve by changing the span value.

y.loess <- loess(y ~ x, span=0.75, data.frame(x=Year, y=pH))

# Compute loess smoothed values for all points along the curve

y.predict <- predict(y.loess, data.frame(x=Year))

# Plots the curve.

lines(Year,y.predict,lwd=5,col="blue")

title(main="MCNP Rainfall pH")

#Done

#Notched Box Plot

#Sets the working dir

setwd("c:/R/")

#Load data.

mydata <- read.table("pH-data-years.csv", header=TRUE, check.names=FALSE, sep=",",)

attach(mydata)

boxplot(mydata, notch=TRUE,

# Gives the title and axis names

main="Mammoth Cave National Park Rainfall pH", xlab="Year", ylab="pH",

#Sets the colors

col=(c("gold","darkgray", "darkorchid1", "cyan", "white", "red","limegreen", "magenta", "chartreuse1", "hotpink1")))

# Adds the line at 18.5

abline(a = NULL, b = NULL, h = 18.5, v = NULL, reg = NULL,

coef = NULL, untf = FALSE)

# Done

# Code for Violin plot Note you have to have vioplot package installed

library(vioplot)

vioplot(pH,col="blue")

title(main="Violin plot

MCNP Rainfall pH")

#Done