lair.noaa.CarbonTracker.background#

CarbonTracker.background(points, by=None)[source]#

Background mole fraction [ppm]: mean of the sampled field over points.

Samples the field at every point (e.g. trajectory endpoints) and averages over them. With by (e.g. 'receptor') the mean and 1-sigma spread are returned per group; otherwise a single-row summary. Output is ppm (CT-CH4 mole fractions are stored in ppb, CO2 in ppm).

Parameters:
  • points (pd.DataFrame) – The points, as sample() takes them.

  • by (str, optional) – A column of points to group by, such as 'receptor'. By default None: one row for all the points.

Returns:

pd.DataFrame – background_ppm, sigma_ppm (the standard deviation over the points) and n_endpoints (the points that had a value), one row per group.

Return type:

DataFrame

See also

CarbonTracker.sample

The value at each point.

Examples

With the points of sample(), as the CarbonTracker example shows:

ct.background(points)  # one row
ct.background(points, by="receptor")  # one row per receptor