| 2 | |
| 3 | |
| 4 | == Spitfire with negative values at fuel_XXhr variables by A.Jornet 15/12/2015 == |
| 5 | |
| 6 | Supposedly solved at r3021 and r3022. It seems that it is not the case. |
| 7 | |
| 8 | There are negative values at diff_frac in stomate_litter. |
| 9 | |
| 10 | It only fails when DGVM is active. |
| 11 | |
| 12 | I disscussed it with Chao, he thinks it comes from somewhere else. I also disscussed with Dan about DGVM. She did not find anything. |
| 13 | |
| 14 | It remains to check if this is a problem related only to precission. Due to the use of min_stomate. |
| 15 | |
| 16 | It is actually the source the makes fuel_XXhr variables become negative (day 41). It is difficult to debug. |
| 17 | |
| 18 | Biomass is very small Xe-09 or Xe-10 at the beginning (day 3). This value is skipped due to min_stomate (1e-08). As the simulation evolves, this makes a difference at diff_frac (there is always a very small difference). So, diff_frac is more than 4 times bigger than the current fuel_10hr itself. So it becomes negative. |
| 19 | |
| 20 | {{{ |
| 21 | diff_frac(:) = litter(:,imetabolic,m,l,icarbon) - fuel_nlitt_total_pft(:,m,imetabolic,icarbon) |
| 22 | WHERE(diff_frac(:).GT.zero .OR. -1.0*diff_frac(:).GT.zero) |
| 23 | ! simply divided even fraction to each fuel class, that is 1/4 of buffer |
| 24 | fuel_1hr(:,m,imetabolic,icarbon) = fuel_1hr(:,m,imetabolic,icarbon) + 0.25 * diff_frac(:) |
| 25 | fuel_10hr(:,m,imetabolic,icarbon) = fuel_10hr(:,m,imetabolic,icarbon) + 0.25 * diff_frac(:) |
| 26 | fuel_100hr(:,m,imetabolic,icarbon) = fuel_100hr(:,m,imetabolic,icarbon) + 0.25 * diff_frac(:) |
| 27 | fuel_1000hr(:,m,imetabolic,icarbon) = fuel_1000hr(:,m,imetabolic,icarbon) + 0.25 * diff_frac(:) |
| 28 | fuel_nlitt_total_pft(:,m,imetabolic,icarbon) = fuel_1hr(:,m,imetabolic,icarbon) + & |
| 29 | fuel_10hr(:,m,imetabolic,icarbon) + fuel_100hr(:,m,imetabolic,icarbon) + & |
| 30 | fuel_1000hr(:,m,imetabolic,icarbon) |
| 31 | ENDWHERE |
| 32 | }}} |
| 33 | |
| 34 | |
| 35 | I replaced all min_stomate to zero in the stomate_litter. The simulation finishes. This makes lignin_struc get a value of ~0.7 with very small litter Xe-09 instead of 0. Due to min_stomate. |
| 36 | |
| 37 | stomate_litter -> littercalc: |
| 38 | |
| 39 | {{{ |
| 40 | !! 2.2.7 new lignin content: add old lignin and lignin increase, divide by |
| 41 | !! total structural litter (above/below) |
| 42 | DO l = 1, nlevs !Loop over litter levels (above and below ground) |
| 43 | DO m = 1,nvm !Loop over PFTs |
| 44 | WHERE( litter(:,istructural,m,l,icarbon) .GT. min_stomate ) |
| 45 | |
| 46 | !MM : Soenke modif |
| 47 | ! Best vectorization ? |
| 48 | !!$ lignin_struc(:,:,:) = & |
| 49 | !!$ ( lignin_struc(:,:,:)*old_struc(:,:,:) + lignin_struc_inc(:,:,:) ) / & |
| 50 | !!$ litter(:,istructural,:,:,icarbon) |
| 51 | |
| 52 | lignin_struc(:,m,l) = lignin_struc(:,m,l) * old_struc(:,m,l) |
| 53 | lignin_struc(:,m,l) = lignin_struc(:,m,l) + lignin_struc_inc(:,m,l) |
| 54 | lignin_struc(:,m,l) = lignin_struc(:,m,l) / litter(:,istructural,m,l,icarbon) |
| 55 | ELSEWHERE |
| 56 | lignin_struc(:,m,l) = zero |
| 57 | ENDWHERE |
| 58 | |
| 59 | IF (m == 11) THEN |
| 60 | WRITE(numout, *) 'lignin_struc = ', lignin_struc(:,m,l) |
| 61 | IF (lignin_struc(1,m,l) > 0) THEN |
| 62 | WRITE (*,*) 'ooooooh' |
| 63 | ENDIF |
| 64 | ENDIF |
| 65 | |
| 66 | ENDDO |
| 67 | ENDDO |
| 68 | }}} |
| 69 | |
| 70 | Solved: [3075] |