wiki:DevelopmentActivities/CarbonMassBalance

Check for carbon mass balance closure

Objective

The objective is to check whether the mass balance is preserved in every subroutine that modifies stocks or fluxes. If the mass balance is not closed, this points towards a problem. The DOFOCO team has implemented such a check but the coding needs to be generalized using common subroutines that may be called in every stomate module.

Specifications

We will use the DOFOCO branch as a start, derive the common subroutines for checking the mass balance, test them against the original DOFOCO subroutines and then implement this system into the trunk.

Conception

Reservoirs

  • biomass
  • bm_to_litter
  • carbon
  • harvest_pool
  • litter
  • turnover/turnover_daily

Fluxes

  • co2_to_bm
  • co2_to_bm_dgvm
  • gpp_daily
  • resp_growth/resp_growth_d
  • resp_hetero_litter
  • resp_hetero_soil
  • resp_hetero_d
  • resp_maint/resp_maint_d
  • soilcarbon_input

First step: Initialize check for mass balance closure at the beginning of the subroutine

Calculate pool_start right after initializations.

Second step: Check mass balance closure

To be done at the end of the subroutine.
Calculate pool_end.
Check Delta_pools=Delta_Flux * dt

List of modified subroutines

  • For DOFOCO
    • crop_harvest
    • gap_clean
    • gap_prog_sapiens
    • growth_fun_all
    • kill_prognostic
    • littercalc_prognostic
    • phenology_prognostic
    • prescribe_prognostic
    • soilcarbon
    • stomate_main
    • stomateLpj
    • turnover_prognostic
    • stomate

Developments

Validation

Last modified 8 years ago Last modified on 10/15/13 19:18:25