wsular / easyflux-dl-cr3000 Goto Github PK
View Code? Open in Web Editor NEWCR3000 datalogger program for Campbell open-path eddy-covariance systems, by @campbell-scientific
Home Page: https://www.campbellsci.com/easyflux-dl
CR3000 datalogger program for Campbell open-path eddy-covariance systems, by @campbell-scientific
Home Page: https://www.campbellsci.com/easyflux-dl
I recall there being consensus for:
Current programs have:
Comments in source code indicate the 1-min outputs were originally on a 5-min basis.
Unique azimuth for cup-and-vane anemometer is not exposed in a user-editable way. It's defined as constant (default: 0) so would be easy to expose through a ConstTable
.
Get rid of compiler warnings by wrapping with conditional compilation for 5TM sensors
The program uses flags to handle data sources in the same output table being acquired on two different time bases (i.e. the slowsequence_disable_flg
). This is a necessary approach related to correctly triggering data tables with simultaneous scans happening.
A new slow sequence was added in 7c72723 for acquiring data from soil probes, which includes new flag slowsequence_5_disable_flg
. This flag is
No impact on historical data since it only affects Decagon (METER) 5TM probes. Need to update 5TM processing to use correct flag.
Parts of the code for SDI-12 soil sensors were moved into a new 1-min slowsequence:
But other parts were left behind in the 5-sec slowsequence:
Maybe second resolution for #8 is preferable: return to just one slowsequence and raise interval to accomodate sensor delays?
SDI-12 soil sensors (TDR315, 5TM) were moved from the standard 5-second slowsequence into a separate 1-min slowsequence to avoid data acquisition stalling due to sensor delays. By default the running averages are supposed to represent the previous 1-minute of data. However, the parameter dictating the number of samples to include in said averages (NMBR_SOIL_T_WTR_DEL_SAMPLES
) was not updated and as a result, the averaging windows for those sensors was inadvertently expanded to previous 12 minutes.
Const SLOWSEQUENCE_SCAN_INTERVAL = 5000 'Unique: slow sequence measurement rate (ms) (For this CR3K program, the shortest scan interval is 2000 ms)
[...]
Const NMBR_SOIL_T_WTR_DEL_SAMPLES = (60*1000)/SLOWSEQUENCE_SCAN_INTERVAL 'Unique: Number of measurements to compute a one-minute mean of soil temperature and water
Standard slow sequence:
SlowSequence
Scan (SLOWSEQUENCE_SCAN_INTERVAL, mSec, 3, 0)
[...]
#If ((SENSOR_HFP) AND (SENSOR_CS616) AND (SENSOR_TCAV)) Then
AvgRun (soil_wtr_current(1), NMBR_CS6xx, soil_wtr_T(1), NMBR_SOIL_T_WTR_DEL_SAMPLES)
New sequence:
SlowSequence
Scan (1, Min, 0, 0)
[...]
#If ((SENSOR_HFP) AND (SENSOR_CS6XX) AND (SENSOR_SOIL_T))) Then
AvgRun (soil_wtr_current(1), NMBR_CS6xx, (tdr31X_wc(1)/100), NMBR_SOIL_T_WTR_DEL_SAMPLES) 'HINT scale % -> v/v
The trivial fix (scaling parameter to match new slowsequence time base) would mean just one data point is included in those averages. Maybe it should be a 15-, 20-, or 30-second scan instead?
Alternately: revert the addition of a new slowsequence and specify up-front that if SDI-12 soil sensors are used, the slowsequence interval must be increased from 5000msec to [whatever the actual minimum should be, probably determined through some bench testing].
Standard measurement command M!
causes datalogger to wait for a response. For 1-2 sensors it's negligible but using 8 can result in skipped slow scans.
Might need to use concurrent measurements instead..
Sensor | SDI-12 command time | Time for heat storage msmts | Time for profiling msmts |
---|---|---|---|
CS650 | 600 ms | up to 1.2 sec | n/a |
CS655 | 600 ms | up to 1.2 sec | n/a |
5TM | 1 sec | up to 2 sec | up to 6 sec |
TDR series | 1 sec | up to 2 sec | up to 6 sec |
5TM sensors require 1 second for measurement:
Select SDI12 Port: 3
Entering SDI12 Terminal
?!
A
AM!
A0012
A
AD0!
A+1.00+20.6
Likewise, TDR series probes also require 1 second for measurement (see Table Command Reference in the user manual. Also worth noting:
If a cable is used to connect multiple sensors to the data recorder and if concurrent readings are to be taken the voltage drop in long cables may become an issue. For example: 5 sensors operating simultaneously could draw up to 400 mA of current and cause a voltage drop of 3.25 volts in 250 feet of 22-gauge wire. If the voltage at the sensor drops to the lower operating limit, the sensor may misread or fail to report data. To avoid this do not use concurrent commands or ensure that long cables are of sufficient wire gauge to handle the current loads without significant voltage drops. The SDI-12 command “aV!” can be used to measure the sensor supply voltage at the sensor and help diagnose power issues. However, the “aV!” command is not concurrent, and so it cannot measure the loading effects of concurrent measurements.)
RH values are naively averaged (indeterminate) in following data tables:
#If (SENSOR_IRGASON) Then 'RelativeHumidity (percent)
Average (1, RH, IEEE4, (irga_disable_f OR sonic_disable_f OR H2O_bad_rng_sig_array(MAX_LAG +1)))
#EndIf
#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
Should have been implemented as two-stage process (same as that used for Flux table):
e
) and average saturation vapor pressure (e_sat
) for desired time periode/e_sat
Both affected tables do contain the intermediate results e
and e_sat
so recalculating correct RH values for historical records is trivial. Future program versions need to incorporate above process.
Edit: introduced in 8a73e69
Base version of EasyFlux-DL relies on unique sensor calibration values being updated in the program file. Any changes to those unique values would be (hopefully) tracked by the user before they deploy their changes.
Our version is modified so users can update unique values without editing (and subsequently redeploying) the program file. Since changes to the unique values file are not tracked in version control, we conditionally add relevant columns to the final data tables which contain the sensitivity values used for that record:
Table name | Relevant columns |
---|---|
Flux | NRLITE_SENS , NR01_SW_IN_SENS , NR01_SW_OUT_SENS , NR01_LW_IN_SENS , NR01_LW_OUT_SENS , CNR1_SW_IN_OUT , CNR1_SW_OUT_SENS , CNR1_LW_IN_SENS , CNR1_LW_OUT_SENS , PYRAN_MULT , PYRAN_OFFSET , QUANTUM_SENS , QUANTUM_OFFSET , SI111_m0 , SI111_m1 , SI111_m2 , SI111_b0 , SI111_b1 , SI111_b2 , SHFP_1_SENS , SHFP_2_SENS , SHFP_3_SENS , SHFP_4_SENS |
LTAR_Met | SHFP_1_SENS , SHFP_2_SENS , SHFP_3_SENS , SHFP_4_SENS |
LTAR_Met_1min | SHFP_1_SENS , SHFP_2_SENS , SHFP_3_SENS , SHFP_4_SENS |
These unique sensor calibration values change very infrequently and consequently we store large amounts of identical values.
Flux
Need to refactor IRGASON code to also record high-frequency CO2 density in timeseries output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.