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

Functions/Subroutines

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