# Flux Towers: Part II

Flux tower eddy covariance instruments measure CO2 flux between an ecosystem and the atmosphere. Observed CO2 fluxes (also called NEE, Net Ecosystem Exchange) can be correlated with locally measured solar intensity, temperature, humidity etc. With enough data, a detailed picture of the local response of the ecosystem to environmental variables to be built up. Flux towers are one of the important tools for quantitative understanding the sensitivity of vegetation to climatic variability.

CO2 flux data  are noisy, to say the least. If you want to understand ecosystem reponse, you need a statistical model.  This post gives some simple ideas and R code showing how such a model can be developed. The example used is Harvard Forest [1], Massachussetts, a temperate deciduous broadleaf forest for which a large amount of flux tower data (collected by Munger & Wofsy) is available. It could equally be applied to tropical forest, grassland, cropland etc at one of the 200+ fluxnet sites worldwide. The model falls short of the full scientific rigour given in the references, but it can easily be developed into a more complete tool.

The main interest here is ecosystem response to sunlight i.e. photosynthesis. The light dependent part of the NEE is GEP (Gross Ecosystem Production), while the light independent part is RE (ecosystem respiration).

### Pre-processing

As always, the first steps are about getting the data into the right form. We use half-hourly data for 1991-2007  for Harvard Forest  i.e Ameriflux Level 2, site code USHa-1. This raw data has not been subject to any gap-filling statistical treatment. Here are the pre-processing steps:

1. download the annual data files and create a dataframe harvard using the rbind() combining all of the data
2. replace missing data (e.g. -9999) with “NA”
3. add a new fornight index, indicating to which fortnight of the year each row of data belongs
4. select a subset of the Ameriflux variables of interest. e.g. column headings c(“YEAR”,”DTIME”,”FN”,”TA”,”NEE”,”TS1″,”VPD”,”PAR_in”)
5. drop rows of data when one or more variables are undefined
6. group the data according to fortnights index i.e. create a list of 26 elements where each element is a dataframe containing all data sharing the same fortnight index.
7. drop “dark” data i.e. rows of data where PAR < 30.

The environmental variables retained at step 4 are TA (atmospheric temperature), TS1  (soil temperature), VPD (vapour pressure deficit) and PAR (photosynthetically active radiation). PAR is solar radiation in the range 0.4-0.7 microns which is energetic enough to contribute to photosynthesis. It has units μ mols s-1 m-2. (1 μ mole = 6 x 1017.)

Here is what the R code looks like:  #download the annual data files and create a dataframe harvard loc=file.path("ftp://cdiac.ornl.gov/pub/ameriflux/data/Level2/Sites_ByID/US-Ha1/with_gaps/usmaharv_1991_L2.csv"); # Ameriflux US_Ha1 download.file(loc,"temp.dat"); ha_1991=read.csv("temp.dat", header=FALSE,skip=20); ......................... loc=file.path("ftp://cdiac.ornl.gov/pub/ameriflux/data/Level2/Sites_ByID/US-Ha1/with_gaps/usmaharv_2007_L2.csv"); # Ameriflux US_Ha1 download.file(loc,"temp.dat"); ha_2007=read.csv("temp.dat", header=FALSE,skip=20); harvard <- rbind(ha_1991,ha_1992,ha_....._2006,ha_2007); # merged dataframes #replace missing data with "NA" temp <- (harvard[,] == -9999 | harvard[,] == -6999); #replace -9999 or -6999 with NAs harvard[temp]=NA; #add a new fortnight index lims <- seq(from=1,to=365,by=14); # fortnightly data lims[27] <- 367; # bound adjust, last fortnight has extra days fortnight <- function(d) {sum(ifelse(d<lims,0,1))}  # convert from DOY to fortnights harvard <- data.frame( "FN" = sapply(harvardUST < 0.2|is.na(harvardTA); y <- is.na(harvardSTS1); u <- is.na(harvardSPAR_in); w <- !(x|y|z|u|v|u_cut); #boolean. w is true when all variables are defined and U* > 0.2 m/s harvardS <- data.frame("YEAR"=harvardFN[w],"TA"=harvardNEE[w], "TS1" = harvardVPD[w],"PAR" = harvardlatex \mathrm{NEE} = \mathrm{R_E} -{{\alpha \beta \mathrm{PAR}} \over {\beta + \alpha \mathrm{PAR}}}latex \alpha \rightarrow \alpha \epsilonlatex \epsilon = {\lambda^2 \over {\mathrm{\left(TA-25 \right)}^2 + \lambda^2} } {\mu^2 \over {\mathrm{VPD}^2 + \mu^2}}latex \lambdalatex \mulatex \mu = 2latex \alpha^{-1}\$ corresponds to the number of  photosynthetically active photons  arriving at the forest canopy for every CO2 molecule trapped by photosynthesis. This number is about 14.

 A common feature of future climate scenarios is competition between increased CO2 availability and increased water stress layed out on a global scale. Clearly flux tower data are good place to look for these effects. The R script for the model and plots can be found here. References [1] Factors controlling CO2 exchange on timescales from hourly to decadal at Harvard Forest, Urbanski, S., C. Barford, S. Wofsy, C. Kucharik, E. Pyle, J. Budney, K. McKain, D. Fitzjarrald, M. Czikowsky, J. W. Munger http://www.agu.org/pubs/crossref/2007.../2006JG000293.shtml [2] See for example, An evaluation of models for partitioning eddy covariance-measured net ecosystem exchange into photosynthesis and respiration P. Stoy et al, http://www.geos.ed.ac.uk/homes/pstoy/Stoy_06b.pdf [3] More detailed models are give in An empirical model simulating diurnal and seasonal CO2 flux for diverse vegetation types and climate conditions, M. Saito, S. Maksyutov, R. Hirata, and A. D. Richardson. http //www.biogeosciences.net/6/585/2009/bg-6-585-2009.html & references. 0 
 Carbon, Climate, ecosystem model, Forests ecosystem model, eddy covariance, Terrestrial Carbon, water stress joe 
 
 Post navigation Older postFlux Towers: Part INewer postMapping Biomes Leave a Comment Your email address will not be published. Required fields are marked *Comment Name * Email * Website By using this form you agree with the storage and handling of your data by this website. * This site uses Akismet to reduce spam. Learn how your comment data is processed. 
 
 
 Categories Agriculture (12) Bayesian (3) bioinformatics (1) Carbon (3) Climate (26) complexity (1) ecosystem model (6) Finance and Economics (2) Forests (4) Land Cover Maps (1) R (10) Statistical Physics (2) Statistics (5) Uncategorized (28) Visualisation (1) Wind Energy (6) Archives April 2019 February 2019 November 2018 April 2018 March 2018 January 2018 September 2017 May 2017 April 2017 November 2016 September 2016 May 2016 October 2015 August 2015 June 2015 May 2015 April 2015 January 2015 September 2014 July 2014 June 2014 February 2014 October 2013 August 2013 June 2013 April 2013 January 2013 November 2012 August 2012 July 2012 April 2012 January 2012 November 2011 August 2011 July 2011 March 2011 February 2011 October 2010 August 2010 July 2010 May 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 July 2009 June 2009 May 2009 April 2009 March 2009 Powered by WordPress | Theme: Write by Themegraphy 
 //<![CDATA[ MapPluginInit( /* Default map width */ 500, /* Default map height */ 300, /* Use rel instad of title? */ false); //]]> /* <![CDATA[ */ var wp_ulike_params = {"ajax_url":"https:\/\/joewheatley.net\/wp-admin\/admin-ajax.php","notifications":"1"}; /* ]]> */ /* <![CDATA[ */ var wpgdprcData = {"ajaxURL":"https:\/\/joewheatley.net\/wp-admin\/admin-ajax.php","ajaxSecurity":"7929ba2bf6"}; /* ]]> */ This site uses functional cookies and external scripts to improve your experience. My settingsGoogle AnalyticsPrivacy SettingsThis site uses functional cookies and external scripts to improve your experience. Which cookies and scripts are used and how they impact your visit is specified on the left. You may change your settings at any time. Your choices will not impact your visit. NOTE: These settings will only apply to the browser and device you are currently using. Google AnalyticsEnableSave my settings