New application of low cost sensors for continuous CO2 flux measurements

Soil CO2 emissions are one of the largest contributions to the global carbon cycle, and a full understanding of processes generating them and how climate change may modify them is needed and still uncertain. Thus, a dense spatial and temporal network of CO2 flux measurements from soil could help reduce uncertainty in the global carbon budgets. In the present study, low cost Air Enquirer kits, including CO2 and environmental parameters sensors, have been designed, built and applied for the first time to design, develop and test a new Steady-State-Through-Flow (SS-TF) chamber for 15 simultaneous measurements of CO2 fluxes in soil and CO2 concentrations in air. Sensor's responses were previously corrected for temperature, relative humidity, illumination and pressure conditions in order to reduce the uncertainty of measured CO2 values and of the following calculated CO2 fluxes. CO2 soil fluxes measured by the proposed SS-TF and by a standard closed Non-Steady-State-Non-Through-Flow (NSS-NTF) chamber were shortly compared. The use of a multi-parametric fitting reduced the total uncertainty of CO2 concentration measurements by 62% compared with 20 one where only a simple CO2 calibration was applied, and by a 90% when compared to uncertainty declared by the manufacturer. The new SS-TF system allows continuous measurement of CO2 fluxes and CO2 ambient air with low cost (~1.2 k€), low energy demand (<5W) and low maintenance (twice per year due to sensor calibration requirements).

in relation to climate variables such as atmospheric temperature. A high temporal and spatial resolution monitoring of CO2 fluxes at sensitive areas could offer useful data both for better understanding the processes at the sources and sinks and thus improving biogenic models (Agustí-Panareda et al., 2016;Randerson et al., 2009). In addition, a complete uncertainty budget of CO2 flux measurements will be essential for the evaluation and correction of global flux models and their associated 35 uncertainties.
Gas interchange between the soil and the lower atmosphere is generally measured as the quantity of gas exhaled from the soil per unit of surface and time (µmol·m -2 ·s -1 ). It can be measured with different techniques, being the most common the Steady-State Through-Flow (SS-TF), also known as open dynamic chamber, and the Non-Steady-State Non-Through-Flow (NSS-NTF) or closed chamber (Pumpanen et al., 2004). In both cases, the CO2 fluxes are measured using a chamber installed on the 40 soil surface. NSS-NTF measurements are based on the rate of CO2 concentration increase within the chamber, while in the SS-TF technique the CO2 efflux is continuously calculated as the difference between the CO2 concentration at the inlet and the outlet under determined hypothesis (Livingston and Hutchinson, 1995). A literature survey suggests that generally NSS-NTF may underestimate CO2 fluxes by 4-14%. This could be due to: i) setting configurations, such as the installation depth of the chamber into the soil; ii) the influences of environmental parameters such as wind, pressure, etc. No significant difference was 45 observed when fluxes were measured using SS-TF chambers (Pumpanen et al., 2004;Rayment, 2000).
In recent years, Wireless Sensor Networks (WSN) are increasingly used for real time and high spatial resolution monitoring (Oliveira and Rodrigues, 2011). A WSN is composed of spatially distributed autonomous sensors to monitor physical, chemical or environmental conditions, and to cooperatively pass their data through the network to other locations. WSN can be used for local data recording for later analysis or for continuous transmission in real time to a remote laboratory for synchronous 50 analysis.
Low-cost sensors for CO2 atmospheric measurements have been largely used in industrial environments and for indoor air quality and ventilation rate studies (Fahlen et al., 1992;Mahyuddin and Awbi, 2012;Schell and Int-Hout, 2001). When low cost sensors are applied at high CO2 concentration areas and/or spots where air concentrations observed are in the order of thousands of parts per million (ppm), the total uncertainty of the measurement does not affect the quality of the study of the 55 concentration variability under different conditions and sources/sinks. However, in the last decade, the improvement in precision and cost decrease of Non Dispersive InfraRed (NDIR) CO2 sensors have made them more readily available for multiple purposes (Yasuda et al., 2012). Their low weight and dimensions allow their utilization in a wide variety of applications, including Unmanned Aerial Vehicles (Kunz et al., 2018), CO2 measurements network areas (Kim et al., 2018;Song et al., 2018) and for the study of the distribution of CO2 in large regions, as in the case study of Switzerland (Müller et 60 al., 2020). However, in order to be able to use these sensors in the outdoor atmosphere, a metrological effort is needed to: i) ensure a traceable and stable calibration; ii) evaluate and correct the influence of the environmental parameters, such as temperature, relative humidity and pressure, on the sensor response; iii) estimate the total uncertainty related with the sensors calibrations and corrections. This work reports on the design and full characterization of a low cost Air Enquirer Kit, including NDIR CO2 and environmental parameters sensors. The CO2 sensor within the Kit was calibrated using a multiparametric approach.
Furthermore, a new SS-TF system, based on 5 multi-sensors portable Air Enquirer Kits, is presented, calibrated and tested here for the first time. The system has been designed and built to continuously monitor CO2 fluxes from soil with high temporal resolution, high accuracy and low cost and maintenance. This new SS-TF also offers continuous measurements of ambient 70 CO2 concentration. The system was previously fully characterized under laboratory conditions. Then, CO2 fluxes based on SS-TF technique were shortly compared with observations based on the NSS-NTF method at a Spanish mountain site.
In the present manuscript the Air Enquirer kits, used within the SS-TF chamber, are presented together with the methodology used to calibrate the NDIR CO2 sensors and to correct their response under different environmental conditions. The new prototype of the SS-FT chamber is also introduced after describing its theoretical basis as well as the NSS-NTF method. 75 Finally, the results of the sensors calibrations and corrections and of the short NSS-NTF/SS-TF chambers comparison are presented and discussed.

Air Enquirer Kit
A multi-sensor portable kit, named Air Enquirer (Morguí et al., 2016), was designed and built in the mark of an EduCaixa 80 project (www.educaixa.org). The kit consists of 5 low cost sensors controlled by an Arduino DUE Rev3 microcontroller board that measure: i) NDIR CO2 concentration (in ppm); ii) relative humidity (%); iii) temperature ( 0 C); iv) barometric pressure (hPa) and v) light intensity (lux). Data from sensors are automatically read and stored at a frequency of 0.2Hz in a microSD card. All sensors and the Arduino board controlling them are enclosed in a methacrylate box of 15x8x5 cm 3 in size (Fig. 1). Table 1 shows the main features of each sensor, following specifications provided by their respective manufacturers. The total 85 cost of each Air Enquirer kit is about 200€.

Calibration and multi-parametric correction of the CO2 sensors of the Air Enquirer kit
Low-cost CO2 sensors are known to be temperature (T), humidity (H) and pressure (P) dependent (Arzoumanian et al., 2019;Martin et al., 2017). In this study, five Air Enquirer kits were calibrated and their responses were corrected under different climate conditions. The simultaneous use of the CO2 and the environmental parameters sensors allows a continuous correction 90 of the response of the CO2 sensor under different conditions of T, P and absolute humidity (H). The absolute humidity was calculated from RH, P and T following Vaisala (Vaisala Oyj, 2013). CO2 sensors were then calibrated using a Picarro G2301 Cavity RingDown Spectroscopy Analyzer (CRDS) as a second reference standard. This CRDS has a precision better than 0.03 ppm for CO2 (Crosson, 2008;Richardson et al., 2012). The CRDS results were previously corrected for water vapour (Rella et al., 2013) and calibrated in the laboratory using six NOAA WMO-CO2-X2007 reference gases (primary standard) before 95 and after each experiment following Tans et al. (2011). In order to calibrate the CO2 sensors response for a wide range of temperature, pressure, humidity and CO2 concentration, duplicate measurements were carried out using a temperature controlled box at two sites: i) at the Institut de Ciències del Clima laboratories (IC3), located at 20 meters above sea level (m.a.s.l.), in the city of Barcelona, Spain, and ii) at the Centre de Recerca d'Alta Muntanya laboratories (CRAM, mountain town of Vielha, Spain, at 1582 m.a.s.l.). Each experiment lasted 7 100 days and was carried out using the scheme in Fig. 2. In order to remove high frequency variability, the sampled air was homogenised in a sealed pre-chamber prior to entering in the calibration chamber. Then, the air was pumped to the calibration box at a flow rate of 0.4 L·min -1 and through the secondary standard reference instrument: CRDS. CO2 concentration measured by each NDIR CO2 sensor installed within each Air Enquirer kit ( 2 ), was calibrated by comparison with simultaneous CO2 concentration measured by the CRDS ( 2 ) and considering the environmental 105 conditions of T, H and P using Eq. (1): A multiparametric fit of Eq. (1), yields the following calibrated/corrected CO2 values:

Steady-State Through-Flow chamber (SS-TF or Open Dynamic Chamber) 110
The prototype of the open SS-TF chamber consists of two methacrylate cells of 36 L, where two Air Enquirer kits are installed in each of the chambers in order to continuously monitor the CO2 concentration and environmental variables. The duplicity of the Air Enquirer kits is used to ensure the reliability of the measurements. The Chamber dimensions were designed to avoid border effects and minimize measurement errors, as observed by Senevirathna et al. (2007). The first chamber is a hermetic closed chamber with a unique entry for ambient air (labelled here as Mixing chamber in Fig. 3). The second one (labelled here 115 as Flux chamber), with an open base, has to be installed directly over the soil.
The Mixing chamber is used to mix the sampled air and to measure the CO2 concentration background of the atmospheric air ( ) before it enters into the Flux chamber. It contains two Air Enquirers and a fan located at its top for mixing the sampled air. This chamber has only two openings for the inlet and outlet of atmospheric air at a flow of 0.4 L·min -1 (labelled ′ ′ in Fig.   3). Cable glands are used at the openings to prevent leakages. Using this configuration, high frequency variability of 120 atmospheric air could be avoided and near steady-state conditions were reached.
The Flux chamber is bottomless and has to be positioned in the first 5 cm of the soil/vegetation layer where the soil fluxes are to be measured. Two Air Enquirer kits and a vent were installed at the top of this chamber as well. A constant flow between the two chambers was achieved with a membrane KNF pump and a flowmeter (labelled as FM in Fig. 3). Low flows, in comparison with the chamber volume, are needed to maintain near steady-state conditions during measurements. 125 Using the system depicted in Fig. 3, CO2 fluxes ( 2 in μmol·m -2 ·s -1 ) can be calculated for given time intervals within the Flux chamber using the mass balance in Eq. (3) (Gao and Yates, 1998), where, and are, respectively the volume of the Assuming that the CO2 concentration at each of the boxes is homogeneous, outflow concentration is equal to Flux chamber concentration ( ( ) = ( )), measured by the two Air Enquirer kits within the flux chamber) and inflow concentration is equal to the mixing concentration ( ( ) = ( )), measured by the two Air Enquirer kits within the Mixing chamber. The advantage of this system is that fluxes can be measured continuously with a very small energy requirement (<5 W) and, even 140 using duplicate sensors, with a relative low cost (~1.2k€) in comparison with other automatic commercial flux chambers, priced at roughly 12 k€. The new system described here enables the feasibility of a network of continuous measurements and a replication of experiments to cope with soil flux variability.

Non-Steady-State Non-Through-Flow chamber (NSS-NTF)
CO2 fluxes using the NSS-NTF chamber, or closed static chamber, are measured on the basis of the so-called linear 145 accumulation method (Livingston and Hutchinson, 1995) which uses the initial rate of concentration increase in an isolated chamber that has been placed on the soil surface for a known period of time. Assuming ideal gas behaviour, the slope of the CO2 concentration during the accumulation interval can be used to determine the CO2 flux (μmol·m -2 ·s -1 ) following Eq. (5): where (m 3 ) and (m 2 ) are the volume of the chamber and the enclosed soil surface area respectively, 2_ (ppm·s -1 ) is 150 the slope of the linear increment of the CO2 concentration during the early accumulation time, P and T are the atmospheric pressure and the environmental temperature within the chamber, and R (m 3 ⋅Pa⋅K −1 ⋅mol −1 ) is the universal gas constant. It has been underlined that the linear approach of the accumulation method is only reliable for short times (Davidson et al., 2002;Grossi et al., 2012;Gutiérrez-Álvarez et al., 2020). Otherwise, gradients of environmental parameters between the inside and outside chamber could influence the measurement, probably yielding to leakages of unknown origin in the chamber. Luckily, 155 high frequency measurements, as the ones performed by CO2 sensors, allow to apply this method over a really short accumulation time (T = 5 min has been used in the present study), thus complying with the theoretical requirements. A https://doi.org/10.5194/amt-2021-387 Preprint. Discussion started: 20 November 2021 c Author(s) 2021. CC BY 4.0 License. necessary condition for the application of this method is that the initial CO2 concentration within the chamber has to be equal to the atmospheric CO2 concentration. Therefore, NSS-NTF chambers need to be ventilated after each measurement period (Davidson et al., 2002;Xu et al., 2006). This can be done manually or using automatic systems. In this study, a manual static 160 chamber was used. A closed NSS-NTF chamber of methacrylate (25x25x25) cm 3 was built at IC3 in order to perform a short campaign for the comparison of CO2 fluxes measured by NSS-NTF and SS-TF systems. An Air Enquirer (#03) and a fan were fastened at the top of the chamber. Both devices were run by a small external battery pack. An outer metallic sleeve was previously fixed onto the soil to avoid leaks and other disturbances. However, the systemic comparison between these two systems is beyond the scope of this study. 165

Calibration and multi-parametric correction
Calibration and the correction factors, following Eq. (2), for the CO2 sensors installed in the five Air Enquirer kits are shown in Table 2. The last two columns present the calculated Residual Standard Error (RSE) of the linear fit between the CO2_Kit and the CO2_Picarro considering only the CO2 calibration (RSE_simple) or the fully multiparametric calibration/correction 170 (RSE_multiparametric).
Calibrating these sensors through comparison with the CRDS Picarro secondary standard in the laboratory, allows reaching RSE_simple values between 3.72 and 9.23 ppm. However, when the influence of the environmental parameters in the response of the sensors is taken into account, the RSE_multiparametric values range is shifted to the interval between 1.99 and 5.42 ppm.
The response of the CO2 sensors before and after the calibration and the multi-parametric correction as IC3 as well as CRAM 175 laboratories is shown in Fig. 4. Four sensors show RSE_multiparametric values of less than 5 ppm, and just one of them (kit #04) greater than 5 ppm. Moreover, this last sensor showed a negative correlation with the ambient temperature, unlike all the others where the values increased as temperature went up. Despite this kit was installed within the CO2 fluxes chambers in the following part of the experiment, results from it were not used for the calculation of the CO2 fluxes.
A variance and covariance analysis were also performed to check the influence of meteorological parameters on the CO2 180 sensor. A clear influence of temperature (T), absolute humidity (H) and pressure (P) was observed on the CO2 sensor's response (p-value: < 10 -6 for all variables). No cross-correlation was observed among variables. Pressure conditions seem to have the highest influence on the sensor response. In fact, a reduction of 62% in the RSE_multiparametric was observed when pressure correction was applied.
The two calibration/correction experiments at the CRAM and at IC3 stations were carried out with one month difference. 185 Previous work with NDIR sensors has shown that a calibration minimum every six months may be necessary to keep accuracy between the desired range, as dust and soiling of mirrors may cause drift in the data results (Curcoll et al., 2019;Piedrahita et al., 2014).

Comparison between the NSS-NTF and SS-TF systems
The new prototype of the SS-TF system, described in section 2.2, was tested in a grassland area of the Pyrenees,near CRAM,190 between the 1 st and the 2 nd of June of 2016 and compared with a manual NSS-NTF system. CO2 fluxes ( 2 ) were calculated for both SS-TF and NSS-NTF systems, using Eq. (4) and Eq. (5), respectively.
CO2 concentrations from each of the sensors installed in the SS-TF chamber (upper panel) and the corresponding calculated 2 time series (lower panel) are shown in Fig. 5. Ten minutes averages CO2 concentration values were used for the SS-TF system in order to reduce the uncertainty associated with the CO2 concentration mean. Ten minutes average CO2 concentrations 195 values are presented with an associated uncertainty of 2σ (95 % of confidence).
Using Eq. (4), the 2 data are presented with 2*RSE_parametric confidence interval, assuming as negligible the uncertainty over the flow and the box volume compared with CO2 concentrations uncertainty. CO2 flux values change from close to zero up to 8 µmol·m -2 ·s -1 . The obtained 2 values agree with CO2 flux values observed in other studies in grasslands at a similar altitude, latitude and period of the year, where the range of night-time fluxes was reported to be between 2 and 4 μmol·m -2 ·s -1 (Bahn et 200 al., 2008;Gilmanov et al., 2007).
The differences between the ten minutes average of CO2 concentrations measured by the two sensors within the Mixing chamber were of 2.2 ±5.3 ppm. This difference is coherent with the RSE_parametric of both sensors, and remains stable over time.
The differences between the ten minutes average of CO2 concentrations measured by the two sensors within the Flux chamber were greater (20 ±8 ppm). Furthermore, this difference was found to be temperature dependent, with a significant correlation 205 (p-value<10 -16 and r 2 =0.95). One of the sensors used for this was #04 (Table 2). Data from this kit was not taken in consideration for the CO2 flux retrieval due to its lower precision and, as mentioned above, an apparently negative temperature dependence, as found in the calibration/correction experiments.
Two examples of the CO2 concentrations measured by the CO2 sensor of kit #03 within the manual NSS-NTF chamber (see section 2.3) are shown in Fig. 6. Data of the first minute after manually closing the chamber were discarded during the 2 210 calculations in order to remove installation noise. Concentration gradients were linear over the following 5 minutes, with a correlation coefficient R 2 >0.99 in all cases, as calculated with Eq. (5). Such correlation was positive for the afternoon measurements and negative for the morning measurements, due to photosynthesis of grassland plants.

The correlation between both NSS-NTF and SS-TF
2 results during the parallel measurements carried out at CRAM soil during the 1st and the 2nd of June of 2016 is shown in Fig. 7. The results of a short comparison campaign are here presented 215 only to strengthen the data obtained from the new system presented in this work. Actually, the size of the comparison dataset does not allow a robust statistic. Indeed, the main goal of the present manuscript is presenting a fully characterized automatic CO2 flux system with high precision, low cost and low maintenance. However, an agreement is observed between the results of the two systems when positive CO2 fluxes are observed while differences between the two systems are observed for negative CO2 fluxes. A plausible cause of this mismatch may be the different degree of opacity of the two systems' chambers which influence the sink effect of the soil during the sunlight hours. Measurements uncertainties have been reported as 2 times the standard deviation of the 10 minutes average measurements.

Conclusions
A new application of low cost CO2 sensors for continuous measurements of CO2 flux is presented here. In order to achieve a reliable performance, CO2 sensors were calibrated using a secondary standard reference (Picarro CDRS monitor), and their 225 response was continuously corrected for synchronous measurements of temperature, humidity and barometric pressure. A multiparametric fitting was applied to calibrate and correct the sensor's responses, achieving a drastic reduction of 90% in the uncertainty of measured CO2 concentrations. The new SS-TF chamber presented in this study allows continuous measurement of CO2 fluxes from soil and continuous ambient air CO2 concentration with low uncertainty, low cost (~1.2 k€), low energy demand and low maintenance (twice per year). This system will help future developments of high spatial and temporal 230 resolution CO2 fluxes networks needed to understand soil respiration and productivity mechanisms at sensitive areas.

Code availability
The software code for this paper is available from the corresponding author.

Data availability
The data for this paper are available from the corresponding author. 235

Author contributions
Josep Anton Morguí coordinated the design and manufacture of the Air Enquirer kits, and promoted the building of the new low cost SS-TF chamber for CO2 fluxes. Lidia Cañas collaborated in the mounting and tuning of the Air Enquirer kits. Armand Karrang, during his bachelor degree project, participated in the laboratory and field campaigns. Roger Curcoll and Claudia Grossi, performed the laboratory and field experiments, analysed the data and coordinated the manuscript writing. Arturo 240 Vargas participated in the development theoretical approach of the SS-TF methodology for gas fluxes. All authors participated in the data analysis, discussion of the results and writing of the manuscript.

Competing interests
The authors declare that they have no conflict of interest.