Git Product home page Git Product logo

reddyproc's Introduction

CRAN_Status_Badge Travis-CI Build Status

Overview

REddyProc package supports processing (half)hourly data from Eddy-Covariance sensors.

There is an online-formular to use the functionality of the package including description at https://www.bgc-jena.mpg.de/bgi/index.php/Services/REddyProcWeb.

Installation

# Release stable version from CRAN
install.packages("REddyProc")

# The development version from GitHub using devtools:
# install.packages("devtools")
devtools::install_github("bgctw/REddyProc")

The REddyProc~package requires a quite recent versions of the tidyverse packages. On encountering problems on installations with older versions should run the following code before installing REddyProc.

install.packages("tidyverse")
update.packages(oldPkgs="dplyr")

Usage

A simple example performs Lookuptable-based gapFilling of Net-Ecosystem-Exchange (NEE) and plotting a fingerprint plot of the filled values.

library(REddyProc)
#+++ Input data from csv (example needs to be downloaded)
examplePath <- getExamplePath('Example_DETha98.txt', isTryDownload = TRUE)
if (length(examplePath)) {
  EddyData <- fLoadTXTIntoDataframe(examplePath)
} else {
  warning(
      "Could not find example text data file."
      ," In order to execute this example code,"
      ," please, allow downloading it from github. " 
      ," Type '?getExamplePath' for more information.")
  # using RData version distributed with the package instead
  EddyData <- Example_DETha98
}
#+++ If not provided, calculate VPD from Tair and rH
EddyData$VPD <- fCalcVPDfromRHandTair(EddyData$rH, EddyData$Tair)
#+++ Add time stamp in POSIX time format
EddyDataWithPosix <- EddyData %>% 
  filterLongRuns("NEE") %>% 
  fConvertTimeToPosix('YDH', Year = 'Year', Day = 'DoY', Hour = 'Hour')
#+++ Initalize R5 reference class sEddyProc for processing of eddy data
#+++ with all variables needed for processing later
EProc <- sEddyProc$new(
  'DE-Tha', EddyDataWithPosix, c('NEE','Rg','Tair','VPD', 'Ustar'))
#Location of DE-Tharandt
EProc$sSetLocationInfo(LatDeg = 51.0, LongDeg = 13.6, TimeZoneHour = 1)  
#
#++ Fill NEE gaps with MDS gap filling algorithm (without prior ustar filtering)
EProc$sMDSGapFill('NEE', FillAll = FALSE)
#
#++ Export gap filled and partitioned data to standard data frame
FilledEddyData <- EProc$sExportResults()
#
#++ Example plots of filled data to screen or to directory \plots
EProc$sPlotFingerprintY('NEE_f', Year = 1998)

Further examples are in vignette(useCase) and vignette(DEGebExample) and further md-files of the vignettes directory.

Docker images

Docker images are provided that comprise rstudio, rocker/tidyverse, and REddyProc. There are different version for the latest push to github, for the version on CRAN and for specific tags starting from 1.1.4.

  • bgctw/reddyproc:latest
  • bgctw/reddyproc_cran
  • bgctw/reddyproc:tag

They are usually run with installed docker by typing at a shell:

docker run --rm -p 8787:8787 <imagename>

Then the loading url localhost:8787 in a browser window should bring up RStudio (default username and password are both rstudio), where you can type the above usage example.

Reference

The methodology and benchmark of REddyProc 1.1.3 is described in the following paper:

Wutzler, T., Lucas-Moffat, A., Migliavacca, M., Knauer, J., Sickel, K., Šigut, L., Menzer, O., and Reichstein, M. (2018): Basic and extensible post-processing of eddy covariance flux data with REddyProc, Biogeosciences, 15, 5015-5030, https://doi.org/10.5194/bg-15-5015-2018.

reddyproc's People

Contributors

bgctw avatar progtw avatar mircomigliavacca avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.