Skip to content

Partitoning

Peter Isaac edited this page Aug 2, 2022 · 1 revision

Partitioning

Night time method

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).

Estimation of E0

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.

Long term estimate

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:

  1. If E0 < 0 then E0 = 0
  2. if E0 > 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.

Short term estimate

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:

  1. If the air temperature is used then the maximum value for E0 is 350, if the soil temperature is used the maximum value for E0 is 550.
  2. The minimum value for E0 is 30.
  3. Windows where E0 is outside these ranges (30 to 350 for tair or 30 to 550 for tsoil) are rejected.
  4. Windows are rejected when;
    1. The standard error of E0 is > 100 or
    2. The standard error of E0 is > 0.5*E0 or
    3. E0 < 50 or
    4. E0 > 450

If none of the e0_2_from_tair estimates pass the quality control checks then the e0_1_from_tair value is used.

Least squares methods

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.

Estimating rref

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.

Day time method