-
Notifications
You must be signed in to change notification settings - Fork 2
Partitoning
Most of the code for the night time method is contained in ONEFlux/oneflux/partition in the file nighttime.py. The method is based on Reichstein et al (2005).
Two estimates of E0 are calculated, e0_1_from_tair and e0_2_from_tair. Both estimates are calculated in the nighttime.flux_partition() function.
The first call (around line 230 of nighttime.py) is done for a whole year of data and the result is called e0_1_from_tair. The following quality control check is applied to this estimate of E0:
- If E
0< 0 then E0= 0 - if E
0> 450 then E0= 450
Note that Reichstein et al (2005) do not mention setting E0 to the limits of 0 or 450 and implies that periods where E0 is outside these ranges are rejected.
The second call (around line 273 of nighttime.py) is done for 14 day windows with a 5 day step between windows (implies a 9 day overlap). Note that Reichstein et al (2005) used a 15 day window and a step size of 5 days. The result from this method is called e0_2_from_tair. The following quality control checks are applied to the e0_2_from_tair estimates:
- If the air temperature is used then the maximum value for E
0is 350, if the soil temperature is used the maximum value for E0is 550. - The minimum value for E
0is 30. - Windows where E
0is outside these ranges (30 to 350 for tair or 30 to 550 for tsoil) are rejected. - Windows are rejected when;
- The standard error of E
0is > 100 or - The standard error of E
0is > 0.5*E0 or - E
0< 50 or - E
0> 450
- The standard error of E
If none of the e0_2_from_tair estimates pass the quality control checks then the e0_1_from_tair value is used.
The routine used for least-squares fitting of the Lloyd-Taylor equation to the night time Fco2 data is called nlinlts1() in nighttime.py. nlinlts1() calls least_squares() (also in nighttime.py) which is a wrapper for scipy.optimise.leastsq().
The function used in the call to least_squares() is trimmed_residuals(), defined in nlinlts1(). The trimmed_residuals() function sets residuals outside the 10th and 90th percentiles to 0. The least_squares() function also calculates the "standard error" or "standard deviation" of the parameter estimates from the diagonal of the covariance matrix.
The reference (or basal) respiration is estimated once a value for E0 has been calculated. The routine used for estimating rref is reanalyse_rref() in nighttime.py.
rref is calculated for windows of 8 days with a step of 4 days.
reanalyse_rref() calls least_squares() twice.
The first call results are called rrefoptord and rrefoptord_se.
The nocturnal NEE observations are trimmed before the second call by rejecting points where the difference between the observation and the average nocturnal NEE lie outside the 5th and 95th percentile. The second (trimmed) results are called rrefopttrim and rrefopttrim_se.