---
id: climate_widgets
title: Climate Widget Calculations
---
## Calculating Below Ground Biomass
Used in the `carbonStock` widget, above ground biomass is calculated using the `agBiomass2bgBiomass` function, which tables above ground biomass as an input.
Here, above ground biomass can be found in the `whrc_aboveground_biomass_stock_2000__Mg` column within the _summary_ geotrellis tables, such as `998dd97a-389f-4a02-988f-17b184f507ac`.
Below ground biomass is defined as a static fraction of the total above ground biomass:
Mbgb = 0.489 x Magb0.89
where Mbgb = belowground biomass and Magb = aboveground biomass.
Total biomass can then be calculated directly using:
Mtotal = Magb + Mbgb = Magb + (0.489 x Magb0.89)
To do the latter in one step we have available the `agBiomass2TotalBiomass` function.
## Calculating Carbon Stocks
Carbon stock is again a derived value. In general, we can calculate a carbon stock value using it's biomass equivalent using:
MCarbon = 0.5 x Mbiomass
However, when calculating the various derived values like *Below Ground Carbon*, or *Total Carbon Stock*, it's important to notice that there are two divergent methods for arriving at the desired value.
While mathematically you can go from *Above Ground Biomass* to *Below Ground Carbon* via either of the following routes:
- AGB -> BGB -> BGC
- AGB -> AGC -> BGC
they actually give slightly different results computationally due to rounding errors which incrase with the startiing values. The biologically correct way to get from *Above Ground Biomass* to *Below Ground Carbon* is to do the former: AGB -> BGB -> BGC.
Therefre, so that we are consistent, we have the following functions defined:
- `agBiomass2bgCarbon`, where:
Mbgc = 0.5 * Mbgb = 0.5 * (0.489 x Magb0.89)
- `agBiomass2TotalCarbon`, where:
Mcarbon = Magc + Mbgc = (0.5 * Magb) + (0.5 * Mbgb = 0.5 * (0.489 x Magb0.89))