Research Questions
Q1) How do pre and post-fire soil respiration, GPP and plant communities compare?
Q2) How did the fire change land-atmosphere C exchange sensitivity to environmental variables.
Q3) Why did this ecosystem return to a net carbon sink so fast?
Hypothesis
H1) Pre and post-fire NEE differences were driven by changes in GPP.
H2) Rapid return to net carbon sink was due to a highly favorable climate and conditions for rapid establishment and growth of fast-growing plants.
The goal of the following is to determine the definition of “high growth”,how many days of high growth occurred per year, and when did the days of high growth begin and end each year.
The definition of high growth is explored in the following.
#Converting units from umolCO2/m2/s to gC/m2/30min
realtower$NEE <- (realtower$NEE*1800*12/1000000)
realtower$RECO <- (realtower$RECO*1800*12/1000000)
#Making GPP negative in addition to unit conversion
realtower$GPP <- (realtower$GPP*1800*12/1000000*-1)
#Building df for days of high GPP per day per year
#GPP daily df, units are gC/m2/day
dailyGPP <- aggregate(realtower$GPP, by=list(year=realtower$year, month=realtower$month, day=realtower$day),FUN=sum, na.rm=T)
dailyGPP$date <- paste0(dailyGPP$year, dailyGPP$month, dailyGPP$day)
dailyGPP <- filter(dailyGPP, year!="20")
dailyGPP <- dailyGPP %>% arrange(date)
dailyGPP$x <- ifelse(dailyGPP$year==13,NA,dailyGPP$x)
dailyGPP$x <- ifelse(dailyGPP$year==19,NA,dailyGPP$x)
#Looking at the data
ggplot(dailyGPP, aes(x=x)) +geom_density() + labs(title = "All daily GPP values", x="GPP in gC/m2/day")

Removing the bottom 5% of GPP values yields a cutoff value of -0.01944552 gC/m2/day.
#Filtering out the 5% of lowest GPP values
dailyGPP5 <- filter(dailyGPP,x < quantile(dailyGPP$x, 0.95, na.rm = TRUE))
ggplot(dailyGPP5, aes(x=year)) + geom_histogram(stat="count") + labs(title = "How many days remain for each year")

ggplot(dailyGPP5, aes(x=x)) +geom_density() + labs(title = "5% daily GPP values removed", x="GPP in gC/m2/day")

##Adding column for Number of days per year where a GPP in lowest 95% occurred
dailyGPP5 <- dailyGPP5 %>%
group_by(year)%>%
mutate(days=sum(x<= quantile(dailyGPP$x, .95, na.rm = TRUE)))
###Taking the mean of how much GPP occurred per day for each year
dailyGPP5 <- dailyGPP5 %>%
group_by(year) %>%
mutate(sumGPPperyear = sum(x, na.rm = TRUE))
####Calculating How much GPP occurred for each of the 95% lowest GPP days
dailyGPP5$GPPpergrowday <- dailyGPP5$sumGPPperyear / dailyGPP5$days
##### Removing 2013 and 2019
dailyGPP5 <- filter(dailyGPP5, year !="13")
dailyGPP5 <- filter(dailyGPP5, year !="19")
#####Plotting how much GPP per growday
ggplot(dailyGPP5, aes(x=year, y=GPPpergrowday, group = 1, label = days)) +geom_point() + geom_line() + labs(title = "Average amount of Carbon fixed per lowest 95% of GPP days",y="gC/m2/day" ) + geom_text(labels = days)

Removing the bottom 10% of GPP values yields a cutoff value of -0.07659837 gC/m2/day.
#Filtering out the 10% of lowest GPP values
dailyGPP10 <- filter(dailyGPP,x < quantile(dailyGPP$x, 0.90, na.rm = TRUE))
ggplot(dailyGPP10, aes(x=year)) + geom_histogram(stat="count") + labs(title = "How many days remain for each year")

ggplot(dailyGPP10, aes(x=x)) +geom_density() + labs(title = "10% daily GPP values removed", x="GPP in gC/m2/day")

##Adding column for Number of days per year where a GPP in lowest 90% occurred
dailyGPP10 <- dailyGPP10 %>%
group_by(year)%>%
mutate(days=sum(x<= quantile(dailyGPP$x, .90, na.rm = TRUE)))
###Taking the mean of how much GPP occurred per day for each year
dailyGPP10 <- dailyGPP10 %>%
group_by(year) %>%
mutate(sumGPPperyear = sum(x, na.rm = TRUE))
####Calculating How much GPP occurred for each of the 90% lowest GPP days
dailyGPP10$GPPpergrowday <- dailyGPP10$sumGPPperyear / dailyGPP10$days
##### Removing 2013 and 2019
dailyGPP10 <- filter(dailyGPP10, year !="13")
dailyGPP10 <- filter(dailyGPP10, year !="19")
#####Plotting how much GPP per growday
ggplot(dailyGPP10, aes(x=year, y=GPPpergrowday, group = 1, label = days)) +geom_point() + geom_line() + labs(title = "Average amount of Carbon fixed per lowest 90% of GPP days",y="gC/m2/day" ) + geom_text(labels = days)+ geom_text(labels =days) + geom_hline(yintercept = 0)

Removing the bottom 20% of GPP values yields a cutoff value of -0.1757438 gC/m2/day.
#Filtering out the 20% of lowest GPP values
dailyGPP20 <- filter(dailyGPP,x < quantile(dailyGPP$x, 0.80, na.rm = TRUE))
ggplot(dailyGPP20, aes(x=year)) + geom_histogram(stat="count") + labs(title = "How many days remain for each year")

ggplot(dailyGPP20, aes(x=x)) +geom_density() + labs(title = "20% daily GPP values removed", x="GPP in gC/m2/day")

##Adding column for Number of days per year where a GPP in lowest 80% occurred
dailyGPP20 <- dailyGPP20 %>%
group_by(year)%>%
mutate(days=sum(x<= quantile(dailyGPP$x, .80, na.rm = TRUE)))
###Taking the mean of how much GPP occurred per day for each year
dailyGPP20 <- dailyGPP20 %>%
group_by(year) %>%
mutate(sumGPPperyear = sum(x, na.rm = TRUE))
####Calculating How much GPP occurred for each of the 80% lowest GPP days
dailyGPP20$GPPpergrowday <- dailyGPP20$sumGPPperyear / dailyGPP20$days
##### Removing 2013 and 2019
dailyGPP20 <- filter(dailyGPP20, year !="13")
dailyGPP20 <- filter(dailyGPP20, year !="19")
#####Plotting how much GPP per growday
ggplot(dailyGPP20, aes(x=year, y=GPPpergrowday, group = 1, label = days)) +geom_point() + geom_line() + labs(title = "Average amount of Carbon fixed per lowest 80% of GPP days",y="gC/m2/day" ) + geom_text(labels = days)+ geom_text(labels =days) + geom_hline(yintercept = 0)

Removing the bottom 40% of GPP values yields a cutoff value of -0.5405074 gC/m2/day.
#Filtering out the 40% of lowest GPP values
dailyGPP40 <- filter(dailyGPP,x < quantile(dailyGPP$x, 0.60, na.rm = TRUE))
ggplot(dailyGPP40, aes(x=year)) + geom_histogram(stat="count") + labs(title = "How many days remain for each year")

ggplot(dailyGPP40, aes(x=x)) +geom_density() + labs(title = "40% daily GPP values removed", x="GPP in gC/m2/day")

##Adding column for Number of days per year where a GPP in lowest 60% occurred
dailyGPP40 <- dailyGPP40 %>%
group_by(year)%>%
mutate(days=sum(x<= quantile(dailyGPP$x, .60, na.rm = TRUE)))
###Taking the mean of how much GPP occurred per day for each year
dailyGPP40 <- dailyGPP40 %>%
group_by(year) %>%
mutate(sumGPPperyear = sum(x, na.rm = TRUE))
####Calculating How much GPP occurred for each of the 60% lowest GPP days
dailyGPP40$GPPpergrowday <- dailyGPP40$sumGPPperyear / dailyGPP40$days
##### Removing 2013 and 2019
dailyGPP40 <- filter(dailyGPP40, year !="13")
dailyGPP40 <- filter(dailyGPP40, year !="19")
#####Plotting how much GPP per growday
ggplot(dailyGPP40, aes(x=year, y=GPPpergrowday, group = 1, label = days)) +geom_point() + geom_line() + labs(title = "Average amount of Carbon fixed per lowest 60% of GPP days",y="gC/m2/day" ) + geom_text(labels =days) + geom_hline(yintercept = 0)
