2 min read

[New Project] advr: an R package for the scientific research on trace gas advection flux density

原文链接: steemit, cnsteem, busy, chainbb, steemdb, steemd, busy, markdown




Carbon dioxide (CO~2~) is one of the key green house gases which play an important role in the global climate change. In academia, the sources and sinks of CO~2~ are estimated with the flux density, e.g. the amount of CO~2~ passing through a unit area in a unit time. Estimates of net ecosystem CO~2~ exchange have been attracting a lot of attention. The research on the advection flux takes care of the contribution of the advection term to the CO~2~ balance.

The advection measurement is very complex. A typical advection measurement consists of horizontal and vertical profiles of the CO~2~ mixing ratio, the air temperature, the air humidity, the air pressure, as well as chamber flux measurement. A datalogger and a microcontroller work together, which control many solenoid valves to switch the sample lines, save the data. Most of the data are recorded every a few seconds, continuously lasting several days, which makes it difficult to check the data quality and the status of the instruments.

Figure 1. Sketch of a typical advection measurement. I image the man with a cup of coffee should be me. But who should be the woman…

What is the project about?

advr is an open source R package for the advection measurement of trace gases. Currently, the version 0.0.0 has three components:

  • a logger program for controlling the data logger CR1000
  • a microcontroller program for controlling Arduino MEGA2560.
  • R functions to process the raw meteorological and ecological data.

An output of advr is shown in Figure 2.

Figure 2. A demo output of advr.

Technology Stack

steemr is developed in R language. The data logger program is written with the CRBasic language. The microcontroller program is composed of functions written in C/C++.


In the future, I am going to add much more features to advr, such as

  • quality control of the raw advection flux data,
  • automatic calculation of the advection flux,
  • improvement of the chamber flux calculation with the state-of-art techniques,
  • automatic visualization of quality control result and flux components (Figure 3) with a single click,
  • building a user-friendly web UI for those who knows nothing of R language.

Figure 3. One of the future plans: Visualization of the flux components of an advection measurement with a single click.

How to contribute?

Anyone can get in touch with me by leaving me a reply on steem @dapeng or on https://github.com/pzhaonet/advr.

GitHub Account