source: tags/ORCHIDEE_1_9_5_2/ORCHIDEE/src_stomate/lpj_gap.f90 @ 4639

Last change on this file since 4639 was 222, checked in by martial.mancip, 13 years ago

NVui, NVio, MM : DGVM corrections.
lpj_establish : Add necessary npp_longterm and woodmass_ind in establish interface.
lpj_gap : suppress local variable mortality because it is in interface now.
stomate_lpj : correct some interfaces.

File size: 8.0 KB
Line 
1! gap routine - place for new plants
2!
3! Death rate of trees is estimated by evaluating their vigour (based on npp).
4! For large availabilities, lifetime is 50 years (!?).
5! Age of stands is not considered, although availability death rate should probably
6! depend on age.
7!
8! $Header: /home/ssipsl/CVSREP/ORCHIDEE/src_stomate/lpj_gap.f90,v 1.10 2009/01/06 15:01:25 ssipsl Exp $
9! IPSL (2006)
10!  This software is governed by the CeCILL licence see ORCHIDEE/ORCHIDEE_CeCILL.LIC
11!
12MODULE lpj_gap
13
14  ! modules used:
15
16  USE ioipsl
17  USE stomate_constants
18  USE constantes_veg
19  USE parallel
20
21  IMPLICIT NONE
22
23  ! private & public routines
24
25  PRIVATE
26  PUBLIC gap,gap_clear
27
28  ! first call
29  LOGICAL, SAVE                                           :: firstcall = .TRUE.
30
31CONTAINS
32
33
34  SUBROUTINE gap_clear
35    firstcall = .TRUE.
36  END SUBROUTINE gap_clear
37
38  SUBROUTINE gap (npts, dt, &
39       npp_longterm, turnover_longterm, lm_lastyearmax, &
40       PFTpresent, biomass, ind, bm_to_litter, mortality)
41
42    !
43    ! 0 declarations
44    !
45
46    ! 0.1 input
47
48    ! Domain size
49    INTEGER(i_std), INTENT(in)                                     :: npts
50    ! Time step (days)
51    REAL(r_std), INTENT(in)                                  :: dt
52    ! "long term" net primary productivity (gC/(m**2 of ground)/year)
53    REAL(r_std), DIMENSION(npts,nvm), INTENT(in)            :: npp_longterm
54    ! "long term" turnover rate (gC/(m**2 of ground)/year)
55    REAL(r_std), DIMENSION(npts,nvm,nparts), INTENT(in)     :: turnover_longterm
56    ! last year's maximum leaf mass, for each PFT (gC/(m**2 of ground))
57    REAL(r_std), DIMENSION(npts,nvm), INTENT(in)            :: lm_lastyearmax
58
59    ! 0.2 modified fields
60
61    ! Is pft there
62    LOGICAL, DIMENSION(npts,nvm), INTENT(in)            :: PFTpresent
63    ! biomass (gC/(m**2 of ground))
64    REAL(r_std), DIMENSION(npts,nvm,nparts), INTENT(inout)  :: biomass
65    ! Number of individuals / (m**2 of ground)
66    REAL(r_std), DIMENSION(npts,nvm), INTENT(inout)         :: ind
67    ! biomass taken away (gC/(m**2 of ground))
68    REAL(r_std), DIMENSION(npts,nvm,nparts), INTENT(inout)  :: bm_to_litter
69    ! mortality (fraction of trees that is dying per time step), per day in history file
70    REAL(r_std), DIMENSION(npts,nvm),INTENT(out)             :: mortality
71
72    ! 0.3 local
73
74    ! biomass increase
75    REAL(r_std), DIMENSION(npts)                             :: delta_biomass
76    ! biomass increase
77    REAL(r_std), DIMENSION(npts)                             :: dmortality
78    ! vigour
79    REAL(r_std), DIMENSION(npts)                             :: vigour
80    ! natural availability, based on vigour
81    REAL(r_std), DIMENSION(npts)                             :: availability
82    ! indices
83    INTEGER(i_std)                                           :: j,k,m
84    REAL(r_std) :: ref_greff
85
86    ! =========================================================================
87
88    IF ( firstcall ) THEN
89
90       firstcall = .FALSE.
91
92    ENDIF
93
94    IF (bavard.GE.3) WRITE(numout,*) 'Entering gap',lpj_gap_const_mort
95
96    mortality(:,:) = zero
97
98    ref_greff =  0.035
99
100    DO j = 2,nvm
101
102       ! only trees
103
104       IF ( tree(j) ) THEN
105
106          !
107          ! 1 determine availability
108          !
109
110          IF ( .NOT.  lpj_gap_const_mort  ) THEN
111
112             !
113             ! 1.1 original formulation: mortality depends on vigour
114             !
115
116             WHERE ( PFTpresent(:,j) .AND. ( lm_lastyearmax(:,j) .GT. min_stomate ) )
117
118!SZ 080806, changed to LPJ formulation according to Smith et al., 2001
119
120                ! how much did the tree grow per year?
121
122!!$                delta_biomass(:) = &
123!!$                     MAX( npp_longterm(:,j) - ( turnover_longterm(:,j,ileaf) + &
124!!$                     turnover_longterm(:,j,iroot) + turnover_longterm(:,j,ifruit) ), &
125!!$                     0._r_std )
126
127            ! note that npp_longterm is now actually longterm growth efficiency (NPP/LAI)
128            ! to be fair to deciduous trees
129             delta_biomass(:) = MAX( npp_longterm(:,j) - ( turnover_longterm(:,j,ileaf) + &
130                  turnover_longterm(:,j,iroot) + turnover_longterm(:,j,ifruit) + & 
131                  turnover_longterm(:,j,isapabove) + turnover_longterm(:,j,isapbelow) ) ,zero)
132
133                ! scale this to the leaf surface of the tree
134!!$                vigour(:) = delta_biomass(:) / (lm_lastyearmax(:,j)*sla(j)) / 70.
135             vigour(:) = delta_biomass(:) / (lm_lastyearmax(:,j)*sla(j))
136
137             ELSEWHERE
138
139                vigour(:) = 0.0
140
141             ENDWHERE
142
143             WHERE ( PFTpresent(:,j) )
144
145                ! note that availability is never above 0.02, i.e. lifetime of 50 years when very
146                ! low vigour.
147
148!SZ 080806, changed to LPJ formulation according to Smith et al., 2001
149! tuned maximal mortality to 0.05 to get realistic range of avergage age to get ~100 years at GREFF=100
150! for the range of modelled annual NPP
151!!$                availability(:) = min_avail / ( 1.+vigour(:)/0.17 )
152                availability(:) = 0.1 / ( 1.+ref_greff*vigour(:) )
153
154                ! Mortality (fraction per time step).
155                ! In the original DGVM, mortality was set to zero if there was strong fire
156                ! perturbation.
157                ! This has been de-activated since the npp is not influenced by fire,
158                ! as opposed to the original DGVM. Instead, mortality is simply
159                ! equal to the availability, modulated by the time step.
160                ! Exact formulation: mor = 1. - ( 1. - availability ) ** (dt/one_year)
161                ! approximation ok as availability < 0.02 << 1
162
163                mortality(:,j) = MAX(min_avail,availability(:))  * dt/one_year 
164!!$                mortality(:,j) = availability(:) * dt/one_year
165               
166             ENDWHERE
167
168          ELSE
169
170             !
171             ! 1.2 Alternative version: Constant mortality
172             !
173
174             WHERE ( PFTpresent(:,j) )
175
176                mortality(:,j) = dt/(residence_time(j)*one_year)
177
178             ENDWHERE
179
180          ENDIF
181
182          !
183          ! 2 Special for the DGVM:
184          !   mortality is one if npp is zero or negative.
185          !
186
187          IF ( control%ok_dgvm ) THEN
188
189             WHERE ( PFTpresent(:,j) .AND. ( npp_longterm(:,j) .LE. min_stomate ) )
190
191                mortality(:,j) = 1.
192
193             ENDWHERE
194
195          ENDIF
196
197          !
198          ! 3 update biomass, create litter
199          !
200
201          DO k = 1, nparts
202
203             WHERE ( PFTpresent(:,j) )
204
205                dmortality(:) =  mortality(:,j) * biomass(:,j,k)
206                bm_to_litter(:,j,k) = bm_to_litter(:,j,k) + dmortality(:)
207               
208                biomass(:,j,k) = biomass(:,j,k) - dmortality(:)
209
210             ENDWHERE
211
212          ENDDO
213
214          !
215          ! 4 update number of individuals
216          !
217
218!SZ 080806, allow changing density in static case when mortality is dynamic
219          IF ( control%ok_dgvm .OR. .NOT.lpj_gap_const_mort) THEN
220
221             WHERE ( PFTpresent(:,j) )
222
223                ind(:,j) = ind(:,j) * ( un - mortality(:,j) )
224
225             ENDWHERE
226
227          ENDIF
228       ELSE
229
230          IF ( .NOT.control%ok_dgvm .AND. .NOT.lpj_gap_const_mort) THEN
231
232             WHERE ( PFTpresent(:,j) .AND. ( npp_longterm(:,j) .LE. 10. ) )
233
234                mortality(:,j) = 1.
235
236             ENDWHERE
237             DO k = 1, nparts
238
239                WHERE ( PFTpresent(:,j) )
240
241                   dmortality(:) =  mortality(:,j) * biomass(:,j,k)
242                   
243                   bm_to_litter(:,j,k) = bm_to_litter(:,j,k) + dmortality(:)
244                   
245                   biomass(:,j,k) = biomass(:,j,k) - dmortality(:)
246
247                ENDWHERE
248             ENDDO
249             
250          ENDIF
251         
252       ENDIF       ! only trees
253
254    ENDDO         ! loop over pfts
255
256    !
257    ! 5 history
258    !
259
260    ! output in fraction of trees that dies/day.
261    ! exact formulation: 1. - ( 1. - mortality ) ** (1./dt)
262    mortality = mortality / dt
263
264    CALL histwrite (hist_id_stomate, 'MORTALITY', itime, &
265         mortality, npts*nvm, horipft_index)
266
267    IF (bavard.GE.4) WRITE(numout,*) 'Leaving gap'
268
269  END SUBROUTINE gap
270
271END MODULE lpj_gap
Note: See TracBrowser for help on using the repository browser.