Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Python_ToolBox Python_ToolBox
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Marie Brunel
  • Python_ToolBoxPython_ToolBox
  • Wiki
  • C balance abnormally high in LPJmL 5 running @LAM

Last edited by Marie Brunel Nov 17, 2021
Page history

C balance abnormally high in LPJmL 5 running @LAM

C balance calculation

C balance is checked annually in the routine src/lpj/check_fluxes.c. The threshold is by default set to one (on absolute value) : if(year>startyear && fabs(balance.carbon)>1). By running the exact same branch (nitrogen_cotton_tillage_newoutput) and with the same configurations and input, we obtained different C balance depending on which cluster we run the model: @PIK or @LAM

image Plot of carbon balance in two pixels : 24240 (south Morocco) and (north Morocco) (see Regions and grid of Morocco for more information about pixels and regions). C balance is higher in the north pixel with value up to 20 which is a lot. And in comparison, lpjml run @pik is under 0 anytime. These abnormal values seem to stop at the year 2000.

Output comparison between run @PIK and @LAM

Configuration

all configurations were checked for both several time

  • branch : gemmes_maroc from nitrogen_cotton_tillage_newoutput
  • configuration : lpjml_maroc.js (maroc/lpjml_maroc.js)
    • "random_prec" : false,
    • "radiation" : "cloudiness",
    • "fire" : "no_fire",
    • "with_nitrogen" : "no",
    • "shuffle_climate" : false,
    • "landuse" : "yes",
    • "sowing_date_option" : "no_fixed_sdate",
    • "irrigation" : "pot",
    • "laimax_interpolate" : "laimax_cft", (laimax from manage par file)
    • "tillage_type" : "read",
    • "startgrid" : 24897,
    • "nspinup" : 7000, first spinup natural vegetation
    • "nspinup" : 390, second spinup with landuse
    • "firstyear": 1901,
    • "lastyear" : 2050,
  • input : input_morocco.js
    • climatic scenario : CNRM RCP 8.5
  • param : param.js
    • "laimax" : 1 (temperate cereals)

ERROR004 @LAM:

ERROR004: y: 1903 c: 24897 (34.75N 5.75W) BALANCE_C-error 9.1214733975 nep: 77.58 firec: 0.00 flux_estab: 6.28 flux_harvest: 47.18 delta_totc: 10.83 biomass_yield: 0.00 estab_storage_grass: 20.00 20.00 estab_storage_tree 100.00 100.00 deforest_emissions: 9.98 product_turnover: 6.75 , program terminated unsuccessfully.

This error was avoided by disabled the threshold in check_fluxes routine.

output comparison

pixel 24240, south Maroc, Grand Oued Noun

output of pixel 24240 calculated by LPJmL5 from @lam and @pik

image

Plots above represent the difference (lam-pik) for the 4 outputs which differ (see pdf for more output). The major difference for this pixel is the soil carbon calculation which is bigger @lam and the difference is growing over the year.
NB: cftcfrac is small for this pixel.

pixel 24897, north Maroc, Oriental

output of pixel 24897 calculated by LPJmL5 from @lam and @pik

image

For this pixel which is in the north of Morocco (with more humid climate), the difference in vegetation and litter carbon are more important. (c balance as well).

cft consump_water_green and blue

Set to 0 for cft 0 (temperate cereal) both pixel : normal for blue but what about green ? Should have some value. Moreover temperate cereal irrigated has green water supply.

image
consumption green water for temperate cereals crop irrigated

Test with a longer landuse spinup

image Tests done with pixel 24897 North Morocco. Same c balance for the two runs.

Test with fixe landuse

"landuse" : "const", "landuse_year_const" : 2000,

image Interesting ! On the right, c balance for one pixel run with constant landuse.

Carbon fluxes comparison

image

  • same configuration than above (with landuse)
  • pattern from diff deforestation emission similar to balance carbon

deforestation emission carbon :

  • balance.deforest_emissions.carbon :
    src/landuse/reclaim_land.c: cell->balance.deforest_emissions.carbon+=stocks.carbon*standfrac; no difference with standfrac between pik and lam
  • stocks.carbon :
    src/soil/soilstocks.c: stocks.carbon+=soil->pool[l].slow.carbon+soil->pool[l].fast.carbon;
  • pool[l].fast.carbon : harvest_stand : stand->soil.pool->fast.carbon += MANURE * bm_grazed_pft.carbon*pft->nind; timber_harvest : soil->pool[0].fast.carbon+=harvest.carbon*biofuel*0.1/standfrac; equilsoil : soil->pool[l].fast.carbon+=c0[soil->litter.item[p].pft->id].fast*socfraction*pftlitter/sumlitter; littersom.c soil->pool[l].fast.carbon-=flux_soil[l].fast.carbon; +++

conclusion :

After discussion, it seems that some thresholds were set in function of the cluster at pik. The solution would be to inspect all of them an adapt it.

Clone repository
  • Binary file
  • Brazil
  • C balance abnormally high in LPJmL 5 running @LAM
  • Cluster
  • Color and ColorMap
  • Data treatment
  • Link shelf
  • Morocco
  • NetCDF format and file
  • Numpy array
  • Plot graph and map
  • Python script
  • Run CNRM and HADgem LPJmL5 (30 minutes)
  • Home