diff --git a/CHANGELOG.md b/CHANGELOG.md index dd1bdbe..ebe2261 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ Revision history for our modified version of EasyFlux® DL for CR3000. > > *Supported sections: Security, Issues, Fixed, Added, Changed, Deprecated, Removed* +## Unreleased (easyflux-1.2-update) + +This version imports changesets from EasyFlux-DL_CR3OP version 1.1→1.2. +Significant realignment means users will need to modify current deployments to conform to updated input channel locations. + +* Support for ambient T/RH probes (HMP155A, HSC23, HMP45C) is reverted such that users now specify a multiplier and offset instead of selecting sensor type. +* Support for rain gauges (TE525 series) is likewise reverted so users specify the multiplier instead of selecting sensor type. +* All whitespace conflicts were resolved in favor of EasyFlux-DL base code. +* **All sensor input locations were reverted to match EasyFlux-DL base code. This highly substantial change affects most sensors.** + As a result of limited input locations, the 034B cup-and-vane anemometer and NR01 component radiometer are mutually exclusive by default (to use both, specify different input channels). +* All hard-coded numbers for computations are changed from integer to float. +* Subroutine `FootprintCharacteristics_KormannMeixner`: + * Incorporates thermal stratification as a function of stability from eqns (11) and (32) in *Kormann and Meixner (2001)*. + * Modifies fourth footprint integration segment to increase integration interval by factor of 2.5 (4→10 x aerodynamic height) + and increase scale factor of aerodynamic height used to calculate max range by factor of 5 (200→1000). + * Modifies fifth footprint integration segment to increase scale factor of aerodynamic height used to calculate max range by factor of 5 (200→1000) + and to iterate up to a fixed number of times instead of estimating number of steps required. + + ## [ProgSig 40826] 2018-11-29 ### Added diff --git a/README.md b/README.md index 29d3489..71a2e18 100644 --- a/README.md +++ b/README.md @@ -1,102 +1,132 @@ # EasyFlux® DL for CR3000 -EasyFlux® DL for CR3000 is a free CRBasic program that enables a CR3000 -data logger to report fully corrected fluxes of CO2, latent heat -(H2O), sensible heat, and momentum from a [Campbell Scientific](https://www.campbellsci.com/) -open-path eddy-covariance (EC) system. For official program documentation and -downloads, refer to the project website: +EasyFlux® DL is a free CRBasic program by Campbell Scientific for +acquiring data from an open-path eddy-covariance system and computing fluxes of +carbon dioxide (CO2), latent heat (H2O), sensible heat and momentum +using commonly-applied techniques described in the scientific literature. +More information is available on the project website: > EasyFlux® DL: Eddy-Covariance Datalogger Program > -## What's Here - -This repository contains a version of EddyFlux-DL customized to run on research -towers operated in partnership with the Laboratory for Atmospheric Research at -Washington State University. These towers focus on agricultural research sites -and belong to multiple networks and/or projects, including: - -* USDA ARS Long-Term Agroeconomic Research ([LTAR](https://ltarnetwork.org)) Network -* Landscapes in Transition Pacific Northwest (LIT-PNW) Project -* the [AmeriFlux](https://ameriflux.lbl.gov/) Network - -Program modifications are intended to be backwards-compatible and accretive, -but not all changes satisfy these goals. To make identifying and merging changes -introduced by the vendor easier, official vendor releases are also tracked here -in a separate and unrelated branch history. - - -## Getting Started - -### Required Equipment ### - -* CR3000 datalogger ([CR3000](https://www.campbellsci.com/cr3000)) -* Memory card module ([NL115](https://www.campbellsci.com/nl115), [NL116](https://www.campbellsci.com/nl116), - or [CFM100](https://www.campbellsci.com/cfm100)) - * Network-enabled module is *highly recommended* -* Open-path infrared gas analyzer with ultrasonic anemometer: - * [IRGASON](https://www.campbellsci.com/irgason), **OR** - * [EC150](https://www.campbellsci.com/ec150) with [CSAT3A](https://www.campbellsci.com/csat3a) -* 16GB industrial-grade CompactFlash memory card - -### Supported Optional Sensors - -> ***N.B.*** *this version has known channel assignment conflicts which prevent -> certain optional sensors from being enabled, regardless of compatibility in -> prior versions. Refer to comments in the program file for complete details. In -> future versions, once compatibility is restored, this message will be removed.* - -* Fine-wire thermocouple ([FW05](https://www.campbellsci.com/fw05), - [FW1](https://www.campbellsci.com/fw1), or [FW3](https://www.campbellsci.com/fw3)) -* Ambient temperature/relative humidity probe ([HC2S3](https://www.campbellsci.com/hc2s3) - or [HMP-155A](https://www.campbellsci.com/hmp155a)) -* Net radiometer ([CNR4](https://www.campbellsci.com/cnr4), [NR01](https://www.campbellsci.com/nr01), - or [NL-Lite2](https://www.campbellsci.com/nr-lite2)) -* Pyranometer ([CS300](https://www.campbellsci.com/cs300-pyranometer) or - [LI200X](https://www.campbellsci.com/li200x-l)) -* Quantum (PAR) sensor ([LI-190R](https://www.campbellsci.com/li190r-l) or - [LI-190SB](https://www.campbellsci.com/li190sb-l)) -* Infrared radiometer ([SI-111](https://www.campbellsci.com/si-111)) -* Tipping bucket rain gage ([TE525](https://www.campbellsci.com/te525-l), - [TE525WS](https://www.campbellsci.com/te525ws-l), [TE525M](https://www.campbellsci.com/te525mm-l), - or TE525/TE525MM with 8 inch funnel) -* Averaging thermocouple ([TCAV](https://www.campbellsci.com/tcav-l)) -* Water content reflectometer, for heat storage term (up to 2 of - [CS616](https://www.campbellsci.com/cs616-reflectometer), - [CS650](https://www.campbellsci.com/cs650), - [CS655](https://www.campbellsci.com/cs655), - [5TM](https://www.metergroup.com/environment/articles/meter-legacy-soil-moisture-sensors/#5tm), - or [TDR-315/315L/310S](http://www.acclima.com)) -* Soil heat flux plates (up to 4 of [HFP01](https://www.campbellsci.com/hfp01)) - or [HFP01SC](https://www.campbellsci.com/hfp01sc-l)) -* Water content reflectometer, for vertical profiling (up to 6 of - [5TM](https://www.metergroup.com/environment/articles/meter-legacy-soil-moisture-sensors/#5tm) - or [TDR-315/315L/310S](http://www.acclima.com)) -* Cup and vane wind set ([034B](https://www.campbellsci.com/034b)) -* GPS receiver ([GPS16X-HVS](https://www.campbellsci.com/gps16x-hvs)) -* Door switch sensor (magnetic reed switch, NO recommended) - -### Quick Setup - -1. Connect the datalogger to power and sensors as described in relevant manuals. -3. Update the unique calibration values in `src/constants.cr3` and upload to - to the datalogger. -2. Modify the program file (`src/default.cr3`) as needed to: - * enable or disable sensors - * update other constants, such as UTC offset -3. Upload the program file to the datalogger. -4. Update station variables, as necessary. - -For additional details, refer to the [official user guide](https://www.campbellsci.com/easyflux-dl#documents_) -as well as files in the [`/doc`](/doc) folder. - +## Requirements + +* CR3000 firmware version ≥ 28.0 +* EC100 firmware version ≥ 7.01 + +## Usage + +Refer to the EasyFlux® DL CR3000OP [Instruction Manual][#csi-manual] +and the [supplemental documentation file](doc/readme.md) for complete directions, +including sensor wiring, program configuration, data table descriptions and important usage notes. + +### Getting Started + +1. Download a program [release][#gh-release] or clone this repo. +1. Update the program file (`EasyFlux-DL.cr3`) according to your particular hardware configuration. +1. Update the include file (`constants.cr3`) with unique sensor-specific calibration values. +1. Push the include file to the datalogger, but do not run it. +1. Push the program file to the datalogger and set to run automatically. + * Optional: upload the program file as `default.cr3` so it always runs automatically. + +[#csi-manual]: https://s.campbellsci.com/documents/us/manuals/easyflux-dl.pdf +[#gh-release]: https://github.com/wsular/EasyFlux-DL/releases/ + +## Features + +### Editable constants + +This version of EddyFlux® DL is modified to enable field editing of unique sensor constants using the keyboard display or a remote client (e.g. PC400). +By separating constants to a separate include file, it becomes possible to edit the file in-memory and recompile the program despite the memory restrictions of the data logger. +To facilitate quality-control and post-processing corrections, unique sensor constants are stored adjacent to corresponding sensor field names in output data tables. + +> ***N.B.** Field modification of unique sensor constants is currently not generalized and can only be used for particular sensor configurations.* + +### New hardware support + +The supported sensor list is expanded as follows (additions in bold): + +* Gas analyzer and sonic anemometer (qty 1) + * EC150 with CSAT3A + * IRGASON +* Fine-wire thermocouple (optional, qty 0 to 1) + * FW05 + * FW1 + * FW3 +* Biometeorology (biomet) and energy balance sensors (optional) + * Temperature/Relative Humidity (RH) Probe (qty 0 to 1) + * HC2S3 + * HMP155A + * Radiation measurements + * Option 1 + * NR Lite2 Net Radiometer (qty 0 to 1) + * CS300 or LI200x Pyranometer (qty 0 to 1) + * LI190x Quantum Sensor (qty 0 to 1) + * SI-111 Infrared Radiometer (qty 0 to 1) + * Option 2 + * NR01 or CNR4 4-Way Radiometers (qty 0 to 1) + * TE525x Rain gauge (qty 0 to 1)) + * **034B Cup-and-Vane Anemometer (qty 0 to 1)**
*(Backported from Campbell Scientific pre-EasyFlux OPEC program)* + * TCAV Soil Thermocouple Probe (qty 0 to 2) + * Soil Water Content Reflectometer (qty 0 to 2) + * CS616 + * CS650 + * CS655 + * **5TM** ([METER Group](https://metergroup.com/)) + * **TDR31x** ([Acclima](https://acclima.com/)) + * Soil Heat Flux Plates + * Option 1: HFP01 plates (qty 0 to 4) + * Option 2: HFP01SC self-calibrating plates (qty 0 to 4) +* **Vertical Profile of Soil Sensors (optional)** + * **Option 1: 5TM (qty 0 to 6)** + * **Option 2: TDR31x (qty 0 to 6)** +* **GPS Receiver (optional, qty 0 to 1)** + * **GPS16X-HVS** +* **Enclosure door switch (optional, qty 0 to 1)** + * **Magnetic reed switch (generic)** +* **Solar charge controller (optional)** + * **TriStar 45** ([MorningStar](https://www.morningstarcorp.com/)) + +### High-frequency CO2 + +This version of *EasyFlux DL* exposes the alternate CO2 density output using humidity-corrected sonic temperature +and adds it to the high-frequency time series output table. +The value is not used for online flux computations and cannot be disabled. + +Using the fast-response temperature measurements from the sonic anemometer compensates for spectroscopic effects during high sensible heat flux regimes +as explained in *Helbig et al. (2016)*. For more information, see: + +* CRBasic Program Reference for `EC100`. *Campbell Scientific, Inc.* CR3000.Std.32.04 +* Helbig, M., et al.: “Addressing a Systematic Bias in Carbon Dioxide Flux Measurements with the EC150 and the IRGASON Open-Path Gas Analyzers”, Agricultural and Forest Meteorol., 228-229 (2016), 349-359. [doi:10.1016/j.agrformet.2016.07.018](https://doi.org/10.1016/j.agrformet.2016.07.018) +* Russell, E.S., et al.: "Adjustment of CO2 flux measurements due to the bias in the EC150 infrared gas analyzer", Agricultural and Forest Meteorol., 276-277 (2019), 107593. [doi:10.1016/j.agrformet.2019.05.024](https://doi.org/10.1016/j.agrformet.2019.05.024) + +### Data tables + +Several new data tables and changes to existing output data tables are summarized below. +For full details, refer to the [instruction manual supplement](doc/readme.md). + +* Time_Series + * New field `CO2_hf` contains alternate CO2 density output +* Flux and Flux_Notes + * New fields for unique sensor calibration factors + * New fields for 034B cup-and-vane anemometer + * New fields for soil water content sensors + * New fields for vertical profile soil sensors + * New fields for solar charge controller + * New field for enclosure door status +* New table: LTAR_Met + * Added to satisfy reporting requirements for LTAR Common Observation Repository (CORe) + * Does averaging on a 15-minute basis + * Contains basic meteorology (TA, RH, PA, WS, WD, PAR, Rn, precip...) and soil-related data, including heat flux plates and vertical profile sensors +* New table: LTAR_Met_1minute + * Added to acquire high-resolution meteorology data + * Does averaging on a 1-minute basis + * Contains same metrics as LTAR_Met, except no precipitation or soil vertical profile ## License * The EasyFlux-DL code base is *Copyright (c) 2014, 2015 Campbell Scientific, Inc. All rights reserved.* For more details, refer to the official [project website](https://www.campbellsci.com/easyflux-dl). -* Original software contributions are licensed under - [the MIT License](https://opensource.org/licenses/MIT). -* Supporting documentation is subject to the Creative Commons Attribution 4.0 - International ([CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)). +* Original software contributions are licensed under *TBD* +* Supporting documentation is subject to the *TBD* diff --git a/doc/LTAR data table planning.xlsx b/doc/LTAR data table planning.xlsx deleted file mode 100644 index 7843d30..0000000 Binary files a/doc/LTAR data table planning.xlsx and /dev/null differ diff --git a/doc/data_tables.xlsx b/doc/data_tables.xlsx deleted file mode 100644 index 12f3751..0000000 Binary files a/doc/data_tables.xlsx and /dev/null differ diff --git a/doc/datadict-Flux.txt b/doc/datadict-Flux.txt new file mode 100644 index 0000000..d249ea6 --- /dev/null +++ b/doc/datadict-Flux.txt @@ -0,0 +1,327 @@ +Field Units Description +Fc_molar umol/(m^2 s) Final corrected CO2 flux +Fc_mass mg/(m^2 s) Final corrected CO2 flux +Fc_qc_grade Grade Overall quality grade for Fc_molar and Fc_mass following Foken et al. 2012 +Fc_samples_Tot samples The total number of time series samples used in calculation of Fc +LE W/m^2 Final corrected latent heat flux +LE_qc_grade Grade Overall quality grade for LE following Foken et al. 2012 +LE_samples_Tot samples The total number of time series samples used in calculation of LE +H W/m^2 Final corrected sensible heat flux derived from sonic sensible heat flux +H_qc_grade Grade Overall quality grade for Hs following Foken et al. 2012 +H_samples_Tot samples The total number of time series samples used in calculation of H +H_FW W/m^2 Final corrected sensible heat flux derived from fine-wire thermocouple measurements +H_FW_samples_Tot samples The total number of time series samples used in calculation of H_FW +Rn W/m^2 Average net radiation (corrected for wind) +G_surface W/m^2 Heat flux at the ground surface +energy_closure Fraction The ratio of sensible and latent heat fluxes over surface heat flux plus net radiation +Bowen_ratio fraction The ratio of final sensible heat flux over final latent heat flux +tau (kg m/s)/(m^2 s) Final corrected momentum flux +tau_qc_grade Grade Overall quality grade for tau following Foken et al. 2012 +u_star m/s Friction velocity after coordinate rotations and frequency corrections +T_star C Scaling temperature after coordinate rotations, frequency corrections, and SND correction +TKE m^2/s^2 Specific turbulence kinetic energy after coordinate rotations +amb_tmpr_Avg C Average ambient temperature from EC100 temperature probe +Tc_Avg C Average air temperature derived from corrected sonic temperature +Td_Avg C Average dewpoint temperature derived from gas analyzer and sonic measurements +RH_Avg % Average relative humidity derived from gas analyzer measurements +e_sat_Avg kPa Average saturation vapor pressure derived from gas analyzer measurements +e_Avg kPa Average vapor pressure derived from gas analyzer measurements +amb_press_Avg kPa Average ambient air pressure +VPD_air kpa Vapor pressure deficit +Ux_Avg m/s Average Ux +Ux_Std m/s Standard deviation of Ux +Uy_Avg m/s Average Uy +Uy_Std m/s Standard deviation of Uy +Uz_Avg m/s Average Uz +Uz_Std m/s Standard deviation of Uz +Ts_Avg C Average sonic temperature +Ts_Std C Standard deviation of sonic temperature +sonic_azimuth degrees Compass direction in which the sonic negative x-axis points +wnd_spd m/s Average wind speed +rslt_wnd_spd m/s Average horizontal wind speed +wnd_dir_sonic degrees Average wind direction in the sonic coordinate system +std_wnd_dir degrees Standard deviation of wind direction +wnd_dir_compass degrees Average compass wind direction +CO2_molfrac_Avg umol/mol Average CO2 mole fraction (wet basis) +CO2_mixratio_Avg umol/mol Average CO2 dry molar mixing ratio +CO2_Avg mg/m^3 Average CO2 mass density +CO2_Std mg/m^3 Standard deviation of CO2 mass density +H2O_molfrac_Avg mmol/mol Water vapor mole fraction (wet basis) +H2O_mixratio_Avg mmol/mol Water vapor dry molar mixing ratio +H2O_Avg g/m^3 Water vapor mass density +H2O_Std g/m^3 Standard deviation of water vapor mass density +CO2_sig_strgth_Min fraction Minimum CO2 signal strength +H2O_sig_strgth_Min fraction Minimum H2O signal strength +FW_Avg C Average fine-wire thermocouple temperature +FW_Std C Standard deviation of fine-wire thermocouple temperature +T_probe_Avg C Average ambient temperature measured by temp/RH probe +e_probe_Avg kPa Average water vapor pressure derived from temp/RH probe +e_sat_probe_Avg kPa Average saturation water vapor pressure derived from temp/RH probe +Td_probe_Avg C Average dewpoint temperature derived from temp/RH probe +H2O_probe_Avg g/m^3 Average water vapor density derived from temp/RH probe measurements +RH_probe_Avg % Average relative humidity from temp/RH probe +rho_a_probe_Avg kg/m^3 Average air density derived from temp/RH probe +rho_d_probe_Avg kg/m^3 Average dry air density derived from temp/RH probe +Precipitation_Tot mm Total precipitation +Rn_meas_Avg W/m^2 Average net radiation (raw, not corrected for wind) +NRLITE_SENS uV/W/m^2 Net radiometer calibration factor +albedo_Avg unitless Average albedo +R_SW_in_Avg W/m^2 Average incoming short wave radiation +R_SW_out_Avg W/m^2 Average outgoing short wave radiation +R_LW_in_Avg W/m^2 Average incoming long wave radiation +R_LW_out_Avg W/m^2 Average outgoing long wave radiation +T_nr_Avg Klvin Average sensor body temperature +R_LW_in_meas_Avg W/m^2 Average raw incoming long wave radiation +R_LW_out_meas_Avg W/m^2 Average raw outgoing long wave radiation +R_pyran_Avg W/m^2 Average radiation measured by pyranometer +PAR_density_Avg umol/(s m^2) Average density of photosynthetic active radiation +QUANTUM_SENS uA/mmol/m^2/s Quantum (PAR) calibration factor +T_SI111_targeted_Avg C Average temperature of targeted object +T_SI111_body_Avg C Average temperature of sensor body +cupvane_WS_Avg m/s Average wind speed from cup-and-vane anemometer +cupvane_WS_rslt_Avg m/s Average wind vector magnitude from cup-and-vane anemometer +cupvane_WD_rslt_Avg degrees Average compass wind direction from cup-and-vane anemometer +cupvane_WD_csi_Std degrees Standard deviation of wind direction from cup-and-vane anemometer +Tsoil_Avg(1) C Average soil temperature for each TCAV sensor; i identifies which TCAV sensor +Tsoil_Avg(2) C Average soil temperature for each TCAV sensor; i identifies which TCAV sensor +soil_wtr_T_Avg(1) frac_v_wtr Average soil water content with temperature correction for each CS616; i identifies which CS616 sensor +soil_wtr_T_Avg(2) frac_v_wtr Average soil water content with temperature correction for each CS616; i identifies which CS616 sensor +soil_wtr_Avg(1) frac_v_wtr Average soil water content without temperature correction; i indentifies which CS616 sensor +soil_wtr_Avg(2) frac_v_wtr Average soil water content without temperature correction; i indentifies which CS616 sensor +cs616_wcr_Avg(1) uSeconds Average water content reflectometer period for each CS616; i identifies which CS616 sensor +cs616_wcr_Avg(2) uSeconds Average water content reflectometer period for each CS616; i identifies which CS616 sensor +cs65x_wc_Avg(1) frac_v_wtr Average soil water content for each sensor; i identifies which CS650 or CS655 sensor +cs65x_wc_Avg(2) frac_v_wtr Average soil water content for each sensor; i identifies which CS650 or CS655 sensor +cs65x_ec_Avg(1) dS/m Average electrical conductivity for each sensor; i identifies which CS650 or CS655 sensor +cs65x_ec_Avg(2) dS/m Average electrical conductivity for each sensor; i identifies which CS650 or CS655 sensor +cs65x_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which CS650 or CS655 sensor +cs65x_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which CS650 or CS655 sensor +tdr31X_wc_Avg(1) % Average soil water content for each sensor; i identifies which TDR3x sensor +tdr31X_wc_Avg(2) % Average soil water content for each sensor; i identifies which TDR3x sensor +tdr31X_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which TDR3x sensor +tdr31X_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which TDR3x sensor +tdr31X_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +tdr31X_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +tdr31X_bulkEC_Avg(1) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_bulkEC_Avg(2) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_poreEC_Avg(1) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_poreEC_Avg(2) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +soil_5TM_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +soil_5TM_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +soil_5TM_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which 5TM sensor +soil_5TM_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which 5TM sensor +soil_5TM_wc_Avg(1) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +soil_5TM_wc_Avg(2) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +shf_plate_avg(1) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(2) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(3) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(4) W/m^2 Average soil heat flux; i identifies which sensor +SHFP_1_SENS uv/W/m^2 Heat flux plate #1 calibration factor +SHFP_2_SENS uv/W/m^2 Heat flux plate #2 calibration factor +SHFP_3_SENS uv/W/m^2 Heat flux plate #3 calibration factor +SHFP_4_SENS uv/W/m^2 Heat flux plate #4 calibration factor +shf_plate_cal(1) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(1); i indicates which sensor +shf_plate_cal(2) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(2); i indicates which sensor +shf_plate_cal(3) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(3); i indicates which sensor +shf_plate_cal(4) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(4); i indicates which sensor +profile_tdr31X_wc_Avg(1) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(2) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(3) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(4) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(5) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(6) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(3) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(4) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(5) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(6) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(3) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(4) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(5) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(6) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(1) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(2) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(3) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(4) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(5) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(6) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(1) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(2) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(3) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(4) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(5) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(6) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_5TM_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_E_Avg(3) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_E_Avg(4) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_E_Avg(5) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_E_Avg(6) unitless Average soil permittivity for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(3) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(4) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(5) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_tmpr_Avg(6) C Average soil temperature for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(1) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(2) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(3) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(4) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(5) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +profile_5TM_wc_Avg(6) frac_v_wtr Average soil water content for each sensor; i identifies which 5TM sensor +upwnd_dist_intrst m Upwind distance of interest for the average wind direction +FP_dist_intrst % Percentage of footprint from within the upwind range of interest +FP_max m Distance upwind where the maximum contribution to the footprint is found +FP_40 m Upwind distance that contains 40% of cumulative footprint +FP_55 m Upwind distance that contains 55% of footprint +FP_90 m Upwind distance that contains 90% of footprint. If NAN is returned, integration of the model never reached 90% within the allowable distance of integration. See Appendix G, Footprint (p. G-1), for more details. +FP_Equation authors Returns either Kljun or KormannMeixner. The model of Kljun et al. (2004) is used for applicable atmospheric conditions, else the model of Kormann & Meixner (2001) is used. +UxUy_Cov (m/s)^2 Covariance of Ux and Uy +UxUz_Cov (m/s)^2 Covariance of Ux and Uz +UyUz_Cov (m/s)^2 Covariance of Uy and Uz +TsUx_Cov C m/s Covariance of Ts and Ux +TsUy_Cov C m/s Covariance of Ts and Uy +TsUz_Cov C m/s Covariance of Ts and Uz +u_star_R m/s Friction velocity after coordinate rotations +u_Avg_R m/s Mean streamwise wind speed after coordinate rotations +u_Std_R m/s Standard deviation of streamwise wind after coordinate rotations +v_Avg_R m/s Average crosswind speed after coordinate rotations +v_Std_R m/s Standard deviation of crosswind after coordinate rotations +w_Avg_R m/s Average vertical wind speed after coordinate rotations +w_Std_R m/s Standard deviation of vertical wind after coordinate rotations +uv_Cov_R (m/s)^2 Covariance of streamwise and crosswind after coordinate rotations +uw_Cov_R (m/s)^2 Covariance of streamwise and crosswind after coordinate rotations +vw_Cov_R (m/s)^2 Covariance of crosswind and vertical wind after coordinate rotations +uTs_Cov_R C m/s Covariance of streamwise wind and sonic temperature after coordinate rotations +vTs_Cov_R C m/s Covariance of crosswind and sonic temperature after coordinate rotations +wTs_Cov_R C m/s Covariance of vertical wind (after coordinate rotations) and sonic temperature +uw_Cov_R_F (m/s)^2 Covariance of streamwise and vertical wind after coordinate rotations and frequency corrections +vw_Cov_R_F (m/s)^2 Covariance of cross and vertical wind after coordinate rotations and frequency corrections +wTs_Cov_R_F C m/s Covariance of vertical wind and sonic temperature after coordinate rotations and frequency corrections +wTs_Cov_R_F_SND C m/s Covariance of vertical wind and sonic temperature after coordinate rotations, frequency corrections, and SND correction +sonic_samples_Tot samples Number of raw sonic samples in averaging period without diagnostic flags +no_sonic_head_Tot samples Number of sonic samples where no sonic head was detected +no_new_sonic_data_Tot samples Number of scans where no sonic data were received +sonic_amp_l_f_Tot samples Number of sonic samples with amplitude low diagnostic flag +sonic_amp_h_f_Tot samples Number of sonic samples with amplitude high diagnostic flag +sonic_sig_lck_f_Tot samples Number of sonic samples with signal lock diagnostic flag +sonic_del_T_f_Tot samples Number of sonic samples with delta temp diagnostic flag +sonic_aq_sig_f_Tot samples Number of sonic samples with acquiring signal diagnostic flag +sonic_cal_err_f_Tot samples Number of sonic samples with calibration error diagnostic flag +UxCO2_Cov mg/(m^2 s) Covariance of Ux and CO2 density +UyCO2_Cov mg/(m^2 s) Covariance of Uy and CO2 density +UzCO2_Cov mg/(m^2 s) Covariance of Uz and CO2 density +UxH2O_Cov g/(m^2 s) Covariance of Ux and water vapor density +UyH2O_Cov g/(m^2 s) Covariance of Uy and water vapor density +UzH2O_Cov g/(m^2 s) Covariance of Uz and water vapor density +uCO2_Cov_R mg/(m^2 s) Covariance of streamwise wind and CO2 density after coordinate rotations +vCO2_Cov_R mg/(m^2 s) Covariance of crosswind and CO2 density after coordinate rotations +wCO2_Cov_R mg/(m^2 s) Covariance of vertical wind and CO2 density after coordinate rotations +uH2O_Cov_R g/(m^2 s) Covariance of streamwise wind and H2O density after coordinate rotations +vH2O_Cov_R g/(m^2 s) Covariance of crosswind and H2O density after coordinate rotations +wH2O_Cov_R g/(m^2 s) Covariance of vertical wind and H2O density after coordinate rotations +wCO2_Cov_R_F mg/(m^2 s) Covariance of vertical wind and CO2 density after coordinate rotations and frequency corrections +wH2O_Cov_R_F g/(m^2 s) Covariance of vertical wind and H2O density after coordinate rotations and frequency corrections +CO2_E_WPL_R_F mg/(m^2 s) CO2 flux WPL correction term due to water vapor flux after coordinate rotations and frequency corrections +CO2_T_WPL_R_F mg/(m^2 s) CO2 flux WPL correction term due to sensible heat flux after coordinate rotations and frequency corrections +H2O_E_WPL_R_F g/(m^2 s) H2O flux WPL correction term due to water vapor flux after coordinate rotations and frequency corrections +H2O_T_WPL_R_F g/(m^2 s) H2O flux WPL correction term due to sensible heat flux after coordinate rotations and frequency corrections +CO2_samples_Tot samples Number of CO2 samples without diagnostic flags and within thresholds for CO2 signal strength (default 0.6, see Section 4.1) and the factory calibrated CO2 measurement range (0 to 1000 umol/mol) +H2O_samples_Tot samples Number of H2O samples without diagnostic flags and within thresholds for H2O signal strength (default 0.7, see Section 4.1) and the factory calibrated H2O measurement range (0 to 72 mmol/mol) +no_irga_head_Tot samples Number of samples where no gas analyzer head was detected +no_new_irga_data_Tot samples Number of scans where no gas analyzer data were received +irga_bad_data_f_Tot samples Number of IRGA samples with any IRGA diagnostic flag set high +irga_gen_fault_f_Tot samples Number of gas analyzer samples with general system fault diagnostic flag +irga_startup_f_Tot samples Number of gas analyzer samples with startup diagnostic flag +irga_motor_spd_f_Tot samples Number of gas analyzer samples with motor speed diagnostic flag +irga_tec_tmpr_f_Tot samples Number of gas analyzer samples with TEC temperature diagnostic flag +irga_src_pwr_f_Tot samples Number of gas analyzer samples with source power diagnostic flag +irga_src_tmpr_f_Tot samples Number of gas analyzer samples with source temperature diagnostic flag +irga_src_curr_f_Tot samples Number of gas analyzer samples with source current diagnostic flag +irga_off_f_Tot samples Number of gas analyzer samples with gas head power down diagnostic flag +irga_sync_f_Tot samples Number of gas analyzer samples with synchronization diagnostic flag +irga_amb_tmpr_f_Tot samples Number of gas analyzer samples with ambient temperature probe diagnostic flag +irga_amb_press_f_Tot samples Number of gas analyzer samples with ambient pressure diagnostic flag +irga_CO2_I_f_Tot samples Number of gas analyzer samples with CO2 1 signal diagnostic flag +irga_CO2_Io_f_Tot samples Number of gas analyzer samples with CO2 Io signal diagnostic flag +irga_H2O_I_f_Tot samples Number of gas analyzer samples with H2O I signal diagnostic flag +irga_H2O_Io_f_Tot samples Number of gas analyzer samples with H2O Io signal diagnostic flag +irga_CO2_Io_var_f_Tot samples Number of gas analyzer samples with CO2 Io variation diagnostic flag +irga_H2O_Io_var_f_Tot samples Number of gas analyzer samples with H2O Io variation diagnostic flag +irga_CO2_sig_strgth_f_Tot samples Number of gas analyzer samples with CO2 signal strength diagnostic flag +irga_H2O_sig_strgth_f_Tot samples Number of gas analyzer samples with H2O signal strength diagnostic flag +irga_cal_err_f_Tot samples Number of gas analyzer samples with calibration file read error flag +irga_htr_ctrl_off_f_Tot samples Number of gas analyzer samples with heater control off diagnostic flag +UxFW_Cov C m/s Covariance of Ux and fine-wire thermocouple temperature +UyFW_Cov C m/s Covariance of Uy and fine-wire thermocouple temperature +UzFW_Cov C m/s Covariance of Uz and fine-wire thermocouple temperature +uFW_Cov_R C m/s Covariance of streamwise wind and fine-wire thermocouple temperature after coordinate rotations +vFW_Cov_R C m/s Covariance of crosswind and fine-wire thermocouple temperature after coordinate rotations +wFW_Cov_R C m/s Covariance of vertical wind and fine-wire thermocouple temperature after coordinate rotations +wFW_Cov_R_F C m/s Covariance of vertical wind and fine-wire thermocouple temperature after coordinate rotations and frequency corrections +FW_samples_Tot samples The number of valid fine-wire thermocouple measurements in the averaging period from which covariances may be calculated +alpha degrees Alpha angle used for coordinate rotations (regardless of planar fit or double rotation method, angle convention of Wilczak et al. 2001 used) +beta degrees Beta angle used for coordinate rotations (regardless of planar fit or double rotation method, angle convention of Wilczak et al. 2001 used) +gamma degrees Gamma angle used for coordinate rotations (regardless of planar fit or double rotation method, angle convention of Wilczak et al. 2001 used) +height_measurement m User entered measurement height of EC sensors +height_canopy m User entered canopy height +surface_type_text User entered surface type {crop, grass, forest, shrub, bare land, water} +displacement_user m User entered displacement height; 0 for auto calculation +d m Displacement height used in calculations; it will equal displacement_user if user entered a nonzero value; if displacement_user is zero, program will auto calculate +roughness_user m User entered roughness length; 0 for auto calculation +z0 m Roughness length +z m Aerodynamic height +L m Obukhov length +stability_zL unitless Atmospheric surface layer stability +iteration_FreqFactor Number of iterations for recalculating Obukhov length and frequency factors +latitude degrees Latitude; positive for Nothern hemisphere, negative for Southern hemisphere +longitude degrees Longitude; positive for Eastern hemisphere, negative for Western hemisphere +separation_x_irga m Separation between sonic and gas analyzer with respect to sonic x-axis +separation_y_irga m Separation between sonic and gas analyzer with respect to sonic y-axis +separation_lat_dist_irga m Separation distance between sonic and gas analyzer along the axis perpendicular to oncoming wind +separation_lag_dist_irga m Separation distance between sonic and gas analyzer along the axis parallel to oncoming wind +separation_lag_scan_irga scans Number of scans to lag gas analyzer data relative to sonic data to account for separation along the axis of oncoming wind and wind velocity +separation_x_FW m Separation between sonic and fine-wire thermocouple with respect to sonic x-axis +separation_y_FW m Separation between sonic and fine-wire thermocouple with respect to sonic y-axis +FW_diameter m Effective diameter of fine-wire thermocouple junction +separation_lat_dist_FW m Separation distance between sonic and fine-wire thermocouple along axis perpendicular to oncoming wind +separation_lag_dist_FW m Separation distance between sonic and fine-wire thermocouple along axis parallel to oncoming wind +separation_lag_scan_FW scans Number of scans to lag fine-wire thermocouple data relative to sonic data to account for separation along axis of oncoming wind and wind velocity +time_const_FW s Calculated time constant of the fine-wire thermocouple +MAX_LAG Maximum number of scans to lag gas analyzer or fine-wire thermocouple data with respect to sonic data when doing cross correlation for covariance maximization +lag_irga scans The lag applied to gas analyzer data with respect to sonic data that maximizes covariance +lag_FW scans The lag applied to fine-wire thermocouple data with respect to sonic data that maximizes covariance +FreqFactor_uw_vw unitless Frequency correction factor applied to momentum fluxes +FreqFactor_wTs unitless Frequency correction factor applied to wTs covariance +FreqFactor_wCO2_wH2O unitless Frequency correction factor applied to wCO2 and wH2O covariances +FreqFactor_wFW unitless Frequency correction factor applied to fine-wire thermocouple derived wFW covariance +rho_d_Avg kg/m^3 Average density of dry air +rho_a_Avg kg/m^3 Average density of ambient (moist) air +Cp J/(kg C) Specific heat of ambient (moist) air at constant pressure +Lv J/g Latent heat of vaporization +batt_V_Avg V Average PV system battery voltage +batt_sens_V_Avg V Average PV system battery sense voltage +array_V_Avg V Average PV system array/load voltage +charge_I_Avg A Average PV system charging current +batt_V_slow_Avg V Average PV system battery voltage, slow filtered +heatsink_T_Avg C Average PV charge controller heatsink temperature +batt_T_Avg C Average PV system battery temperature +reference_V_Avg V Average PV charge controller reference voltage +ah_reset Ah PV charge controller resettable amp-hour meter +ah_total Ah PV charge controller total amp-hour meter +hourmeter hr PV charge controller hourmeter +alarm_bits unitless PV charge controller alarms (bitfield) +fault_bits unitless PV charge controller faults (bitfield) +dip_num_Avg unitless PV charge controller DIP switch settings (bitfield) +state_num_Avg unitless PV charge controller control state +pwm_duty_Avg fraction PV charge controller PWM Duty Cycle +door_is_open_Hst Fraction of time door was open (0-1) +panel_tmpr_Avg C Average temperature of the datalogger wiring panel +batt_volt_Avg V Average battery voltage supplying power to the datalogger +slowsequence_Tot samples Number of slow sequences during the averaging interval (for example, the number of times biomet and energy balance sensors were measured) +process_time_Avg ms Average processing time for each scan +process_time_Max ms Maximum processing time for a scan +buff_depth_Max scans Maximum number of records stored in the buffer diff --git a/doc/datadict-LTAR_Met.txt b/doc/datadict-LTAR_Met.txt new file mode 100644 index 0000000..eff4888 --- /dev/null +++ b/doc/datadict-LTAR_Met.txt @@ -0,0 +1,69 @@ +Field Units Description +amb_tmpr_Avg C Average ambient temperature from EC100 temperature probe +rslt_wnd_spd m/s Average horizontal wind speed +wnd_dir_compass degrees Average compass wind direction +RH_Avg % Average relative humidity derived from gas analyzer measurements +Precipitation_Tot mm Total precipitation +amb_press_Avg kPa Average ambient air pressure +PAR_density_Avg umol/(s m^2) Average density of photosynthetic active radiation +batt_volt_Avg volts Average temperature of the datalogger wiring panel +panel_tmpr_Avg C Average battery voltage supplying power to the datalogger +std_wnd_dir degrees Standard deviation of wind direction +VPD_air kpa Vapor pressure deficit +Rn_meas_Avg W/m^2 Average net radiation (raw, not corrected for wind) +e_sat kPa Average saturation vapor pressure derived from gas analyzer measurements +e kPa Average vapor pressure derived from gas analyzer measurements +tdr31X_wc_Avg(1) % Average soil water content for each sensor; i identifies which TDR3x sensor +tdr31X_wc_Avg(2) % Average soil water content for each sensor; i identifies which TDR3x sensor +tdr31X_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which TDR3x sensor +tdr31X_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which TDR3x sensor +tdr31X_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +tdr31X_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +tdr31X_bulkEC_Avg(1) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_bulkEC_Avg(2) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_poreEC_Avg(1) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +tdr31X_poreEC_Avg(2) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +Tsoil_Avg(1) C Average soil temperature for each TCAV sensor; i identifies which TCAV sensor +Tsoil_Avg(2) C Average soil temperature for each TCAV sensor; i identifies which TCAV sensor +profile_tdr31X_wc_Avg(1) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(2) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(3) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(4) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(5) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_wc_Avg(6) % Average soil water content for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(1) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(2) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(3) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(4) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(5) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_tmpr_Avg(6) C Average soil temperature for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(1) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(2) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(3) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(4) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(5) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_E_Avg(6) unitless Average soil permittivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(1) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(2) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(3) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(4) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(5) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_bulkEC_Avg(6) uS/cm Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(1) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(2) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(3) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(4) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(5) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +profile_tdr31X_poreEC_Avg(6) uS/cm Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor +shf_plate_avg(1) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(2) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(3) W/m^2 Average soil heat flux; i identifies which sensor +shf_plate_avg(4) W/m^2 Average soil heat flux; i identifies which sensor +SHFP_1_SENS uv/W/m^2 Heat flux plate #1 calibration factor +SHFP_2_SENS uv/W/m^2 Heat flux plate #2 calibration factor +SHFP_3_SENS uv/W/m^2 Heat flux plate #3 calibration factor +SHFP_4_SENS uv/W/m^2 Heat flux plate #4 calibration factor +shf_plate_cal(1) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor +shf_plate_cal(2) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor +shf_plate_cal(3) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor +shf_plate_cal(4) unitless Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor diff --git a/doc/datadict-Time_Series.txt b/doc/datadict-Time_Series.txt new file mode 100644 index 0000000..a218b44 --- /dev/null +++ b/doc/datadict-Time_Series.txt @@ -0,0 +1,16 @@ +Field Units Description +Ux m/s Wind speed along sonic x-axis +Uy m/s Wind speed along sonic y-axis +Uz m/s Wind speed along sonic z-axis +Ts C Sonic temperature +diag_sonic unitless Raw sonic diagnostic value (0 indicates no diagnostic flags set) +CO2 mg/m^3 CO2 density +H2O g/m^3 Water vapor density +diag_irga unitless Raw gas analyzer diagnostic value (0 indicates no diagnostic flags set) +Tc C Air temperature derived from sonic temperature corrected for humidity and pressure +amb_tmpr C Air temperature measured by the EC100 temperature probe +amb_press kPa Ambient pressure +CO2_sig_strgth fraction CO2 signal strength +H2O_sig_strgth fraction H2O signal strength +CO2_hf mg/m^3 CO2 density using humidity-corrected sonic temperature +FW C Air temperature measured by fine-wire thermocouple diff --git a/doc/field_name_xref.xlsx b/doc/field_name_xref.xlsx new file mode 100644 index 0000000..61c771f Binary files /dev/null and b/doc/field_name_xref.xlsx differ diff --git a/doc/img/logger-sdi12-mux.png b/doc/img/logger-sdi12-mux.png deleted file mode 100644 index 622724c..0000000 Binary files a/doc/img/logger-sdi12-mux.png and /dev/null differ diff --git a/doc/img/network-diagram.png b/doc/img/network-diagram.png deleted file mode 100644 index 547f1df..0000000 Binary files a/doc/img/network-diagram.png and /dev/null differ diff --git a/doc/img/phenocam-brackets.jpg b/doc/img/phenocam-brackets.jpg deleted file mode 100644 index 66c3ddc..0000000 Binary files a/doc/img/phenocam-brackets.jpg and /dev/null differ diff --git a/doc/img/power-diagram-parallel-sunsaver.png b/doc/img/power-diagram-parallel-sunsaver.png deleted file mode 100644 index b2523d4..0000000 Binary files a/doc/img/power-diagram-parallel-sunsaver.png and /dev/null differ diff --git a/doc/img/solar-panel-stand-2x70.png b/doc/img/solar-panel-stand-2x70.png deleted file mode 100644 index 273b97d..0000000 Binary files a/doc/img/solar-panel-stand-2x70.png and /dev/null differ diff --git a/doc/network.md b/doc/network.md deleted file mode 100644 index 63568ab..0000000 --- a/doc/network.md +++ /dev/null @@ -1,86 +0,0 @@ -# Network - -> This documentation is not specific to the EasyFlux-DL-CR3000 program. It only -> covers the USDA Long-Term Agroeconomic Research (LTAR) site towers at R.J. -> Cook Agronomy Farm. - -## Overview - -The towers are equipped with internet access for datalogger telemetry and for -the phenocam to submit imagery to the [Phenocam Network](https://phenocam.sr.unh.edu/). -Each pair of towers has a broadband cellular modem and a transparent wireless -bridge which shares the data connection. Static IP addresses and port forward -rules allow a LoggerNet instance to retrieve data on a regular schedule. The -Phenocam is also configured with static IP and operates independently. - -## Setup - -### Hardware Summary - -Parts at each tower: - -* Broadband modem (Raven X; Sierra Wireless) - * *Only at Cook East and Boyd North* - * Mounting bracket/power cables/antennas/etc -* Directional, outdoor-grade wireless radio (Nanostation LocoM2; Ubiquiti Networks) - * Surge protectors, to recommendation (ETH-SP; Ubiquiti Networks) - * Power-over-Ethernet (POE) injector for wifi radio (TP-DCDC-1224; Tycon) - * Variable-angle vertical pipe bracket -* 12Vdc wide-temperature range Ethernet switch (SW-504; BrainBoxes) -* Datalogger (CR3000; Campbell Scientific) -* Phenocam (Netcam SC 5MP IR; StarDot) - * Included Ethernet+Power cable - * Passive Power-over-Ethernet injector (double-check polarity before use) -* Misc. Ethernet cables, shielded (3 & 12 ft lengths recommended) -* Misc. mounting hardware (hose clamps, cable ties, etc) - -> There is no line-of-sight between the towers at Boyd Farm and a third radio -> will be added later to relay the signal. - -### Modem - -* Data plan is "Unlimited" and has no caps or fees based on data usage* -* Broadband modem is assigned a public, static IPv4 address† -* DHCP service is turned off since all devices have static IP -* Port forward rules must be created for each datalogger at its configured - PakBus address (default: 6785) - -**Serviced through a central USDA account* -†*Still available on special request but this may change in the future.* - -### Wireless radios - -* Wireless channel width is decreased to 20 MHz to improve link stability -* Wireless link is a Layer 2 Transparent Bridge (Point-to-Point Link) which uses - WDS and AirMAX (proprietary) so it's not available to phones/laptops/etc. -* Use adjustable angle bracket to align radios pairs for best signal quality - -### CR3000 - -* Configure a static, private IP address -* Enable relevant security options - -### Phenocam - -* Configure a static, private IP address -* Setup the camera for direct image upload (see [phenocam](phenocam.md)) - -## Diagram - -> *Update: using all shielded and slightly longer cables is recommended.* - -![Network block diagram](img/network-diagram.png) - - -## References - -* Sierra Wireless. *ALEOS 4.0.11 Configuration Guide.* Rev 7 June 13. Online: - -* Sierra Wireless. *AirLink Raven X User Guide.* Rev 2.0. Online: - -* Ubiquiti Networks. *Layer 2 Transparent Bridge.* - Online: -* Ubiquiti Networks. *NanoStationM/locoM Quick Start Guide (Multilingual).* - Online: -* Ubiquiti Networks. *airOS 6 User Guide.* Online: - diff --git a/doc/phenocam.md b/doc/phenocam.md deleted file mode 100644 index 64954c3..0000000 --- a/doc/phenocam.md +++ /dev/null @@ -1,128 +0,0 @@ -# Phenocam - -> This documentation is not specific to the EasyFlux-DL-CR3000 program. It only -> covers the USDA Long-Term Agroeconomic Research (LTAR) site towers at R.J. -> Cook Agronomy Farm. - -## Overview - -Each tower has a single Phenocam aimed into the primary fetch. The cameras are -all registered with the [Phenocam Network](https://phenocam.sr.unh.edu/webcam/) -and operate independently of the eddy-covariance (EC) and meteorology sensors. -In addition to capturing phenological changes, the cameras help document field -activities. - -### Sites - -* R.J. Cook Agronomy Farm (USDA LTAR Network) - * Cook East: - * Cook West: - * Boyd North: - * Boyd South: - - -### Schedule - -| -|---|---| -| Daily operation | Between 4am and 11pm (extent of daylight in summer) | -| Capture interval | Every fifteen minutes (roughly :00, :15, :30, :45) | -| Time zone | Pacific Standard Time (UTC-0800) | - -> The capture interval (15min) aligns with USDA LTAR data reporting guidelines. - -### Materials summary - -* Standard Phenocam package from Stardot Technologies () - * 5MP StarDot NetCam SC IR with 12V power supply - * Ethernet+DC power cable - * outdoor housing and mounting bracket -* Ethernet surge protector (APC ProtectNet PNET1GB) - * Recommended because it fits inside the camera outdoor housing -* Ethernet surge protector for in the datalogger enclosure (Ubiquiti ETH-SP) -* (2) Threaded rod mount clamping hangers for 1-1/2" ID - * Closure hardware, and for bolting onto camera housing - * Select 1-1/2" ID to match diameter of UT10 tower mast - * Example product: McMaster Item #3006T312 -* Misc parts (shielded Ethernet cable, thread-lock compound, 1/4"-20 hardware, - crimp terminal, wire, hose clamp, etc) - -## Camera Setup - -Refer to the official [phenocam installation instructions](https://phenocam.sr.unh.edu/pdf/PhenoCam_Install_Instructions.pdf) -for guidance on purchasing, configuration, assembly and installation of the -phenocam. Additional details are provided below. - -### Software - -1. Change the password (default: admin) -2. Update the camera hostname with site name (ex: `NetCamSC-CookEast`) -3. Reboot -4. Run the [Phenocam Installation Tool (PIT)](https://bluegreen-labs.github.io/phenocam-installation-tool/) - with arguments in table below -5. Reboot and verify correct settings were applied -6. Open camera settings and assign a static IP address - -Refer to the official PIT website (linked above) for complete usage details. - -| -|---|---| -| `CAMERA` |*use the registered phenocam site name* -| `TIME_OFFSET` | `-8` | -| `TZ` | `PST` | -| `CRON_START` | `4` | -| `CRON_END` | `22` | -| `CRON_INT` | `15` | -| `FTP_MODE` | `passive` | - -### Hardware - -Pictures and more detailed descriptions are available in the official -installation instructions. - -1. Mount prepared camera onto housing sled with thread-lock compound. -2. Insert sled into housing and slide camera lens up to the glass window to - minimize glare. Secure sled with small screw once in position. -3. Feed Ethernet/power cable through housing cable gland and attach to the - bottom of the housing. Pay attention to power cable connectors when selecting - which end to feed. - * Removing the Ethernet jack shroud and shaving down the black rubber molding - is required to fit through the cable gland nut - * Alternatively, use electricians putty to seal the cable entry port and - secure the Ethernet/power cable to the housing arm with cable ties. -4. Connect power cable to camera. -5. Install surge protector (APC ProtectNet) between camera and Ethernet cable, - and secure to top of camera with velcro. -6. Feed surge protector ground wire through cable gland to outside of housing - and crimp on large ring terminals. -7. Bolt a pair of clamping hangers onto the camera housing mounting holes, - securing the surge protector wire as well. - -![Picture of installed brackets](img/phenocam-brackets.jpg) - -## Installation - -Refer to the official installation instructions for additional guidance on -camera positioning. - -1. Mount camera at appropriate height to obtain best field of view and maintain - access for servicing. -2. Secure Ethernet/power cable to the tower with cable ties, leaving slack to - allow for minor adjustments. -3. Install surge protector (Ubiquiti ETH-SP) in the datalogger enclosure and - connect to grounding stud. -4. Connect switch to surge protector with shielded cable. -5. Connect phenocam Ethernet cable to surge protector. -6. Connect phenocam power cable to pigtail from 12Vdc power rails. -7. Test the camera by logging in, and use the live feed to fine-tune the camera - position. - -## References - -* Koen Hufkens. *Phenocam Installation Tool.* Untagged commit `ac578c4`. Online: - -* Richardson, A., Klosterman, S., & Hufkens, K. *Phenocam Installation Instructions.* - Revision Oct 2016. Online: -* The University of New Hampshire. *Phenocam Frequently Asked Questions.* Online: - - diff --git a/doc/power.md b/doc/power.md deleted file mode 100644 index 1d80bf6..0000000 --- a/doc/power.md +++ /dev/null @@ -1,121 +0,0 @@ -# Power Details - -> This documentation is not specific to the EasyFlux-DL-CR3000 program. It only -> covers the USDA Long-Term Agroeconomic Research (LTAR) site towers at R.J. -> Cook Agronomy Farm. - -## Overview - -The eddy-covariance (EC) towers run on solar-powered 12Vdc battery systems. -Towers deployed at R. J. Cook Agronomy Farm (Cook East/West) use older -equipment from the Regional Approaches to Climate Change (REACCH) project. -Towers deployed at Boyd Farm (Boyd North/South) use newer equipment purchased -for the Long-Term Agroeconomic Research (LTAR) project. - - -## Cook Farm Towers (SunSaver) - -Parts for one tower are listed below. Each *SunSaver-10-12V* charge controller -can support two solar panels in parallel connection, and the charging outputs -can be paralleled into the battery array. Though not ideal, the controllers are -located in the same enclosure as the batteries because they provide temperature -compensation and the sensor is embedded into the control unit. Fusing is also -located in the battery enclosure. To disconnect equipment in the datalogger -enclosure, use the green removable power plugs. - -* (4) solar panels (Campbell Scientific SP70 or SP90) -* (2) charge controller (Morningstar SunSaver-10-12V) -* (5 to 7) deep-cycle 12V flooded batteries -* misc. electrical (e.g. wire, crimp terminals, fuses, screw terminal blocks) -* sturdy, ventilated battery enclosure (see section below) -* (2) solar panel stands (see section below) - -### Notes - -* Be familiar with user documentation (see *References* below) -* Use appropriate fuses (not pictured) -* Do not exceed equipment ratings -* Disconnect all tower equipment from power before setup or servicing -* Remove the flooded jumper from charge controller -* Use the low-voltage disconnect (LVD) feature, if available -* Protect cables with outdoor-rated conduit - -![Photovoltaic system diagram](img/power-diagram-parallel-sunsaver.png) - - -## Boyd Farm Towers (TriStar TS-45) - -Parts for one tower are listed below. The *TriStar TS-45* charge controller -accepts higher solar voltage levels so the two panels are connected in series -to (hopefully) provide sufficient voltage for charging even when cloudy or in -winter when sun angles are much lower. - -* (2) solar panels (SolarLand SLP120-12U) -* (1) charge controller (Morningstar TriStar TS-45) - * (1) Remote Temperature Sensor accessory (Morningstar RTS) - * (1) local display/keypad accessory (Morningstar TS-M-2) - * (1) MC4 extension cable, 50ft long (cut in half to make 2x 25ft cables) -* 5 to 7 deep-cycle 12V flooded batteries -* misc. electrical (e.g. wire, crimp terminals, fuses, screw terminal blocks) -* sturdy, ventilated battery enclosure (see section below) -* (1) solar panel stand (see section below) - - -## Battery Enclosure - -All sites are equipped with a steel job chest (Knaack Model 4824 Jobmaster) to -house the batteries and controllers. The chosen size is large enough to fit up -to 9 standard dimension deep-cycle batteries. It also has multiple electrical -pass-thru holes, an overhung lid and outdoor-grade finish. Minimal preparation -is required: - -* Attach skids made from 4ft lengths of pressure-treated (ground contact) 2x8 - dimensional lumber to keep the chest from sinking into the ground. -* Tape steel bug mesh over unused electrical pass-thru holes to keep pests out. - Aluminum HVAC tape works well for this application. -* Seal the lock mechanism holes with electrician's putty to keep rodents out. -* Once cables are installed, seal entry points with electrician's putty. -* Apply safety decals and hazard labels as appropriate - - -## Solar Panel Stands - -The solar arrays are mounted on portable stands instead of attached to fixed -concrete posts. This allows them to be moved out of the way of field machinery -or be repositioned for better performance. - -### Recommended Materials - -* Bolt-Together Framing, 2-1/8" x 1-3/4" Angle, Galvanized Steel - * lengths of 4', 5' and 6 -* Stainless Steel hardware in 1/4"-20 thread size, for securing panels to framing - * 4x per panel: Hex Head Screw, 3/4" length - * Attach with screw head inside panel framing - * Use Standard Washer and Split Lock Washer under the Hex nut -* Stainless Steel hardware in 5/16"-18 thread size, for securing framing together - * At each joint: Hex Head Screw, 3/4" length - * Attach screw with Standard Washer on both sides of framing and Split Lock - Washer under the Hex nut -* Long-Lasting Outdoor Sand Bag - * High UV resistance to prevent bag rupture - * Use enough weight to resist strong winter winds - * Current type in use are "DuraBag®" brand, with the sand liners - -![Solar panel stand](img/solar-panel-stand-2x70.png) - - -## References - -* Campbell Scientific. *SP70 Solar Panel Instruction Manual.* Rev 3/09. - Online: -* Morningstar. *Remote Temperature Sensor Datasheet.* Online: - -* Morningstar. *SunSaver Photovoltaic System Controllers Operator's Manual.* - 101E-R4-2/00. Online: -* Morningstar. *TriStar Digital Meters Installation and Operation Manual.* - Online: -* Morningstar. *TriStar Solar Charging System Controller Insallation, Operation - and Maintenance Manual.* Online: -* SOLARLAND. *SLP120-12U Datasheet.* Online: - - diff --git a/doc/readme.md b/doc/readme.md new file mode 100644 index 0000000..6311b4e --- /dev/null +++ b/doc/readme.md @@ -0,0 +1,390 @@ +# Supplemental Documentation for EasyFlux-DL CR3000OP + +> The following revisions apply to *EasyFlux-DL Instruction Manual For CR3000 and Open-Path Eddy-Covariance System (Revision 03/2018)*. +> +> Online: https://s.campbellsci.com/documents/us/manuals/easyflux-dl.pdf + +## 1. Introduction + +Make the following additions to the list of supported sensors (in bold): + +* Biometeorology (biomet) and energy balance sensors (optional) + * **03B Cup-and-Vane Anemometer (qty 0 to 1)**
*(Backported from Campbell Scientific pre-EasyFlux OPEC program)* + * Soil Water Content Reflectometer (qty 0 to 2) + * CS616 + * CS650 + * CS655 + * **5TM** + * **TDR310x** +* **Vertical Profile of Soil Sensors (optional)** + * **Option 1: 5TM (qty 0 to 6)** + * **Option 2: TDR31x (qty 0 to 6)** +* **GPS Receiver (optional, qty 0 to 1)** + * **GPS16X-HVS** +* **Enclosure door switch (optional, qty 0 to 1)** + * **Magnetic reed switch (NO or NC)** +* **Solar charge controller (optional)** + * **TriStar 45** + +## 2. Precautions + +Insert this additional note: + +* *EasyFlux DL* requires the EC100 to have operating system version 7.01 or newer. + +## 3.1 Wiring + +### 3.1.8 Soil Water Content + +This version of *EasyFlux DL* supports five models of soil water content reflectometers: +CS616, CS650, CS655, 5TM (METER Group), or TDR3xx (Acclima). +From zero to two of any one model is supported. +The default wiring is shown in Table 3-8. + +> **NOTE**
Some early 5TM units may have the older Decagon wiring scheme. +> The wire colors for older sensors are denoted by an * in Table 3-8. + +Add the following rows to **Table 3-8. Default wiring for Soil Water Content Probes** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| 5TM soil sensor
(Addresses 1/2) | 0 to 2 | SDI-12 Data | Orange/Red* | **C5** | +| | | SDI-12 Power | Brown/White* | **+12 V** | +| | | SDI-12 Reference | Bare/Bare* | **G** | +| TDR3xx soil sensor
(Addresses 1/2) | 0 to 2 | SDI-12 Data | Blue | **C5** | +| | | SDI-12 Power | Red | **+12 V** | +| | | SDI-12 Reference | White | **G** | + +### 3.1.11 Cup-and-Vane Anemometer (new section) + +This version of *EasyFlux DL* can support from zero to one MetOne 034B cup-and-vane anemometer. +The default wiring for the cup-and-vane anemometer is shown in Table 3-11. + +> **CAUTION**
This sensor requires an input channel which is also used by the NR01 net radiometer. +> The default wiring must be modified before it can support both sensors. + +**Table 3-11. Default wiring for Cup-and-Vane Anemometer** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| 034B Cup-and-Vane Anemometer | 0 or 1 | Wind direction signal | Green | **SE 20** | +| | | Wind direction excitation | Blue | **VX3** | +| | | Wind direction reference | White | **⏚** | +| | | Wind speed signal | Red | **P2** | +| | | Wind speed reference | Black | **⏚** | +| | | Shield | Clear | **⏚** | + +### 3.1.12 Vertical Profile Soil Sensors (new section) + +This version of *EasyFlux DL* supports two models of soil sensors for vertical profiles: +METER Group (Decagon Devices) 5TM, or Acclima TDR series. +From zero to six of any one model is supported. +The default wiring shown in Table 3-12 uses the same SDI-12 input channel as soil water content sensors. + +By default, sensor quantity is 6 and sequential SDI-12 addresses are 3 to 8 (maximum address is 9). +Data field output labels (from 1 up to 6) correspond to these addresses, from low to high. + +> **NOTE**
Some early 5TM units may have the older Decagon wiring scheme, which is denoted by an * in Table 3-8. + +**Table 3-12. Default Wiring for Vertical Profile Soil Sensors** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| 5TM soil sensor
(Addresses 3..8) | 0 to 6 | SDI-12 Data | Orange/Red* | **C5** | +| | | SDI-12 Power | Brown/White* | **+12 V** | +| | | SDI-12 Reference | Bare/Bare* | **G** | +| TDR3xx soil sensor
(Addresses 3..8) | 0 to 6 | SDI-12 Data | Blue | **C5** | +| | | SDI-12 Power | Red | **+12 V** | +| | | SDI-12 Reference | White | **G** | + +### 3.1.13 GPS Receiver (new section) + +A GPS receiver is optional but will keep the datalogger clock synchronized to GPS time. +If the datalogger clock drifts from the GPS time, then it will be resynchronized. +The default wiring for the GPS receiver is shown in Table 3.13. + +> **NOTE**
Units with serial numbers greater than 1A4189318 have a 3 V PPS output signal +> and require a level shifter for the datalogger to recognize the PPS signal. +> A Campbell Scientific SW12V or A300 can be used for this purpose. + +**Table 3-13. Default Wiring for GPS Receiver** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| GPS16X-HVS | 0 or 1 | PPS | Gray | **C7** | +| | | Tx data | White | **C8** | +| | | Rx data | Blue | **G** | +| | | Shield | Clear | **⏚** | +| | | Power in | Red | **+12 V** | +| | | Power ground | Black | **G** | +| | | Power enable | Yellow | **G** | + +### 3.1.14 Enclosure door switch (new section) + +This version of *EasyFlux DL* supports zero or one magnetic reed switch for tracking datalogger enclosure status. +Both normally open and normally-closed switches are supported. +The default wiring for the enclosure door switch is shown in Table 3-14. + +**Table 3-14. Default Wiring for Enclosure Door Switch** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| Enclosure door switch | 0 or 1 | Wire 1 | | **C6** | +| | | Wire 2 | | **5V** | + +### 3.1.15 Solar charge controller (new section) + +This version of *EasyFlux DL* supports zero or one solar charge controller: MorningStar TriStar 45. +Operating parameters and state flags for the PV system are aggregated at the same interval as flux outputs. +The default wiring for the charge controller is shown in Table 3-15. + +**Table 3-15. Default Wiring for Solar Charge Controller** + +| Sensor | Quantity | Wire Description | Color | Datalogger terminal | +|:-:|:-:|:-:|:-:|:-:| +| TriStar 45 | 0 or 1 | Serial Rx (pin 2) | | **C1** | +| | | Serial Tx (pin 3) | | **C2** | +| | | Serial ground (pin 5) | | **G** | +| | | +5V (DTR/pin 4) | | **5V** | +| | | Ground (RTS/pin 7) | | **G** | + +## 4. Operation + +### 4.1 Set Constants in *CRBasic Editor* and Load Program + +The content in this section of the Instruction Manual applies to this version of *EasyFlux DL*, +however, several important notes apply: + +* Category 3, Sensor Calibration Constants, have been relocated to a separate include file: `constants.cr3`. + * ***N.B.** the include file does not yet support all sensor types so some sensor calibration constants may still reside in the program file.* +* The program file will not compile if the include file is not present in the same directory. +* In some cases, the corresponding constant in the include file is used to compute the correct program constant. + In these cases, the constant in the include file will be expressed in different units. + +### 4.1.1. Sending the program (new section) + +After all constants are verified and both files are saved, the program file may be compiled to test for errors. +Once it is error-free, send the include file and program file to the datalogger using *CRBasic Editor* or the *File Control* screen. +Send the include file first, but do not run it (since it will not compile on its own). +Next send the program file and configure run options as desired. +If the include file has not been modified, it does not need to be resent to the logger before sending an updated program file. + +### 4.1.2 Field editing unique constants (new section) + +The sensor calibration constants in the include file will be incorporated when the program compiles and begins running. +Once running, the include file can be modifed without impacting the program. +New values in the include file are only adopted after restarting due to power loss or by run control commands. +There are two options for modifying the include file: + +Option 1, using CRBasic Editor and a remote client (e.g. PC400): + +1. Update values in the include file. +1. Push the include file to the `CPU:` drive of the datalogger. + * To prevent interrupting the running program, **do not** enable *Run Now* or *Run at Power-on*. +1. Use Run Control to stop the program (retaining data is recommended). +1. Use Run Control to restart the program (if file was renamed to `default.cr3` it restarts automatically). + +Option 2, using the local keyboard display: + +1. Open System MenuFileEditCPU: +1. Select the include file (`constants.cr3`) +1. Use the keyboard to edit unique sensor constants as needed. +1. Press Esc to exit and when prompted, save changes. +1. Restart the program, or power cycle the datalogger. + +### 4.3 Data Retrieval + +> *Note: values provided in Table 4-3. CF Card Fill Times may need slight but negligible downward adjustment due to +> additional fields stored in the time series and flux output data tables.* + +### 4.4.0 Data Dictionaries (new section) + +The tables in this chapter follow the conventions of the *EasyFlux DL* Instruction Manual, including the text used for Units. +Many entries contain special characters or otherwise deviate from unit labels present in actual data output files. + +Tables throughout chapter 4 are good for general reference, but users should also utilize the machine-readable metadata files linked below. +These data dictionaries are derived from program-generated data tables and contain the full complement of available fields, not just those related to active sensors. + +Files are in tab-separated format with a single header row and the following columns: + +1. Field +1. Units +1. Description + +| Table(s) | Dictionary file +|:-|:-| +| Time_Series | [datadict-Time_Series.txt](datadict-Time_Series.txt) +| Flux
Flux_Notes | [datadict-Flux.txt](datadict-Flux.txt) +| LTAR_Met
LTAR_Met_1Minute | [datadict-LTAR_Met.txt](datadict-LTAR_Met.txt) + +### 4.4 Output tables + +Add the following rows to **Table 4-4. Data Output Tables**: + +| Table name | Description | Recording interval | Memory on CR3000 CPU | Memory on CF card | +|:-:|:-:|:-:|:-:|:-:| +| LTAR_Met | Processed biomet data | 15 minutes | Auto-Allocate (typically less than 1 hour) | The LTAR_Met table is broken up into 30-day files | +| LTAR_Met_1Minute | Processed biomet data | 1 minute | Auto-Allocate (typically less than 1 hour) | The LTAR_Met_1Minute table is broken up into 30-day files | + +For **Table 4-5. Data Fields in the Time_Series Data Output Table**: + +| Change Type | Data Field Name | Units | Description | Data Field Included | +|:-:|:-:|:-:|:-:|:-:| +| Insert 1 row after H2O_sig_strgth | CO2_hf | mg m-3 | CO2 density output using humidity-corrected sonic temperature | Always | + +For **Table 4-7: Data fields in the Flux Data Output Table**: + +> **NOTE**
Field names with `(i)` qualifiers will appear with no suffixes if only one sensor is activated. +> This makes creating a data dictionary potentially much more difficult. + +Make the following substitutions in the Units column (actual units in output table vs. Instruction Manual): + +* `counts` → `samples` +* `ratio` → `Fraction` +* `deg` → `degrees` + +And insert or update rows as follows: + +| Change Type | Data Field Name | Units | Description | Data Field Included | +|:-:|:-:|:-:|:-:|:-:| +| Update row | tau | (kg m/s)/(m^2 s)
*[reformatted]* | - | - | +| Update row | Td → Td_Avg
*[misnamed]* | - | - | - | +| Update row | wnd_dir_Std → std_wnd_dir
*[misnamed]* | - | - | - | +| Insert 1 row after Rn_meas_Avg | NRLITE_SENS | µV/(W m2) | Net radiometer calibration factor | If NR_LITE is used | +| Insert 1 row after PAR_density_Avg | QUANTUM_SENS | µA per mmol/(m2 s) | Quantum (PAR) calibration factor | If LI190SB is used | +| Insert 4 rows after T_SI111_body_Avg | cupvane_WS_Avg | m/s | Average wind speed from cup-and-vane anemometer | If 034B is used | +| | cupvane_WS_rslt_Avg | m/s | Average wind vector magnitude from cup-and-vane anemometer | If 034B is used | +| | cupvane_WD_rslt_Avg | degrees | Average compass wind direction from cup-and-vane anemometer | If 034B is used | +| | cupvane_WD_csi_Std | degrees | Standard deviation of wind direction from cup-and-vane anemometer | If 034B is used | +| Update row | soil_wtr_T_Avg(i) | ratio → frac_v_wtr
*[mislabeled]* | - | - | +| Update row | cs65x_wc_Avg(i) | ratio → frac_v_wtr
*[mislabeled]* | - | - | +| Insert 8 rows after CS65x_tmpr_Avg(i) | tdr31x_wc_Avg(i) | % | Average soil water content for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | tdr31x_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | tdr31x_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | tdr31x_bulkEC_Avg(i) | µS/cm | Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | tdr31x_poreEC_Avg(i) | µS/cm | Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | soil_5TM_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which 5TM sensor | If 5TM is used | +| | soil_5TM_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which 5TM sensor | If 5TM is used | +| | soil_5TM_wc_Avg(i) | frac_v_wtr | Average soil water content for each sensor; i identifies which 5TM sensor | If 5TM is used | +| Insert 4 rows after shf_plate_Avg(i) | SHFP_1_SENS | µV/(W m2) | Heat flux plate #1 calibration factor | If one HFP is used | +| | SHFP_2_SENS | µV/(W m2) | Heat flux plate #2 calibration factor | If two HFP are used | +| | SHFP_3_SENS | µV/(W m2) | Heat flux plate #3 calibration factor | If three HFP are used | +| | SHFP_4_SENS | µV/(W m2) | Heat flux plate #4 calibration factor | If four HFP are used | +| shf_plate_cal(i) | unitless
*[add missing units]* | - | - | - | +| Insert 8 rows after shf_plate_cal(i) | profile_tdr31x_wc_Avg(i) | % | Average soil water content for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | profile_tdr31x_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | profile_tdr31x_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | profile_tdr31x_bulkEC_Avg(i) | µS/cm | Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | profile_tdr31x_poreEC_Avg(i) | µS/cm | Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| | profile_5TM_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which 5TM sensor | If 5TM is used | +| | profile_5TM_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which 5TM sensor | If 5TM is used | +| | profile_5TM_wc_Avg(i) | frac_v_wtr | Average soil water content for each sensor; i identifies which 5TM sensor | If 5TM is used | +| Update row | FP_equation | text → authors
*[mislabeled]* | - | - | + +For **Table 4-7: Data fields in the Flux Data Output Table**: + +Make the following substitutions in the Units column (actual units in output table vs. Instruction Manual): + +* `counts` → `samples` +* `ratio` → `Fraction` +* `deg` → `degrees` + +And insert or update rows as follows: + +| Change Type | Data Field Name | Units | Description | Data Field Included | +|:-:|:-:|:-:|:-:|:-:| +| Insert row between d & z0
*[undocumented row]* | roughness_user | m | User entered roughness length; 0 for auto calculation | Always | +| Update row | stability_zL | m/m→unitless
*[reformatted]* | - | - | +| Update row | iteration_FreqFactor | m→*None defined
[mislabeled]* | - | - | +| Update row | separation_lag_scan_FW | m→scans
*[mislabeled]* | - | - | +| Update row | time_const_FW | m→s
*[mislabeled]* | - | - | +| Update row | MAX_LAG | scans→*None defined
[mislabeled]* | - | - | +| Update row | FreqFactor_uw_vw | number→unitless
*[mislabeled]* | - | - | +| Update row | FreqFactor_wTs | number→unitless
*[mislabeled]* | - | - | +| Update row | FreqFactor_wCO2_wH2O | number→unitless
*[mislabeled]* | - | - | +| Update row | FreqFactor_wFW | number→unitless
*[mislabeled]* | - | - | +| Insert 17 rows after Lv | batt_V_Avg | V | Average PV system battery voltage | If TS45 is used | +| | batt_sens_V_Avg | V | Average PV system battery sense voltage | If TS45 is used | +| | array_V_Avg | V | Average PV system array/load voltage | If TS45 is used | +| | charge_I_Avg | A | Average PV system charging current | If TS45 is used | +| | batt_V_slow_Avg | V| Average PV system battery voltage, slow filtered | If TS45 is used | +| | heatsink_T_Avg | °C | Average PV charge controller heatsink temperature | If TS45 is used | +| | batt_T_Avg | °C | Average PV system battery temperature | If TS45 is used | +| | reference_V_Avg | V | Average PV charge controller reference voltage | If TS45 is used | +| | ah_reset | Ah | PV charge controller resettable amp-hour meter | If TS45 is used | +| | ah_total | Ah | PV charge controller total amp-hour meter | If TS45 is used | +| | hourmeter | hr | PV charge controller hourmeter | If TS45 is used | +| | alarm_bits | unitless | PV charge controller alarms (bitfield) | If TS45 is used | +| | fault_bits | unitless | PV charge controller faults (bitfield) | If TS45 is used | +| | dip_num | unitless | PV charge controller DIP switch settings (bitfield) | If TS45 is used | +| | state_num | unitless | PV charge controller control state | If TS45 is used | +| | pwm_duty | unitless | PV charge controller PWM Duty Cycle | If TS45 is used | +| | door_is_open_Hist | | Fraction of time door was open (0-1) | If DOOR is used | +| Update row | process_time_Avg | µs→ms
*[mislabeled]* | - | - | +| Update row | process_time_Max | µs→ms
*[mislabeled]* | - | - | +| Update row | buff_depth_Max | number→scans
*[mislabeled]* | - | - | + +Insert new table, **Table 4-9: Data fields in the LTAR_Met output table**: + +| Data Field Name | Units | Description | Data Field Included | +|:-:|:-:|:-:|:-:| +| amb_tmpr_Avg | °C | Average ambient temperature from EC100 temperature probe | Always | +| rslt_wnd_spd | m/s | Average horizontal wind speed | Always | +| wnd_dir_compass | deg | Average compass wind direction | Always | +| RH_Avg | % | Average relative humidity | Always | +| Precipitation_Tot | mm | Total precipitation | If TE525mm is used | +| amb_press_Avg | kPa | Average ambient air pressure | Always | +| PAR_density_Avg | µmol/(m2 s) | Average density of photosynthetic active radiation | If LI190SB is used | +| batt_volt_Avg | volt | Average voltage supplying power to the datalogger | Always | +| panel_tmpr_Avg | ºC | Average temperature of the datalogger wiring panel | Always | +| std_wnd_dir | deg | Standard deviation of wind direction | Always | +| VPD_air | kPa | Average vapor pressure deficit | Always | +| Rn_meas_Avg | W/m2 | Average net radiation (raw, not corrected for wind) | IF NR_LITE is used | +| e_sat | kPa | Average saturation water vapor pressure | Always | +| e | kPa | Average water vapor pressure | Always | +| tdr31X_wc_Avg(i) | % | Average volumetric soil water content for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31X_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31x_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31x_bulkEC_Avg(i) | µS/cm | Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31x_poreEC_Avg(i) | µS/cm | Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| Tsoil(i) | ºC | Average soil temperature for each TCAV sensor; i identifies which TCAV sensor | If TCAV is used | +| profile_tdr31X_wc_Avg(i) | % | Average volumetric soil water content for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| profile_tdr31X_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| profile_tdr31X_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| profile_tdr31X_bulkEC_Avg(i) | µS/cm | Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| profile_tdr31X_poreEC_Avg(i) | µS/cm | Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| shf_plate_Avg(i) | W/m2 | Average soil heat flux; i identifies which sensor | If HFP or HFP01SC is used | +| SHFP_1_SENS | µV/(W m2) | Heat flux plate #1 calibration factor | If one HFP is used | +| SHFP_2_SENS | µV/(W m2) | Heat flux plate #2 calibration factor | If two HFP are used | +| SHFP_3_SENS | µV/(W m2) | Heat flux plate #3 calibration factor | If three HFP are used | +| SHFP_4_SENS | µV/(W m2) | Heat flux plate #4 calibration factor | If four HFP are used | +| shf_plate_cal(i) | µV/(W m2) | Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor | If HFP01SC is used | + +Insert new table, **Table 4-10: Data fields in the LTAR_Met_1Minute output table**: + +| Data Field Name | Units | Description | Data Field Included | +|:-:|:-:|:-:|:-:| +| amb_tmpr_Avg | °C | Average ambient temperature from EC100 temperature probe | Always | +| rslt_wnd_spd | m/s | Average horizontal wind speed | Always | +| wnd_dir_compass | deg | Average compass wind direction | Always | +| RH_Avg | % | Average relative humidity | Always | +| amb_press_Avg | kPa | Average ambient air pressure | Always | +| PAR_density | µmol/(m2 s) | Average density of photosynthetic active radiation | If LI190SB is used | +| std_wnd_dir | deg | Standard deviation of wind direction | Always | +| VPD_air | kPa | Average vapor pressure deficit | Always | +| Rn_meas_Avg | W/m2 | Average net radiation (raw, not corrected for wind) | IF NR_LITE is used | +| e_sat | kPa | Average saturation water vapor pressure | Always | +| e | kPa | Average water vapor pressure | Always | +| tdr31X_wc_Avg(i) | % | Average volumetric soil water content for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31X_tmpr_Avg(i) | °C | Average soil temperature for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31X_E_Avg(i) | unitless | Average soil permittivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31X_bulkEC_Avg(i) | µS/cm | Average bulk electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| tdr31X_poreEC_Avg(i) | µS/cm | Average pore water electrical conductivity for each sensor; i identifies which TDR3x sensor | If TDR31X is used | +| Tsoil(i) | ºC | Average soil temperature for each TCAV sensor; i identifies which TCAV sensor | If TCAV is used | +| shf_plate_Avg(i) | W/m2 | Average soil heat flux; i identifies which sensor | If HFP01 or HFP01SC is used | +| SHFP_1_SENS | µV/(W m2) | Heat flux plate #1 calibration factor | If one HFP01 is used | +| SHFP_2_SENS | µV/(W m2) | Heat flux plate #2 calibration factor | If two HFP01 are used | +| SHFP_3_SENS | µV/(W m2) | Heat flux plate #3 calibration factor | If three HFP01 are used | +| SHFP_4_SENS | µV/(W m2) | Heat flux plate #4 calibration factor | If four HFP01 are used | +| shf_plate_cal(i) | µV/(W m2) | Coefficients found from the HFP01SC self-calibration and used to calculate shf_plate_Avg(i); i indicates which sensor | If HFP01SC is used | + diff --git a/doc/sensors.md b/doc/references.md similarity index 52% rename from doc/sensors.md rename to doc/references.md index f0343ba..f52cf25 100644 --- a/doc/sensors.md +++ b/doc/references.md @@ -1,134 +1,4 @@ -# Sensors - -> This documentation is not specific to the EasyFlux-DL-CR3000 program. It only -> covers the USDA Long-Term Agroeconomic Research (LTAR) site towers at R.J. -> Cook Agronomy Farm. - -## Overview - -### Core Hardware - -* CR3000 datalogger ([CR3000](https://www.campbellsci.com/cr3000)) - * `CR3000.Std.31` or newer firmware -* Datalogger network & memory card module ([NL115](https://www.campbellsci.com/nl115) - or [NL116](https://www.campbellsci.com/nl116)) - * network connection is required for remote data collection - * 16GB industrial-grade CompactFlash memory card (min. 2/logger recommended) -* Infrared CO2/H2O analyzer ([EC150](https://www.campbellsci.com/ec150)) - * Control box ([EC100](https://www.campbellsci.com/ec100)) must be firmware - revision 7.01 or later -* Three dimensional ultrasonic anemometer ([CSAT3A](https://www.campbellsci.com/csat3a)) - -### Deployed Sensors - -* Ambient temperature/relative humidity probe ([HMP-155A](https://www.campbellsci.com/hmp155a)) -* Net radiometer ([NL-Lite2](https://www.campbellsci.com/nr-lite2)) -* Quantum (PAR) sensor ([LI-190SB](https://www.campbellsci.com/li190sb-l)) -* Tipping bucket rain gage ([TE525WS](https://www.campbellsci.com/te525ws-l)) -* Cup and vane wind set ([034B](https://www.campbellsci.com/034b)) -* GPS receiver ([GPS16X-HVS](https://www.campbellsci.com/gps16x-hvs)) -* Door switch sensor (magnetic reed switch, NO recommended) -* Averaging thermocouple ([TCAV](https://www.campbellsci.com/tcav-l) x1) -* Water content reflectometer, for heat storage term - ([TDR-315L](http://www.acclima.com) x1) -* Soil heat flux plates ([HFP01](https://www.campbellsci.com/hfp01) x1) -* Water content reflectometer, for vertical profiling (TDR-315L x6) - - -## Wiring - -Complete wiring details are documented in the program file. Refer to one of -these files for a printable summary which is specific to this deployment: - -* [Microsoft Word® format (.docx)](wiring.docx) (editable) -* [Portable Document Format (.pdf)](wiring.pdf) (formatted to fit a single size - Letter page) - -SDI-12 sensors are wired into a separate terminal block bus connection: - -![Datalogger SDI-12 bus terminals](img/logger-sdi12-mux.png) - -## Configuration/Setup - -### Datalogger (CR3000) - -* Update firmware to the latest version (requires `CR3000.Std.31` or later) -* Update program file so `UTC_OFFSET` reflects the correct timezone -* Update program file with correct unique calibration constants -* Upload program file to datalogger CPU drive -* Configure datalogger security code(s) -* Configure a static IP and port forwarding (see [network](network.md)) -* Connect sensors correctly (see wiring above) -* Connect a power source (see [power](power.md)) -* Provide a CompactFlash memory card - -### Sonic/IRGA (EC150, EC100 & CSAT3A) - -Sensors use default configuration values. Control box (EC100) firmware must be -revision 7.01 or later. - -### Net radiometer (NR-Lite2) - -The unique calibration constant must be updated in the program file. - -### Quantum/PAR sensor (LI-190SB) - -The unique calibration constant must be updated in the program file. - -### Water content reflectometer, for heat storage term (TDR-315L) - -The sensors must be programmed with SDI-12 addresses "`1`" and "`2`". - -### Heat flux plate(s) (HFP01) - -The unique calibration constants must be updated in the program file. - -### Water content reflectometer, for vertical profiling (TDR-315L) - -The sensors must be programmed with sequential SDI-12 addresses from "`3`" to -"`8`" with higher addresses signifying deeper installation depth. - -## Data Outputs - -The program produces several data tables with varying record intervals. Each -table is described on a different sheet in this spreadsheet: - -* [Microsoft Excel® format (.xlsx)](doc/data_tables.xlsx) -* *(sorry, PDF format is not provided)* - -### LTAR Common Observatory Repository (CORe) - -This table is designed to facilitate data reduction and submission of meteorology data to -the USDA LTAR Common Observatory Repository (CORe) database. For more information, refer to -[Common Observatory Meteorology Data Concept of Operations.pdf](https://www.ars.usda.gov/ARSUserFiles/np211/LTAR%20Meteorology%20Concept%20of%20Operations%20FINAL%20150929.pdf). - -* Data table name: `LTAR_Met` -* Record interval: 15 minutes, aligned to midnight - -Download a field name lookup table in JSON format from [here](ltar_core_lut.json): - -```` -{ -"amb_tmpr_Avg" : "AirTemperature", -"rlst_wnd_spd" : "WindSpeed", -"wnd_dir_compass" : "WindDirection", -"RH_Avg" : "RelativeHumidity", -"Precipitation_Tot" : "Precipitation", -"amb_press_Avg" : "AirPressure", -"PAR_density_Avg" : "PAR", -"batt_volt_Avg" : "BatteryVoltage", -"panel_tmpr_Avg" : "LoggerTemperature", -"std_wnd_dir" : null, -"VPD_air" : null, -"Rn_meas_Avg" : null -} -```` - -See the data output spreadsheet (above) for complete table details. Note there -is also a 1-min data table with most of the same measurements. - - -## References +# References * Acclima. *User Manual TDR-315/315L/310S.* January, 2017 Rev. 2. Online: diff --git a/doc/wiring.docx b/doc/wiring.docx deleted file mode 100644 index 0b3b81d..0000000 Binary files a/doc/wiring.docx and /dev/null differ diff --git a/doc/wiring.pdf b/doc/wiring.pdf deleted file mode 100644 index a7e4a04..0000000 Binary files a/doc/wiring.pdf and /dev/null differ diff --git a/doc/wiring_schedule.xlsx b/doc/wiring_schedule.xlsx index 5283bb0..0b04ce0 100644 Binary files a/doc/wiring_schedule.xlsx and b/doc/wiring_schedule.xlsx differ diff --git a/src/default.cr3 b/src/EasyFlux-DL.cr3 similarity index 95% rename from src/default.cr3 rename to src/EasyFlux-DL.cr3 index f284a0f..010447c 100644 --- a/src/default.cr3 +++ b/src/EasyFlux-DL.cr3 @@ -42,7 +42,7 @@ 'wnd wind 'wtr water 'hfp01xx HFP01 or HFP01SC soil heat flux plate sensor -'This is a change + '*** SIGN CONVENTION ' Positive fluxes away from the ground surface and negative towards the ground surface. @@ -90,55 +90,40 @@ Const LTAR_CORE_TABLE = TRUE 'Unique: TRUE if producing 15-min LTAR Commo Const LTAR_CORE_TABLE_1Minute = TRUE '*** SENSORS **** -Const SENSOR_IRGASON = FALSE 'Unique: IRGASON, if TRUE, SENSOR_CSAT3AEC150 must be set to FALSE -Const SENSOR_CSAT3AEC150 = TRUE 'Unique: CSAT3A + EC150, if TRUE, SENSOR_IRGASON must be set to FALSE. -Const SENSOR_FW = FALSE 'Unique: FW05, FW1, FW3, or other fine wire thermocouple - -'Select at most 1 temperature/RH probe: -Const SENSOR_HMP155A = TRUE 'Unique: Vaisala HMP155A -Const SENSOR_HC2S3 = FALSE 'Unique: Campbellsci HC2S3 -Const SENSOR_HMP45C = FALSE 'Unique: Vaisala HMP45C - -Const SENSOR_NR_LITE = TRUE 'Unique: NR Lite2: net radiometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE -Const SENSOR_CS300 = FALSE 'Unique: CS300: pyranometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE -Const SENSOR_LI200X = FALSE 'Unique: LI200X: pyranometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE -Const SENSOR_LI190SB = TRUE 'Unique: LI190SB: Quantum, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE -Const SENSOR_SI111 = FALSE 'Unique: SI111: Infrared radiometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE -Const SENSOR_NR01 = FALSE 'Unique: NR01: 4-way net radiometer, if true, SENSOR_NR_LITE and SENSOR_CNR4 must be set to FALSE -Const SENSOR_CNR4 = FALSE 'Unique: CNR4: 4-way net radiometer, if true, SENSOR_NR_LITE and SENSOR_NR01 must be set to FALSE - -'Select at most 1 rain sensor: -Const SENSOR_TE525 = FALSE 'Unique: TE525 (6") rain gage -Const SENSOR_TE525WS = TRUE 'Unique: TE525WS (8") rain gage -Const SENSOR_TE525MM = FALSE 'Unique: TE525MM (metric) rain gage -Const SENSOR_TE525_wf = FALSE 'Unique: TE525 or TE525MM rain gage with 8in funnel - -Const SENSOR_TCAV = TRUE 'Unique: TCAV: type E thermocouple averaging soil temperature probes -Const SENSOR_HFP01 = TRUE 'Unique: HFP01: soil heat flux plates, if true, SENSOR_HFP01SC must be set to FALSE -Const SENSOR_HFP01SC = FALSE 'Unique: HFP01SC: self-calibrated soil heat flux plates, if true, SENSOR_HFP01 must be set to FALSE -'Select at most 1 soil T/VWC probe: -Const SENSOR_CS616 = FALSE 'Unique: CS616: water content reflectometers for volumetric soil moisture -Const SENSOR_CS65X = FALSE 'Unique: CS650 or CS655: water content reflectometers for volumetric soil moisture -Const SENSOR_TDR31X = TRUE 'Unique: Acclima TDR-315L soil water content/temperature probes -Const SENSOR_5TM = FALSE 'Unique: Decagon Devices 5TM soil water content/temperature probes - -Const PROFILE_TDR31X = TRUE 'Unique: soil profile composed of Acclima TDR-315L probes, if true, PROFILE_5TM must be false -Const PROFILE_5TM = FALSE 'Unique: soil profile composed of Decagon Devices 5TM probes, if true, PROFILE_TDR31X must be false - -Const SENSOR_034B = TRUE 'Unique: MetOne 034B cup & vane wind set -Const SENSOR_GPS16X = TRUE 'Unique: Garmin GPS16x-HVS GPS receiver -Const SENSOR_DOOR = TRUE 'Unique: reed switch enclosure door sensor -Const SENSOR_TS45 = TRUE 'Unique: MorningStar TriStar TS-45 charge controller +Const SENSOR_IRGASON = TRUE 'Unique: IRGASON, if TRUE, SENSOR_CSAT3AEC150 must be set to FALSE +Const SENSOR_CSAT3AEC150 = FALSE 'Unique: CSAT3A + EC150, if TRUE, SENSOR_IRGASON must be set to FALSE. +Const SENSOR_FW = FALSE 'Unique: FW05, FW1, FW3, or other fine wire thermocouple +Const SENSOR_TMPR_RH = FALSE 'Unique: HC2S3 or HMP155A: temperature and relative humidity probe +Const SENSOR_NR_LITE = FALSE 'Unique: NR Lite2: net radiometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE +Const SENSOR_CS300 = FALSE 'Unique: CS300: pyranometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE +Const SENSOR_LI200X = FALSE 'Unique: LI200X: pyranometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE +Const SENSOR_LI190SB = FALSE 'Unique: LI190SB: Quantum, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE +Const SENSOR_SI111 = FALSE 'Unique: SI111: Infrared radiometer, if true, SENSOR_NR01 and SENSOR_CNR4 must be set to FALSE +Const SENSOR_NR01 = FALSE 'Unique: NR01: 4-way net radiometer, if true, SENSOR_NR_LITE and SENSOR_CNR4 must be set to FALSE +Const SENSOR_CNR4 = FALSE 'Unique: CNR4: 4-way net radiometer, if true, SENSOR_NR_LITE and SENSOR_NR01 must be set to FALSE +Const SENSOR_TE525mm = FALSE 'Unique: TE525mm rain gauge +Const SENSOR_TCAV = FALSE 'Unique: TCAV: type E thermocouple averaging soil temperature probes +Const SENSOR_CS616 = FALSE 'Unique: CS616: water content reflectometers for volumetric soil moisture, if true, SENSOR_CS65X, SENSOR_TDR31X and SENSOR_5TM must be set to FALSE +Const SENSOR_CS65X = FALSE 'Unique: CS650 or CS655: water content reflectometers for volumetric soil moisture, if true, SENSOR_CS616, SENSOR_TDR31X and SENSOR_5TM must be set to FALSE +Const SENSOR_TDR31X = FALSE 'Unique: Acclima TDR series soil moisture sensors, if true, SENSOR_CS616, SENSOR_CS65X and SENSOR_5TM must be set to FALSE +Const SENSOR_5TM = FALSE 'Unique: Decagon Devices 5TM soil water content/temperature probes, if true, SENSOR_CS616, SENSOR_CS65X and SENSOR_TDR31X must be set to FALSE +Const SENSOR_HFP01 = FALSE 'Unique: HFP01: soil heat flux plates, if true, SENSOR_HFP01SC must be set to FALSE +Const SENSOR_HFP01SC = FALSE 'Unique: HFP01SC: self-calibrated soil heat flux plates, if true, SENSOR_HFP01 must be set to FALSE +Const PROFILE_TDR31X = FALSE 'Unique: soil profile composed of Acclima TDR-315L probes, if true, PROFILE_5TM must be false +Const PROFILE_5TM = FALSE 'Unique: soil profile composed of Decagon Devices 5TM probes, if true, PROFILE_TDR31X must be false +Const SENSOR_034B = FALSE 'Unique: MetOne 034B cup & vane wind set, if true, either SENSOR_NR01 must be set to FALSE or SE input channel for WD must be changed +Const SENSOR_GPS16X = FALSE 'Unique: Garmin GPS16x-HVS GPS receiver; if serial no. >1A4189318 then level shifter is required for 3V PPS signal +Const SENSOR_DOOR = FALSE 'Unique: reed switch enclosure door sensor +Const SENSOR_TS45 = FALSE 'Unique: MorningStar TriStar TS-45 charge controller 'adjust to reflect reality -Const NMBR_SHFP = 1 'Unique: number of HFP01 or HFP01SC sensors to measure (Maximum is 4) . -Const NMBR_CS6xx = 1 'Unique: number of CS616, CS650, CS655, TDR-315 or 5TM sensors (Maximum is 2) +Const NMBR_SHFP = 4 'Unique: number of HFP01 or HFP01SC sensors to measure (Maximum is 4) +Const NMBR_TCAV = 2 'Unique: number of TCAV (Maximum is 2) +Const NMBR_CS6xx = 2 'Unique: number of CS616, CS650, CS655, TDR-315 or 5TM sensors (Maximum is 2) Const NMBR_PROFILE = 6 'Unique: number of T/VWC probes (TDR-315 or 5TM) in profile (Maximum is 6) 'Composite boolean variables for variables above -Const SENSOR_TMPR_RH = ((SENSOR_HMP155A) OR (SENSOR_HC2S3) OR (SENSOR_HMP45C)) Const SENSOR_Rn = ((SENSOR_CNR4) OR (SENSOR_NR01) OR (SENSOR_NR_LITE)) -Const SENSOR_TE525x = ((SENSOR_TE525) OR (SENSOR_TE525WS) OR (SENSOR_TE525MM) OR (SENSOR_TE525_wf)) Const SENSOR_HFP = ((SENSOR_HFP01) OR (SENSOR_HFP01SC)) Const SENSOR_CS6XX = ((SENSOR_CS616) OR (SENSOR_CS65X) OR (SENSOR_TDR31X) OR (SENSOR_5TM)) Const SENSOR_SOIL_T = ((SENSOR_TCAV) OR (SENSOR_CS65X) OR (SENSOR_TDR31X) OR (SENSOR_5TM)) @@ -168,7 +153,7 @@ Const SENSOR_PROFILE = ((PROFILE_TDR31X) OR (PROFILE_5TM)) #If (SENSOR_HFP) Then 'Soil heat flux plates Const SHF_ANALOG_INPUT = 1 'Starting differential analog input channel. -'Use `NMBR_SHFP` above to specify number of HFP01 or HFP01SC sensors to measure (Maximum is 4) +'Use `NMBR_SHFP` above to specify number of HFP01 or HFP01SC sensors to measure (Maximum is 4) . Data 1000/SHFP_1_SENS 'Unique: multiplier for HFP01xx #1 (1000/sensitivity). #If (NMBR_SHFP >1) Then 'This conditional statement can avoid the confliction with Data statements for the numerical wTs transfer function from Dijk (2002)) if NMBR_SHFP < 2 @@ -188,11 +173,11 @@ Data 1000/SHFP_4_SENS 'Unique: multiplier for HFP01xx #4 (1000/se '*** Beginning of HFP01 wiring *** '1H Signal #1 (white) '1L Signal reference #1 (green) -'gnd Shield #1 (black) +'gnd Shield #1 (clear) '2H Signal #2 (white) '2L Signal reference #2 (green) -'gnd Shield #2 (black) +'gnd Shield #2 (clear) '3H Signal #3 (white) '3L Signal reference #3 (green) @@ -265,7 +250,7 @@ Const FW_ANALOG_INPUT = 5 'Differential analog input channel for FW (I #EndIf #If (SENSOR_Rn) Then ' Net radiations sensors -Const NR_ANALOG_INPUT = 10 'Starting differential analog input channel for a net radiation sensor. +Const NR_ANALOG_INPUT = 6 'Starting differential analog input channel for a net radiation sensor. #EndIf #If (SENSOR_NR_LITE) Then @@ -368,7 +353,7 @@ Const PYRAN_OFFSET = 0 'Unique: offset for LI200X [0 W/m^2] or CS300 #EndIf #If (SENSOR_LI190SB) Then -Const QUANTUM_ANALOG_INPUT = 11 'Differential analog input channel for quantum PAR sensor +Const QUANTUM_ANALOG_INPUT = 8 'Differential analog input channel for quantum PAR sensor Const QUANTUM_VOLTAGE_RANGE = mV20 'Unique: measurement range of voltage Const QUANTUM_MULT = 1000/(QUANTUM_SENS*0.604) 'Unique: multiplier (1000 C) for quantum PAR sensor. Const QUANTUM_OFFSET = 0 'Unique: offset for for quantum PAR sensor. @@ -402,12 +387,11 @@ Const b2_SI111 = 13114 'Unique: calbration b2 #EndIf #If (SENSOR_TCAV) Then -Const TCAV_ANALOG_INPUT = 5 'Staring differential analog input channel for TCAV. -Const NMBR_TCAV = 1 'Unique: number of TCAV (Maximum is 2) +Const TCAV_ANALOG_INPUT = 11 'Staring differential analog input channel for TCAV. '*** Beginning of TCAV wiring *** -'5H Signal #1 (purple) -'5L Signal reference #1 (red) +'11H Signal #1 (purple) +'11L Signal reference #1 (red) 'gnd Shield #1 (clear) '12H Signal #2 (purple) @@ -460,7 +444,7 @@ Const CS65X_SDI12_Address_2 = 2 'Unique: SDI address for CS655 #2 #EndIf #If (SENSOR_TDR31X) Then -Const TDR31X_SDI12_PORT = 7 'Control port for SDI-12 data +Const TDR31X_SDI12_PORT = 5 'Control port for SDI-12 data Const TDR31X_SDI12_Address_1 = 1 'Unique: SDI address for TDR-315 #1 #If (NMBR_CS6xx = 2) Then Const TDR31X_SDI12_Address_2 = 2 'Unique: SDI address for TDR-315 #2 @@ -476,7 +460,7 @@ Const TDR31X_SDI12_Address_2 = 2 'Unique: SDI address for TDR-315 #2 #EndIf #If (SENSOR_5TM) Then -Const fiveTM_SDI12_PORT = 7 'Control port for SDI-12 data +Const fiveTM_SDI12_PORT = 5 'Control port for SDI-12 data Const fiveTM_SDI12_Address_1 = 1 'Unique: SDI address for TDR-315 #1 #If (NMBR_CS6xx = 2) Then Const fiveTM_SDI12_Address_2 = 2 'Unique: SDI address for TDR-315 #2 @@ -499,7 +483,7 @@ Const fiveTM_SDI12_Address_2 = 2 'Unique: SDI address for TDR-315 #2 Const TDR31X_SDI12_Address_P = 3 'Unique: first address in sequential series #If (NOT SENSOR_TDR31X) Then -Const TDR31X_SDI12_PORT = 7 'Control port for SDI-12 data +Const TDR31X_SDI12_PORT = 5 'Control port for SDI-12 data '*** Beginning of TDR-315 wiring *** 'C5 SDI-12 data #1 (blue) ' SDI-12 data #2 (blue @@ -514,7 +498,7 @@ Const TDR31X_SDI12_PORT = 7 'Control port for SDI-12 data Const fiveTM_SDI12_Address_P = 3 'Unique: first address in sequential series #If (NOT SENSOR_5TM) Then -Const fiveTM_SDI12_PORT = 7 'Control port for SDI-12 data +Const fiveTM_SDI12_PORT = 5 'Control port for SDI-12 data #EndIf '*** Beginning of 5TM wiring *** 'C5 SDI-12 data #1 (red) @@ -528,18 +512,9 @@ Const fiveTM_SDI12_PORT = 7 'Control port for SDI-12 data #EndIf #If (SENSOR_TMPR_RH) Then -Const TMPR_RH_ANALOG_INPUT = 8 'Starting differential analog input channel for temperature and humidity probe. -Const TMPR_RH_MULT = (100-0)/1000 'Unique: RH multiplier, all models = 0.1 -Const TMPR_RH_OFFSET = 0 'Unique: RH offset, all models = 0 - -#If (SENSOR_HMP155A) Then -Const TMPR_RH_T_MULT = (60 - -80)/1000 'Unique: temperature multiplier HMP155A = 0.14 -Const TMPR_RH_T_OFFSET = -80 'Unique: temperature offset HC2S3 = -40, HMP155A = -80, or HMP45C = -40. -#EndIf -#If (SENSOR_HC2S3 OR SENSOR_HMP45C) Then -Const TMPR_RH_T_MULT = (60 - -40)/1000 'Unique: temperature multiplier HC2S3 = 0.1 -Const TMPR_RH_T_OFFSET = -40 'Unique: temperature offset HC2S3 = -40 -#EndIf +Const TMPR_RH_ANALOG_INPUT = 27 'Single-end analog input channel for temperature and humidity probe. +Const TMPR_RH_T_MULT = 0.14 'Unique: multiplier for temperature; HC2S3 = 0.1, HMP155A = 0.14, or HMP45C = 0.1. +Const TMPR_RH_T_OFFSET = -80 'Unique: offset for temperature; HC2S3 = -40, HMP155A = -80, or HMP45C = -40. '*** Beginning of HC2S3 or HMP wiring *** '14H Temperature signal (brown/yellow) @@ -553,21 +528,12 @@ Const TMPR_RH_T_OFFSET = -40 'Unique: temperature offset HC2S3 = -4 'G Power reference (gray/black) '*** End of HC2S3 or HMP wiring *** #EndIf -#If (SENSOR_TE525x) Then +#If (SENSOR_TE525mm) Then -Const TE525_PULSE_INPUT = 2 'Pulse input channel rain gauge. +Const TE525_PULSE_INPUT = 1 'Pulse input channel rain gauge. +Const TE525_MULT = 0.1 'Unique: multiplier for TE525MM [0.1], TE525 or TE525WS [0.254], or 8" funnel on TE525 or TE525MM [0.1459] rain gauge -#If (SENSOR_TE525MM) Then -Const TE525_MULT = 0.1 'Unique: multiplier for TE525MM -#EndIf -#If (SENSOR_TE525 OR SENSOR_TE525WS) Then -Const TE525_MULT = 0.254 'Unique: multiplier for TE525 & TE525WS -#EndIf -#If (SENSOR_TE525_wf) Then -Const TE525_MULT = 0.1459 'Unique: multipler for TE525 or TE525MM w/ 8in funnel -#EndIf - -'*** Beginning of TE525x wiring *** +'*** Beginning of TE525mm wiring *** 'P1 Precipitation (black) 'gnd Signal reference (white) 'gnd Shield (clear/clear) @@ -575,32 +541,32 @@ Const TE525_MULT = 0.1459 'Unique: multipler for TE525 or TE525MM w/ 8in fun #EndIf #If (SENSOR_034B) Then -Const o34B_WD_ANALOG_INPUT = 23 'Single-ended analog input channel for 034B wind direction -Const o34B_WD_EXCITATION = 1 'Voltage excitation channel for 034B wind direction -Const o34B_WS_PULSE_INPUT = 1 'Pulse input channel for 034B wind speed +Const o34B_WD_ANALOG_INPUT = 20 'Single-ended analog input channel for 034B wind direction +Const o34B_WD_EXCITATION = Vx3 'Voltage excitation channel for 034B wind direction +Const o34B_WS_PULSE_INPUT = 2 'Pulse input channel for 034B wind speed -Const o34B_WD_MULT = 720 'Unique: multipler for wind direction -Const o34B_WD_OFFSET = 0 'Unique: offset for wind direction -Const o34B_WS_MULT = 0.7989 'Unique: multiplier for wind speed -Const o34B_WS_OFFSET = 0.28 'Unique: offset for wind speed +Const o34B_WD_MULT = 720 'Unique: multipler for wind direction +Const o34B_WD_OFFSET = 0 'Unique: offset for wind direction +Const o34B_WS_MULT = 0.7989 'Unique: multiplier for wind speed +Const o34B_WS_OFFSET = 0.28 'Unique: offset for wind speed 'lower case'd in anticipation of future integration into settings array Const cupvane_azimuth = 0 'Unique: orientation of windset w.r.t. true north '*** Beginning of 034B wiring *** -'1L Wind direction signal (green) -'VX1 Wind direction voltage excitation (blue) +'10L Wind direction signal (green) +'VX3 Wind direction voltage excitation (blue) 'gnd Wind diretion reference (white) -'P1 Wind speed pulsed input (red) +'P2 Wind speed pulsed input (red) 'gnd Wind speed reference (black) 'gnd Shield (clear) '*** End of 034B wiring *** #EndIf #If (SENSOR_GPS16X) Then -Const GPS16X_COM = Com2 'Serial port for GPS16X +Const GPS16X_COM = Com4 'Serial port for GPS16X -Const UTC_OFFSET = -8 'local time offset from UTC, in hours +Const UTC_OFFSET = -8 'Unique: local time offset from UTC, in hours Const MAX_CLOCK_DRIFT = 0 'max clock drift permitted before setting clock, in msec '*** Beginning of GPS16X wiring *** @@ -616,10 +582,10 @@ Const MAX_CLOCK_DRIFT = 0 'max clock drift permitted before setting clock, in m #EndIf #If (SENSOR_DOOR) Then -Const DOOR_CTRL_INPUT = 8 'Control input port -Const DOOR_SWITCH_POLARITY = False 'switch NO vs NC; change if reported door state is inverted +Const DOOR_CTRL_INPUT = 6 'Control input port +Const DOOR_SWITCH_POLARITY = False 'Unique: switch NO vs NC; change if reported door state is inverted '*** Beginning of door reed switch wiring *** -'C8 one wire +'C6 one wire '+5V the other wire '*** End of door switch wiring *** #EndIf @@ -782,6 +748,7 @@ Dim slowsequence_5_disable_flg As Boolean 'Flag used to decimate statistics in Dim sys_conf_var_file As Long 'Filehandle for the file that contains the system configuration variables in the CPU. Dim i, i_slow As Long 'Index variables for the outmost loop. "i" in main scan and "i_slow" in slow scan sequence + Dim array_index As Long 'Used for array index that must be calculated using loop index (to simplify expression and reduce computation for array index) Dim n = 1 'Used for counting the number of samples @@ -1591,6 +1558,7 @@ DataTable (comp_mean, TRUE, 1) EndTable '*** End of IRGA constants, variables, and working data table *** + #If (SENSOR_FW) Then '*** Beginning of FW constants, variables, and working data table *** Public time_const_FW = 0.001 'default value (seconds). It will be recalculated inside the program @@ -1768,7 +1736,7 @@ DataTable (stats_tmpr_rh,TRUE,1) EndTable '*** End of temperature and humidity probe constants, variables, and working data table *** #EndIf -#If (SENSOR_TE525x) Then +#If (SENSOR_TE525mm) Then '*** Beginning of TE525mm constants and variables *** Public Precipitation @@ -1812,7 +1780,7 @@ Units R_SW_in = W/m^2 Units R_SW_out = W/m^2 Units R_LW_in = W/m^2 Units R_LW_out = W/m^2 -Units T_nr = Kelvin +Units T_nr = Klvin Units R_LW_in_meas = W/m^2 Units R_LW_out_meas = W/m^2 '*** End of NR01/CNR4 constants and variables *** @@ -2264,10 +2232,6 @@ DisplayMenu ("System Control", TRUE) #EndIf MenuItem ("Sonic Azmth", sonic_azimuth) -'needs integration into settings array before reveal -' #If (SENSOR_034B) Then -' MenuItem ("Windset Azmth", cupvane_azimuth) -' #EndIf MenuItem ("Latitude", latitude) MenuItem ("Hemisph_Eq", hemisphere_NS) MenuPick (Hemisphere_North, Hemisphere_South) @@ -2331,12 +2295,13 @@ EndMenu '*** OUTPUT DATA TABLES ***' '**************************' -Const ONE_FULL_TABLE = TRUE 'Unique: TRUE if all hourly or half-hourly data are stored in one table +Const ONE_FULL_TABLE = FALSE 'Unique: TRUE if all hourly or half-hourly data are stored in one table ' FALSE if hourly or half-hourly variables for direct use are stored in Flux table and the variables for later reference are stored in Flux_Notes DataTable (Flux, TRUE, FLUX_SIZE_CPU) DataInterval (0, OUTPUT_INTERVAL, Min, 10) TableFile ("CRD:"&Status.SerialNumber(1,1)&".Flux_", 64, -1, 0, NMBR_DAY_FLUX_CRD, Day, 0, 0) + '**** Beginning of flux and quality classification data *** Sample (1, Fc_molar, IEEE4) 'Carbon dioxide flux in umol/(m^2 s) after coordinate rotations, freq corrections, and WPL correction Sample (1, Fc_mass, IEEE4) 'Carbon dioxide flux in mg/(m^2 s) after coordinate rotations, freq corrections, and WPL correction @@ -2445,7 +2410,7 @@ DataTable (Flux, TRUE, FLUX_SIZE_CPU) Sample (1, rho_d_probe_Avg, IEEE4) 'Measured from temperaure and humidity probe: dry air density in kg/m^3 '*** End of temperature and humidity probe output data *** #EndIf - #If (SENSOR_TE525x) Then + #If (SENSOR_TE525mm) Then '*** Beginning of rain gauge output data *** Totalize (1, Precipitation, FP2, 0) @@ -2567,7 +2532,7 @@ DataTable (Flux, TRUE, FLUX_SIZE_CPU) Units SHFP_4_SENS = uv/W/m^2 #EndIf #EndIf - '*** End of HFP01 output data *** + '*** End of HFP01 output data *** #EndIf #If (SENSOR_HFP01SC) Then @@ -3008,7 +2973,7 @@ DataTable (LTAR_Met, TRUE, -1) #If (NOT SENSOR_IRGASON) Then Average (1, RH, IEEE4, (irga_disable_f OR irga_amb_tmpr_f OR H2O_bad_rng_sig_array(MAX_LAG +1))) #EndIf - #If (SENSOR_TE525x) Then + #If (SENSOR_TE525mm) Then Totalize(1, Precipitation, FP2, False) 'Precipitation (mm) [liquid precip] #EndIf '*** End of Phase 1 measurements *** @@ -3248,7 +3213,7 @@ Sub Displacement_roughness_heights (S_type, d_user, z0_user, h_canopy, h_measur EndIf - If ((S_type = FOREST) OR (S_type = SHRUB)) Then 'Forest and Shrub + If ((S_type = FOREST) OR (S_type = SHRUB)) Then 'Forest and Shrub displacement = 2*h_canopy/3 'Forest canopy, 2/3 rule, page 116, Oke, 1987 roughness = 0.06*h_canopy 'Forest canopy, Jarvis et al. (1976) ans Raupach et al. (1991) EndIf @@ -4311,7 +4276,9 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit 'Composite variables Dim r_KM 'Shape factor (r_KM =2 + m_KM - n_KM) in footprint of Kormann and Meixner (2001) - Dim Xi 'wnd_const/(k*r_KM^2) where k is von Kerman constant (0.41) + Dim Phi_c 'Phi_c is the thermal stratification as a function of stability [see eq 1.32 in Kaimal & Finnigan 1994 and eq. 34 in Kormann and Meixner (2001)]. + Dim kp 'Constant in power-law profile of the eddy diffusivity (k*u_star*height_aerodynamic^(1.0 - n_KM)/Phi_c) + Dim Xi 'wnd_const/(kp*r_KM^2) where k is von Kerman constant (0.41) Dim Mu '(m_KM + 1)/r_KM Dim Gamma_Mu 'Gamma function of Mu Dim xgz '((Xi^Mu)*(height_aerodynamic^(m_KM +1)))/Gamma_Mu @@ -4333,80 +4300,82 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit Dim FP_M3 'footprint at x = x_L + 0.75*(x_R - x_L) Dim FP_R 'footprint at x = x_R - Dim Interval_count 'Used to calculate interval number after FP_90pct_range calculated, but before Upwnd_dist reaches - Dim J As Long 'Used for index of iteration. The upcase letter J is used to keep the editor's auto-correct feature - 'From changing the case of J in units as lowcase (e.g. J/s m^2) throughout the program. + Dim J As Long 'Used for index of iteration. The uppercase letter J is used to keep the editor's auto-correct feature + 'From changing the case of J in units as lowercase (e.g. J/s m^2) throughout the program. If ((Ustar <> NaN) AND (Stability <> NaN) AND (U <> NaN)) Then + 'Calculate the exponent of vertical profile of horizontal wind and the exponent of vertical profile of eddy diffusivity - If (Stability > 0) Then 'Similarity functions are defined in a range of z/L from -2 to 2 (pages 28, 41~43, Kaimal & Finnigan 1994). Extened to +/-4 as shown in Fig 5.23 in Stull (1988) Select Case Stability Case Is <= 4.0 - m_KM = (Ustar/(k*U))*(1 + 5*Stability) 'Exponent of vertical profile of horizontal wind - n_KM = 1/(1 + 5*Stability) 'Exponent of vertical profile of eddy diffusivity - - Case Is > 4 - m_KM = (Ustar/(k*U))*(1 + 5*4) 'Exponent of vertical profile of horizontal wind - n_KM = 1/(1 + 5*4) 'Exponent of vertical profile of eddy diffusivity + m_KM = (Ustar/(k*U))*(1.0 + 5.0*Stability) 'Exponent of vertical profile of horizontal wind + n_KM = 1.0/(1.0 + 5.0*Stability) 'Exponent of vertical profile of eddy diffusivity + Phi_c = 1.0 + 5.0 * Stability 'Thermal stratification as a function of stability + Case Is > 4.0 + m_KM = (Ustar/(k*U))*(1 + 5.0*4.0) 'Exponent of vertical profile of horizontal wind + n_KM = 1.0/(1.0 + 5*4) 'Exponent of vertical profile of eddy diffusivity + Phi_c = 1.0 + 5.0 * 4.0 'Thermal stratification as a function of stability EndSelect Else Select Case Stability Case Is >= -4.0 - m_KM = (Ustar/(k*U))/((1 - 16*Stability)^0.25) 'Exponent of vertical profile of horizontal wind - n_KM = (1-24*Stability)/(1 - 16*Stability) 'Exponent of vertical profile of eddy diffusivity - + m_KM = (Ustar/(k*U))/((1.0 - 16.0*Stability)^0.25) 'Exponent of vertical profile of horizontal wind + n_KM = (1.0 - 24.0*Stability)/(1.0 - 16.0*Stability) 'Exponent of vertical profile of eddy diffusivity + Phi_c = 1.0 /SQR(1.0 - 16.0*Stability) 'Thermal stratification as a function of stability Case Is < -4.0 - m_KM = (Ustar/(k*U))/((1 - 16*(-4))^0.25) 'Exponent of vertical profile of horizontal wind - n_KM = (1-24*(-4))/(1 - 16*(-4)) 'Exponent of vertical profile of eddy diffusivity + m_KM = (Ustar/(k*U))/((1.0 - 16.0*(-4.0))^0.25) 'Exponent of vertical profile of horizontal wind + n_KM = (1.0 - 24.0*(-4.0))/(1.0 - 16.0*(-4.0)) 'Exponent of vertical profile of eddy diffusivity + Phi_c = 1.0 /SQR(1.0 + 16.0*4) 'Thermal stratification as a function of stability EndSelect EndIf 'Calculate the wind constant in the vertical profile of horizontal wind - wnd_const = U/(height_aerodynamic^m_KM) 'Wind constant + wnd_const = U/(height_aerodynamic^m_KM) 'Wind constant 'Calculate the composite variables - r_KM = 2 + m_KM - n_KM 'Shape factor - - Xi = wnd_const/(k*r_KM*r_KM) + r_KM = 2.0 + m_KM - n_KM 'Shape factor + kp = k * u_star * height_aerodynamic^(1.0 - n_KM)/Phi_c 'from eqs (11) and (32) in Kormann and Meixner (2001) + Xi = wnd_const/(kp*r_KM*r_KM) Mu = (m_KM + 1)/r_KM - Gamma_Mu = SQR(2*PI/Mu)*(((Mu + 1/(12*Mu - 0.1/Mu))/EXP(1))^Mu) 'Nemes (2007) + Gamma_Mu = SQR(2.0*PI/Mu)*(((Mu + 1.0/(12.0*Mu - 0.1/Mu))/EXP(1.0))^Mu) 'Nemes (2007) xgz = ((Xi^Mu)*(height_aerodynamic^(m_KM +1)))/Gamma_Mu xz = Xi*(height_aerodynamic^r_KM) 'Turnning and inflection points - x_max = xz/(Mu + 1) 'Upwind location of source/sink that contributes most to the measured flux - x_inflection_L = x_max*(1 - 1/SQR(Mu + 2)) 'x at the left footprint inflection point - x_inflection_R = x_max*(1 + 1/SQR(Mu + 2)) 'x at the right footprint inflection point + x_max = xz/(Mu + 1.0) 'Upwind location of source/sink that contributes most to the measured flux + x_inflection_L = x_max*(1.0 - 1.0/SQR(Mu + 2.0)) 'x at the left footprint inflection point + x_inflection_R = x_max*(1.0 + 1.0/SQR(Mu + 2.0)) 'x at the right footprint inflection point 'Reset variables - FP_cumulative = 0 - FP_win_range = 0 - FP_40pct_range = 0 - FP_55pct_range = 0 - FP_90pct_range = 0 + FP_cumulative = 0.0 + FP_win_range = 0.0 + FP_40pct_range = 0.0 + FP_55pct_range = 0.0 + FP_90pct_range = 0.0 '***Calculate footprint characteristics: FP_win_range, FP_40pct_range, FP_55pct_range, and FP_90pct_range ' Use five numerical integration segments to calculate the footprint characteristics ' 1st: starting segment from 0 (+ Delt-->0) to the left footprint inflection point (x_inflection_L) ' 2nd: the left footprint inflection point to the footprint maximum (x_max) - ' 3rd: the footprint maximum to the right footptint inflection point (x_inflection_R) then further to [x_inflection_R + (x_inflection_R - x_max)] or until cumulative footprint reaches 90% - ' 4th: from x > [x_inflection_R + (x_inflection_R - x_max)] or x at culumutive footprint > 90% and then until the distance of interest is reached, - ' but limited x_max + 200*height_aerodynamic (x_200z). - ' 5th: If upwind range of interest has not been reached, this segment is integrated from x at FP_90 = 90% (x_90) - ' or x_max + 200*height_aerodynamic (x_200z) to upwind distance of interest, but limited to x_90 (or x_200z) + 100*height_aerodynamic. + ' 3rd: the footprint maximum to the right footptint inflection point (x_inflection_R) then further to + ' [x_inflection_R + (x_inflection_R - x_max)] or until cumulative footprint reaches 90% whichever is reached first. + ' 4th: from x > [x_inflection_R + (x_inflection_R - x_max)] or x at culumutive footprint > 90% if reached and then until the distance of interest or + ' FP_90pct_range is reached if not reached in 3rd segment but limited further x_max + x_max + 1000*height_aerodynamic. + ' 5th: If upwind range of interest or FP_90pct_range has not been reached, this segment is integrated from x at FP_90 = 90% (x_90) + ' or the 4th segment end point to upwind distance of interest, but limited to integration further + 1000*height_aerodynamic. ' Use a high resolution of integration intervals for the first three segments ' a lower resolution for the 4th and 5th segments, but high precision numerical method of Boole's rule '1st numerical integration segment: Upwind range within the left inflection point - x_R = 0 'Reset + x_R = 0.0 'Reset Integration_interval = x_inflection_L/NMBR_INT_INTERV_SEGMENT 'In numerical integration, use x at the left footprint inflection point as the ending boundary of this segment - FP_R = 0 'Reset + FP_R = 0.0 'Reset 'Upwind range within the left inflection point For J = 1 To NMBR_INT_INTERV_SEGMENT @@ -4429,15 +4398,17 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit EndIf 'Find the 40% footprint distance - If (FP_cumulative >= 0.4) AND (FP_40pct_range = 0) Then + If (FP_cumulative >= 0.4) AND (FP_40pct_range = 0.0) Then FP_40pct_range = x_R - Integration_interval*(FP_cumulative - 0.4)/(FP_cumulative - FP_cumulative_prev) EndIf Next J '2nd numerical integration segment: Upwind range from the left footprint inflection point to the maximum footprint - Integration_interval = (x_max - x_inflection_L)/NMBR_INT_INTERV_SEGMENT 'In this segment, use x at the left inflection point as the starting boundary and x_max as the ending boundary + 'In this segment, use x at the left inflection point as the starting boundary and x_max as the ending boundary + Integration_interval = (x_max - x_inflection_L)/NMBR_INT_INTERV_SEGMENT + For J = 1 To NMBR_INT_INTERV_SEGMENT x_L = x_R x_R = x_R + Integration_interval @@ -4447,14 +4418,14 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit FP_L = FP_R 'Footprint value at the right boundary of integral interval - FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1)) + FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1.0)) 'The trapezoidal rule used for an individual interval to cumulate the footprint - FP_cumulative += Integration_interval*(FP_L + FP_R)/2 + FP_cumulative += Integration_interval*(FP_L + FP_R)/2.0 'Find the footprint w/in the range of interest If ((x_L < upwnd_dist) AND (x_R >= upwnd_dist)) Then - FP_win_range = 100*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) + FP_win_range = 100.0*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) EndIf 'Find the 40% footprint distance @@ -4469,8 +4440,10 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit Next J - '3rd numerical integration segment: Upwind range from the maximum footprint to the right footprint inflection point and further to [x_inflection_R + (x_inflection_R -x_max)] or until 90% footprint is reached - Integration_interval = (x_inflection_R - x_max)/NMBR_INT_INTERV_SEGMENT 'In this segment, use x_max as the starting boundary and x at the right inflection point as the boundary of middle interval + '3rd numerical integration segment: Upwind range from the maximum footprint to the right footprint inflection point and further to + ' [x_inflection_R + (x_inflection_R -x_max)] or until 90% footprint is reached + ' In this segment, use x_max as the starting boundary and x at the right inflection point as the boundary of middle interval + Integration_interval = (x_inflection_R - x_max)/NMBR_INT_INTERV_SEGMENT 'Upwind range within two times of range from x_max to the right inflection point For J = 1 To 2*NMBR_INT_INTERV_SEGMENT 'The fine resolution of integration is used even beyong x_inflection_R to [x_inflection_R + (x_inflection_R -x_max)] or until 90% footprint is reached @@ -4482,14 +4455,14 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit FP_L = FP_R 'Footprint value at the right boundary of integration interval - FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1)) + FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1.0)) 'The trapezoidal rule used for an individual interval to cumulate footprint - FP_cumulative += Integration_interval*(FP_L + FP_R)/2 + FP_cumulative += Integration_interval*(FP_L + FP_R)/2.0 'Find the footprint w/in the range of interest If ((x_L < upwnd_dist) AND (x_R >= upwnd_dist)) Then - FP_win_range = 100*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) + FP_win_range = 100.0*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) EndIf 'Find the 40% footprint distance @@ -4510,12 +4483,12 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit Next J - '4th numerical integration segment: x > [x_inflection_R + (x_inflection_R - x_max)] or culumutive footprint > 90% + '4th numerical integration segment: x > [x_inflection_R + (x_inflection_R - x_max)] or culumutive footprint < 90% ' Use lower intergration resolution, but the more accurate numerical integration method of Boole's rule - Integration_interval = 4*height_aerodynamic + Integration_interval = 10*height_aerodynamic - 'If upwind range of 90% footprint is not reached. Continue, but limited to x_max + 200*height_aerodynamic - While ((FP_cumulative < 0.9) AND (x_R - x_max < 200*height_aerodynamic)) + 'If upwind range of 90% footprint is not reached. Continue, but limited to x_max + 1000*height_aerodynamic + While ((FP_cumulative < 0.9) AND (x_R - x_max < 1000*height_aerodynamic)) x_L = x_R x_R = x_R + Integration_interval FP_cumulative_prev = FP_cumulative @@ -4525,19 +4498,19 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit FP_L = FP_R 'Footprint value at the 1st, 2nd, and 3rd quarter integration interval - FP_M1 = xgz*EXP(-xz/(x_L + 0.25*Integration_interval))/((x_L + 0.25*Integration_interval)^(Mu + 1)) - FP_M2 = xgz*EXP(-xz/(x_L + 0.50*Integration_interval))/((x_L + 0.50*Integration_interval)^(Mu + 1)) - FP_M3 = xgz*EXP(-xz/(x_L + 0.75*Integration_interval))/((x_L + 0.75*Integration_interval)^(Mu + 1)) + FP_M1 = xgz*EXP(-xz/(x_L + 0.25*Integration_interval))/((x_L + 0.25*Integration_interval)^(Mu + 1.0)) + FP_M2 = xgz*EXP(-xz/(x_L + 0.50*Integration_interval))/((x_L + 0.50*Integration_interval)^(Mu + 1.0)) + FP_M3 = xgz*EXP(-xz/(x_L + 0.75*Integration_interval))/((x_L + 0.75*Integration_interval)^(Mu + 1.0)) 'Footprint value at the right boundary of an integration interval - FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1)) + FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1.0)) 'The Boole's rule used for an individual interval to cumulate the footprint - FP_cumulative += Integration_interval*(7*FP_L + 32*FP_M1 + 12*FP_M2 + 32*FP_M3 +7*FP_R)/90 + FP_cumulative += Integration_interval*(7.0*FP_L + 32.0*FP_M1 + 12.0*FP_M2 + 32.0*FP_M3 +7.0*FP_R)/90.0 'Find the footprint w/in the range of interest If ((x_L < upwnd_dist) AND (x_R >= upwnd_dist)) Then - FP_win_range = 100*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) + FP_win_range = 100.0*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) EndIf 'Find the 40% footprint distance @@ -4557,25 +4530,16 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit FP_90pct_range = x_R - Integration_interval*(FP_cumulative - 0.9)/(FP_cumulative - FP_cumulative_prev) EndIf - ' Assign FP_90pct_range as NaN if culmulative footprint can not reach 0.9 within x_max + 200*height_aerodynamic - If ((FP_cumulative < 0.90) AND (FP_90pct_range = 0)) Then - FP_90pct_range = NaN - EndIf - ' 5th numerical integration segment: - ' If upwind range of interest has not been reached, this segment is integrated - ' from x at FP_90 = 90% (x_90) or x_max + 200*height_aerodynamic (x_200z)(if FP_90 is not reached) to upwind distance of interest, - ' but limited to x_90 (or x_200z) + 100*height_aerodynamic. + ' If upwind range of interest or FP_90pct has not been reached, this segment is integrated + ' from x at FP_90 = 90% (x_90) or the 4th segment end if upwind distance of interest or FP_90 is not reached, + ' but limited to 1000*height_aerodynamic further. - If (x_R < upwnd_dist) Then + If ((x_R < upwnd_dist) OR (FP_90pct_range = 0)) Then - 'Control the integration w/in 25 iterations after above integrations - If ((upwnd_dist - x_R) < (100*height_aerodynamic)) Then + Integration_interval = 2*Integration_interval 'Rescale integration interval - Interval_count = INT((upwnd_dist - x_R)/Integration_interval) - Integration_interval = (upwnd_dist - x_R)/Interval_count 'Rescale integration interval - - For J = 1 To Interval_count '100*height_aerodynamic after above integration, the cumulative footprint is enough + For J = 1 To 50 '100*height_aerodynamic after above integration, the cumulative footprint is enough x_L = x_R x_R = x_R + Integration_interval FP_cumulative_prev = FP_cumulative @@ -4585,32 +4549,44 @@ Sub FootprintCharacteristics_KormannMeixner (Ustar, height_aerodynamic, Stabilit FP_L = FP_R 'Footprint value at the right boudary of the 1st, 2nd, and 3rd quarter integration interval - FP_M1 = xgz*EXP(-xz/(x_L + 0.25*Integration_interval))/((x_L + 0.25*Integration_interval)^(Mu + 1)) - FP_M2 = xgz*EXP(-xz/(x_L + 0.50*Integration_interval))/((x_L + 0.50*Integration_interval)^(Mu + 1)) - FP_M3 = xgz*EXP(-xz/(x_L + 0.75*Integration_interval))/((x_L + 0.75*Integration_interval)^(Mu + 1)) + FP_M1 = xgz*EXP(-xz/(x_L + 0.25*Integration_interval))/((x_L + 0.25*Integration_interval)^(Mu + 1.0)) + FP_M2 = xgz*EXP(-xz/(x_L + 0.50*Integration_interval))/((x_L + 0.50*Integration_interval)^(Mu + 1.0)) + FP_M3 = xgz*EXP(-xz/(x_L + 0.75*Integration_interval))/((x_L + 0.75*Integration_interval)^(Mu + 1.0)) 'Footprint value at the right boundary of integration interval - FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1)) + FP_R = xgz*EXP(-xz/x_R)/(x_R^(Mu + 1.0)) - FP_cumulative += Integration_interval*(7*FP_L + 32*FP_M1 + 12*FP_M2 + 32*FP_M3 +7*FP_R)/90 + FP_cumulative += Integration_interval*(7.0*FP_L + 32.0*FP_M1 + 12.0*FP_M2 + 32.0*FP_M3 +7.0*FP_R)/90.0 - 'Try FP FP_90pct_range again in case that FP_90pct_range is not resolved - If ((FP_cumulative >= 0.9) AND (FP_90pct_range = NaN)) Then + 'Find the footprint w/in the range of interest + If ((x_L < upwnd_dist) AND (x_R >= upwnd_dist)) Then + FP_win_range = 100.0*(FP_cumulative_prev + (FP_cumulative - FP_cumulative_prev)*(upwnd_dist - x_L)/Integration_interval) + EndIf + + 'Try FP_90pct_range again in case that FP_90pct_range is not resolved + If ((FP_cumulative >= 0.9) AND (FP_90pct_range = 0)) Then FP_90pct_range = x_R - Integration_interval*(FP_cumulative - 0.9)/(FP_cumulative - FP_cumulative_prev) EndIf - + + If ((x_R >= upwnd_dist) AND (FP_90pct_range > x_max)) Then + ExitFor + EndIf + Next J + If (FP_win_range = 0) Then Select Case FP_cumulative Case Is < 1.00 - FP_win_range = 100*FP_cumulative - Case Is >=1 - FP_win_range = 99 + FP_win_range = 100.00*FP_cumulative + Case Is >=1.00 + FP_win_range = 99.00 EndSelect - - Else - FP_win_range = 99 - EndIf + EndIf + + 'Assign FP_90pct_range as current x_R if cumulative footprint can not reach 0.9 within the integration range above. + If ((FP_cumulative >= 0.9) AND (FP_90pct_range = 0)) Then + FP_90pct_range = x_R + EndIf EndIf @@ -4790,7 +4766,7 @@ BeginProg 'Set the SDM clock speed. SDMSpeed (SDM_PER) - + #If (SENSOR_TS45) Then SerialOpen(TS45_COM,9600,7,50,1000) 'Open serial port for ModbusMaster #EndIf @@ -4800,7 +4776,7 @@ BeginProg 'Datalogger panel temperature PanelTemp (panel_tmpr, 250) - #If (SENSOR_TE525x) Then 'This is placed at beginning of scan because PulseCount() is not allowed in any conditional statements. + #If (SENSOR_TE525mm) Then 'This is placed at beginning of scan because PulseCount() is not allowed in any conditional statements. '*** Beginning of Precipitation measurements *** PulseCount (Precipitation, 1, TE525_PULSE_INPUT, 2, 0, TE525_MULT, 0) '*** End of Precipitation measurements *** @@ -4896,7 +4872,7 @@ BeginProg ' Call Table for 5-minute and 30-minute table CallTable comp_cov_3d_5min 'for Steady State Test CallTable comp_cov_3d - + ' The data for Steady State Test (SST) If (comp_cov_3d_5min.Output(1, 1)) Then GetRecord (u_Avg_SST, comp_cov_3d_5min, 1) @@ -5614,7 +5590,7 @@ BeginProg GetRecord (shf_plate_avg(1), stats_SHF, 1) - #If ((SENSOR_CS6XX) AND (SENSOR_SOIL_T)) Then + #If ((SENSOR_SOIL_T) AND (SENSOR_CS6XX)) Then AvgSpa(G_surface, NMBR_SHFP, shf_plate_avg(1)) 'G_surface is used as a temporary variable #If (SENSOR_TCAV) Then @@ -5624,7 +5600,7 @@ BeginProg AvgSpa(Tsoil_current_Avg, NMBR_CS6xx, Tsoil_current (1)) #EndIf - AvgSpa(soil_wtr_current_Avg, NMBR_CS6xx, soil_wtr_current (1)) 'XXXX + AvgSpa(soil_wtr_current_Avg, NMBR_CS6xx, soil_wtr_current (1)) Delta_soil_ht_storage = ((Tsoil_current_Avg - Tsoil_prev_Avg)*Cds*soil_bulk_density + _ (Tsoil_current_Avg*soil_wtr_current_Avg - Tsoil_prev_Avg*soil_wtr_prev_Avg)*1000*Cw)*thick_abv_SHFP/(60*OUTPUT_INTERVAL-Offset_intv_Delta_ht_storage) @@ -5658,7 +5634,7 @@ BeginProg 'Save averaged and calculated data. CallTable Flux - + #If (NOT ONE_FULL_TABLE) Then CallTable Flux_Notes #EndIf @@ -5672,7 +5648,7 @@ BeginProg #EndIf 'Save 15 Minute Meteorology Data for LTAR CORE - slowsequence_disable_flg = TRUE + slowsequence_disable_flg = TRUE If (slowsequence_finished_flg) Then slowsequence_finished_flg = FALSE slowsequence_disable_flg = FALSE @@ -5684,7 +5660,7 @@ BeginProg slowsequence_5_disable_flg = FALSE EndIf - Else + Else scan_count += 1 EndIf CallTable diagnostic @@ -5761,7 +5737,7 @@ BeginProg 'Measure battery voltage. Battery (batt_volt) - + 'Check state of enclosure door #If (SENSOR_DOOR) Then If (CheckPort(DOOR_CTRL_INPUT) = DOOR_SWITCH_POLARITY) Then @@ -5774,9 +5750,9 @@ BeginProg #If (SENSOR_TMPR_RH) Then '*** Beginning of temperature and humidity probe measurements *** - VoltDiff (T_probe, 2, mV1000, TMPR_RH_ANALOG_INPUT, TRUE, 0, ANALOG_INTEGRATION, 1, 0) + VoltSe (T_probe, 2, mV1000, TMPR_RH_ANALOG_INPUT, TRUE, 0, ANALOG_INTEGRATION, 1, 0) T_probe = T_probe*TMPR_RH_T_MULT + TMPR_RH_T_OFFSET - RH_probe = RH_probe*TMPR_RH_MULT + TMPR_RH_OFFSET + RH_probe = RH_probe*0.1 VaporPressure (e_probe, T_probe, RH_probe) 'Saturation water pressure at current temperature @@ -5889,9 +5865,7 @@ BeginProg '*** End of net radiation measurements *** - #EndIf - - + #EndIf #If (SENSOR_HFP01) Then '*** Beginning of HFP01 measurements *** diff --git a/src/constants.cr3 b/src/constants.cr3 index 887db19..101064f 100644 --- a/src/constants.cr3 +++ b/src/constants.cr3 @@ -1,7 +1,7 @@ 'Ancillary file for online corrections flux program version 1.x 'Copyright (c) 2017 Washington State University -Const NRLITE_SENS = 12 'uV/W/m^2 +Const NRLITE_SENS = 16 'uV/W/m^2 Const QUANTUM_SENS = 5 'uA per 1000 umol/m^2/s diff --git a/src/old_default.cr3 b/src/old_default.cr3 deleted file mode 100644 index f8bf2e0..0000000 --- a/src/old_default.cr3 +++ /dev/null @@ -1,998 +0,0 @@ -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -' Vineyard Pilot Study (2015) -' Laboratory for Atmospheric Research at Washington State University -' https://bitbucket.org/wsular/2015-vineyard-tower-logger -' -'========================== SEMI-EDITABLE VALUES ====================================== - -'manually update prior to pushing but do not check-in with other than empty string! -Const GIT_TAG = "" - -'----- TIMEZONE ----- -'This must be set as a constant for use with GPS instruction. It cannot be dynamically -'assigned based on logger's serial # because of this fact. -Const UTC_OFFSET = -8 'offset from UTC as +/- hours; PST = -8 - -'----- PROGRAM TIMING ----- -Const FAST_INTV = 100 'length of primary scan interval, milliseconds -Const SLOW_INTV = 1 'length of secondary scan interval, seconds -Const SOIL_INTV = 30 'length of slowest sensors (soil probes, gps, shfp) -Const STAT_OUT_30 = 30 'stats output interval minutes -Const SDM_PER = 30 'default SDM clock speed -Const INTEG = 250 'analog measurement integration time (250/_50hz/_60hz) - -'----- PROGRAM OPERATION ----- -Const SETTINGS_FILE = "CPU:wine_settings.dat" -Const FAST_BUFFER_SIZE = 600 '= 60sec = 1min buffer -Const SLOW_BUFFER_SIZE = 60 '= 1min buffer -Const SOIL_BUFFER_SIZE = 24 '= 2min buffer -Const DAILY_MEDNUM = 480 '# of values to include in median for daily stats -Const NMBR_WND_SAMPLES = 3000/FAST_INTV '#pts to compute 3sec mean horizontal wind - -'----- BASE SENSORS ANALOG INPUT MAP ------ -Const HMP_T_DIFF = 2 'HMP T diff input chan # -Const HMP_RH_DIFF = 3 'HMP RH diff input chan # -Const NRLITE_DIFF = 4 'NR-Lite2 diff input chan # -Const LI190_DIFF = 5 'LI190SB diff input chan # - -Const oh34B_WD_SE = 1 '034B single ended input chan # = D1H -Const oh34B_WD_VX = 1 '034B voltage excitation chan # -Const oh34B_WS_PULSE = 1 '034B pulse input chan # -Const TE525_PULSE = 2 'TE525 rain gage pulse input chan # - -'----- BASE SENSORS DIGITAL INPUT MAP ----- -Const EC100_SDM_ADDR = 1 'SDM address for EC100/EC150/CSAT3A -Const GPS_COM_ADDR = Com4 'GPS serial input port # -Const SDI_COM_ADDR = 5 'serial port reserved for SDI communications = Com3 - -'------ OPTIONAL SENSORS ANALOG INPUT MAP ----- -Const HFP_1_SGNL_DIFF = 6 'heat flux plate sensor signal diff input chan # -Const HFP_2_SGNL_DIFF = 7 ' plate #2 - -Const TCAV_DIFF = 8 'averaging thermcouple diff input chan # - - -ConstTable - Const SHFP_ENABLED = True -EndConstTable - -'----- FIXED CALIBRATION VALUES ------ -Const HMP_T_MULT = (60 - -80)/1000 '-80 to +60 *C over 1V = 0.14 -Const HMP_T_OFFSET = -80 -Const HMP_RH_MULT = (100 - 0)/1000 '0 - 100% over 1V -Const HMP_RH_OFFSET = 0 -Const oh34B_WD_MULT = 720 '720/0 as specified in CSI manual: -Const oh34B_WD_OFFSET = 0 ' Met One 034B Windset rev3/12, pg 6 -Const oh34B_WS_MULT = 0.7989 '0.7989/0.28 as specified in above CSI manual -Const oh34B_WS_OFFSET = 0.28 -Const TE525_MULT = 0.254 'Table 7-2, CSI manual rev 8/16 - - -'========================== NO USER-SERVICEABLE PARTS BELOW =========================== -'----- PHYSICAL CONSTANTS ----- -Const MW_CO2 = 44.01 'molecular weight of CO2, g/mol -Const MW_H2O = 18.016 'molecular weight of water, g/mol -Const MW_AIR = 28.964 'molecular weight of dry air, g/mol -Const MU_WPL = MW_AIR/MW_H2O 'Ratio of the molecular weight of dry air to water vapor -Const R = .0083143 'Universal gas constant [kPa m^3/(K mol)] -Const RD = R/29 'Gas constant for dry air [kPa m^3/(K g)] -Const LV = 2440 'Estimate of the latent heat of vaporization [J/g] -Const RV = R/18 'Gas constant for water vapor [kPa m^3/(K g)] -Const CP = 1004.67 'Estimate of heat capacity of air [J/(kg K)] - - -'----- PROGRAM OPERATION VARIABLES ----- -Public debug_on As Boolean -Dim self As String * 16 -Dim filehandle As Long -Dim scan_count As Long 'Number scans executed. -Dim just_had_1hz_scan As Boolean 'Flag used to indicate the SlowSequence has finished its scan. -Dim inbetween_1hz_scan As Boolean = {TRUE} 'Flag used to decimate statistics in main scan. -Dim just_had_soil_scan As Boolean -Dim inbetween_5s_scan As Boolean = {TRUE} -Dim i As Long 'Main scan index variable. -Dim ii As Long 'Slow sequence scan index variable. -Dim n = {1} -Units n = samples - -Dim sensor_shfp As Boolean 'set based on site SN - -'----- RETAINED SETTINGS ----- -Const NUM_SETTINGS = {24} 'set to length of settings array -Const WRITEFILE = 0 -Const READFILE = 1 - -Dim settings(NUM_SETTINGS) 'values retained via file written to datalogger CPU -Alias settings(1) = sonic_azimuth -Alias settings(2) = NRLite2_sens -Alias settings(3) = LI190SB_sens -Alias settings(4) = cup_ws_enabled -Alias settings(5) = vane_wd_enabled -Alias settings(6) = rain_enabled -Alias settings(23) = hfp1_sens -Alias settings(24) = hfp2_sens -Units hfp1_sens = uV/W/m^2 -Units hfp2_sens = uV/W/m^2 -Units sonic_azimuth = degEofTN -Units NRLite2_sens = uV/W/m^2 -Units LI190SB_sens = uA/mmol/m^2/s - -Public choice(NUM_SETTINGS) -Alias choice(1) = set_sonic_azimuth -Alias choice(2) = set_NRLite2_sens -Alias choice(3) = set_LI190SB_sens -Alias choice(4) = set_cup_ws_enabled -Alias choice(5) = set_vane_wd_enabled -Alias choice(6) = set_rain_enabled -Alias choice(23) = set_hfp1_sens -Alias choice(24) = set_hfp2_sens - - -'*********** CR3000 ************ -Dim panel_tmpr -Units panel_tmpr = C -Dim batt_volt -Units batt_volt = V - - -'*********** EC100/EC150/CSAT3A ********** -Const OFFSET = 17 'min # recs req'd to compensate for IRGA/CSAT lags on-the-fly -Const BANDWIDTH = 20 '20 = 20 Hz -Const DELAY_EC150 = INT (4000/FAST_INTV/BANDWIDTH) 'Automatically computed lag of the EC150 data. -Const EC150_REC_BCK = OFFSET-DELAY_EC150 'Number of records back to align EC150 data. - -Dim sonic_irga_raw(13) 'unlagged EC150 irga + CSAT3A sonic data - -Dim sonic(5) 'lagged working CSAT3A data -Alias sonic(1) = Ux -Alias sonic(2) = Uy -Alias sonic(3) = Uz -Alias sonic(4) = Ts -Alias sonic(5) = diag_sonic -Units Ux = m/s -Units Uy = m/s -Units Uz = m/s -Units Ts = C -Units diag_sonic = bitmap - -Dim irga(9) -Alias irga(1) = CO2 -Alias irga(2) = H2O -Alias irga(3) = diag_irga -Alias irga(4) = amb_tmpr -Alias irga(5) = amb_press -Alias irga(6) = CO2_signal -Alias irga(7) = H2O_signal -Alias irga(8) = Tc -Alias irga(9) = CO2_hf 'irga(1) calculated using sonic temp instead of thermistor -Units CO2 = mg/m^3 -Units H2O = g/m^3 -Units diag_irga = bitmap -Units amb_tmpr = C -Units amb_press = kPa -Units CO2_signal = unity -Units H2O_signal = unity -Units Tc = C -Units CO2_hf = mg/m^3 - -Dim CO2_hf_ppm -Units CO2_hf_ppm = ppmv - -Dim mask As Long -Dim diag_sonic_tmp As Long 'used to break out the CSAT3A sonic head diagnostic bits. -Dim sonic_disable_f As Boolean 'TRUE if CSAT3A diag warning flag, SDM error or no data -Dim diag_irga_tmp As Long 'used to break out the EC150 diagnostic bits. -Dim irga_disable_f As Boolean 'TRUE when EC150 sends bad data. - -Dim cov_array_sonic(1,4) 'used to hold input data for cov instructions -Dim cov_array_cs(4,4) - -Dim etcvar(3) -Alias etcvar(1) = divisor 'used to find molar mixing ratio. -Alias etcvar(2) = rho_d_mean 'Density of dry air used in WPL [kg / m^3]. -Alias etcvar(3) = sigma_wpl 'density of water vapor / density of dry air. - -Dim results(19) -Alias results(1) = Ts_absolute 'sonic temp in Kelvin -Alias results(2) = CO2_ppm 'CO2 mixing ratio -Alias results(3) = Xv 'H2O mixing ratio -Alias results(4) = L 'Obukohov length -Alias results(5) = Hs 'Sensible heat flux using sonic temperature. -Alias results(6) = tau 'Momentum flux. -Alias results(7) = u_star 'Friction velocity. -Alias results(8) = sonic_uptime -Alias results(9) = Fc_wpl 'Carbon dioxide flux (EC150), with WPL -Alias results(10) = LE_wpl 'Latent heat flux (EC150), with WPL -Alias results(11) = Hc 'Sensible heat flux with h2o-corrected sonic temp -Alias results(12) = irga_uptime -Alias results(13) = rho_a_mean -Alias results(14) = Fc_irga 'Carbon dioxide flux (EC150), without WPL -Alias results(15) = LE_irga 'Latent heat flux (EC150), without WPL -Alias results(16) = CO2_wpl_LE 'Carbon dioxide flux (EC150), WPL latent heat flux. -Alias results(17) = CO2_wpl_H 'Carbon dioxide flux (EC150), WPL sensible heat flux. -Alias results(18) = H2O_wpl_LE 'Latent heat flux (EC150), WPL latent heat flux. -Alias results(19) = H2O_wpl_H 'Latent heat flux (EC150), WPL sensible heat flux. -Units Ts_absolute = Kelvin -Units CO2_ppm = ppm -Units Xv = ppt -Units L = m -Units Hs = W/m^2 -Units tau = kg/(m s^2) -Units u_star = m/s -Units sonic_uptime = unity -Units Fc_wpl = mg/(m^2 s) -Units LE_wpl = W/m^2 -Units Hc = W/m^2 -Units irga_uptime = unity -Units rho_a_mean = kg/m^3 -Units Fc_irga = mg/(m^2 s) -Units LE_irga = W/m^2 -Units CO2_wpl_LE = mg/(m^2 s) -Units CO2_wpl_H = mg/(m^2 s) -Units H2O_wpl_LE = W/m^2 -Units H2O_wpl_H = W/m^2 - -Dim Fc_hf_irga 'CO2 flux using alt. CO2 value, without WPL -Dim CO2_hf_wpl_LE 'CO2 flux WPL latent heat component, using alt. CO2 value -Dim CO2_hf_wpl_H 'CO2 flux WPL sensible heat component, using alt. CO2 value -Dim Fc_hf_wpl 'CO2 flux using alt. CO2 value with WPL corrections -Units Fc_hf_wpl = mg/m^2/s - - -'********** HMP-155A temp/RH probe ********** -Dim hmp(4) -Alias hmp(1) = T_hmp 'HMP temperature -Alias hmp(2) = RH_hmp 'HMP relative humidity -Alias hmp(3) = e_hmp 'HMP vapor pressure -Alias hmp(4) = e_sat_hmp 'HMP saturation vapor pressure -Units T_hmp = C -Units RH_hmp = percent -Units e_hmp = kPa -Units e_sat_hmp = kPa - -Dim hmp_stats(3) -Alias hmp_stats(1) = H2O_hmp_mean -Alias hmp_stats(2) = RH_hmp_Avg -Units H2O_hmp_mean = g/m^3 -Units RH_hmp_Avg = % - - -'********** NR-Lite2 ********** -Dim nrlite_mult - -Dim nrlite(2) -Alias nrlite(1) = Rn -Alias nrlite(2) = Rn_meas -Units Rn = W/m^2 -Units Rn_meas = W/m^2 - -Dim hor_wind -Dim hor_wind_raw - - -'********** LI190SB quantum PAR sensor *********** -Dim li190_dens_mult -Dim li190_tot_mult - -Dim par(3) -Alias par(1) = PAR_mV -Alias par(2) = PAR_flxdens -Alias par(3) = PAR_totflx -Units PAR_mV = mV -Units PAR_flxdens = umol/m^2/s -Units PAR_totflx = mmol/m^2 - - -'*********** 034B wind vane ********** -Dim oh34B(2) -Alias oh34B(1) = WS_ms -Alias oh34B(2) = WindDir -Units WS_ms = m/s -Units WindDir = degrees - - -'********** TE525 rain gage ********** -Dim Rain_mm -Units Rain_mm=mm - - -'********** GPS16X-HVS ********** -Dim nmea_sentence(2) As String * 90 -Dim gps_data(15) -Alias gps_data(1) = latitude_a 'Degrees latitude (+ = East; - = West) -Alias gps_data(2) = latitude_b 'Minutes latitude -Alias gps_data(3) = longitude_a 'Degress longitude (+ = East; - = West) -Alias gps_data(4) = longitude_b 'Minutes longitude -Alias gps_data(5) = speed 'Speed -Alias gps_data(6) = course 'Course over ground -Alias gps_data(7) = magnetic_variation 'Magnetic variation from true north (+ = East; - = West) -Alias gps_data(8) = fix_quality 'GPS fix quality: 0 = invalid, 1 = GPS, 2 = 'differential GPS, 6 = estimated -Alias gps_data(9) = nmbr_satellites 'Number of satellites used for fix -Alias gps_data(10) = altitude 'Antenna altitude -Alias gps_data(11) = pps 'Elapsed ms since last pulse per second (PPS) from GPS -Alias gps_data(12) = dt_since_gprmc 'Time since last GPRMC string, normally less than '1 second -Alias gps_data(13) = gps_ready 'Counts from 0 to 10, 10 = ready -Alias gps_data(14) = max_clock_change 'Maximum value the clock was changed -Alias gps_data(15) = nmbr_clock_change 'Number of times the clock was changed -Units latitude_a = degreesN -Units latitude_b = minutesN -Units longitude_a = degreesE -Units longitude_b = minutesE -Units speed = m/s -Units course = degreesEofN -Units magnetic_variation = degreesEofN -Units fix_quality = unitless -Units nmbr_satellites = unitless -Units altitude = m -Units pps = ms -Units dt_since_gprmc = s -Units gps_ready = unitless -Units max_clock_change = ms -Units nmbr_clock_change = occurrences - - -'********** HFP01SC heat flux plate ********** -Dim hfp(4) -Alias hfp(1) = soil_hfp1_heat_flux -Alias hfp(2) = soil_hfp2_heat_flux -Alias hfp(3) = soil_hfp1_sensitivity -Alias hfp(4) = soil_hfp2_sensitivity -Units soil_hfp1_heat_flux = W/m^2 -Units soil_hfp2_heat_flux = W/m^2 -Units soil_hfp1_sensitivity = W/m^2/mV -Units soil_hfp2_sensitivity = W/m^2/mV - -'********** Averaging thermocouple ********** -Dim tcav(1) -Alias tcav(1) = tcav_T -Units tcav = degC - - -'********** Intermediate variables ********** -Dim dly_data_out(13) 'used to temporarily store the lagged record. - -Dim work_stats_out(40) -'sonic processing -Alias work_stats_out(1) = Ts_Std 'results of covariance instructions, 10 qntys -Alias work_stats_out(2) = Ts_Ux_cov -Alias work_stats_out(3) = Ts_Uy_cov -Alias work_stats_out(4) = Ts_Uz_cov -Alias work_stats_out(5) = Ux_Std -Alias work_stats_out(6) = Ux_Uy_cov -Alias work_stats_out(7) = Ux_Uz_cov -Alias work_stats_out(8) = Uy_Std -Alias work_stats_out(9) = Uy_Uz_cov -Alias work_stats_out(10) = Uz_Std -Alias work_stats_out(11) = wnd_spd 'results of windvector instruction, 4 qntys -Alias work_stats_out(12) = rslt_wnd_spd -Alias work_stats_out(13) = rslt_wnd_dir -Alias work_stats_out(14) = std_wnd_dir -Alias work_stats_out(15) = sonic_samples '1 @ totalize -'irga processing -Alias work_stats_out(16) = CO2_mg_m3_Std 'results of 3 covariances, 12 #s -Alias work_stats_out(17) = CO2_Ux_cov -Alias work_stats_out(18) = CO2_Uy_cov -Alias work_stats_out(19) = CO2_Uz_cov -Alias work_stats_out(20) = H2O_g_m3_Std -Alias work_stats_out(21) = H2O_Ux_cov -Alias work_stats_out(22) = H2O_Uy_cov -Alias work_stats_out(23) = H2O_Uz_cov -Alias work_stats_out(24) = Tc_stdev -Alias work_stats_out(25) = Tc_Ux_cov -Alias work_stats_out(26) = Tc_Uy_cov -Alias work_stats_out(27) = Tc_Uz_cov -Alias work_stats_out(28) = CO2_mg_m3_Avg 'four averages -Alias work_stats_out(29) = H2O_g_m3_Avg -Alias work_stats_out(30) = amb_press_Avg -Alias work_stats_out(31) = Tc_Avg -Alias work_stats_out(32) = irga_samples '1 @ totalize -'hmp processing -Alias work_stats_out(33) = e_hmp_Avg 'two averages -Alias work_stats_out(34) = e_sat_hmp_Avg -Alias work_stats_out(35) = samples_possible -Alias work_stats_out(36) = CO2_hf_mg_m3_Avg '1 average -Alias work_stats_out(37) = CO2_hf_mg_m3_Std 'results of 1 covariance, 4#s -Alias work_stats_out(38) = CO2_hf_Ux_cov -Alias work_stats_out(39) = CO2_hf_Uy_cov -Alias work_stats_out(40) = CO2_hf_Uz_cov -Units Ts_Std = C -Units Ts_Ux_cov = C m/s -Units Ts_Uy_cov = C m/s -Units Ts_Uz_cov = C m/s -Units Ux_Std = m/s -Units Ux_Uy_cov = (m/s)^2 -Units Ux_Uz_cov = (m/s)^2 -Units Uy_Std = m/s -Units Uy_Uz_cov = (m/s)^2 -Units Uz_Std = m/s -Units wnd_spd = m/s -Units rslt_wnd_spd = m/s -Units rslt_wnd_dir = degrees -Units std_wnd_dir = degrees -Units sonic_samples = samples -Units CO2_mg_m3_Std = mg/m^3 -Units CO2_Ux_cov = mg/(m^2 s) -Units CO2_Uy_cov = mg/(m^2 s) -Units CO2_Uz_cov = mg/(m^2 s) -Units H2O_g_m3_Std = g/m^3 -Units H2O_Ux_cov = g/(m^2 s) -Units H2O_Uy_cov = g/(m^2 s) -Units H2O_Uz_cov = g/(m^2 s) -Units Tc_stdev = C -Units Tc_Ux_cov = C m/s -Units Tc_Uy_cov = C m/s -Units Tc_Uz_cov = C m/s -Units CO2_mg_m3_Avg = mg/m^3 -Units H2O_g_m3_Avg = g/m^3 -Units amb_press_Avg = kPa -Units Tc_Avg = C -Units irga_samples = samples -Units e_hmp_Avg = kPa -Units e_sat_hmp_Avg = kPa -Units samples_possible = samples -Units CO2_hf_mg_m3_Std = mg/m^3 -Units CO2_hf_Ux_cov = mg/m^2/s -Units CO2_hf_Uy_cov = mg/m^2/s -Units CO2_hf_Uz_cov = mg/m^2/s - - -'============================ REMOTE MONITORING ============================ -DataTable(debug,True,2) - Sample(2,hmp(1),IEEE4) - Sample(2,nrlite(1),IEEE4) - Sample(3,par(1),IEEE4) - Sample(2,oh34B(1),IEEE4) - Sample(1,Rain_mm,IEEE4) - Sample(15,gps_data(1),IEEE4) - Sample(4,hfp(1),IEEE4) - Sample(1,tcav(1),IEEE4) -EndTable - - -'=========================== PROCESSING DATA TABLES =================================== -DataTable(work_delay_ec100,TRUE,OFFSET) 'handles lagging CSAT+IRGA data - TableHide - Sample(13,sonic_irga_raw(1),IEEE4) -EndTable - -DataTable(work_30min,TRUE,1) - TableHide - DataInterval(0,STAT_OUT_30,Min,1) - Covariance(4,cov_array_sonic(1,1),IEEE4,sonic_disable_f,10) - WindVector(1,-1*Uy,Ux,IEEE4,sonic_disable_f,0,1,2) - Totalize(1,n,IEEE4,sonic_disable_f) - FieldNames("sonic_total") - Covariance(4,cov_array_cs(1,1),IEEE4,irga_disable_f,4) - Covariance(4,cov_array_cs(2,1),IEEE4,irga_disable_f,4) - Covariance(4,cov_array_cs(3,1),IEEE4,irga_disable_f,4) - Average(1,CO2,IEEE4,irga_disable_f) - Average(1,H2O,IEEE4,irga_disable_f) - Average(1,amb_press,IEEE4,irga_disable_f) - Average(1,Tc,IEEE4,irga_disable_f) - Totalize(1,n,IEEE4,irga_disable_f) - FieldNames("irga_total") - Average(1,e_hmp,IEEE4,(inbetween_1hz_scan OR e_hmp=NAN)) - Average(1,e_sat_hmp,IEEE4,(inbetween_1hz_scan OR e_sat_hmp=NAN)) - Totalize(1,n,IEEE4,False) - Average(1,CO2_hf,IEEE4,irga_disable_f) - Covariance(4,cov_array_cs(4,1),IEEE4,irga_disable_f,4) -EndTable - -'=========================== BASE OUTPUT DATA TABLES ================================== -Const DAYS = 42 '6 weeks - -'time series data @ 10hz -DataTable (tsdata,TRUE,600 - DataInterval (0,FAST_INTV,mSec,100) - TableFile("CRD:TOA5_" & self & ".tsdata_", 108, 24, 0, 1, hr, 0, 0) - CardOut(0, DAYS*864000) - Sample (4,sonic_irga_raw(1),IEEE4) - FieldNames ("Ux,Uy,Uz,Ts") - Sample (1,sonic_irga_raw(5),FP2) - FieldNames ("diag_sonic") - Sample (1,sonic_irga_raw(13),IEEE4) - FieldNames ("CO2_hf") - Sample (5,sonic_irga_raw(6),IEEE4) - FieldNames ("CO2,H2O,diag_irga,amb_tmpr,amb_press") - Sample (2,sonic_irga_raw(11),FP2) - FieldNames ("CO2_signal,H2O_signal") -EndTable - -'30min statistics -DataTable (stats30,TRUE,10) - DataInterval (0,STAT_OUT_30,Min,10) - CardOut (0, DAYS*48) - Sample(1,L,IEEE4) 'monin obukhov length, meters - Sample(1,u_star,FP2) 'friction velocity, m/s - Sample(1,tau,FP2) 'momemtum flux, kg/(m s^2) - Sample(1,Fc_wpl,IEEE4) 'density-corrected (WPL) CO2 flux, mg/m3 - Sample(1,Fc_hf_wpl,IEEE4) 'WPL-corrected CO2 flux using alt. CO2 value - Sample(1,LE_wpl,FP2) 'density-corrected (WPL) latent heat flux, W/m2 - Sample(1,Hc,FP2) 'density-corrected sensible heat flux, W/m2 - Average(1,Ts,FP2,sonic_disable_f) 'mean sonic temperature, degC - Sample(1,Ts_Std,FP2) 'stdev of sonic temp, degC - Sample(1,Tc_Avg,FP2) 'mean of corrected sonic temp, degC - Sample(1,Uz_Std,FP2) 'stdev of vertical wind, m/s - Sample(1,wnd_spd,FP2) 'mean scalar wind speed, m/s - Sample(1,rslt_wnd_spd,FP2) 'vector mean wind speed, m/s - Sample(1,rslt_wnd_dir,FP2) 'mean wind direction rel2 north, degrees - Sample(1,std_wnd_dir,FP2) 'scalar stdev of wind direction, degrees - Sample(1,sonic_uptime,FP2) - Average(1,CO2_ppm,FP2,irga_disable_f) - Sample (1,CO2_mg_m3_Avg,FP2) 'mean of CO2 conc, mg/m3 - Sample (1,CO2_mg_m3_Std,FP2) 'stdev of CO2 conc, mg/m3 - Sample(1,CO2_hf_mg_m3_Avg,FP2) - Sample(1,CO2_hf_mg_m3_Std,FP2) - Average(1,CO2_signal,FP2,irga_disable_f) - Average(1,(Xv / MU_WPL),FP2,irga_disable_f) - FieldNames("H2O_g_kg_Avg") - Sample (1,H2O_g_m3_Avg,FP2) 'mean of H2O conc, g/m3 - Sample (1,H2O_g_m3_Std,FP2) 'stdev of H2O conc, g/m3 - Average(1,H2O_signal,FP2,irga_disable_f) - Average(1,amb_tmpr,IEEE4,irga_disable_f) - Sample (1,amb_press_Avg,IEEE4) 'mean of ambient pressure, kPa - Sample (1,irga_uptime,FP2) - Average(1,T_hmp,IEEE4,(inbetween_1hz_scan OR T_hmp=NAN)) - Sample (1,RH_hmp_Avg,FP2) 'mean HMP relative humidity, % - Sample (1,e_hmp_Avg,FP2) - Sample (1,e_sat_hmp_Avg,FP2) - Average(1,Rn,FP2,(inbetween_1hz_scan OR Rn=NAN)) - Average(1,Rn_meas,FP2,inbetween_1hz_scan OR Rn_meas=NAN)) - Totalize(1,PAR_totflx,FP2,(inbetween_1hz_scan OR PAR_totflx=NAN)) - Average(1,PAR_flxdens,FP2,(inbetween_1hz_scan OR PAR_flxdens=NAN)) - WindVector(1,WS_ms,WindDir,FP2,(WS_ms=NAN OR WindDir=NAN),0,0,2) - FieldNames("Met1_wnd_spd,Met1_rslt_wnd_spd,Met1_rslt_wnd_dir,Met1_std_wnd_dir") - 'units propogate from other datatable since names match - Totalize(1,Rain_mm,FP2,Rain_mm=NAN) '10hz loop - Average(1,soil_hfp1_heat_flux, IEEE4,(inbetween_5s_scan OR soil_hfp1_heat_flux=NAN)) - Sample (1,soil_hfp1_sensitivity,IEEE4) - Average(1,soil_hfp2_heat_flux, IEEE4,(inbetween_5s_scan OR soil_hfp2_heat_flux=NAN)) - Sample (1,soil_hfp2_sensitivity,IEEE4) - Average(1,panel_tmpr,FP2,(inbetween_1hz_scan OR panel_tmpr=NAN)) - Average(1,batt_volt,FP2,(inbetween_1hz_scan OR batt_volt=NAN)) -EndTable - -'Daily values -DataTable (site_daily,TRUE,2) - DataInterval (0,1,Day,10) - CardOut(0, DAYS) - Median(1,(latitude_a + latitude_b/60),DAILY_MEDNUM,IEEE4,(latitude_a=NAN OR latitude_b=NAN)) - FieldNames("latitude_Med") - Units latitude_Med = decDegreesN - Median(1,(longitude_a + longitude_b/60),DAILY_MEDNUM,IEEE4,(longitude_a=NAN OR longitude_b=NAN)) - FieldNames("longitude_Med") - Units longitude_Med = decDegreesE - Median(1,magnetic_variation,DAILY_MEDNUM,FP2,magnetic_variation=NAN) - Average(1,nmbr_satellites,FP2,nmbr_satellites=NAN) - Median(1,altitude,DAILY_MEDNUM,IEEE4,altitude=NAN) - Average(1,altitude,IEEE4,altitude=NAN) - Minimum(1,gps_ready,FP2,gps_ready=NAN,0) - Sample(1,max_clock_change,UINT2) - Sample(1,nmbr_clock_change,UINT2) - Minimum(1,batt_volt,FP2,batt_volt=NAN,1) - Maximum(1,batt_volt,FP2,batt_volt=NAN,1) - Minimum(1,T_hmp,FP2,T_hmp=NAN,1) - Maximum(1,T_hmp,FP2,T_hmp=NAN,1) -EndTable - -'program start-up information -DataTable (site_info,TRUE,20) - CardOut(0,1000) - Sample(1,UTC_OFFSET,FP2) - FieldNames("UTC_offset") - Units UTC_OFFSET = hours - Sample(1,sonic_azimuth,FP2) - Sample(1,NRLite2_sens,FP2) - FieldNames("NR_sens") - Sample(1,LI190SB_sens,FP2) - FieldNames("PAR_sens") - Sample(1,soil_hfp1_sensitivity,IEEE4) 'heat flux plate #1 info - FieldNames("HFP_1_sens") - Units HFP_1_SENS = W/m^2/mV - Sample(1,soil_hfp2_sensitivity,IEEE4) 'heat flux plate #2 info - FieldNames("HFP_2_sens") - Units HFP_2_SENS = W/m^2/mV - Sample(1,Status.CompileResults,String) - FieldNames("CompileResults") - Sample(1,Status.CardStatus,String) - FieldNames("CardStatus") - Sample(1,Status.RunSignature,UINT2) 'program information - FieldNames("RunSig") - Sample(1,Status.ProgSignature,UINT2) - FieldNames("ProgSig") - Sample(1,GIT_TAG,String) - FieldNames("GitRepoTag") - Sample(1,sensor_shfp,Boolean) - FieldNames("hfp_installed") -EndTable - -'=========================== SUPPLEMENTAL OUTPUT DATA TABLES ========================== -DataTable(soil,True,100) - DataInterval(0,5,Min,4) - CardOut(0,DAYS*288) - Average(1,soil_hfp1_heat_flux,IEEE4,soil_hfp1_heat_flux=NAN)) - Average(1,soil_hfp2_heat_flux,IEEE4,soil_hfp2_heat_flux=NAN)) - Average(1,tcav_T,IEEE4,tcav_T=NAN) -EndTable - - - -'================================ MENU ================================================ -Const Enable = True -Const Yes = True -Const Apply = True -Const Disable = False -Const No = False -Const Cancel = False -Public save_changes As Boolean -Dim recompile As Boolean - -DisplayMenu("Vineyard DAQ", -1) 'add submenu to main - SubMenu("Initial Setup") - SubMenu("Soil heat flux plate") - MenuItem("Enable?", SHFP_ENABLED) - MenuPick(Yes, No) - EndSubMenu - MenuRecompile("Apply now?", recompile) - MenuPick(No, Apply) - EndSubMenu - - SubMenu("Settings") - SubMenu("Sonic anemometer") - MenuItem("Azmiuth", set_sonic_azimuth) - DisplayLine(" degE of True North") - EndSubMenu - SubMenu("Net radiometer") - MenuItem("Sensitivity", set_NRLite2_sens) - DisplayLine(" uV/W/m^2") - EndSubMenu - SubMenu("PAR sensor") - MenuItem("Sensitivity", set_LI190SB_sens) - DisplayLine(" uA/mmol/m^s/s") - EndSubMenu - SubMenu("Cup & vane windset") - MenuItem("Enable WS?", set_cup_ws_enabled) - MenuPick(Yes, No) - MenuItem("Enable WD?", set_vane_wd_enabled) - MenuPick(Yes, No) - EndSubMenu - SubMenu("Rain gage") - MenuItem("Enable?", set_rain_enabled) - MenuPick(Yes, No) - EndSubMenu - #If (SHFP_ENABLED) Then - SubMenu("Soil heat flux plate") - DisplayLine("Plate #1 (DF 6):") - MenuItem("Sensitivity", set_hfp1_sens) - DisplayLine(" uV/W/m^2") - DisplayLine("Plate #2 (DF 7):") - MenuItem("Sensitivity", set_hfp2_sens) - DisplayLine(" uV/W/m^2") - EndSubMenu - #Else - DisplayLine("SHFP disabled") - #EndIf - SubMenu("Save changes") - MenuItem("Save now?", save_changes) - MenuPick(Cancel,Yes) - EndSubMenu - EndSubMenu - - SubMenu("Debug") - SubMenu("Monitor sensors") - DisplayValue("sonic Ux", sonic_irga_raw(1)) - DisplayValue("sonic Uy", sonic_irga_raw(2)) - DisplayValue("sonic Uz", sonic_irga_raw(3)) - DisplayValue("sonic Ts", sonic_irga_raw(4)) - DisplayValue("sonic diag", sonic_irga_raw(5)) - DisplayValue("irga CO2", sonic_irga_raw(6)) - DisplayValue("irga H2O", sonic_irga_raw(7)) - DisplayValue("irga diag", sonic_irga_raw(8)) - DisplayValue("irga tmpr", sonic_irga_raw(9)) - DisplayValue("irga press", sonic_irga_raw(10)) - DisplayValue("irga CO2 sig", sonic_irga_raw(11)) - DisplayValue("irga H2O sig", sonic_irga_raw(12)) - DisplayValue("HMP tmpr", T_hmp) - DisplayValue("HMP RH", RH_hmp) - DisplayValue("NR Rn", Rn) - DisplayValue("NR Rn meas", Rn_meas) - DisplayValue("PAR mV", PAR_mV) - DisplayValue("PAR flx dens", PAR_flxdens) - DisplayValue("PAR total flx", PAR_totflx) - DisplayValue("034B WS", WS_ms) - DisplayValue("034B WD", WindDir) - DisplayValue("Rain", Rain_mm) - DisplayValue("GPS lat deg", latitude_a) - DisplayValue("GPS lat min", latitude_b) - DisplayValue("GPS long deg", longitude_a) - DisplayValue("GPS long min", longitude_b) - DisplayValue("GPS speed", speed) - DisplayValue("GPS course", course) - DisplayValue("GPS mag var", magnetic_variation) - DisplayValue("GPS fix qual", fix_quality) - DisplayValue("GPS num sats", nmbr_satellites) - DisplayValue("GPS altitude", altitude) - DisplayValue("GPS pps", pps) - DisplayValue("GPS msg time", dt_since_gprmc) - DisplayValue("GPS ready", gps_ready) - DisplayValue("GPS max adj", max_clock_change) - DisplayValue("GPS num adj", nmbr_clock_change) - DisplayValue("SHFP 1 flux", soil_hfp1_heat_flux) - DisplayValue("SHFP 1 sens", soil_hfp1_sensitivity) - DisplayValue("SHFP 2 flux", soil_hfp2_heat_flux) - DisplayValue("SHFP 2 sens", soil_hfp2_sensitivity) - DisplayValue("TCAV tmpr", tcav_T) - EndSubMenu - MenuItem("Debug table", debug_on) - MenuPick(Disable,Enable) - EndSubMenu -EndMenu - - -'=============================== SUBROUTINES ========================================== -Sub set_default_choices() - set_sonic_azimuth = NAN - set_NRLite2_sens = 0 - set_LI190SB_sens = 0 - set_cup_ws_enabled = False - set_vane_wd_enabled = False - set_rain_enabled = False - set_hfp1_sens = 0 - set_hfp2_sens = 0 -EndSub - -Sub populate_choices() - Move(choice(1),NUM_SETTINGS,settings(1),NUM_SETTINGS) -EndSub - -Sub save_current_choices() - 'input validation - - Move(settings(1),NUM_SETTINGS,choice(1),NUM_SETTINGS) - Calfile(settings,NUM_SETTINGS,SETTINGS_FILE,WRITEFILE) - - 'update dependent variables - nrlite_mult = 1000/NRLite2_sens - li190_dens_mult = 1000/(LI190SB_sens*0.604) - li190_tot_mult = (1/(LI190SB_sens*0.604))*(SLOW_INTV/1) - - sensor_shfp = SHFP_ENABLED - #If (SHFP_ENABLED) Then - soil_hfp1_sensitivity = 1000/hfp1_sens - soil_hfp2_sensitivity = 1000/hfp2_sens - #Else - soil_hfp1_heat_flux = NAN - soil_hfp1_sensitivity = 0 - soil_hfp2_heat_flux = NAN - soil_hfp2_sensitivity = 0 - #EndIf -EndSub - -Sub setup() - filehandle = FileOpen(SETTINGS_FILE,"rb",0) ' attempt to open file - FileClose(filehandle) - If (filehandle = 0) Then 'if file not found - set_default_choices() - Else - Calfile(settings,NUM_SETTINGS,SETTINGS_FILE,READFILE) - populate_choices() - EndIf - save_current_choices() - - CallTable (site_info) - - SDMSpeed (SDM_PER) - self = Status.StationName -EndSub - - -'================================ PROGRAM ============================================= -BeginProg - setup() - - Scan (FAST_INTV,mSec,FAST_BUFFER_SIZE,0) - - '== 034B wind vane acquisition - BrHalf(WindDir,1,mV5000,oh34B_WD_SE,oh34B_WD_VX,1,5000,True,0,INTEG,oh34B_WD_MULT,oh34B_WD_OFFSET) - If (vane_wd_enabled) Then - If ((WindDir >= 360) OR (WindDir < 0)) Then (WindDir = 0) - Else - WindDir = NAN - EndIf - PulseCount(WS_ms,1,oh34B_WS_PULSE,2,1,oh34B_WS_MULT,oh34B_WS_OFFSET) - If (cup_ws_enabled) Then - If (WS_ms <= oh34B_WS_OFFSET) Then (WS_ms = 0) - Else - WS_ms = NAN - EndIf - - '== TE525 rain gage acquisition - PulseCount(Rain_mm,1,TE525_PULSE,2,0,TE525_MULT,0) - If (NOT rain_enabled) Then Rain_mm = NAN - - '== EC100/EC150/CSAT3A irga/sonic acquisition - EC100 (sonic_irga_raw(1),EC100_SDM_ADDR,2) - CallTable(work_delay_ec100) - CallTable(tsdata) - - '== NR-Lite2 correction factor calc - hor_wind_raw = SQR (sonic_irga_raw(1)*sonic_irga_raw(1)+sonic_irga_raw(2)*sonic_irga_raw(2)) - AvgRun (hor_wind,1,hor_wind_raw,NMBR_WND_SAMPLES) '3-sec running mean of horiz. WS - - If ( scan_count >= OFFSET ) Then 'IF HAVE ENUF SCANS TO DO STATS, - - '== EC100/EC150/CSAT3A lagged data retrieval - GetRecord (dly_data_out(1),work_delay_ec100,EC150_REC_BCK) - Move (Ux,5,dly_data_out(1),5) 'Ux, Uy, Uz, Ts, diag_sonic - Move (CO2,7,dly_data_out(6),8) '+H2O,diag_irga,amb_tmpr,amb_press,CO2_signal,H2O_signal,CO2_hf - If ( (diag_sonic <> NAN) AND (diag_sonic <> -1) ) Then - sonic_disable_f = diag_sonic AND &h3f '= 0011 1111 - Else - Move(Ux,5,NAN,1) - sonic_disable_f = TRUE - EndIf - Ts_absolute = IIF(sonic_disable_f, NAN, Ts+273.15) - If ( (diag_irga <> NAN) AND (diag_irga <> -1) ) Then - irga_disable_f = sonic_disable_f OR (diag_irga AND &h1) 'bit 0 always HI for warning - Else - Move(CO2,8,NAN,1) - irga_disable_f = TRUE - EndIf - If ( NOT irga_disable_f ) Then - Tc = Ts_absolute/(1+0.32*H2O*R*Ts_absolute/(amb_press*18)) - 273.15'Kaimal and Gaynor (1991) Eq. (3). - divisor = (amb_press/(R*(Tc+273.15)))-(H2O/18) '[divisor] = mol/m^3 - CO2_ppm = CO2/(MW_CO2/1000)/divisor - CO2_hf_ppm = CO2_hf/(MW_CO2/1000)/divisor - Xv = H2O/(MW_H2O/1000)/divisor - Else - Tc = NAN - CO2_ppm = NAN - CO2_hf_ppm = NAN - Xv = NAN - EndIf - - 'sonic cov for stats 1 - cov_array_sonic(1,1) = Ts - Move (cov_array_sonic(1,2),3,Ux,3) - - 'irga cov for stats 1 - cov_array_cs(1,1) = CO2 - cov_array_cs(2,1) = H2O - cov_array_cs(3,1) = Tc - cov_array_cs(4,1) = CO2_hf - Move (cov_array_cs(1,2),3,Ux,3) - Move (cov_array_cs(2,2),3,Ux,3) - Move (cov_array_cs(3,2),3,Ux,3) - Move(cov_array_cs(4,2),3,Ux,3) - - '+++++ 30 min statistics +++++ - CallTable (work_30min) - If ( work_30min.Output(1,1) ) Then - GetRecord(work_stats_out(1),work_30min,1) - - sonic_uptime = sonic_samples/samples_possible - irga_uptime = irga_samples/samples_possible - - 'add azimuth to calculated wind dir - rslt_wnd_dir = (360 + rslt_wnd_dir + sonic_azimuth) MOD 360 - tau = SQR ((Ux_Uz_cov*Ux_Uz_cov)+(Uy_Uz_cov*Uy_Uz_cov)) - u_star = SQR (tau) - Ts_Std = SQR (Ts_Std) - Ux_Std = SQR (Ux_Std) - Uy_Std = SQR (Uy_Std) - Uz_Std = SQR (Uz_Std) - - L=-u_star^3*(Tc_Avg+273.15)/(0.4*9.8*Ts_Uz_cov) 'obukohov length - rho_d_mean = (amb_press_Avg/((Tc_Avg+273.15)*RD))-(H2O_g_m3_Avg*MU_WPL) - rho_a_mean = (rho_d_mean+H2O_g_m3_Avg)/1000 - Fc_irga = CO2_Uz_cov 'online fluxes - LE_irga = LV*H2O_Uz_cov - CO2_mg_m3_Std = SQR (CO2_mg_m3_Std) 'stdevs - H2O_g_m3_Std = SQR (H2O_g_m3_Std) - Tc_stdev = SQR (Tc_stdev) - sigma_wpl = H2O_g_m3_Avg/rho_d_mean 'WPL term - - 'EC150 Webb et al. (1980) term for carbon dioxide Eq. (24). - CO2_wpl_LE = MU_WPL*CO2_mg_m3_Avg/rho_d_mean*H2O_Uz_cov - CO2_wpl_H = (1+(MU_WPL*sigma_wpl))*CO2_mg_m3_Avg/(Tc_Avg+273.15)*Tc_Uz_cov - Fc_wpl = Fc_irga+CO2_wpl_LE+CO2_wpl_H - - 'EC150 Webb et al. (1980) term for water vapor Eq. (25). - H2O_wpl_LE = MU_WPL*sigma_wpl*LE_irga - H2O_wpl_H = (1+(MU_WPL*sigma_wpl))*H2O_g_m3_Avg/(Tc_Avg+273.15)*LV*Tc_Uz_cov - LE_wpl = LE_irga+H2O_wpl_LE+H2O_wpl_H - - 'repeat using high-frequency tmpr CO2 value - Fc_hf_irga = CO2_hf_Uz_cov - CO2_hf_mg_m3_Std = SQR(CO2_hf_mg_m3_Std) - CO2_hf_wpl_LE = MU_WPL*CO2_hf_mg_m3_Avg/rho_d_mean*H2O_Uz_cov - CO2_hf_wpl_H = (1+(MU_WPL*sigma_wpl))*CO2_hf_mg_m3_Avg/(Tc_Avg+273.15)*Tc_Uz_cov - Fc_hf_wpl = Fc_hf_irga+CO2_hf_wpl_LE+CO2_hf_wpl_H - - RH_hmp_Avg = 100*e_hmp_Avg/e_sat_hmp_Avg - - Hs = rho_a_mean*CP*Ts_Uz_cov - tau = rho_a_mean*tau - Hc = rho_a_mean*CP*Tc_Uz_cov - EndIf - CallTable(stats30) '**************************************************** - - inbetween_1hz_scan = TRUE - If ( just_had_1hz_scan ) Then - just_had_1hz_scan = FALSE - inbetween_1hz_scan = FALSE - EndIf - - inbetween_5s_scan = TRUE - If ( just_had_soil_scan ) Then - just_had_soil_scan = FALSE - inbetween_5s_scan = FALSE - EndIf - Else - scan_count = scan_count+1 - EndIf - NextScan - - - '====================== SLOW SCAN INTERVAL ================================= - SlowSequence - Scan (SLOW_INTV,Sec,SLOW_BUFFER_SIZE,0) - PanelTemp (panel_tmpr,INTEG) - Battery (batt_volt) - - '== HMP-155A temp/RH - VoltDiff (T_hmp,1,mV1000,HMP_T_DIFF,TRUE,0,INTEG,HMP_T_MULT,HMP_T_OFFSET) - VoltDiff (RH_hmp,1,mV1000,HMP_RH_DIFF,TRUE,0,INTEG,HMP_RH_MULT,HMP_RH_OFFSET) - VaporPressure (e_hmp,T_hmp,RH_hmp) - SatVP (e_sat_hmp,T_hmp) - - '== NR-Lite2 net radiometer, expected range 0-15mV - VoltDiff (Rn_meas,1,mV20,NRLITE_DIFF,TRUE,0,INTEG,nrlite_mult,0) - If ( sonic_irga_raw(5)=0 AND hor_wind>5 ) Then 'sonic_irga_raw(5) = CSAT3 diag word - Rn = Rn_meas*(1+(0.021286*(hor_wind-5))) - Else - Rn = Rn_meas - EndIf - - '== LI190SB - VoltDiff (PAR_mV,1,mV20,LI190_DIFF,True,0,INTEG,1,0) 'MULT/OFF applied below - If (PAR_mV > 0) Then - PAR_flxdens = PAR_mV*li190_dens_mult - PAR_totflx = PAR_mV*li190_tot_mult - Else - PAR_flxdens = NAN - PAR_totflx = NAN - EndIf - - If (debug_on) Then CallTable debug - - If (save_changes) Then - save_changes = False 'reset b4 we forget - save_current_choices() - CallTable(site_info) - EndIf - - just_had_1hz_scan = TRUE - NextScan - - - '====================== SOIL SCAN INTERVAL ================================= - SlowSequence - Scan (SOIL_INTV,Sec,SOIL_BUFFER_SIZE,0) - - '== Garmin GPS - GPS (latitude_a,GPS_COM_ADDR,UTC_OFFSET*3600,0,nmea_sentence(1)) - CallTable(site_daily) - - #If (SHFP_ENABLED) Then - VoltDiff(soil_hfp1_heat_flux,1,mv200,HFP_1_SGNL_DIFF,TRUE,0,INTEG, _ - soil_hfp1_sensitivity,0) - VoltDiff(soil_hfp2_heat_flux,1,mv200,HFP_2_SGNL_DIFF,TRUE,0,INTEG, _ - soil_hfp2_sensitivity,0) - TCDiff(tcav_T,1,mV50,TCAV_DIFF,TypeE,panel_tmpr,1,0,INTEG,0,1) - #EndIf - - CallTable(soil) - just_had_soil_scan = TRUE - NextScan -EndProg