The motivation for this work is to create a simple diagnostic model of gross primary production (GPP) of the terrestrial biosphere to contrast with the complex process-based models that are currently being developed and used in earth system modeling that are generally not well tested and tend to produce widely divergent results.
This work implements a flux partitioning method to calculate GPP from FLUXNET measurements of net ecosystem CO2 exchange and photosynthetic photon flux density.
[TOC]
- LAST UPDATED: 2018-09-04
- TEAM: labprentice
- REPO: gepisat (public)
This directory holds standard input data used for consistency checking. The monthly data is for one of the grass FLUXNET sites in Oensingen, Switzerland for the year 2002.
- mfsun_CH-Oe1_2002.txt
- Monthly sunshine fraction (unitless)
- mprec_CH-Oe1_2002.txt
- Monthly precipitation (mm/month)
- mtemp_CH-Oe1_2002.txt
- Monthly air temperature (Celcius)
- mvapr_CH-Oe1_2002.txt
- Monthly vapor pressure (hPa)
- mvpd_CH-Oe1_2002.txt
- Monthly vapor pressure deficit (kPa)
This directory holds the documentation for the GePiSaT model.
- gepisat_doc.pdf
- The current PDF format of the model documentation
- gepisat_doc.tex
- The main LaTeX document
- gepisat.bib
- The BibLaTeX file for documentation references
- img/
- Contains EPS figures
- tex/
- Contains LaTeX section files for documentation
This directory contains the main GePiSaT model Python code.
- database
- __init__.py
- database package init script (contains version number)
- crudata.py
- functions for processing CRU TS meteorology, VPD, and elevation
- fluxdata.py
- class definitions and processing functions for flux tower data
- glasdata.py
- class definition and processing function for canopy height data
- modisdata.py
- class definition and processing function for EVI
- splashdata.py
- function for processing Priestley-Taylor moisture index
- utilities.py
- module with function for creating output files
- var.py
- class definition for creating input files for the var_list database table
- watchdata.py
- class definition and processing function for shortwave radiation flux
- __init__.py
- gepisat
- __init__.py
- gepisat package init script (contains version number)
- const.py
- module with global constants
- data.py
- module with DATA class for file and data IO
- db_util.py
- module containing the connectSQL function
- file_handler.py
- module with GPGSL (GePiSaT PostGreSQL) file handler (for DATA)
- flux_parti.py
- module containing the FLUX_PARTI (flux partitioning) class
- lue.py
- module containing the LUE class for monthly light-use efficiency model variables
- solar.py
- module containing the SOLAR_TOA class for calculating top of the atmosphere solar irradiation
- utilities.py
- module containing a variety of utility functions
- __init__.py
- db_setup.py
- Setup script for PostgreSQL database
- Creates tables with appropriate schemas
- Populates tables with data
- table_maker.py
- Data manager script for PostgreSQL database
- Reads multiple input file types
- Produces variable lists and data sets for db_setup.py
- model.py
- Main model code
- Performs monthly flux partitioning of NEE and PPFD observation pairs
- Gap-fills PPFD observations
- Calculates GPP based on flux partitioning parameters
- Integrates PPFD and GPP to monthly totals
- Reads monthly gridded meteorological data
This directory contains the result files from GePiSaT model runs. See the README for details.
This directory holds a variety of analyzing, plotting and processing tools.
- analysis/
- lue_analyzer.R
- Analysis functions for GePiSaT light-use efficiency outputs
- summary_stats.R
- Analysis for optimizing GePiSaT dynamic parameterization
- lue_analyzer.R
- misc/
- map_country.py
- Utility function to map continents with their associated country names and abbreviations
- map_country.py
- plotting/
- plot_daily_gpp.py
- This script produces plots of daily GPP results
- plot_gapfill.R
- This script plots the monthly PPFD observations and the gap-filling product
- plot_gpp.R
- This script creates plots of GPP based on the LUE station text files
- Three climate regions / forest regions for each climate region
- Box and whisker plot of monthly GPP for each region
- Calculates monthly averages of GPP +/- st deviation
- Writes out results
- This script creates plots of GPP based on the LUE station text files
- plot_lue.R
- This script processes the LUE data from monthly LUE files (output from model.py) and produces plots
- plot_monthly_gpp.py
- This script produces plots of monthly GPP (with error bars) or a comparison between 2012 and 2015 results
- plot_outliers.R
- This script reads the observation and outlier-free datasets output by model.py, plots them and highlights the observation pairs identified as outliers
- plot_partitioning.R
- This script reads the observation and outlier-free datasets output by model.py, and plots the linear and hyperbolic partitioning
- plot_ts.R
- This script reads the data output from gepisat_ts.py to plot the gridded data associated with flux tower locations.
- plot_daily_gpp.py
- processing/
- catfiles_lue.pl
- This script will concatenate all the files listed in the working directory that end with ".txt" into a single file
- file_handler-any.py
- This script is meant to speed up file handling on any OS
- Creates subdirectories based on station name
- Moves files into their corresponding subdirectories
- This script is meant to speed up file handling on any OS
- file_handler-osx.pl
- This script is meant to speed up file handling in Mac OSX (or Linux).
- Creates subdirectories if they do not already exist
- Moves files into their corresponding subdirectory
- This script is meant to speed up file handling in Mac OSX (or Linux).
- file_handler-win.pl
- This script is meant to speed up file handling in Windows.
- Creates subdirectories if they do not already exist
- Moves files into their corresponding subdirectory
- This script is meant to speed up file handling in Windows.
- annual_gpp.py
- This script processes the GPP output from GePiSaT into monthly and annual totals
- Interpolation of monthly GPP is performed for cases where one or two consecutive months are missing in an attempt to complete the time series; only complete time series of monthly GPP are integrated to annual totals
- cru_dat.py
- This script reads CRU TS 3.00 data file (i.e., .dat) containing the half-degree land-surface elevation data
- cru_netcdf.py
- This script reads NetCDF files (e.g., CRU TS 3.21), extracts variables of interest (e.g., monthly average max and min air temperature, monthly average vapor pressure), and writes the variables of interest to ASCII raster format
- gepisat_gpp.py
- This script reads the output from GePiSaT for gapfilling PPFD (aka ST-NAME-GF_YYYY-MM-01.txt), calculates the daily PPFD totals, finds the associated flux partitioning parameters (via summary_statistics.txt), and calculates daily GPP
- gepisat_nlsr.py
- This script performs non-linear least squared regression for the next-gen LUE model
- gepisat_ts.py
- This script connects to the GePiSaT database, reads observations, and saves them to file as a time series for analysis
- glas_netcdf.py
- This script reads the NetCDF file for the 2005 GLAS-derived canopy height based on the work of Simard et al., 2011.
- glas_tiff.py
- This script opens a TIFF raster file for processing
- NOTE: pixel indexing starts in the top-left (NW) corner (similar to MODIS)
- grid_centroid.py
- Given a point location, i.e., lon and lat, this script finds the four grid centroids surrounding the point, calculates the distances between the point and centroids, and returns the closest centroid.
- If calculated distances are equal, the nearest centroid defaults north and east
- lue_vars_grid.py
- This script creates netCDF files of gridded datasets required for the calculation of GePiSaT's predicted GPP, i.e.:
GPP = phi_o * m' * fa * Iabs
- where:
phi_o
is the intrinsic quantum efficiencym'
is the CO2 substrate limitation termfa
is the index of plant-available moistureIabs
is absorbed light [mol m^-2
]
- The required gridded datasets are:
Iabs
: absorbed light, [mol m^-2
]VPD
: vapor pressure deficit, [kPa
]Gs
: photorespiratory compensation point, [Pa
]K
: Michaelis-Menten coefficient, [Pa
]ns
: relative viscosity of water, unitlessfa
: index of plant-available moisture, unitlessbeta
: ratio of unit costs carboxylation:transpiration, unitless
- The required gridded observations (inputs) are:
elv
: elevation AMSV, metersevi
: monthly enhanced vegatation indexswdown
: daily downwelling shortwave radiation, W m^-2tmp
: monthly mean daily air temperature, degrees Cvap
: monthly mean atmospheric vapor pressure, hPa
- The sources of inputs are:
elv
: CRU TS3.00 [netCDF] (0.5 deg x 0.5 deg)evi
: MODIS MYD13C2 & MOD13C2 [HDF] (0.05 deg x 0.05 deg)swdown
: WATCH WFDEI [netCDF] (0.5 deg x 0.5 deg)tmp
: CRU TS3.22 [netCDF] (0.5 deg x 0.5 deg)vap
: CRU TS3.22 [netCDF] (0.5 deg x 0.5 deg)
- This script creates netCDF files of gridded datasets required for the calculation of GePiSaT's predicted GPP, i.e.:
- modis_hdf.py
- This script reads MODIS land-surface products (in HDF file format) and produces a CSV file for importing geo-referenced data into GIS.
- includes assigning longitude and latitude to measurements based on the gridded data's resolution
- This script can also resample the MODIS CGM (0.05 deg) grid to a lower resolution (e.g., 0.5 deg) and process EVI to file
- This script reads MODIS land-surface products (in HDF file format) and produces a CSV file for importing geo-referenced data into GIS.
- modis_hdf2ncdf.py
- This script reads MODIS land-surface products (in HDF file format), upscales the data to 0.5 degree resolution, and saves the data to netCDF file format
- noaa_netcdf.py
- This script reads the netCDF file of 0.5 degree resolution mean monthly soil moisture data based on van den Dool, Huang & Fan (2003)
- raster_to_ts.py
- This script creates a time series based on a single pixel (or list of pixels) read from monthly ASCII raster at 0.5 degree resolution
- watch_netcdf.py
- This script reads a netCDF file (WATCH Forcing Data) and extracts data for the variable of interest for each grid point. The data extraction is then formatted for ASCII raster file output
- Note: WFDEI contains 67,209 pixels of terrestrial observations plus an additional 27,533 pixels over Antarctica for a total of 94,742 pixels
- catfiles_lue.pl