Skip to content

QC Flag Definitions

Peter Isaac edited this page Dec 6, 2022 · 3 revisions

PyFluxPro QC Flag Definitions

PyFluxPro assigns a quality control (QC) flag to every record for every variable. Each QC flag value has a unique definition that allows the user to trace the provenance of a record all of the way through the PyFluxPro processing path. In particular, the QC flag value will tell the user why a particular data point has been rejected and what method has been used to gap fill the missing data at a later stage.

The QC flags are stored in the netCDF files as the variable name with the suffix "_QCFlag" appended e.g. Fsd_QCFlag is the quality control flag for downwelling shortwave radiation.

There are 2 rules that govern the QC flag value and the analysis that may be supported by the data point, see below:

  1. A QC flag value of 0 indicates an original measurement that has passed all of the quality control checks. These data are recommended for process-based studies.
  2. A QC flag value that ends in 0 (e.g. 10, 20, ... or mod(flag, 10)==0) indicates a measurement that has been changed (e.g. linear correction) or gap filled. Data that has been corrected is recommended for process-based studies. Data that has been gap filled is not recommended for process-based studies but may be used for budget-style studies.

The QC flag definitions are given in the table below.

Flag Definition
0 Data has passed all QC checks
1 Data missing from the L1 input file
2 Failed range check
3 Failed SONIC check, Diag_SONIC flag != 0
4 Failed IRGA check, Diag_IRGA flag != 0 plus dependencies on AGC_IRGA, AH_IRGA_Sd, CO2_IRGA_Sd, AH_IRGA_Vr, CO2_IRGA_Vr
5 Failed diurnal check
6 Date/time range excluded
7 Hour range excluded
8 Value of -9999 (missing data) found with QC flag value of 0
9 Fre set to missing when (Fsd>threshold) or (ustar<threshold)
10 Linear correction or linear drift correction applied to data
11 Dependent data rejected during 2D coordinate rotation
12 Data rejected due to dependencies when calculating Massman frequency corrections (MassmanStandard)
13 Fh rejected during conversion of Fhv to Fh (FhvtoFh)
14 Fco2 rejected during WPL correction due to dependencies
Fe rejected during WPL correction due to dependencies
15 Ta calculated from SONIC Tv rejected due to dependencies
16 Data rejected at L3 due to failed range check
17 Data rejected at L3 due to failed diurnal check
18 Ustar below threshold (FilterUstar)
19 Data rejected during coordination of gaps in flux series

Table 1: Definition of QC flag values from 0 to 19.

Flag Definition
20 GapFilling: Driver gap filled using alternate data CONFLICT: same code used by ReplaceRotatedCovariance
21 Missing rotated covariance replaced with non-rotated value CONFLICT: same code used in gfalternate_main
22 Soil moisture set to default value in CorrectFgForStorage
23
24
25
26
27
28
29
30 GapFilling: Flux Gap Filled by ANN (SOLO)
31 GapFilling: Flux Gap not Filled by ANN
32
33
34
35 Data replaced by alternate value when difference between data and alternate value exceeds threshold (ReplaceWhenDiffExceedsRange)
36
37
38 Data rejected at L4 due to failed range check (do_qcchecks)
39 Data rejected at L4 due to failed diurnal check (do_qcchecks)
40 Gap filled from climatology
41 No value available from GapFillUsingClimatology
42
43
44
45
46
47
48
49

Table 2: Definition of QC flag values from 20 to 49.

Flag Definition
50 Gap filled by interpolation
51 Fsd below threshold when calculating albedo
52 Hour outside range 1000 to 1400 when calculating albedo
53
54
55
56
57
58
59
60 Flux data generated by GapFillFluxFromDayRatio
61 Stomatal resistance less than 0 (get_stomatalresistance)
62 Fe less than threshold when calculating stomatal resistance (get_stomatalresistance)
63 Fsd less than threshold when calculating stomatal resistance (get_stomatalresistance)
64 Wind speed = 0 when calculating stomatal resistance (get_stomatalresistance)
65
66
67
68
69
70 Partitioning Night: Re computed from exponential temperature response curves
71
72
73
74
75
76
77
78
79

Table 3: Definition of QC flag values from 50 to 79.

Flag Definition
80 Partitioning Day: GPP/Re computed from light-response curves, GPP = Re - Fc
81 Partitioning Day: GPP night mask
82 Partitioning Day: Fc > Re, GPP = 0, Re = Fc
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100

Table 4: Definition of QC flag values from 80 to 100.

Flag Definition
400 Reserved
410 Gap filled using automatic weather station (AWS) data.
420 Gap filled using ACCESS-G numerical weather prediction (NWP) data.
430 Gap filled using ECMWF Re-Analysis Interim (ERAI) data.
440 Gap filled using ECMWF Re-Analysis 5 (ERA5) data.
450 Gap filled using climatology, interpolated daily (default)
460 Gap filled using climatology, monthly (not implemented)
470 Gap filled using Marginal Distribution Sampling (MDS)

Table 5: Definition of QC flag values for Level 4.

Flag Definition
500 Reserved
510 Flux gap filled using SOLO neural network (windowed)
520 Flux gap filled using SOLO neural network (long gaps)
530
540
550
560
570 Flux gap filled using Marginal Distribution Sampling (MDS)

Table 6: Definition of QC flag values for Level 5.

Flag Definition
600 Reserved
610 ER estimated by SOLO neural network from nocturnal, u*-filtered NEE
620 ER estimated using Lloyd & Taylor (1994) from nocturnal, u*-filtered NEE
630 ER estimated using Lasslop et al (2010) from nocturnal, u*-filtered NEE (E0) and both daytime and nighttime NEE (alpha, beta0, VPD0, k, rb)

Table 7: Definition of QC flag values for Level 6.

Clone this wiki locally