1 | ! ================================================================================================================================= |
---|
2 | ! MODULE : lpj_cover |
---|
3 | ! |
---|
4 | ! CONTACT : orchidee-help _at_ listes.ipsl.fr |
---|
5 | ! |
---|
6 | ! LICENCE : IPSL (2006) |
---|
7 | ! This software is governed by the CeCILL licence see ORCHIDEE/ORCHIDEE_CeCILL.LIC |
---|
8 | ! |
---|
9 | !>\BRIEF Recalculate vegetation cover and LAI |
---|
10 | !! |
---|
11 | !!\n DESCRIPTION : None |
---|
12 | !! |
---|
13 | !! RECENT CHANGE(S) : None |
---|
14 | !! |
---|
15 | !! REFERENCE(S) : |
---|
16 | !! Sitch, S., B. Smith, et al. (2003), Evaluation of ecosystem dynamics, |
---|
17 | !! plant geography and terrestrial carbon cycling in the LPJ dynamic |
---|
18 | !! global vegetation model, Global Change Biology, 9, 161-185.\n |
---|
19 | !! Smith, B., I. C. Prentice, et al. (2001), Representation of vegetation |
---|
20 | !! dynamics in the modelling of terrestrial ecosystems: comparing two |
---|
21 | !! contrasting approaches within European climate space, |
---|
22 | !! Global Ecology and Biogeography, 10, 621-637.\n |
---|
23 | !! |
---|
24 | !! SVN : |
---|
25 | !! $HeadURL$ |
---|
26 | !! $Date$ |
---|
27 | !! $Revision$ |
---|
28 | !! \n |
---|
29 | !_ ================================================================================================================================ |
---|
30 | |
---|
31 | MODULE lpj_cover |
---|
32 | |
---|
33 | ! modules used: |
---|
34 | |
---|
35 | USE ioipsl_para |
---|
36 | USE stomate_data |
---|
37 | USE pft_parameters |
---|
38 | |
---|
39 | IMPLICIT NONE |
---|
40 | |
---|
41 | ! private & public routines |
---|
42 | |
---|
43 | PRIVATE |
---|
44 | PUBLIC cover |
---|
45 | |
---|
46 | CONTAINS |
---|
47 | |
---|
48 | !! ================================================================================================================================ |
---|
49 | !! SUBROUTINE : cover |
---|
50 | !! |
---|
51 | !>\BRIEF Recalculate vegetation cover and LAI |
---|
52 | !! |
---|
53 | !!\n DESCRIPTION : Veget_cov_max is first renewed here according to newly calculated foliage biomass in this calculation step |
---|
54 | !! Then, litter, soil carbon, and biomass are also recalcuted with taking into account the changes in Veget_cov_max (i.e. delta_veg) |
---|
55 | !! Grid-scale fpc (foliage projected coverage) is calculated to obtain the shadede ground area by leaf's light capture |
---|
56 | !! Finally, grid-scale fpc is adjusted not to exceed 1.0 |
---|
57 | !! |
---|
58 | !! RECENT CHANGE(S) : |
---|
59 | !! |
---|
60 | !! Early 2019. Added soil nitrogen pools. |
---|
61 | !! |
---|
62 | !! MAIN OUTPUT VARIABLE(S) : ::lai (leaf area index, @tex $(m^2 m^{-2})$ @endtex), |
---|
63 | !! :: veget (fractional vegetation cover, unitless) |
---|
64 | !! |
---|
65 | !! REFERENCE(S) : None |
---|
66 | !! |
---|
67 | !! FLOWCHART : |
---|
68 | !! \latexonly |
---|
69 | !! \includegraphics[scale=0.5]{lpj_cover_flowchart.png} |
---|
70 | !! \endlatexonly |
---|
71 | !! \n |
---|
72 | !_ ================================================================================================================================ |
---|
73 | |
---|
74 | SUBROUTINE cover (npts, cn_ind, ind, biomass, & |
---|
75 | veget_cov_max, veget_cov_max_old, lai, litter, som, turnover_daily, bm_to_litter, & |
---|
76 | co2_to_bm, co2_fire, resp_hetero, resp_hetero_litter, resp_hetero_soil, resp_maint, resp_growth, resp_excess, gpp_daily,& |
---|
77 | deepSOM_a, deepSOM_s, deepSOM_p, & |
---|
78 | lignin_struc, lignin_wood, soil_n_min) |
---|
79 | |
---|
80 | !! 0. Variable and parameter declaration |
---|
81 | |
---|
82 | !! 0.1 Input variables |
---|
83 | |
---|
84 | INTEGER(i_std), INTENT(in) :: npts !! Domain size (unitless) |
---|
85 | REAL(r_std), DIMENSION(npts,nvm), INTENT(in) :: cn_ind !! Crown area |
---|
86 | !! @tex $(m^2)$ @endtex per individual |
---|
87 | REAL(r_std), DIMENSION(npts,nvm), INTENT(in) :: ind !! Number of individuals |
---|
88 | !! @tex $(m^{-2})$ @endtex |
---|
89 | REAL(r_std), DIMENSION(npts,nvm), INTENT(in) :: veget_cov_max_old!! "Maximal" coverage fraction of a PFT (LAI-> |
---|
90 | !! infinity) on ground at beginning of time |
---|
91 | |
---|
92 | !! 0.2 Output variables |
---|
93 | |
---|
94 | !! 0.3 Modified variables |
---|
95 | |
---|
96 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: lai !! Leaf area index OF AN INDIVIDUAL PLANT |
---|
97 | !! @tex $(m^2 m^{-2})$ @endtex |
---|
98 | REAL(r_std), DIMENSION(npts,nlitt,nvm,nlevs,nelements), INTENT(inout) :: litter !! Metabolic and structural litter, above and |
---|
99 | !! below ground @tex $(gC m^{-2})$ @endtex |
---|
100 | REAL(r_std), DIMENSION(npts,ncarb,nvm,nelements), INTENT(inout) :: som !! Carbon pool: active, slow, or passive @tex $(gC m^{-2})$ @endtex |
---|
101 | REAL(r_std), DIMENSION(npts,nvm,nparts,nelements), INTENT(inout) :: biomass !! Biomass @tex $(gC m^{-2})$ @endtex |
---|
102 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: veget_cov_max !! "Maximal" coverage fraction of a PFT (LAI-> |
---|
103 | !! infinity) on ground (unitless) |
---|
104 | REAL(r_std), DIMENSION(npts,nvm,nparts,nelements), INTENT(inout) :: turnover_daily !! Turnover rates (gC m^{-2} day^{-1}) |
---|
105 | REAL(r_std), DIMENSION(npts,nvm,nparts,nelements), INTENT(inout) :: bm_to_litter !! Conversion of biomass to litter |
---|
106 | !! @tex $(gC m^{-2} day^{-1})$ @endtex |
---|
107 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: co2_to_bm !! biomass up take for establishment |
---|
108 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: co2_fire !! Carbon emitted to the atmosphere by fire(living |
---|
109 | !! and dead biomass) |
---|
110 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_hetero !! Heterotrophic respiration |
---|
111 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_hetero_litter !! Heterotrophic respiration from litter |
---|
112 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_hetero_soil !! Heterotrophic respiration from soil |
---|
113 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_maint !! Maintenance respiration |
---|
114 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_growth !! Growth respiration |
---|
115 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: resp_excess !! Excess respiration |
---|
116 | REAL(r_std), DIMENSION(npts,nvm), INTENT(inout) :: gpp_daily !! Daily gross primary productivity |
---|
117 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements), INTENT(inout) :: deepSOM_a !! Soil carbon discretized with depth (g/m**3) active |
---|
118 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements), INTENT(inout) :: deepSOM_s !! Soil carbon discretized with depth (g/m**3) slow |
---|
119 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements), INTENT(inout) :: deepSOM_p !! Soil carbon discretized with depth (g/m**3) passive |
---|
120 | REAL(r_std), DIMENSION(npts,nvm,nlevs), INTENT(inout) :: lignin_struc !! ratio Lignine/Carbon in structural litter, |
---|
121 | !! above and below ground |
---|
122 | REAL(r_std), DIMENSION(npts,nvm,nlevs), INTENT(inout) :: lignin_wood !! ratio Lignine/Carbon in woody litter, |
---|
123 | !! above and below ground |
---|
124 | REAL(r_std),DIMENSION(npts,nvm,nnspec), INTENT(inout) :: soil_n_min !! mineral nitrogen in the soil (gN/m**2) |
---|
125 | !! 0.4 Local variables |
---|
126 | |
---|
127 | INTEGER(i_std) :: i,j,k,m !! Index (unitless) |
---|
128 | REAL(r_std), DIMENSION(npts,nlitt,nlevs,nelements) :: dilu_lit !! Dilution for carbon variables |
---|
129 | REAL(r_std), DIMENSION(npts,ncarb,nelements) :: dilu_som !! Dilution for soil Organic Matter |
---|
130 | !! @tex $(gC(or N) m^{-2})$ @endtex |
---|
131 | REAL(r_std), DIMENSION(npts,ngrnd,nelements) :: dilu_deepSOM_a !! Dilution for active soil Organic Matter when ok_soil_carbon_discretization |
---|
132 | !! @tex $(gC(or N) m^{-2})$ @endtex |
---|
133 | REAL(r_std), DIMENSION(npts,ngrnd,nelements) :: dilu_deepSOM_s !! Dilution for slow soil Organic Matter when ok_soil_carbon_discretization |
---|
134 | !! @tex $(gC(or N) m^{-2})$ @endtex |
---|
135 | REAL(r_std), DIMENSION(npts,ngrnd,nelements) :: dilu_deepSOM_p !! Dilution for passive soil Organic Matter when ok_soil_carbon_discretization |
---|
136 | !! @tex $(gC(or N) m^{-2})$ @endtex |
---|
137 | REAL(r_std), DIMENSION(npts,nnspec) :: dilu_sin !! Dilution for soil Inorganic Nitrogen |
---|
138 | !! @tex $(gN m^{-2})$ @endtex |
---|
139 | REAL(r_std), DIMENSION(npts,nlevs) :: dilu_lf_struc !! Dilution for fraction of structural litter that is lignin |
---|
140 | REAL(r_std), DIMENSION(npts,nlevs) :: dilu_lf_wood !! Dilution for fraction of woody litter that is lignin |
---|
141 | REAL(r_std), DIMENSION(npts,nparts,nelements) :: dilu_bio !! Dilution for carbon variables |
---|
142 | REAL(r_std), DIMENSION(npts) :: dilu_TCarbon !! Dilution for carbon variables |
---|
143 | REAL(r_std), DIMENSION(npts,nparts,nelements) :: dilu_turnover_daily !! Dilution for carbon variables |
---|
144 | REAL(r_std), DIMENSION(npts,nparts,nelements) :: dilu_bm_to_litter !! Dilution for carbon variables |
---|
145 | REAL(r_std), DIMENSION(npts) :: dilu_co2flux_new !! Dilution for carbon variables |
---|
146 | REAL(r_std), DIMENSION(npts) :: dilu_gpp_daily !! Dilution for carbon variables |
---|
147 | REAL(r_std), DIMENSION(npts) :: dilu_resp_growth !! Dilution for carbon variables |
---|
148 | REAL(r_std), DIMENSION(npts) :: dilu_resp_excess !! Dilution for carbon variables |
---|
149 | REAL(r_std), DIMENSION(npts) :: dilu_resp_maint !! Dilution for carbon variables |
---|
150 | REAL(r_std), DIMENSION(npts) :: dilu_resp_hetero !! Dilution for carbon variables |
---|
151 | REAL(r_std), DIMENSION(npts) :: dilu_resp_hetero_litter !! Dilution for carbon variables |
---|
152 | REAL(r_std), DIMENSION(npts) :: dilu_resp_hetero_soil !! Dilution for carbon variables |
---|
153 | REAL(r_std), DIMENSION(npts) :: dilu_co2_to_bm !! Dilution for carbon variables |
---|
154 | REAL(r_std), DIMENSION(npts) :: dilu_co2_fire !! Dilution for carbon variables |
---|
155 | REAL(r_std), DIMENSION(npts,nvm) :: TCarbon !! Total carbon |
---|
156 | REAL(r_std), DIMENSION(npts,ncarb,nvm,nelements) :: som_old !! Carbon pool stored before update: active, slow, or passive @tex $(gC m^{-2})$ @endtex |
---|
157 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements) :: deepSOM_a_old !! Soil carbon discretized with depth (g/m**3) active stored before update |
---|
158 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements) :: deepSOM_s_old !! Soil carbon discretized with depth (g/m**3) slow stored before update |
---|
159 | REAL(r_std), DIMENSION(npts,ngrnd,nvm,nelements) :: deepSOM_p_old !! Soil carbon discretized with depth (g/m**3) passive stored before update |
---|
160 | REAL(r_std), DIMENSION(npts,nvm) :: co2flux_new !! NBP after re-calculation in order to conserve carbon |
---|
161 | REAL(r_std), DIMENSION(npts,nvm) :: co2flux_old !! NBP before re-calculation |
---|
162 | REAL(r_std), DIMENSION(nvm) :: delta_veg !! Conversion factors (unitless) |
---|
163 | REAL(r_std), DIMENSION(nvm) :: reduct !! Conversion factors (unitless) |
---|
164 | REAL(r_std) :: delta_veg_sum !! Conversion factors (unitless) |
---|
165 | REAL(r_std) :: diff !! Conversion factors (unitless) |
---|
166 | REAL(r_std) :: sr !! Conversion factors (unitless) |
---|
167 | REAL(r_std), DIMENSION(npts) :: frac_nat !! Conversion factors (unitless) |
---|
168 | REAL(r_std), DIMENSION(npts) :: sum_vegettree !! Conversion factors (unitless) |
---|
169 | REAL(r_std), DIMENSION(npts) :: sum_vegetgrass !! Conversion factors (unitless) |
---|
170 | REAL(r_std), DIMENSION(npts) :: sum_veget_natveg !! Conversion factors (unitless) |
---|
171 | REAL(r_std), DIMENSION(npts) :: vartmp !! Temporary variable used to add history |
---|
172 | |
---|
173 | !_ ================================================================================================================================ |
---|
174 | |
---|
175 | !! 1. If the vegetation is dynamic, calculate new maximum vegetation cover for natural plants |
---|
176 | |
---|
177 | IF ( ok_dgvm ) THEN |
---|
178 | |
---|
179 | !! 1.1 Calculate initial values of vegetation cover |
---|
180 | frac_nat(:) = un |
---|
181 | sum_veget_natveg(:) = zero |
---|
182 | veget_cov_max(:,ibare_sechiba) = un |
---|
183 | som_old(:,:,:,:) = som(:,:,:,:) |
---|
184 | deepSOM_a_old(:,:,:,:) = deepSOM_a(:,:,:,:) |
---|
185 | deepSOM_s_old(:,:,:,:) = deepSOM_s(:,:,:,:) |
---|
186 | deepSOM_p_old(:,:,:,:) = deepSOM_p(:,:,:,:) |
---|
187 | |
---|
188 | DO j = 2,nvm ! loop over PFTs |
---|
189 | |
---|
190 | IF ( natural(j) ) THEN |
---|
191 | |
---|
192 | ! Summation of individual tree crown area to get total foliar projected coverage |
---|
193 | veget_cov_max(:,j) = ind(:,j) * cn_ind(:,j) |
---|
194 | sum_veget_natveg(:) = sum_veget_natveg(:) + veget_cov_max(:,j) |
---|
195 | |
---|
196 | ELSE |
---|
197 | |
---|
198 | !fraction occupied by agriculture needs to be substracted for the DGVM |
---|
199 | !this is used below to constrain veget for natural vegetation, see below |
---|
200 | frac_nat(:) = frac_nat(:) - veget_cov_max(:,j) |
---|
201 | |
---|
202 | ENDIF |
---|
203 | |
---|
204 | ENDDO ! loop over PFTs |
---|
205 | |
---|
206 | DO i = 1, npts ! loop over grid points |
---|
207 | |
---|
208 | ! Recalculation of vegetation projected coverage when ::frac_nat was below ::sum_veget_natveg |
---|
209 | ! It means that non-natural vegetation will recover ::veget_cov_max as natural vegetation |
---|
210 | IF (sum_veget_natveg(i) .GT. frac_nat(i) .AND. frac_nat(i) .GT. min_stomate) THEN |
---|
211 | |
---|
212 | DO j = 2,nvm ! loop over PFTs |
---|
213 | IF( natural(j) ) THEN |
---|
214 | veget_cov_max(i,j) = veget_cov_max(i,j) * frac_nat(i) / sum_veget_natveg(i) |
---|
215 | ENDIF |
---|
216 | ENDDO ! loop over PFTs |
---|
217 | |
---|
218 | ENDIF |
---|
219 | ENDDO ! loop over grid points |
---|
220 | |
---|
221 | ! Renew veget_cov_max of bare soil as 0 to difference of veget_cov_max (ibare_sechiba) |
---|
222 | ! to current veget_cov_max |
---|
223 | DO j = 2,nvm ! loop over PFTs |
---|
224 | veget_cov_max(:,ibare_sechiba) = veget_cov_max(:,ibare_sechiba) - veget_cov_max(:,j) |
---|
225 | ENDDO ! loop over PFTs |
---|
226 | veget_cov_max(:,ibare_sechiba) = MAX( veget_cov_max(:,ibare_sechiba), zero ) |
---|
227 | |
---|
228 | !! 1.2 Calculate carbon fluxes between PFTs to maintain mass balance |
---|
229 | !! Assure carbon closure when veget_cov_max changes(delta_veg): if veget_cov_max of some PFTs decrease, we use "dilu" to |
---|
230 | !! record the corresponding lost in carbon (biomass, litter, soil carbon, gpp, respiration etc.) for |
---|
231 | !! these PFTs, and re-allocate "dilu" to those PFTs with increasing veget_cov_max. |
---|
232 | DO i = 1, npts ! loop over grid points |
---|
233 | |
---|
234 | ! Calculate the change in veget_cov_max between previous time step and current time step |
---|
235 | delta_veg(:) = veget_cov_max(i,:)-veget_cov_max_old(i,:) |
---|
236 | delta_veg_sum = SUM(delta_veg,MASK=delta_veg.LT.zero) |
---|
237 | |
---|
238 | dilu_lit(i,:,:,:) = zero |
---|
239 | dilu_som(i,:,:) = zero |
---|
240 | dilu_deepSOM_a(i,:,:) = zero |
---|
241 | dilu_deepSOM_s(i,:,:) = zero |
---|
242 | dilu_deepSOM_p(i,:,:) = zero |
---|
243 | dilu_sin(i,:) = zero |
---|
244 | dilu_lf_struc(i,:) = zero |
---|
245 | dilu_lf_wood(i,:) = zero |
---|
246 | dilu_bio(i,:,:) = zero |
---|
247 | dilu_TCarbon(i)=zero |
---|
248 | dilu_turnover_daily(i,:,:)=zero |
---|
249 | dilu_bm_to_litter(i,:,:)=zero |
---|
250 | dilu_co2flux_new(i)=zero |
---|
251 | dilu_gpp_daily(i)=zero |
---|
252 | dilu_resp_growth(i)=zero |
---|
253 | dilu_resp_excess(i)=zero |
---|
254 | dilu_resp_maint(i)=zero |
---|
255 | dilu_resp_hetero(i)=zero |
---|
256 | dilu_resp_hetero_litter(i)=zero |
---|
257 | dilu_resp_hetero_soil(i)=zero |
---|
258 | dilu_co2_to_bm(i)=zero |
---|
259 | dilu_co2_fire(i)=zero |
---|
260 | |
---|
261 | ! Calculate TCarbon: total carbon including biomass, litter and soil carbon, as well as "today's" turnover and |
---|
262 | ! bm_to_litter due to mortality, because today's turnover and bm_to_litter are not yet added into "litter" until tomorrow. |
---|
263 | DO j=1, nvm |
---|
264 | TCarbon(i,j)=SUM(biomass(i,j,:,icarbon))+SUM(som(i,:,j,icarbon))+SUM(litter(i,:,j,:,icarbon))+& |
---|
265 | SUM(turnover_daily(i,j,:,icarbon))+SUM(bm_to_litter(i,j,:,icarbon)) |
---|
266 | co2flux_old(i,j)=resp_maint(i,j)+resp_growth(i,j)+resp_excess(i,j)+resp_hetero(i,j) + & |
---|
267 | co2_fire(i,j)-co2_to_bm(i,j)-gpp_daily(i,j) |
---|
268 | co2flux_new(i,j)=resp_maint(i,j)+resp_growth(i,j)+resp_excess(i,j)+resp_hetero(i,j) + & |
---|
269 | co2_fire(i,j)-co2_to_bm(i,j)-gpp_daily(i,j) |
---|
270 | ENDDO |
---|
271 | |
---|
272 | DO j=1, nvm ! loop over PFTs |
---|
273 | IF ( delta_veg(j) < -min_stomate ) THEN |
---|
274 | dilu_lit(i,:,:,:) = dilu_lit(i,:,:,:) + delta_veg(j) * litter(i,:,j,:,:) / delta_veg_sum |
---|
275 | dilu_som(i,:,:) = dilu_som(i,:,:) + delta_veg(j) * som(i,:,j,:) / delta_veg_sum |
---|
276 | dilu_deepSOM_a(i,:,:) = dilu_deepSOM_a(i,:,:) + delta_veg(j) * deepSOM_a(i,:,j,:) / delta_veg_sum |
---|
277 | dilu_deepSOM_s(i,:,:) = dilu_deepSOM_s(i,:,:) + delta_veg(j) * deepSOM_s(i,:,j,:) / delta_veg_sum |
---|
278 | dilu_deepSOM_p(i,:,:) = dilu_deepSOM_p(i,:,:) + delta_veg(j) * deepSOM_p(i,:,j,:) / delta_veg_sum |
---|
279 | dilu_sin(i,:) = dilu_sin(i,:) + delta_veg(j) * soil_n_min(i,j,:) / delta_veg_sum |
---|
280 | dilu_lf_struc(i,:) = dilu_lf_struc(i,:) + & |
---|
281 | delta_veg(j) * lignin_struc(i,j,:) * litter(i,istructural,j,:,icarbon)/ delta_veg_sum |
---|
282 | dilu_lf_wood(i,:) = dilu_lf_wood(i,:) + & |
---|
283 | delta_veg(j) * lignin_wood(i,j,:)*litter(i,iwoody,j,:,icarbon) / delta_veg_sum |
---|
284 | dilu_TCarbon(i)= dilu_TCarbon(i) + delta_veg(j) * TCarbon(i,j) / delta_veg_sum |
---|
285 | dilu_turnover_daily(i,:,:)=dilu_turnover_daily(i,:,:)+delta_veg(j)*turnover_daily(i,j,:,:)/delta_veg_sum |
---|
286 | dilu_bm_to_litter(i,:,:)=dilu_bm_to_litter(i,:,:)+delta_veg(j)*bm_to_litter(i,j,:,:)/delta_veg_sum |
---|
287 | dilu_co2flux_new(i)=dilu_co2flux_new(i)+delta_veg(j)*co2flux_old(i,j)/delta_veg_sum |
---|
288 | dilu_gpp_daily(i)=dilu_gpp_daily(i)+delta_veg(j)*gpp_daily(i,j)/delta_veg_sum |
---|
289 | dilu_resp_growth(i)=dilu_resp_growth(i)+delta_veg(j)*resp_growth(i,j)/delta_veg_sum |
---|
290 | dilu_resp_excess(i)=dilu_resp_excess(i)+delta_veg(j)*resp_excess(i,j)/delta_veg_sum |
---|
291 | dilu_resp_maint(i)=dilu_resp_maint(i)+delta_veg(j)*resp_maint(i,j)/delta_veg_sum |
---|
292 | dilu_resp_hetero(i)=dilu_resp_hetero(i)+delta_veg(j)*resp_hetero(i,j)/delta_veg_sum |
---|
293 | dilu_resp_hetero_litter(i)=dilu_resp_hetero_litter(i)+delta_veg(j)*resp_hetero_litter(i,j)/delta_veg_sum |
---|
294 | dilu_resp_hetero_soil(i)=dilu_resp_hetero_soil(i)+delta_veg(j)*resp_hetero_soil(i,j)/delta_veg_sum |
---|
295 | dilu_co2_to_bm(i)=dilu_co2_to_bm(i)+delta_veg(j)*co2_to_bm(i,j)/delta_veg_sum |
---|
296 | dilu_co2_fire(i)=dilu_co2_fire(i)+delta_veg(j)*co2_fire(i,j)/delta_veg_sum |
---|
297 | ENDIF |
---|
298 | ENDDO ! loop over PFTs |
---|
299 | |
---|
300 | DO j=1, nvm ! loop over PFTs |
---|
301 | IF ( delta_veg(j) > min_stomate) THEN |
---|
302 | |
---|
303 | ! Dilution of reservoirs |
---|
304 | ! Recalculate the litter and soil carbon with taking into accout the change in |
---|
305 | ! veget_cov_max (delta_veg) |
---|
306 | ! Litter |
---|
307 | ! Lignin fraction of structural litter |
---|
308 | lignin_struc(i,j,:)=(lignin_struc(i,j,:) * veget_cov_max_old(i,j)* litter(i,istructural,j,:,icarbon) + & |
---|
309 | dilu_lf_struc(i,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
310 | |
---|
311 | ! Lignin fraction of woody litter |
---|
312 | lignin_wood(i,j,:)=(lignin_wood(i,j,:) * veget_cov_max_old(i,j)* litter(i,iwoody,j,:,icarbon) + & |
---|
313 | dilu_lf_wood(i,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
314 | |
---|
315 | litter(i,:,j,:,:)=(litter(i,:,j,:,:) * veget_cov_max_old(i,j) + dilu_lit(i,:,:,:) * delta_veg(j)) & |
---|
316 | / veget_cov_max(i,j) |
---|
317 | |
---|
318 | WHERE ( litter(i,istructural,j,:,icarbon) > min_stomate ) |
---|
319 | lignin_struc(i,j,:) = lignin_struc(i,j,:)/litter(i,istructural,j,:,icarbon) |
---|
320 | ELSEWHERE |
---|
321 | lignin_struc(i,j,:) = LC_leaf(j) |
---|
322 | ENDWHERE |
---|
323 | |
---|
324 | WHERE ( litter(i,iwoody,j,:,icarbon) > min_stomate ) |
---|
325 | lignin_wood(i,j,:) = lignin_struc(i,j,:)/litter(i,iwoody,j,:,icarbon) |
---|
326 | ELSEWHERE |
---|
327 | lignin_wood(i,j,:) = LC_heartabove(j) |
---|
328 | ENDWHERE |
---|
329 | |
---|
330 | ! Soil carbon |
---|
331 | som(i,:,j,:)=(som(i,:,j,:) * veget_cov_max_old(i,j) + dilu_som(i,:,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
332 | ! BG: Here only done for carbon but I keep as much as possible the possibility to do it with N |
---|
333 | IF ( ok_soil_carbon_discretization ) THEN |
---|
334 | deepSOM_a(i,:,j,:)=(deepSOM_a(i,:,j,:) * veget_cov_max_old(i,j) + & |
---|
335 | dilu_deepSOM_a(i,:,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
336 | deepSOM_s(i,:,j,:)=(deepSOM_s(i,:,j,:) * veget_cov_max_old(i,j) + & |
---|
337 | dilu_deepSOM_s(i,:,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
338 | deepSOM_p(i,:,j,:)=(deepSOM_p(i,:,j,:) * veget_cov_max_old(i,j) + & |
---|
339 | dilu_deepSOM_p(i,:,:) * delta_veg(j)) / veget_cov_max(i,j) |
---|
340 | ENDIF |
---|
341 | |
---|
342 | ! Soil inorganic nitrogen |
---|
343 | soil_n_min(i,j,:)=(soil_n_min(i,j,:) * veget_cov_max_old(i,j) + dilu_sin(i,:) & |
---|
344 | * delta_veg(j)) / veget_cov_max(i,j) |
---|
345 | TCarbon(i,j)=(TCarbon(i,j) * veget_cov_max_old(i,j) + dilu_TCarbon(i) * delta_veg(j)) / veget_cov_max(i,j) |
---|
346 | turnover_daily(i,j,:,:)=(turnover_daily(i,j,:,:)*veget_cov_max_old(i,j)+& |
---|
347 | dilu_turnover_daily(i,:,:)*delta_veg(j))/veget_cov_max(i,j) |
---|
348 | bm_to_litter(i,j,:,:)=(bm_to_litter(i,j,:,:)*veget_cov_max_old(i,j)+& |
---|
349 | dilu_bm_to_litter(i,:,:)*delta_veg(j))/veget_cov_max(i,j) |
---|
350 | co2flux_new(i,j)=(co2flux_old(i,j)*veget_cov_max_old(i,j)+dilu_co2flux_new(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
351 | gpp_daily(i,j)=(gpp_daily(i,j)*veget_cov_max_old(i,j)+dilu_gpp_daily(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
352 | resp_growth(i,j)=(resp_growth(i,j)*veget_cov_max_old(i,j)+dilu_resp_growth(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
353 | resp_excess(i,j)=(resp_excess(i,j)*veget_cov_max_old(i,j)+dilu_resp_excess(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
354 | resp_maint(i,j)=(resp_maint(i,j)*veget_cov_max_old(i,j)+dilu_resp_maint(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
355 | resp_hetero(i,j)=(resp_hetero(i,j)*veget_cov_max_old(i,j)+dilu_resp_hetero(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
356 | resp_hetero_litter(i,j)=(resp_hetero_litter(i,j)*veget_cov_max_old(i,j)+ & |
---|
357 | dilu_resp_hetero_litter(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
358 | resp_hetero_soil(i,j)=(resp_hetero_soil(i,j)*veget_cov_max_old(i,j)+ & |
---|
359 | dilu_resp_hetero_soil(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
360 | co2_to_bm(i,j)=(co2_to_bm(i,j)*veget_cov_max_old(i,j)+dilu_co2_to_bm(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
361 | co2_fire(i,j)=(co2_fire(i,j)*veget_cov_max_old(i,j)+dilu_co2_fire(i)*delta_veg(j))/veget_cov_max(i,j) |
---|
362 | ENDIF |
---|
363 | |
---|
364 | IF(veget_cov_max(i,j).GT.min_stomate) THEN |
---|
365 | |
---|
366 | ! Correct biomass densities to conserve mass |
---|
367 | ! since it's defined on veget_cov_max |
---|
368 | biomass(i,j,:,:) = biomass(i,j,:,:) * veget_cov_max_old(i,j) / veget_cov_max(i,j) |
---|
369 | |
---|
370 | ENDIF |
---|
371 | |
---|
372 | ENDDO ! loop over PFTs |
---|
373 | ENDDO ! loop over grid points |
---|
374 | |
---|
375 | vartmp(:)=SUM(gpp_daily*veget_cov_max,dim=2) |
---|
376 | CALL histwrite_p (hist_id_stomate, "tGPP", itime, vartmp, npts, hori_index) |
---|
377 | vartmp(:)=SUM(resp_growth*veget_cov_max,dim=2) |
---|
378 | CALL histwrite_p (hist_id_stomate, "tRESP_GROWTH", itime, vartmp, npts, hori_index) |
---|
379 | vartmp(:)=SUM(resp_excess*veget_cov_max,dim=2) |
---|
380 | CALL histwrite_p (hist_id_stomate, "tRESP_EXCESS", itime, vartmp, npts, hori_index) |
---|
381 | vartmp(:)=SUM(resp_maint*veget_cov_max,dim=2) |
---|
382 | CALL histwrite_p (hist_id_stomate, "tRESP_MAINT", itime, vartmp, npts, hori_index) |
---|
383 | vartmp(:)=SUM(resp_hetero*veget_cov_max,dim=2) |
---|
384 | CALL histwrite_p (hist_id_stomate, "tRESP_HETERO", itime, vartmp, npts, hori_index) |
---|
385 | vartmp(:)=SUM(co2_to_bm*veget_cov_max,dim=2) |
---|
386 | CALL histwrite_p (hist_id_stomate, "tCO2_TAKEN", itime, vartmp, npts, hori_index) |
---|
387 | vartmp(:)=SUM(co2_fire*veget_cov_max,dim=2) |
---|
388 | CALL histwrite_p (hist_id_stomate, "tCO2_FIRE", itime, vartmp, npts, hori_index) |
---|
389 | vartmp(:)=SUM(co2flux_new*veget_cov_max,dim=2) |
---|
390 | CALL histwrite_p (hist_id_stomate, "tCO2FLUX", itime, vartmp, npts, hori_index) |
---|
391 | vartmp(:)=SUM(co2flux_old*veget_cov_max_old,dim=2) |
---|
392 | CALL histwrite_p (hist_id_stomate, "tCO2FLUX_OLD", itime, vartmp, npts, hori_index) |
---|
393 | vartmp(:)=SUM(TCarbon*veget_cov_max,dim=2) |
---|
394 | CALL histwrite_p (hist_id_stomate, "tCARBON", itime, vartmp, npts, hori_index) |
---|
395 | vartmp(:)=SUM(SUM(biomass(:,:,:,icarbon),dim=3)*veget_cov_max,dim=2) |
---|
396 | CALL histwrite_p (hist_id_stomate, "tBIOMASS", itime, vartmp, npts, hori_index) |
---|
397 | vartmp(:)=SUM(SUM(SUM(litter(:,:,:,:,icarbon),dim=4),dim=2)*veget_cov_max,dim=2) |
---|
398 | CALL histwrite_p (hist_id_stomate, "tLITTER", itime, vartmp, npts, hori_index) |
---|
399 | vartmp(:)=SUM(SUM(som(:,:,:,icarbon),dim=2)*veget_cov_max,dim=2) |
---|
400 | CALL histwrite_p (hist_id_stomate, "tSOILC", itime, vartmp, npts, hori_index) |
---|
401 | |
---|
402 | IF ( ok_soil_carbon_discretization ) THEN |
---|
403 | vartmp(:)=SUM(SUM(deepSOM_a(:,:,:,icarbon),dim=2)*veget_cov_max,dim=2) |
---|
404 | CALL histwrite_p (hist_id_stomate, "tDEEPCa", itime, vartmp, npts, hori_index) |
---|
405 | vartmp(:)=SUM(SUM(deepSOM_s(:,:,:,icarbon),dim=2)*veget_cov_max,dim=2) |
---|
406 | CALL histwrite_p (hist_id_stomate, "tDEEPCs", itime, vartmp, npts, hori_index) |
---|
407 | vartmp(:)=SUM(SUM(deepSOM_p(:,:,:,icarbon),dim=2)*veget_cov_max,dim=2) |
---|
408 | CALL histwrite_p (hist_id_stomate, "tDEEPCp", itime, vartmp, npts, hori_index) |
---|
409 | vartmp(:)=SUM(SUM(deepSOM_a(:,:,:,initrogen),dim=2)*veget_cov_max,dim=2) |
---|
410 | CALL histwrite_p (hist_id_stomate, "tDEEPNa", itime, vartmp, npts, hori_index) |
---|
411 | vartmp(:)=SUM(SUM(deepSOM_s(:,:,:,initrogen),dim=2)*veget_cov_max,dim=2) |
---|
412 | CALL histwrite_p (hist_id_stomate, "tDEEPNs", itime, vartmp, npts, hori_index) |
---|
413 | vartmp(:)=SUM(SUM(deepSOM_p(:,:,:,initrogen),dim=2)*veget_cov_max,dim=2) |
---|
414 | CALL histwrite_p (hist_id_stomate, "tDEEPNp", itime, vartmp, npts, hori_index) |
---|
415 | ENDIF |
---|
416 | |
---|
417 | ENDIF |
---|
418 | |
---|
419 | END SUBROUTINE cover |
---|
420 | |
---|
421 | END MODULE lpj_cover |
---|