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
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
all configurations were checked for both several time
- branch : gemmes_maroc from nitrogen_cotton_tillage_newoutput
- configuration : 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: 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.
pixel 24240, south Maroc, Grand Oued Noun
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
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.
|consumption green water for temperate cereals crop irrigated|
Test with a longer landuse spinup
Test with fixe landuse
"landuse" : "const", "landuse_year_const" : 2000,
Carbon fluxes comparison
- 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 :
- pool[l].fast.carbon :
stand->soil.pool->fast.carbon += MANURE * bm_grazed_pft.carbon*pft->nind;timber_harvest :
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.