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

Functions/Subroutines

subroutine anthropogenicemissions (CO2PointSource, EmissionsMethod, it, imin, DLS, DayofWeek_id, EF_umolCO2perJ, FcEF_v_kgkm, EnEF_v_Jkm, TrafficUnits, FrFossilFuel_Heat, FrFossilFuel_NonHeat, MinFCMetab, MaxFCMetab, MinQFMetab, MaxQFMetab, PopDensDaytime, PopDensNighttime, Temp_C, HDD_id, Qf_A, Qf_B, Qf_C, AH_MIN, AH_SLOPE_Heating, AH_SLOPE_Cooling, BaseT_Heating, BaseT_Cooling, TrafficRate, QF0_BEU, QF_SAHP, Fc_anthro, Fc_metab, Fc_traff, Fc_build, Fc_point, AHProf_24hr, HumActivity_24hr, TraffProf_24hr, PopProf_24hr, SurfaceArea)
 

Function/Subroutine Documentation

◆ anthropogenicemissions()

subroutine anemsn_module::anthropogenicemissions ( real(kind(1d0)), intent(in)  CO2PointSource,
integer, intent(in)  EmissionsMethod,
integer, intent(in)  it,
integer, intent(in)  imin,
integer, intent(in)  DLS,
integer, dimension(3), intent(in)  DayofWeek_id,
real(kind(1d0)), intent(in)  EF_umolCO2perJ,
real(kind(1d0)), dimension(2), intent(in)  FcEF_v_kgkm,
real(kind(1d0)), intent(in)  EnEF_v_Jkm,
real(kind(1d0)), intent(in)  TrafficUnits,
real(kind(1d0)), intent(in)  FrFossilFuel_Heat,
real(kind(1d0)), intent(in)  FrFossilFuel_NonHeat,
real(kind(1d0)), intent(in)  MinFCMetab,
real(kind(1d0)), intent(in)  MaxFCMetab,
real(kind(1d0)), intent(in)  MinQFMetab,
real(kind(1d0)), intent(in)  MaxQFMetab,
real(kind(1d0)), dimension(2), intent(in)  PopDensDaytime,
real(kind(1d0)), intent(in)  PopDensNighttime,
real(kind(1d0)), intent(in)  Temp_C,
real(kind(1d0)), dimension(12), intent(in)  HDD_id,
real(kind(1d0)), dimension(2), intent(in)  Qf_A,
real(kind(1d0)), dimension(2), intent(in)  Qf_B,
real(kind(1d0)), dimension(2), intent(in)  Qf_C,
real(kind(1d0)), dimension(2), intent(in)  AH_MIN,
real(kind(1d0)), dimension(2), intent(in)  AH_SLOPE_Heating,
real(kind(1d0)), dimension(2), intent(in)  AH_SLOPE_Cooling,
real(kind(1d0)), dimension(2), intent(in)  BaseT_Heating,
real(kind(1d0)), dimension(2), intent(in)  BaseT_Cooling,
real(kind(1d0)), dimension(2), intent(in)  TrafficRate,
real(kind(1d0)), dimension(2), intent(in)  QF0_BEU,
real(kind(1d0)), intent(out)  QF_SAHP,
real(kind(1d0)), intent(out)  Fc_anthro,
real(kind(1d0)), intent(out)  Fc_metab,
real(kind(1d0)), intent(out)  Fc_traff,
real(kind(1d0)), intent(out)  Fc_build,
real(kind(1d0)), intent(out)  Fc_point,
real(kind(1d0)), dimension(0:23, 2), intent(in)  AHProf_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in)  HumActivity_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in)  TraffProf_24hr,
real(kind(1d0)), dimension(0:23, 2), intent(in)  PopProf_24hr,
real(kind(1d0)), intent(in)  SurfaceArea 
)

Definition at line 43 of file suews_phys_anemsn.f95.

References errorhint().

Referenced by suews_driver::suews_cal_anthropogenicemission().

43 
44  ! Simple anthropogenic heat parameterisation and co2 calculation
45  ! Calculates QF_SAHP and Fc_anthro
46 
47  IMPLICIT NONE
48 
49  INTEGER, INTENT(in):: &
51  it, & !Hour
52  imin, & !Minutes
53  dls !day lightsavings =1+1h=0
54 
55  INTEGER, DIMENSION(3), INTENT(in)::dayofweek_id !1 - day of week; 2 - month; 3 - season
56 
57  REAL(KIND(1d0)), DIMENSION(12), INTENT(in):: hdd_id !Heating Degree Days (see SUEWS_DailyState.f95)
58 
59  REAL(KIND(1d0)), DIMENSION(2), INTENT(in):: &
60  qf_a, qf_b, qf_c, & !Qf coefficients
61  ah_min, & !Minimum anthropogenic heat flux
62  ah_slope_heating, & !Slope of the anthropogenic heat flux calculation
64  fcef_v_kgkm, & !CO2 Emission factor
65  popdensdaytime, & !Daytime population density [ha-1] (i.e. workers)
66  baset_heating, & !Critical temperature
67  baset_cooling, & !Critical cooling temperature
68  trafficrate, & !Traffic rate
69  qf0_beu
70 
71  REAL(KIND(1d0)), DIMENSION(0:23, 2), INTENT(in):: ahprof_24hr
72  REAL(KIND(1d0)), DIMENSION(0:23, 2), INTENT(in):: humactivity_24hr
73  REAL(KIND(1d0)), DIMENSION(0:23, 2), INTENT(in):: traffprof_24hr
74  REAL(KIND(1d0)), DIMENSION(0:23, 2), INTENT(in):: popprof_24hr
75 
76  REAL(KIND(1D0)), INTENT(in):: &
77  co2pointsource, & !Point source [kgC day-1]
79  enef_v_jkm, & !Energy Emission factor
80  trafficunits, & !Traffic Units choice
81  frfossilfuel_heat, & !Fraction of Fossil Fuel heat
82  frfossilfuel_nonheat, &!Fraction of Fossil Fuel non heat
83  minfcmetab, & !Minimum FC Metabolism
84  maxfcmetab, & !Maximum FC Metabolism
85  minqfmetab, & !Minimum QF Metabolism
86  maxqfmetab, & !Maximum QF Metabolism
87  popdensnighttime, & !Nighttime population density [ha-1] (i.e. residents)
88  surfacearea, & !Surface area [m-2]
89  temp_c !Air temperature
90 
91  REAL(KIND(1D0)), INTENT(out):: &
92  qf_sahp, &
93  fc_anthro, &
95 
96  INTEGER:: &
97  iu, & !1=weekday OR 2=weekend
98  ih
99 
100  REAL(KIND(1D0)):: &
102  get_prof_spectime_mean, & !external function to get profile value at specified timestamp
103  hdd_daily, & !daily HDD
104  cdd_daily, & !daily HDD
105  tair_avg_daily, & !daily mean air temperature
106  numcapita(2), &
107  dp_x_rhopop, dp_x_rhopop_traff, &
109  qf_sahp_base, & !Anthropogenic heat flux calculated by SAHP (temp independent part)
110  qf_sahp_heating, & !Anthropogenic heat flux calculated by SAHP (heating part only)
111  qf_sahp_cooling, & !AC contribution
112  popdornort, & ! Population
113  actdornort, & ! Human activity
114  traffdornort, & ! Traffic
115  ahdornort ! Anthropogenic heat
116 
117  ! initialisation
118  qf_traff = 0
119  qf_sahp_heating = 0
120  qf_sahp_cooling = 0
121 
122  ! Transfer HDD/CDD values to local explict variables
123  hdd_daily = hdd_id(7)
124  cdd_daily = hdd_id(8)
125  ! NB: temporarily use 5-day running mean to test the performance
126  tair_avg_daily = hdd_id(10)
127 
128  ! Tair_avg_daily= HDD_id_use(3) ! this is daily
129 
130  ! use average of both daytime and nighttime population values
131  ! TS 20 Sep 2019: moved from here to simplify the interface
132  IF (popdensdaytime(1) >= 0 .AND. popdensnighttime >= 0) numcapita(1) = (popdensdaytime(1) + popdensnighttime)/2 !If both, use average
133  IF (popdensdaytime(2) >= 0 .AND. popdensnighttime >= 0) numcapita(2) = (popdensdaytime(2) + popdensnighttime)/2 !If both, use average
134 
135  !NumCapita = (PopDensDaytime + PopDensNighttime)/2
136 
137  !-----------------------------------------------------------------------
138  ! Account for Daylight saving
139  ih = it - dls
140  IF (ih < 0) ih = 23
141 
142  ! Set weekday/weekend counter
143  iu = 1 !Set to 1=weekday
144  IF (dayofweek_id(1) == 1 .OR. dayofweek_id(1) == 7) iu = 2 !Set to 2=weekend
145 
146  ! Calculate energy emissions and CO2 from human metabolism -------------
147  ! Pop dens (cap ha-1 -> cap m-2) x activity level (W cap-1)
148  ! PopDorNorT = PopProf_tstep((NSH*(ih+1-1)+imin*NSH/60+1),iu) ! 1=night, 2=day, 1-2=transition
149  ! ActDorNorT = HumActivity_tstep((NSH*(ih+1-1)+imin*NSH/60+1),iu) ! 1=night, 2=day, 1-2=transition
150  ! TraffDorNorT = TraffProf_tstep((NSH*(ih+1-1)+imin*NSH/60+1),iu) ! normalise so the AVERAGE of the multipliers is equal to 1
151  ! AHDorNorT = AHProf_tstep((NSH*(ih+1-1)+imin*NSH/60+1),iu) ! normalise so the AVERAGE of the multipliers is equal to 1
152  ! PRINT*, ''
153  ! PRINT*, 'AHDorNorT old:',AHDorNorT
154  popdornort = get_prof_spectime_inst(ih, imin, 0, popprof_24hr(:, iu)) ! 1=night, 2=day, 1-2=transition
155  actdornort = get_prof_spectime_inst(ih, imin, 0, humactivity_24hr(:, iu)) ! 1=night, 2=day, 1-2=transition
156  traffdornort = get_prof_spectime_mean(ih, imin, 0, traffprof_24hr(:, iu)) ! normalise so the AVERAGE of the multipliers is equal to 1
157  ahdornort = get_prof_spectime_mean(ih, imin, 0, ahprof_24hr(:, iu)) ! normalise so the AVERAGE of the multipliers is equal to 1
158 
159  ! Diurnal profile times population density [cap ha-1]
160  dp_x_rhopop = ahdornort*numcapita(iu)
161 
162  qf_metab = (popdensnighttime*minqfmetab*((2 - actdornort) + (2 - popdornort))/2 + &
163  popdensdaytime(iu)*maxqfmetab*((actdornort - 1) + (popdornort - 1))/2)/10000 !W m-2
164 
165  fc_metab = (popdensnighttime*minfcmetab*((2 - actdornort) + (2 - popdornort))/2 + &
166  popdensdaytime(iu)*maxfcmetab*((actdornort - 1) + (popdornort - 1))/2)/10000 !umol m-2 s-1
167 
168  !----------------------------------------------------------------------------------------------------
169  !Different methods to calculate the anthopogenic heat and CO2 emissions.
170  !1-3: CO2 emission is calculated from QF which can be calculated with three methods
171  !41-43: CO2 emission is calculated with local information. QF methods are used for housing and human metabolism
172 
173  IF (emissionsmethod == 1 .OR. emissionsmethod == 4 .OR. &
174  emissionsmethod == 11 .OR. emissionsmethod == 14 .OR. &
175  emissionsmethod == 21 .OR. emissionsmethod == 24 .OR. &
176  emissionsmethod == 31 .OR. emissionsmethod == 34 .OR. &
177  emissionsmethod == 41 .OR. emissionsmethod == 44) THEN ! (formerly SAHP_1 subroutine)
178  ! Loridan et al. (2011) JAMC Eq 13: linear relation with air temperature
179  ! Weekday/weekend differences due to profile only
180  ! Now scales with population density
181 
182  IF (temp_c < baset_heating(iu)) THEN
183  ! QF_SAHP = (AH_MIN(iu) + AH_SLOPE_Heating(iu)*(BaseT_Heating(iu) - Temp_C))*AHDorNorT
184  qf_sahp_heating = (ah_slope_heating(iu)*(baset_heating(iu) - temp_c))*ahdornort
185  ELSE
186  qf_sahp_heating = 0
187  ! QF_SAHP = AH_MIN(iu)*AHDorNorT
188  ENDIF
189 
190  ! Need to be checked later, not recommended to use
191  qf_sahp_base = ah_min(iu)*ahdornort ! Temperature-independent contribution
192  qf_sahp_cooling = 0 ! No AC contribution with this method
193 
194  ELSEIF (emissionsmethod == 2 .OR. emissionsmethod == 5 .OR. &
195  emissionsmethod == 12 .OR. emissionsmethod == 15 .OR. &
196  emissionsmethod == 22 .OR. emissionsmethod == 25 .OR. &
197  emissionsmethod == 32 .OR. emissionsmethod == 35 .OR. &
198  emissionsmethod == 42 .OR. emissionsmethod == 45) THEN ! (formerly SAHP_2 subroutine)
199  ! Jarvi et al. (2011) JH Eq 3 using HDD and CDD
200  ! Weekday/weekend differences due to profile and coefficients QF_a,b,c
201  ! Scales with population density
202  ! QF_SAHP = (Qf_a(iu) + Qf_b(iu)*CDD_daily + Qf_c(iu)*HDD_daily)*DP_x_RhoPop !This contains QF from all three sources: buildings, metabolism and traffic!
203  qf_sahp_base = (qf_a(iu))*dp_x_rhopop ! Temperature-independent contribution from buildings, traffic and human metabolism
204  qf_sahp_heating = (qf_c(iu)*hdd_daily)*dp_x_rhopop ! Heating contribution
205  qf_sahp_cooling = (qf_b(iu)*cdd_daily)*dp_x_rhopop ! Cooling (AC) contribution
206 
207  ELSEIF (emissionsmethod == 3 .OR. emissionsmethod == 6 .OR. &
208  emissionsmethod == 13 .OR. emissionsmethod == 16 .OR. &
209  emissionsmethod == 23 .OR. emissionsmethod == 26 .OR. &
210  emissionsmethod == 33 .OR. emissionsmethod == 36 .OR. &
211  emissionsmethod == 43 .OR. emissionsmethod == 46) THEN
212  ! Updated Loridan et al. (2011) method using daily (not instantaneous) air temperature (HDD_id_use(3))
213  ! Linear relation with air temperature
214  ! Weekday/weekend differences due to profile only
215  ! Scales with population density
216 
217  ! Need to be checked later, not recommended to use
218  qf_sahp_base = ah_min(iu)*ahdornort ! Temperature-independent contribution
219 
220  IF (tair_avg_daily < baset_heating(iu)) THEN ! Heating
221  qf_sahp_heating = (ah_slope_heating(iu)*(baset_heating(iu) - tair_avg_daily))*ahdornort ! Heating contribution
222  qf_sahp_cooling = 0
223 
224  ELSEIF (tair_avg_daily > baset_cooling(iu)) THEN ! Air-conditioning
225  qf_sahp_heating = 0
226  qf_sahp_cooling = (ah_slope_cooling(iu)*(tair_avg_daily - baset_cooling(iu)))*ahdornort ! AC contribution
227 
228  ELSE
229  qf_sahp_heating = 0
230  qf_sahp_cooling = 0
231  ENDIF
232 
233  ENDIF
234 
235  ! total QF as the sum of components
236  qf_sahp = qf_sahp_base + qf_sahp_heating + qf_sahp_cooling
237 
238  IF (emissionsmethod >= 1 .AND. emissionsmethod <= 3 .OR. &
239  emissionsmethod >= 11 .AND. emissionsmethod <= 13 .OR. &
240  emissionsmethod >= 21 .AND. emissionsmethod <= 23 .OR. &
241  emissionsmethod >= 31 .AND. emissionsmethod <= 33 .OR. &
242  emissionsmethod >= 41 .AND. emissionsmethod <= 43) THEN
243 
244  ! Calculate QF from buildings.
245  ! First remove (if possibe) human metabolism from the total value given by SAHP.
246  IF ((qf_sahp_base - qf_metab) > 0) THEN
247  qf_build = qf_sahp_base*qf0_beu(iu) + qf_sahp_heating + qf_sahp_cooling !QF0_BEU = QF0_BuildingEnergyUse = Fraction of base value coming from buildings
248  !relative to traffic as metabolism is separately calculated
249  ELSE
250  CALL errorhint(69, 'QF metab exceeds base QF.', qf_metab, qf_sahp_base)
251 
252  qf_build = qf_sahp_heating + qf_sahp_cooling + (qf_sahp_base - qf_metab) !If human metabolism greater than Base QF, remove this from the heating/cooling contribution also
253  ENDIF
254 
255  ! Consider the various components of QF_build to calculate Fc_build
256  ! Assume all A/C electric, so QF_SAHP_ac is not associated with any local CO2 emissions
257  ! HDD part is building energy use, split between electricity (no local emissions CO2) and combustion (CO2) heating...
258  fc_build = qf_sahp_heating*frfossilfuel_heat*ef_umolco2perj
259 
260  ! ... and there is also a temperature-independent contribution from building energy use.
261  IF ((qf_sahp_base - qf_metab) > 0) THEN
263  ENDIF
264 
265  ! Remainder of temperature-independent part must be traffic
266  !QF_traff = (QF_SAHP_base-QF_metab)*(1.0-QF0_BEU(iu))
267  qf_traff = qf_sahp_base*(1.0 - qf0_beu(iu)) - qf_metab
268 
269  ! Divide QF by energy emission factor and multiply by CO2 factor
270  fc_traff = qf_traff/enef_v_jkm*fcef_v_kgkm(iu)*1e3*1e6/44
271 
272  !CO2 point source [kg C day-1] * 1e3 g kg-1 * 1e6 umol mol-1 /(12 g mol-1 * m-2)
273  IF (co2pointsource > 0) THEN
274  fc_point = co2pointsource*1e3*1e6/(12*60*60*24*surfacearea)
275  ELSE
276  fc_point = 0
277  ENDIF
278 
279  ! Sum components to give anthropogenic CO2 flux [umol m-2 s-1]
281 
282  ELSEIF (emissionsmethod >= 4 .AND. emissionsmethod <= 6 .OR. &
283  emissionsmethod >= 14 .AND. emissionsmethod <= 16 .OR. &
284  emissionsmethod >= 24 .AND. emissionsmethod <= 26 .OR. &
285  emissionsmethod >= 34 .AND. emissionsmethod <= 36 .OR. &
286  emissionsmethod >= 44 .AND. emissionsmethod <= 46) THEN
287  ! Calculate QF and Fc using building energy use and transport statistics
288 
289  ! Calculate energy released from traffic
290  IF (trafficunits == 1) THEN ! [veh km m-2 day-1]
291  ! Calculate using mean traffic rate [veh km m-2 day-1] * emission factor [J km-1]
292  qf_traff = trafficrate(iu)/(60*60*24)*enef_v_jkm*traffdornort
293  ! Use mean traffic rate [veh km m-2 s-1] * emission factor [kg km-1] * 1e3 g kg-1 /44 g mol-1 * 1e6 umol mol-1
294  fc_traff = trafficrate(iu)/(60*60*24)*fcef_v_kgkm(iu)*1e3*1e6/44*traffdornort
295 
296  ELSEIF (trafficunits == 2) THEN ! [veh km cap-1 day-1]
297  dp_x_rhopop_traff = traffdornort*numcapita(iu)/10000 ! [cap m-2]
298  ! Use mean traffic rate [veh km cap-1 day-1] * emission factor [J km-1]
299  qf_traff = trafficrate(iu)/(60*60*24)*enef_v_jkm*dp_x_rhopop_traff
300  ! Use mean traffic rate [veh km cap-1 day-1] * emission factor [kg km-1] * 1e3 g kg-1 /44 g mol-1 * 1e6 umol mol-1
301  fc_traff = trafficrate(iu)/(60*60*24)*fcef_v_kgkm(iu)*1e3*1e6/44*dp_x_rhopop_traff
302 
303  ELSE ! If TrafficUnits doesn't match possible units
304  CALL errorhint(75, 'Check TrafficUnits', trafficunits)
305 
306  ENDIF
307 
308  ! Energy released from buildings only
309  ! Should buildings have their own profile? Now using population profile
310  qf_build = ((qf_sahp_base*qf0_beu(iu) + qf_sahp_heating + qf_sahp_cooling)/dp_x_rhopop)* &
311  (popdensnighttime*(2 - popdornort) + popdensdaytime(iu)*(popdornort - 1))
312 
313  ! Consider the various components of QF_build to calculate Fc_build
314  fc_build = qf_sahp_heating*frfossilfuel_heat*ef_umolco2perj
315  ! ... and there is also a temperature-independent contribution from building energy use
317 
318  !CO2 point source [kg C day-1] * 1e3 g kg-1 * 1e6 umol mol-1 /(12 g mol-1 * m-2)
319  IF (co2pointsource > 0) THEN
320  fc_point = co2pointsource*1e3*1e6/(12*60*60*24*surfacearea)
321  ELSE
322  fc_point = 0
323  ENDIF
324 
325  ! Add other QF components to QF_SAHP_base (because if AnthropEmissionsMethod = 4, QF calculated above is building part only)
327 
328  ! Sum components to give anthropogenic heat flux [W m-2]
330 
331  ! Sum components to give anthropogenic CO2 flux [umol m-2 s-1]
333 
334  ENDIF
335 
336  RETURN
real(kind(1d0)) qf_metab
real(kind(1d0)) minfcmetab
real(kind(1d0)) fc_metab
real(kind(1d0)) qf_traff
real(kind(1d0)) fc_anthro
real(kind(1d0)) fc_traff
real(kind(1d0)), dimension(2) qf_c
real(kind(1d0)), dimension(2) popdensdaytime
real(kind(1d0)), dimension(0:23, 2) ahprof_24hr
real(kind(1d0)) temp_c
real(kind(1d0)) qf_build
integer dls
real(kind(1d0)), dimension(2) ah_slope_heating
real(kind(1d0)), dimension(2) ah_min
real(kind(1d0)) maxqfmetab
integer emissionsmethod
real(kind(1d0)) co2pointsource
real(kind(1d0)), dimension(12) hdd_id
real(kind(1d0)), dimension(2) fcef_v_kgkm
real(kind(1d0)), dimension(0:23, 2) popprof_24hr
integer imin
real(kind(1d0)), dimension(2) baset_cooling
real(kind(1d0)), dimension(2) qf_a
real(kind(1d0)) qf_sahp
real(kind(1d0)) frfossilfuel_heat
real(kind(1d0)) fc_point
real(kind(1d0)) qf_sahp_base
real(kind(1d0)) surfacearea
real(kind(1d0)) fc_build
real(kind(1d0)), dimension(2) trafficrate
real(kind(1d0)) popdensnighttime
real(kind(1d0)) function get_prof_spectime_inst(Hour, Min, Sec, Prof_24h)
real(kind(1d0)) trafficunits
real(kind(1d0)), dimension(2) qf_b
real(kind(1d0)) minqfmetab
real(kind(1d0)) maxfcmetab
real(kind(1d0)), dimension(2) baset_heating
real(kind(1d0)), dimension(0:23, 2) traffprof_24hr
real(kind(1d0)) frfossilfuel_nonheat
integer it
real(kind(1d0)) ef_umolco2perj
real(kind(1d0)), dimension(2) ah_slope_cooling
real(kind(1d0)), dimension(0:23, 2) humactivity_24hr
subroutine errorhint(errh, ProblemFile, VALUE, value2, valueI)
real(kind(1d0)) function get_prof_spectime_mean(Hour, Min, Sec, Prof_24h)
real(kind(1d0)) enef_v_jkm
real(kind(1d0)), dimension(2) qf0_beu
Here is the call graph for this function:
Here is the caller graph for this function: