| 14 | 3. corrected bug for "carbon"initialization, actually, this variable should contain a element dimension in the calculation, at least icarbon and initrogen. So it is better to rename this variable as ele_pools... |
| 15 | |
| 16 | in stomate_io.f90 |
| 17 | |
| 18 | {{{ |
| 19 | |
| 20 | 232 !!!!pssdebugok#1+++ |
| 21 | 233 REAL(r_std), DIMENSION(npts,ncarb,nvm,nelements), INTENT(out) :: carbon !! som pool: active, slow, or passive, surface |
| 22 | 234 !! for carbon and nitrogen (gC/m**2) |
| 23 | 235 !!!!pssdebugok#1--- |
| 24 | 236 ! REAL(r_std), DIMENSION(npts,ncarb,nvm), INTENT(out) :: carbon !! carbon pool: active, slow, or passive, |
| 25 | 237 ! !! (gC/m**2) |
| 26 | |
| 27 | }}} |
| 28 | |
| 29 | 4. leaching only have iammonium and initrate, other gas (inox, initrous) for leaching should be zero; |
| 30 | |
| 31 | in stomate_soilcarbon.f90 |
| 32 | |
| 33 | debug: initiate leaching(:,:,:) = 0 |
| 34 | |
| 35 | |
| 36 | {{{ |
| 37 | 654 !!!!pssdebug++++ |
| 38 | 655 leaching(:,:,:) = 0 |
| 39 | 656 !!!!pssdebug---- |
| 40 | |
| 41 | }}} |
| 42 | |
| 43 | For denitrification calculation, there is no leaching(:,m,inox) and leaching(:,m,initrous) calculation before. I think we do not need to minus leaching for this two species here. |
| 44 | |
| 45 | {{{ |
| 46 | 1079 !!!!pssdebugok+ ! |
| 47 | 1080 ! NO consumption |
| 48 | 1081 denitrification(:,m,i_nh4_to_no) = MIN(soil_n_min(:,m,inox), & |
| 49 | 1082 anvf(:,m) * ( mu_no(:) / Y_no + M_no * soil_n_min(:,m,inox) / sum_n(:)) * bact(:,m) * & |
| 50 | 1083 24. * dt ) |
| 51 | 1084 ! |
| 52 | 1085 ! N2O consumption |
| 53 | 1086 denitrification(:,m,i_nh4_to_n2o) = MIN(soil_n_min(:,m,initrous), & |
| 54 | 1087 anvf(:,m) * ( mu_n2o(:) / Y_n2o + M_n2o * soil_n_min(:,m,initrous) / sum_n(:)) * bact(:,m) * & |
| 55 | 1088 24. * dt ) |
| 56 | 1089 !!!!pssdebugok- |
| 57 | 1090 !!!!pssdebug ! NO consumption |
| 58 | 1091 !!!!pssdebug denitrification(:,m,i_nh4_to_no) = MIN(soil_n_min(:,m,inox)-leaching(:,m,inox), & |
| 59 | 1092 !!!!pssdebug anvf(:,m) * ( mu_no(:) / Y_no + M_no * soil_n_min(:,m,inox) / sum_n(:)) * bact(:,m) * & |
| 60 | 1093 !!!!pssdebug 24. * dt ) |
| 61 | 1094 !!!!pssdebug ! |
| 62 | 1095 !!!!pssdebug ! N2O consumption |
| 63 | 1096 !!!!pssdebug denitrification(:,m,i_nh4_to_n2o) = MIN(soil_n_min(:,m,initrous)-leaching(:,m,initrous), & |
| 64 | 1097 !!!!pssdebug anvf(:,m) * ( mu_n2o(:) / Y_n2o + M_n2o * soil_n_min(:,m,initrous) / sum_n(:)) * bact(:,m) * & |
| 65 | 1098 !!!!pssdebug 24. * dt ) |
| 66 | |
| 67 | }}} |
| 68 | |
| 69 | 5. nitrogen demand problem |