503 | | The mass of biomass and circ_class_biomass starts to diverge after leaf fall in stomate_turnover.f90. I fixed this by removing repetitions in a big; I couldn't locate the precise error in the original code. |
504 | | {{{ |
| 503 | The mass of biomass and circ_class_biomass starts to diverge after leaf fall in stomate_turnover.f90. |
| 504 | I rewrote the code in a more fail-safe format and thereby fixed the bug. I don't know where the error is in the original piece of code. |
| 505 | |
| 506 | {{{ |
| 507 | !! 4.3 Loop over leaf age classes |
| 508 | DO ilage = 1, nleafages |
| 509 | |
| 510 | turnover_rate(:) = zero |
| 511 | |
| 512 | WHERE ( leaf_age(:,ivm,ilage) .GT. leaf_age_crit(:,ivm) / deux) |
| 513 | |
| 514 | turnover_rate(:) = MIN( 0.99_r_std, dt / ( leaf_age_crit(:,ivm) * & |
| 515 | ( leaf_age_crit(:,ivm) / leaf_age(:,ivm,ilage) )**quatre ) ) |
| 516 | |
| 517 | ENDWHERE |
| 518 | |
| 519 | IF (is_tree(ivm)) THEN |
| 520 | |