areaWeightedTotal: Calculate area-weighted total

View source: R/areaWeightedTotal.R

areaWeightedTotalR Documentation

Calculate area-weighted total

Description

Calculates area-weighted sum of a Field. Useful for deriving global/regional GPP or other fluxes, C stocks etc. Note the Field variable must be on a per-unit area basis, with the area unit supplied as an argument (default is "m^2").

Usage

areaWeightedTotal(
  x,
  area_unit = "m^2",
  lon_centres = seq(-179.75, 179.75, by = 0.5),
  lat_centres = seq(-89.75, 89.75, by = 0.5)
)

Arguments

x

A spatial Field for which the area-weighted summed flux

area_unit

A character string specifying the unit the Field is in, default is "m^2" but can also be "km^2" or "ha" (see DGVMTools::addArea)

Value

A DGVMTools::Field object the area-weighted summed data.

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMBenchmarks documentation built on April 14, 2025, 5:31 a.m.