Learn R Programming

NEONiso

Author: Rich Fiorella October 31, 2022.

This repository contains an R package to calibrate NEON atmospheric isotope data. A stable version of the package can be installed from CRAN, and a development version of this package can be installed here using devtools (see below).

Please report any issues you have, bugs found, or enhancement suggestions as issues to this repository.

Installing the development version:

  1. You will need the rhdf5 package, which is not on CRAN. rhdf5 is available from bioconductor using:
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("rhdf5")
  1. Install devtools, which is available on CRAN.
  2. Install NEONiso from GitHub. Development version can be installed using:
devtools::install_github("lanl/NEONiso")

Alternatively, you can install a specific version of the package (e.g., v0.1) by specifying the version tag:

devtools::install_github("lanl/NEONiso@v0.1")

Citation information:

Package functionality to calibrate NEON carbon isotope data is described in a paper at JGR-Biogeosciences (doi: 10.1029/2020JG005862). Users of this package should also cite the Zenodo DOI above.

Please also check to ensure that you are compliant with NEON's data citation policy for any products derived from this package: https://www.neonscience.org/data/about-data/data-policies

Usage:

Two methods are available to calibrate NEON Carbon isotope data and they take slightly different approaches: a) the 'Bowling_2003' method calibrates 12CO2 and 13CO2 mole fractions independently, while b) the 'linreg' method calibrates d13C and CO2 directly without converting to isotopologue mole fractions. The method is specified as an argument to calibrate_carbon_bymonth(). Both methods yield very similar results, but the error and precision estimates are slightly better from the calibrate_carbon_Bowling2003() function (Fiorella et al., 2021; JGR-Biogeosciences)

This function is meant to be applied to a list or vector of uncalibrated data files, and produce output hdf5 files that have (currently) only the CO2 and d13C variables instead of the entire data bundle. Development was targeted and tested on monthly basic files, but the functions should also work on the extended data files.

neonUtilities:::stackEddy should work on these output files - please file an issue if it does not.

DATA ALERT:

Several months of data on the NEON data portal have an issue where the Picarro time clock has diverged from the valve manifold time. A fix has been developed, but has not been propagated to the NEON data portal.

Copyright notice:

© 2022. Triad National Security, LLC. All rights reserved. This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. All rights in the program are reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.

Copy Link

Version

Install

install.packages('NEONiso')

Monthly Downloads

358

Version

0.7.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Rich Fiorella

Last Published

February 13th, 2025

Functions in NEONiso (0.7.2)

fit_water_regression

Estimate slope/intercept of water isotope calibration regression
extract_water_calibration_data

Extract only the data corresponding to validation/calibration time periods.
validate_output_file

Validate output file.
water_isotope_sites

List sites with water vapor isotope ratios.
write_water_calibration_data

Write water calibration parameters to file
write_water_ambient_data

Write calibrated ambient water isotope ratio observations to file.
restructure_variables

Restructures data.frames imported by ingest_data to shorten variable names and Wrapper function around restructure_carbon_variables and restructure_water_variables.
restructure_water_variables

Restructure ingested variables for the water isotope system.
setup_output_file

Structure a new HDF5 file
validate_analyte

Standardize analyte names
terrestrial_gradient_sites

List terrestrial gradient sites
select_daily_reference_data

Select validation data corresponding to a particular day
ingest_data

Ingest and stack variables needed in calibration.
loocv

Leave-one-out cross validation
swap_standard_isotoperatios

swap_standard_isotoperatios
terrestrial_core_sites

List terrestrial core sites
fit_carbon_regression

Estimate slope/intercept of carbon isotope calibration regression
get_Rstd

Return heavy-to-light isotope ratio of primary standard.
manage_local_EC_archive

Manage a local eddy covariance (EC) data archive.
restructure_carbon_variables

Restructure ingested variables for the carbon isotope system.
write_carbon_ambient_data

Write calibrated carbon ambient data to file
write_carbon_calibration_data

Write carbon calibrations to file
calculate_12CO2

Calculate 12C-CO2 Mole Fractions
carbon_regression_plots

Make plots of carbon calibration data for debugging
calculate_13CO2

Calculate 13C-CO2 Mole Fractions
calibrate_water

Calibrate NEON water isotope ratios using validation data sets.
calibrate_ambient_carbon_linreg

Calibrate ambient carbon isotope data using linear regression
calibrate_ambient_carbon_gainoffset

Calibrate ambient carbon isotope data using gain-and-offset method
calibrate_carbon

Calibrate NEON carbon isotope data using validation data sets.
calibrate_ambient_water_linreg

calibrate_ambient_water_isotopes
NEONiso-package

NEONiso
R_to_delta

Convert heavy-to-light isotope ratio to delta values.
convert_NEONhdf5_to_POSIXct_time

Convert NEON HDF5 file time to POSIXct
extract_carbon_cal_data

Extract only the data corresponding to validation/calibration time periods.
correct_carbon_ref_output

Correct carbon ref output
filter_median_brock86

Apply a median absolute deviation filter
correct_carbon_ref_cval

correct_carbon_ref_cval
estimate_calibration_error

Produce estimates of the calibration error.
delta_to_R

Converts delta value to heavy-to-light isotope ratio
convert_POSIXct_to_NEONhdf5_time

Convert a POSIXct object to the format used in NEON HDF5 files