SUEWS API Site
Documentation of SUEWS source code
Functions/Subroutines
co2_module Module Reference

Functions/Subroutines

subroutine co2_biogen (alpha_bioCO2, alpha_enh_bioCO2, avkdn, beta_bioCO2, beta_enh_bioCO2, BSoilSurf, ConifSurf, DecidSurf, dectime, EmissionsMethod, gfunc, gfunc2, GrassSurf, gsmodel, id, it, ivConif, ivDecid, ivGrass, LAI_id, LAIMin, LAIMax, min_res_bioCO2, nsurf, NVegSurf, resp_a, resp_b, sfr, SnowFrac, t2, Temp_C, theta_bioCO2, Fc_biogen, Fc_photo, Fc_respi)
 

Function/Subroutine Documentation

◆ co2_biogen()

subroutine co2_module::co2_biogen ( real(kind(1d0)), dimension(nvegsurf), intent(in)  alpha_bioCO2,
real(kind(1d0)), dimension(nvegsurf), intent(in)  alpha_enh_bioCO2,
real(kind(1d0)), intent(in)  avkdn,
real(kind(1d0)), dimension(nvegsurf), intent(in)  beta_bioCO2,
real(kind(1d0)), dimension(nvegsurf), intent(in)  beta_enh_bioCO2,
integer, intent(in)  BSoilSurf,
integer, intent(in)  ConifSurf,
integer, intent(in)  DecidSurf,
real(kind(1d0)), intent(in)  dectime,
integer, intent(in)  EmissionsMethod,
real(kind(1d0)), intent(in)  gfunc,
real(kind(1d0)), intent(in)  gfunc2,
integer, intent(in)  GrassSurf,
integer, intent(in)  gsmodel,
integer, intent(in)  id,
integer, intent(in)  it,
integer, intent(in)  ivConif,
integer, intent(in)  ivDecid,
integer, intent(in)  ivGrass,
real(kind(1d0)), dimension(nvegsurf), intent(in)  LAI_id,
real(kind(1d0)), dimension(nvegsurf), intent(in)  LAIMin,
real(kind(1d0)), dimension(nvegsurf), intent(in)  LAIMax,
real(kind(1d0)), dimension(nvegsurf), intent(in)  min_res_bioCO2,
integer, intent(in)  nsurf,
integer, intent(in)  NVegSurf,
real(kind(1d0)), dimension(nvegsurf), intent(in)  resp_a,
real(kind(1d0)), dimension(nvegsurf), intent(in)  resp_b,
real(kind(1d0)), dimension(nsurf), intent(in)  sfr,
real(kind(1d0)), dimension(nsurf), intent(in)  SnowFrac,
real(kind(1d0)), intent(in)  t2,
real(kind(1d0)), intent(in)  Temp_C,
real(kind(1d0)), dimension(nvegsurf), intent(in)  theta_bioCO2,
real(kind(1d0)), intent(out)  Fc_biogen,
real(kind(1d0)), intent(out)  Fc_photo,
real(kind(1d0)), intent(out)  Fc_respi 
)

Definition at line 39 of file suews_phys_biogenco2.f95.

Referenced by suews_driver::suews_cal_biogenco2().

39 
40  IMPLICIT NONE
41 
42  INTEGER, INTENT(in):: &
45 
46  REAL(KIND(1d0)), INTENT(in):: &
47  avkdn, &
48  dectime, &
49  gfunc, &
50  gfunc2, &
51  temp_c, &
52  t2
53 
54  REAL(KIND(1d0)), DIMENSION(nsurf), INTENT(in):: &
55  sfr, & !Surface fractions [-]
56  snowfrac
57 
58  REAL(KIND(1d0)), DIMENSION(nvegsurf), INTENT(in):: &
59  laimin, laimax, & ! [m2 m-2]
60  alpha_bioco2, &
61  beta_bioco2, &
62  theta_bioco2, &
65  resp_a, &
66  resp_b, &
68  lai_id
69 
70  REAL(KIND(1D0)), INTENT(out):: &
71  fc_biogen, &
73 
74  INTEGER:: iv ! counter
75 
76  REAL(KIND(1d0)):: &
77  par_umolm2s1, &
78  bellucco2017_pho, & ! Photosynthesis (Bellucco et al. 2016)
79  bellucco2017_res, & ! Respiration (Bellucco et al. 2016)
80  bellucco2017_res_surf, &! Respiration for each vegetated surface
81  vegfracsum ! Sum of vegetation fractions without water. Could be moved elsewhere later.
82 
83  REAL(KIND(1d0)), DIMENSION(nvegsurf):: &
84  active_veg_fr, & ! Active vegetation fraction
85  active_veg_fr0, & ! Active vegetation fraction without LAI
86  fc_photo_surf, & ! Photosynthesis for each vegetated surface
87  bellucco2017_pho_surf, & ! Photosynthesis for each vegetated surface
88  alpha_bioco2_v2, &
89  beta_bioco2_v2, &
90  theta_bioco2_v2
91 
92  REAL(KIND(1d0)), PARAMETER :: &
93  jtoumolpar = 4.6, &
94  kdntopar = 0.46
95 
96  !-----------------------------------------------------------------------
97  ! Calculate PAR from Kdown ----------------------------------
98  par_umolm2s1 = jtoumolpar*kdntopar*avkdn
99  vegfracsum = sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf)
100 
101  ! Calculate active vegetation surface -----------------------
102  !Now this is zero always when LAI in its minimum values. This needs to vary between the summer time maximum and some minimum value
103  !especially in the case of evergreen trees (i.e. in early March LAI can be in its minimum value, but air temperature and radiation
104  !such that uptake can take place)
105  DO iv = ivconif, ivgrass !For vegetated surfaces. Snow included although quite often LAI will be in its minimum when snow on ground
106 
107  active_veg_fr(iv) = (sfr(iv + 2)*(1 - snowfrac(iv + 2)))*(lai_id(iv)/laimax(iv))
108  active_veg_fr0(iv) = (sfr(iv + 2)*(1 - snowfrac(iv + 2)))*lai_id(iv)
109 
110  ENDDO
111 
112  IF (emissionsmethod >= 11 .AND. emissionsmethod <= 16) THEN ! Rectangular hyperbola
113  ! Calculate carbon uptake due to photosynthesis -------------
114  fc_photo = 0
115  DO iv = ivconif, ivgrass
116  fc_photo_surf(iv) = -beta_bioco2(iv)*alpha_bioco2(iv)*par_umolm2s1/(alpha_bioco2(iv)*par_umolm2s1 + beta_bioco2(iv))
117  ! For active vegetation fraction only
118  fc_photo = fc_photo + fc_photo_surf(iv)*active_veg_fr(iv) !umol m-2 s-1
119  ENDDO
120 
121  ELSEIF (emissionsmethod >= 21 .AND. emissionsmethod <= 26) THEN !Local model, Bellucco et al. (2017)
122  ! Calculate carbon uptake due to photosynthesis -------------
123  bellucco2017_pho = 0
124  DO iv = ivconif, ivgrass
125  bellucco2017_pho_surf(iv) = -(1/(2*theta_bioco2(iv)) &
126  *(alpha_bioco2(iv)*par_umolm2s1 + beta_bioco2(iv) &
127  - sqrt((alpha_bioco2(iv)*par_umolm2s1 + beta_bioco2(iv))**2 &
128  - 4*alpha_bioco2(iv)*beta_bioco2(iv)*theta_bioco2(iv)*par_umolm2s1)))
129 
130  ! For active vegetation fraction only
131  bellucco2017_pho = bellucco2017_pho + bellucco2017_pho_surf(iv)*active_veg_fr(iv)
132  ENDDO
133  fc_photo = bellucco2017_pho
134 
135  ELSEIF (emissionsmethod >= 31 .AND. emissionsmethod <= 36) THEN !General model, Bellucco et al. (2017)
136  ! Not currently recommended as includes also some anthropogenic impacts. Should maybe be separate from other biogen choices?
137  ! Alpha and beta calculated as a function of vegetation cover fraction
138 
139  !Different alpha, beta and theta vegetation cover values should be same in BiogenCO2Method = 3.
143 
144  !Because different alpha, beta and theta values are same - only one vegetation type is needed.
145  alpha_bioco2_v2(ivconif) = alpha_bioco2(ivconif) + alpha_enh_bioco2(ivconif)* &
146  (sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf) + sfr(bsoilsurf)) !umol CO2 umol photons-1
147  beta_bioco2_v2(ivconif) = -beta_bioco2(ivconif) + beta_enh_bioco2(ivconif)* &
148  (sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf) + sfr(bsoilsurf)) !umol m^-2 s^-1
149 
150  !Photosynthesis
151  bellucco2017_pho = -(1/(2*theta_bioco2(ivconif)) &
152  *(alpha_bioco2_v2(ivconif)*par_umolm2s1 &
153  + beta_bioco2_v2(ivconif) &
154  - sqrt((alpha_bioco2_v2(ivconif)*par_umolm2s1 + beta_bioco2_v2(ivconif))**2 - 4* &
155  alpha_bioco2_v2(ivconif)*beta_bioco2_v2(ivconif)*theta_bioco2(ivconif)*par_umolm2s1)))
156 
157  ELSE !If values are not same, then weighted average is calculated.
158  ! CALL ErrorHint(74, 'Check values in SUEWS_BiogenCO2.txt: ', notUsed, notUsed, notUsedI)
159 
160  ! Weighted averages
161  alpha_bioco2_v2(ivconif) = (alpha_bioco2(ivconif)*sfr(conifsurf)/vegfracsum + &
162  alpha_bioco2(ivdecid)*sfr(decidsurf)/vegfracsum &
163  + alpha_bioco2(ivgrass)*sfr(grasssurf)/vegfracsum) &
165  beta_bioco2_v2(ivconif) = (beta_bioco2(ivconif)*sfr(conifsurf)/vegfracsum + &
166  beta_bioco2(ivdecid)*sfr(decidsurf)/vegfracsum &
167  + beta_bioco2(ivgrass)*sfr(grasssurf)/vegfracsum) &
169  theta_bioco2_v2(ivconif) = (theta_bioco2(ivconif)*sfr(conifsurf)/vegfracsum + &
170  theta_bioco2(ivdecid)*sfr(decidsurf)/vegfracsum &
171  + theta_bioco2(ivgrass)*sfr(grasssurf)/vegfracsum) &
173 
174  ! Using weighted average values to calculate alpha and beta as a function of vegetation cover fraction
175  alpha_bioco2_v2(ivconif) = alpha_bioco2_v2(ivconif) + alpha_enh_bioco2(ivconif)* &
176  (sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf) + sfr(bsoilsurf)) !umol CO2 umol photons-1
177  beta_bioco2_v2(ivconif) = -beta_bioco2_v2(ivconif) + beta_enh_bioco2(ivconif)* &
178  (sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf) + sfr(bsoilsurf)) !umol m^-2 s^-1
179 
180  !Photosynthesis
181  bellucco2017_pho = -(1/(2*theta_bioco2_v2(ivconif))*( &
182  alpha_bioco2_v2(ivconif)*par_umolm2s1 + beta_bioco2_v2(ivconif) &
183  - sqrt((alpha_bioco2_v2(ivconif)*par_umolm2s1 + beta_bioco2_v2(ivconif))**2 &
184  - 4*alpha_bioco2_v2(ivconif)*beta_bioco2_v2(ivconif)*theta_bioco2_v2(ivconif) &
185  *par_umolm2s1)))
186 
187  ENDIF
188  ! Calculate carbon uptake due to photosynthesis -------------
189  fc_photo = bellucco2017_pho*active_veg_fr(conifsurf - 2) + &
190  bellucco2017_pho*active_veg_fr(decidsurf - 2) + &
191  bellucco2017_pho*active_veg_fr(grasssurf - 2)
192 
193  ELSEIF (emissionsmethod >= 41 .AND. emissionsmethod <= 46) THEN ! Conductance parameters
194  !Dependance to incoming shortwave radiation, specific humidity deficit, air temperature and soil moisture deficit
195  fc_photo = 0
196  DO iv = ivconif, ivgrass
197  fc_photo = fc_photo + active_veg_fr0(iv)*beta_bioco2(iv)
198  ENDDO
199 
200  IF (gsmodel == 1 .OR. gsmodel == 2) THEN !With air temperature
201  fc_photo = -fc_photo*gfunc
202  ELSEIF (gsmodel == 3 .OR. gsmodel == 4) THEN !With modelled 2 meter temperature
203  fc_photo = -fc_photo*gfunc2
204  ENDIF
205 
206  ENDIF
207 
208  ! Calculate carbon emissions due to respiration -------------
209  bellucco2017_res = 0.0
210  bellucco2017_res_surf = 0.0
211  IF (vegfracsum > 0.01) THEN
212  DO iv = ivconif, ivgrass
213  IF (sfr(2 + iv) > 0.005) THEN
214  IF (gsmodel == 1 .OR. gsmodel == 2) THEN !With air temperature
215  bellucco2017_res_surf = max(min_res_bioco2(iv), resp_a(iv)*exp(resp_b(iv)*temp_c))
216  ELSEIF (gsmodel == 3 .OR. gsmodel == 4) THEN !With modelled 2 meter temperature
217  bellucco2017_res_surf = max(min_res_bioco2(iv), resp_a(iv)*exp(resp_b(iv)*t2))
218  ENDIF
219  ! Only for vegetation fraction
220  bellucco2017_res = bellucco2017_res + bellucco2017_res_surf*sfr(2 + iv)/vegfracsum
221  ENDIF
222  ENDDO
223  ENDIF
224  fc_respi = bellucco2017_res*(sfr(conifsurf) + sfr(decidsurf) + sfr(grasssurf) + sfr(bsoilsurf))
225  ! Combine to find biogenic CO2 flux
227 
228  RETURN
229 
real(kind(1d0)), dimension(nvegsurf) theta_bioco2
integer gsmodel
integer, parameter ivgrass
real(kind(1d0)), dimension(nvegsurf) laimax
integer, parameter bsoilsurf
real(kind(1d0)) temp_c
real(kind(1d0)) fc_biogen
real(kind(1d0)), dimension(nvegsurf) alpha_enh_bioco2
real(kind(1d0)), dimension(nvegsurf) alpha_bioco2
integer, parameter nsurf
real(kind(1d0)) fc_photo
real(kind(1d0)), dimension(nvegsurf) resp_a
integer emissionsmethod
integer, parameter conifsurf
integer id
real(kind(1d0)) fc_respi
real(kind(1d0)), dimension(nvegsurf) resp_b
real(kind(1d0)) avkdn
integer, parameter grasssurf
real(kind(1d0)), dimension(nsurf) snowfrac
integer, parameter ivconif
real(kind(1d0)), dimension(nvegsurf) laimin
integer, parameter nvegsurf
real(kind(1d0)), dimension(nvegsurf) lai_id
real(kind(1d0)), dimension(nsurf) sfr
real(kind(1d0)), dimension(nvegsurf) min_res_bioco2
integer it
integer, parameter decidsurf
real(kind(1d0)) dectime
real(kind(1d0)), dimension(nvegsurf) beta_enh_bioco2
real(kind(1d0)), dimension(nvegsurf) beta_bioco2
integer, parameter ivdecid
Here is the caller graph for this function: