| 2 | CNP-Dev version based on MERGE-OCN revision 2567 |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | == '''1. Mass conservation issue: stomate_growth_fun_all.f90''' == |
| 8 | |
| 9 | The carbon being allocated to biomass pools must no be substracted before nutrient limitation of allocation is computed. |
| 10 | This can be fixed by: |
| 11 | {{{ |
| 12 | ! The calculation of ::resp_maint is solely based on the demand i.e. |
| 13 | ! given the biomass and the condition of the plant, how much should be |
| 14 | ! respired. It is not sure that this demand can be satisfied i.e. the |
| 15 | ! calculated maintenance respiration may exceed the available carbon |
| 16 | |
| 17 | !DSGdebug_01 |
| 18 | deficit = zero |
| 19 | !DSGdebug_01 |
| 20 | |
| 21 | IF ( bm_alloc_tot(ipts,j) - resp_maint(ipts,j) .LT. zero ) THEN |
| 22 | }}} |
| 23 | [...] |
| 24 | {{{ |
| 25 | ! Not enough carbon to pay the deficit, the individual |
| 26 | ! is going to die at the end of this day |
| 27 | bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) + & |
| 28 | biomass(ipts,j,icarbres,icarbon) |
| 29 | biomass(ipts,j,icarbres,icarbon) = zero |
| 30 | |
| 31 | ! Truncate the maintenance respiration to the available carbon |
| 32 | resp_maint(ipts,j) = bm_alloc_tot(ipts,j) |
| 33 | |
| 34 | !DSGdebug_01 |
| 35 | deficit = zero |
| 36 | !DSGdebug_01 |
| 37 | ENDIF |
| 38 | |
| 39 | }}} |
| 40 | [...] |
| 41 | {{{ |
| 42 | ! Final ::resp_maint is know |
| 43 | bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) - resp_maint(ipts,j) |
| 44 | |
| 45 | !DSGdebug_01 |
| 46 | biomass(ipts,j,ilabile,icarbon) = biomass(ipts,j,ilabile,icarbon) - & |
| 47 | (resp_maint(ipts,j) + deficit) |
| 48 | !DSGdebug_01 |
| 49 | |
| 50 | !! 3.11 Growth respiration |
| 51 | ! Calculate total growth respiration and update allocatable carbon |
| 52 | ! Growth respiration is a tax on productivity, not actual allocation |
| 53 | ! Total growth respiration has be calculated before the allocation |
| 54 | ! takes place because the allocation itself is not linear. After |
| 55 | ! the allocation has been calculated, growth respiration can be |
| 56 | ! calculated for each biomass component separatly. The unit of |
| 57 | ! resp_growth is gC m-2 dt-1 |
| 58 | resp_growth(ipts,j) = frac_growthresp(j) * MAX(zero, bm_alloc_tot(ipts,j)) |
| 59 | bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) - resp_growth(ipts,j) |
| 60 | |
| 61 | !DSGdebug_01 |
| 62 | biomass(ipts,j,ilabile,icarbon) = biomass(ipts,j,ilabile,icarbon) - & |
| 63 | resp_growth(ipts,j) |
| 64 | !DSGdebug_01 |
| 65 | |
| 66 | |
| 67 | }}} |
| 68 | [...] |
| 69 | {{{ |
| 70 | !======================================================= |
| 71 | ! Block from OCN but I did not find it in DOFOCO ??? |
| 72 | ! |
| 73 | ! 5.1 retrieve allocated biomass from labile pool (nitrogen, or new allocation) |
| 74 | ! |
| 75 | |
| 76 | !DSGdebug_01 |
| 77 | biomass(:,:,ilabile,icarbon) = biomass(:,:,ilabile,icarbon) - bm_alloc_tot(:,:) |
| 78 | !DSGdebug_01 |
| 79 | biomass(:,:,ilabile,initrogen) = biomass(:,:,ilabile,initrogen) - n_alloc_tot(:,:) |
| 80 | |
| 81 | }}} |