| 198 | |
| 199 | }}} |
| 200 | === UPDATE [16/06/2015]=== |
| 201 | In the case the individual is going to die, the resp_maint is subtracted although it is subtracted later (for all possible cases). |
| 202 | So I uncomment this. |
| 203 | {{{ |
| 204 | ! Not enough carbon to pay the deficit, the individual |
| 205 | ! is going to die at the end of this day |
| 206 | bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) + & |
| 207 | biomass(ipts,j,icarbres,icarbon) |
| 208 | !DSGdebug_01: this is done already few lines later |
| 209 | !DSGdebug_01c biomass(ipts,j,icarbres,icarbon) = zero |
| 210 | |
| 211 | ! Truncate the maintenance respiration to the available carbon |
| 212 | resp_maint(ipts,j) = bm_alloc_tot(ipts,j) |
| 213 | |
| 214 | }}} |
| 215 | and add a max function to ensure the pools doesn't get negative due to computer precision: |
| 216 | {{{ |
| 217 | ! Final ::resp_maint is know |
| 218 | bm_alloc_tot(ipts,j) = bm_alloc_tot(ipts,j) - resp_maint(ipts,j) |
| 219 | |
| 220 | !DSGdebug_01c |
| 221 | biomass(ipts,j,ilabile,icarbon) = MAX(biomass(ipts,j,ilabile,icarbon) - & |
| 222 | (resp_maint(ipts,j) + deficit),zero) |
| 223 | !DSGdebug_01c |