Difference between revisions of "Climate change policies and health in Kuopio"

From Testiwiki
Jump to: navigation, search
(Results)
m
 
(40 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
|answer = The target of 40 % GHG reduction seems realistic due to reforms in Haapaniemi power plant, assuming that GHG emissions for wood-based fuel is 0. Life-cycle impacts of the wood-based fuel have not yet been estimated.}}
 
|answer = The target of 40 % GHG reduction seems realistic due to reforms in Haapaniemi power plant, assuming that GHG emissions for wood-based fuel is 0. Life-cycle impacts of the wood-based fuel have not yet been estimated.}}
  
 +
<nowiki>
 
{{#display_map:
 
{{#display_map:
 
62.900223, 27.637482, Kuopio
 
62.900223, 27.637482, Kuopio
 
| zoom = 11
 
| zoom = 11
 
}}
 
}}
 +
</nowiki>
  
 
==Scope==
 
==Scope==
Line 53: Line 55:
 
==Answer==
 
==Answer==
  
*[http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=a4sBYqRnk4MXNj0M Results from an assessment model run]  
+
*[http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=xUA9zDXiadLXxi60 Results from an assessment model run] 10.6.2015.
*{{#l:Climate change policies and health in Kuopio_model results.pdf}}
+
*{{#l:Urgenche building model run for Kuopio.pdf}}
  
 
===Conclusions===
 
===Conclusions===
Line 62: Line 64:
 
===Results===
 
===Results===
  
; Calculate building stock into the future
+
==== Model version 2 ====
* The dynamics is calculated by adding building floor area at time points greater than construction year, and by subtracting when time point is greater than demolition year. This is done by building category, not individually.
 
* Also the renovation dynamics is built using event years: at an event, a certain amount of floor area is moved from one energy efficiency category to another.
 
* Full data are stored in the ovariables. Before evaluating, extra columns and rows are removed. The first part of the code is about this.
 
 
 
[http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=CcSsz4RJAZFaAAmE Example model run] (running the model takes more than 6 min, so use this ready-made result)
 
 
 
<rcode graphics="1" variables="name:server|type:hidden|default:TRUE">
 
# SIirrä Kuopion-datat kässäristä linkin taakse Opasnettiin
 
# KÄssäriin vain yhteenvetotaulukko joka kaupungista.
 
# Mieti mitä sanotaan sisäilmasta. Perusmalli toimii ilmankin, ja Matin nostama miljoonan sisäilman hankaluus pitäisi lähinnä keskustella. Käytetäänkä ylileveitä jakaumia?
 
# Onko järkeä yhdistää kaupungit? Silloin tulisi NA:ta eri päätösten kohdalle, ja tämä pitäisi huomioida kuvissa (muutenkin kannattaisi slaissata data ennen kuvien piirtämistä).
 
# Tarkista iF jota käytetään: Mikä on iF-summary?
 
  
 +
:''This model version was used to produce the corrected manuscript in July 2015.
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=5YrOTNdv6hO2Gg92 Model run 21.7.2015] runs to the end but emissions are too large exp for wood after 1980.
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=CKE08J9mOmLlbtoi Model run 22.7.2015] Bugs with fuelShares fixed. Now results are similar to the ones in the manuscript. Except that health impacts are 2-3 times higher, only partly due to higher wood burning in the 2000's.
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=iWTbYNM9MZOeQ0P7 Model run 23.7.2015] archived version. Also renovationShares and changeBuildings data corrected.
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=PWq7mHEWjyFReXDV Model run 24.7.2015] archived version. This was used for the manuscript.
  
 +
<rcode graphics=1 store0 variables="name:server|type:hidden|default:TRUE">
 +
### THIS CODE IS FROM PAGE [[Climate change policies and health in Kuopio]] (Op_en5461, code_name = "")
 
library(OpasnetUtils)
 
library(OpasnetUtils)
 
library(ggplot2)
 
library(ggplot2)
library(rgdal)
 
library(maptools)
 
library(RColorBrewer)
 
library(classInt)
 
library(OpasnetUtilsExt)
 
library(RgoogleMaps)
 
  
 +
### Technical parameters
 +
 +
openv.setN(0) # use medians instead of whole sampled distributions
 +
objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]] findrest
 +
BS <- 24 # base_size = font sixe in graphs
 +
figstofile <- FALSE
 +
saveobjects <- FALSE
 +
finnish <- FALSE
 
suomenna <- function(ova) {
 
suomenna <- function(ova) {
d <- ova@output
+
if(class(ova) == "ovariable") out <- ova@output else out <- ova
if("Trait" %in% colnames(d)) {
+
if("Heating" %in% colnames(out)) {
levels(d$Trait)[levels(d$Trait) == "Cancer"] <- "Syöpä"
+
out$Heating <- as.factor(out$Heating)
levels(d$Trait)[levels(d$Trait) == "CHD2"] <- "Sydänkuolema"
+
levels(out$Heating)[levels(out$Heating) == "District heating"] <- "District"
levels(d$Trait)[levels(d$Trait) == "Stroke"] <- "Aivohalvaus"
 
levels(d$Trait)[levels(d$Trait) == "Child's IQ"] <- "Lapsen ÄO"
 
levels(d$Trait)[levels(d$Trait) == "Tooth defect"] <- "Hammasvaurio"
 
levels(d$Trait)[levels(d$Trait) == "Dental defect"] <- "Hammasvaurio"
 
levels(d$Trait)[levels(d$Trait) == "Vitamin D recommendation"] <- "D-vitamiinin saantisuositus"
 
levels(d$Trait)[levels(d$Trait) == "Dioxin recommendation"] <- "Dioksiinin saantisuositus"
 
 
}
 
}
if("Exposure_agent" %in% colnames(ova@output)) {
+
if("Response" %in% colnames(out)) {
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "Vitamin_D"] <- "D-vitamiini"
+
out$Response <- as.factor(out$Response)
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "EPA"] <- "EPA"
+
levels(out$Response)[levels(out$Response) == "Cardiopulmonary mortality"] <- "Cardiopulmonary"
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "DHA"] <- "DHA"
 
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "Omega3"] <- "Omega3"
 
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "PCDDF"] <- "Dioksiini"
 
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "PCB"] <- "PCB"
 
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "TEQ"] <- "TEQ"
 
levels(d$Exposure_agent)[levels(d$Exposure_agent) == "MeHg"] <- "Metyylielohopea"
 
 
}
 
}
if("Hedelm" %in% colnames(d)) {
+
if("Pollutant" %in% colnames(out)) {
levels(d$Hedelm)[levels(d$Hedelm) == FALSE] <- "Ei"
+
out$Pollutant <- as.factor(out$Pollutant)
levels(d$Hedelm)[levels(d$Hedelm) == TRUE] <- "Kyllä"
+
levels(out$Pollutant)[levels(out$Pollutant) == "CO2trade"] <- "CO2official"
 
}
 
}
+
out$Time <- as.numeric(as.character(out$Time))
colnames(d)[colnames(d) == "Age"] <- "Ikäryhmä"
+
return(out)
colnames(d)[colnames(d) == "Exposure_agent"] <- "Altiste"
 
colnames(d)[colnames(d) == "Trait"] <- "Vaste"
 
colnames(d)[colnames(d) == "Ikä"] <- "Ikä"
 
colnames(d)[colnames(d) == "Silakkamäärä"] <- "Silakkamäärä"
 
 
return(d)
 
 
}
 
}
  
#language <- "EN"
+
obstime <- Ovariable("obstime", data = data.frame(Obsyear = factor(seq(1920, 2050, 10), ordered = TRUE), Result = 1))
openv.setN(0) # use medians instead of whole sampled distributions
 
#openv.setN(1000)
 
BS <- 18
 
  
objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]] findrest
+
## Additional index needed in followup of ovariables efficiencyShares and stockBuildings
  
obsyear <- data.frame(EventYear = (192:205) * 10) # Observation years must be defined for an assessment.
+
year <- Ovariable("year", data = data.frame(
 +
Constructed = factor(
 +
c("1799-1899", "1900-1909", "1910-1919", "1920-1929", "1930-1939", "1940-1949",
 +
"1950-1959", "1960-1969", "1970-1979", "1980-1989", "1990-1999",
 +
"2000-2010", "2011-2019", "2020-2029", "2030-2039", "2040-2049"
 +
),
 +
ordered = TRUE
 +
),
 +
Time = c(1880, 1910 + 0:14 * 10),
 +
Result = 1
 +
))
  
 
###################### Decisions
 
###################### Decisions
Line 138: Line 126:
  
 
# Remove previous decisions, if any.  
 
# Remove previous decisions, if any.  
rm(
 
"buildings",
 
"stockBuildings",
 
"buildingTypes",
 
"changeBuildings",
 
"stockEfficiencyShares",
 
"changeEfficiencyShares",
 
"energyUse",
 
"heatingShares",
 
"heatingSharesNew",
 
"rateBuildings",
 
"renovationShares",
 
"fuelTypes",
 
"year",
 
envir = openv
 
)
 
  
############################ City-specific data
+
forgetDecisions <- function() {
 +
for(i in ls(envir = openv)) {
 +
if("dec_check" %in% names(openv[[i]])) openv[[i]]$dec_check <- FALSE
 +
}
 +
return(cat("Decisions were forgotten.\n"))
 +
}
 +
 
 +
forgetDecisions()
 +
 
 +
############################ IMPORT DATA AND MODELS
  
####!------------------------------------------------
 
 
objects.latest("Op_en5417", code_name = "initiate") # [[Population of Kuopio]]  
 
objects.latest("Op_en5417", code_name = "initiate") # [[Population of Kuopio]]  
 
# population: City_area
 
# population: City_area
objects.latest("Op_en5932", code_name = "initiate") # [[Building stock in Kuopio]] Building ovariables:  
+
objects.latest("Op_en5932", code_name = "initiatetest") # [[Building stock in Kuopio]] Building ovariables:  
 
# buildingStock: Building, Constructed, City_area
 
# buildingStock: Building, Constructed, City_area
 
# rateBuildings: Age, (RenovationPolicy)
 
# rateBuildings: Age, (RenovationPolicy)
Line 170: Line 150:
 
# heatingSharesNew: Building2, Heating
 
# heatingSharesNew: Building2, Heating
 
# eventyear: Constructed, Eventyear
 
# eventyear: Constructed, Eventyear
# efficiencies: Constructed, Efficiency
 
  
# Calculate locations for Kuopio districts
+
###################### Actual building model
districts <- tidy(opbase.data("Op_en3435.kuopio_city_districts"), widecol = "Location") # [[Exposure to PM2.5 in Finland]]  
+
# The building stock is measured as m^2 floor area.
 +
 
 +
objects.latest("Op_en6289", code_name = "buildingstest") # [[Building model]] # Generic building model.
 +
 
 +
###################### Energy and emissions
 +
 
 +
objects.latest("Op_en5488", code_name = "energyUseAnnual") # [[Energy use of buildings]] energyUse
 +
objects.latest("Op_en5488", code_name = "efficiencyShares") # [[Energy use of buildings]]
 +
objects.latest("Op_en2791", code_name = "emissionstest") # [[Emission factors for burning processes]]
 +
objects.latest("Op_en2791", code_name = "emissionFactors") # [[Emission factors for burning processes]]
 +
objects.latest("Op_en7328", code_name = "emissionLocations") # [[Kuopio energy production]]
 +
objects.latest("Op_en7328", code_name = "fuelShares") # [[Kuopio energy production]]
 +
objects.latest("Op_en5141", code_name = "fuelUse") # [[Energy balance]]
 +
 
 +
## Exposure
 +
 
 +
objects.latest("Op_en5813", code_name = "exposure") # [[Intake fractions of PM]] uses Humbert iF as default.
 +
 
 +
###################### Health assessment
 +
 
 +
objects.latest('Op_en2261', code_name = 'totcases') # [[Health impact assessment]] totcases and dependencies.
 +
objects.latest('Op_en5461', code_name = 'DALYs') # [[Climate change policies and health in Kuopio]] DALYs, DW, L
 +
 
 +
frexposed <- 1 # fraction of population that is exposed
 +
bgexposure <- 0 # Background exposure to an agent (a level below which you cannot get in practice)
 +
BW <- 70 # Body weight (is needed for RR calculations although it is irrelevant for PM2.5)
 +
 
 +
##################### CALCULATIONS
 +
 
 +
renovationRate <- EvalOutput(renovationRate) * 10 # Rates for 10-year periods
 +
renovationRate@marginal[colnames(renovationRate@output) == "Age"] <- TRUE
 +
renovationShares <- EvalOutput(renovationShares)
 +
colnames(renovationShares@output)[colnames(renovationShares@output) == "Startyear"] <- "Obsyear"
 +
stockBuildings <- EvalOutput(stockBuildings)
 +
stockBuildings <- oapply(stockBuildings, cols = c("City_area"), FUN = sum)
 +
changeBuildings <- EvalOutput(changeBuildings)
 +
changeBuildings <- oapply(changeBuildings, cols = c("City_area"), FUN = sum)
 +
 
 +
buildings <- EvalOutput(buildings)
 +
 
 +
buildings@output$RenovationPolicy <- factor(
 +
buildings@output$RenovationPolicy,
 +
levels = c("BAU", "Active renovation", "Effective renovation"),
 +
ordered = TRUE
 +
)
 +
 
 +
buildings@output$EfficiencyPolicy <- factor(
 +
buildings@output$EfficiencyPolicy,
 +
levels = c("BAU", "Active efficiency"),
 +
ordered = TRUE
 +
)
 +
 
 +
energyUse <- EvalOutput(energyUse)
 +
fuelUse <- EvalOutput(fuelUse)
 +
fuelUse <- fuelUse * 1E-3 *3600 # kWh -> MJ
 +
 
 +
emissions <- EvalOutput(emissions)
 +
 
 +
population <- 1E+5 # stockBuildings is using another population to divide floor area into City areas.
 +
 
 +
exposure <- EvalOutput(exposure)
 +
exposure@output <- exposure@output[exposure@output$Area == "Average" , ] # Kuopio is an average area,
 +
# rather than rural or urban.
 +
 
 +
totcases <- EvalOutput(totcases)
 +
totcases <- oapply(totcases, cols = c("Age", "Sex"), FUN = sum)
 +
 
 +
DALYs <- EvalOutput(DALYs)
 +
 
 +
###################### GRAPHS AND OUTPUTS
 +
 
 +
bui <- suomenna(oapply(buildings * 1E-6, cols = c("City_area", "buildingsSource"), FUN = sum))
  
####i------------------------------------------------
+
ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Heating)) + geom_bar(binwidth = 5) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
colnames(districts) <- gsub("\\.", "_", colnames(districts))
+
if(figstofile) ggsave("Figure3.eps", width = 8, height = 7)
districts <- Ovariable("districts", data = data.frame(districts, Result = 1))
 
  
###################### Energy and emissions
+
ggplot(bui, aes(x = Time, weight = buildingsResult, fill = Building))+geom_bar()+facet_grid(Efficiency~Heating)
  
####!------------------------------------------------
+
ggplot(subset(bui, EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Renovation)) +
objects.latest("Op_en2791", code_name = "initiate") # [[Emission factors for burning processes]]
+
geom_bar(binwidth = 5) +
# emissionFactors: Burner, Fuel, Pollutant
+
facet_grid(. ~ RenovationPolicy) + theme_gray(base_size = BS) +
# fuelTypes: Heating, Burner, Fuel
+
labs(
objects.latest("Op_en5488", code_name = "initiate") # [[Energy use of buildings]]
+
title = "Building stock in Kuopio by renovation policy",
# energyUse: Building, Heating
+
x = "Time",
# changeEfficiencyShares: Efficiency, Constructed
+
y = "Floor area (M m2)"
# renovationRatio: Efficiency, Building2, Renovation
+
)
####i------------------------------------------------
 
  
#### BUILDINGTYPES MUST BE HANDLED OUTSIDE FORMULA!
+
ggplot(subset(bui, RenovationPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Efficiency)) + geom_bar(binwidth = 5) +
 +
facet_grid(. ~ EfficiencyPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio by efficiency policy",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
fuelTypes@data <- merge(fuelTypes@data, data.frame(Year = 1900 + 0:16 * 5))
+
ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Building)) + geom_bar(binwidth = 5) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
# Fill in Heating types and convert from % to fraction.
 
heatingSharesNew <- findrest(heatingSharesNew, cols = "Heating", total = 100) / 100
 
efficienciesNew <- findrest(efficienciesNew, cols = "Efficiency", total = 100) / 100
 
renovationShares <- findrest(renovationShares, cols = "Renovation", total = 100) / 100
 
  
################ Transport and fate
+
ggplot(subset(suomenna(energyUse), EfficiencyPolicy == "BAU"), aes(x = Time, weight = energyUseResult * 1E-6, fill = Heating)) + geom_bar(binwidth = 5) +
 +
facet_wrap( ~ RenovationPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Energy used in heating in Kuopio",
 +
x = "Time",
 +
y = "Heating energy (GWh /a)"
 +
)
  
####!------------------------------------------------
+
if(figstofile) ggsave("Figure4.eps", width = 11, height = 7)
objects.latest("Op_en3435", code_name = "disperse") # [[Exposure to PM2.5 in Finland]]
 
# iF: Iter, Emissionheight, City.area ## THESE SHOULD BE UPDATED! (precalculated with N = 1)
 
# emissionLocations: Heating, Emission site, Emission height
 
#Summarised Piltti matrix, another copy of the code on a more reasonable page
 
# Default run: en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=aXDIVDboftr1bTEd
 
####i------------------------------------------------
 
  
###### THESE SHOULD HAPPEN WHEN THE OVARIABLES ARE DEFINED
+
ggplot(suomenna(energyUse), aes(x = Time, weight = energyUseResult * 1E-6, fill = Heating)) + geom_bar(binwidth = 5) +
colnames(iF@output)[colnames(iF@output) == "City.area"] <- "Emission_site"
+
facet_grid(EfficiencyPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
colnames(iF@output)[colnames(iF@output) == "Emissionheight"] <- "Emission_height"
+
labs(
iF@output$Iter <- NULL
+
title = "Energy used in heating in Kuopio",
colnames(emissionLocations@data) <- gsub(" ", "_", colnames(emissionLocations@data))
+
x = "Time",
 +
y = "Heating energy (GWh /a)"
 +
)
  
fuelTypes <- CheckDecisions(EvalOutput(fuelTypes, verbose = TRUE))
+
emis <- suomenna(truncateIndex(emissions, cols = "Fuel", bins = 5))
  
###################### Health assessment
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU" & Pollutant != "CO2eq"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
 +
facet_grid(Pollutant ~ FuelPolicy, scale = "free_y") + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
####!------------------------------------------------
+
if(figstofile) ggsave("Figure5.eps", width = 8, height = 7)
objects.latest('Op_en2261', code_name = 'initiate') # [[Health impact assessment]] dose, RR, totcases.
 
objects.latest('Op_en5917', code_name = 'initiate') # [[Disease risk]] disincidence
 
objects.latest('Op_en5827', code_name = 'initiate') # [[ERFs of environmental pollutants]] ERF, threshold
 
#objects.latest('Op_en5453', code_name = 'initiate') # [[Burden of disease in Finland]] BoD
 
directs <- tidy(opbase.data("Op_en5461", subset = "Direct inputs"), direction = "wide") # [[Climate change policies and health in Kuopio]]
 
####i------------------------------------------------
 
  
frexposed <- 1 # fraction of population that is exposed
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
bgexposure <- 0 # Background exposure to an agent (a level below which you cannot get in practice)
+
facet_grid(Pollutant ~ ., scale = "free_y") + theme_gray(base_size = BS) +#FuelPolicy
BW <- 70 # Body weight (is needed for RR calculations although it is irrelevant for PM2.5)
+
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
colnames(directs) <- gsub(" ", "_", colnames(directs))
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Emission_site)) + geom_bar(binwidth = 5) +
 +
facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
#################### Manage the data before calculating
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
 +
facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
# This is the population of Kuopio (i.e. population living in the building stock)
+
ggplot(subset(suomenna(exposure), RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) +
 +
geom_bar(binwidth = 5) + facet_grid(Area ~ Emission_height) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Exposure to PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Average PM2.5 (µg/m3)"
 +
)
  
population <- EvalOutput(population, verbose = TRUE)
+
ggplot(subset(suomenna(exposure), EfficiencyPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) + geom_bar(binwidth = 5) + facet_grid(FuelPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Exposure to PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Average PM2.5 (µg/m3)"
 +
)
  
areaweight <- oapply(population, cols = "City_area", FUN = "sum") # Sum across city areas.
+
ggplot(subset(suomenna(totcases), EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = totcasesResult, fill = Heating))+geom_bar(binwidth = 5) +
areaweight <- population / (1 * areaweight)
+
facet_grid(Response ~ RenovationPolicy) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Health effects of PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Health effects (deaths /a)"
 +
)
  
stockBuildings <- unkeep(stockBuildings * areaweight * eventyear, cols = "Constructed", prevresults = TRUE, sources = TRUE)
+
cat("Total DALYs/a by different combinations of policy options.\n")
colnames(stockBuildings@output)[colnames(stockBuildings@output) == "Eventyear"] <- "Time"
 
  
# PITÄÄ MUUTTAA Eventyear -> Time ja City.area -> City_area
+
dal <- subset(suomenna(DALYs), Response == "Total mortality")
 +
oprint(aggregate(dal["DALYsResult"], by = dal[c("Time", "EfficiencyPolicy", "RenovationPolicy", "FuelPolicy")], FUN = sum))
  
historicalBuildings <- Ovariable("historicalBuildings", ddata = "Op_en5932", subset = "Historical construction and demolition") * 1
+
ggplot(subset(dal, FuelPolicy == "BAU"), aes(x = Time, weight = DALYsResult, fill = Heating))+geom_bar(binwidth = 5) +
changeBuildings <- construction * constructionAreas * heatingShares * efficiencyShares #/ 3 # Statistics are for three years (2010-2012) BUT PER YEAR?!
+
facet_grid(EfficiencyPolicy ~ RenovationPolicy) +
changeBuildings@output <- subset(changeBuildings@output, as.numeric(as.character(Time)) > 2012) # Only keep future construction.
+
theme_gray(base_size = BS) +
marginals <- c(colnames(historicalBuildings@output)[historicalBuildings@marginal], colnames(changeBuildings@output)[changeBuildings@marginal])
+
labs(
changeBuildings@output <- orbind(changeBuildings, historicalBuildings)
+
title = "Health effects in DALYs of PM2.5 from heating in Kuopio",
changeBuildings@marginal <- colnames(changeBuildings@output) %in% marginals
+
x = "Time",
changeBuildings <- unkeep(changeBuildings, prevresults = TRUE, sources = TRUE)
+
y = "Health effects (DALY /a)"
 +
)
  
 +
ggplot(subset(dal, Time == 2030), aes(x = RenovationPolicy, weight = DALYsResult, fill = Heating))+geom_bar() +
 +
facet_grid(EfficiencyPolicy ~ FuelPolicy) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Health effects in DALYs of PM2.5 from heating in Kuopio 2030",
 +
x = "Biofuel policy in district heating",
 +
y = "Health effects (DALY /a)"
 +
)
  
###################### Actual building model
+
######## Buildings in Kuopio on map
 +
if(FALSE){
 +
# Calculate locations for Kuopio districts
  
# The building stock is measured as m^2 floor area.
+
temp <- buildings
 +
temp@output <- subset(temp@output,
 +
Time == 2030 & EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"
 +
)
 +
temp <- unkeep(temp, sources = TRUE, prevresults = TRUE)
 +
temp <- oapply(temp, cols = c("Building", "Heating", "Efficiency", "Renovation"), FUN = sum)
  
 
####!------------------------------------------------
 
####!------------------------------------------------
objects.latest("Op_en6289", code_name = "initiate") # [[Building model]] # Generic building model.
+
districts <- tidy(opbase.data("Op_en5932.kuopio_city_districts"), widecol = "Location") # [[Building stock in Kuopio]]  
# buildings: formula-based
 
# heatingEnergy: formula-based
 
 
####i------------------------------------------------
 
####i------------------------------------------------
  
buildings <- EvalOutput(buildings, verbose = TRUE)
+
colnames(districts) <- gsub("[ \\.]", "_", colnames(districts))
 +
districts <- Ovariable("districts", data = data.frame(districts, Result = 1))
 +
 
 +
temp <- temp * districts
  
buildings@output$RenovationPolicy <- factor(
+
MyRmap(
buildings@output$RenovationPolicy,
+
ova2spat(
levels = c("BAU", "Active renovation", "Effective renovation"),
+
temp,  
ordered = TRUE
+
coord = c("E", "N"),  
 +
proj4string = "+init=epsg:3067"
 +
), # National Land Survey uses EPSG:3067 (ETRS-TM35FIN)
 +
plotvar = "Result",
 +
legend_title = "Floor area",
 +
numbins = 8,
 +
pch = 19,  
 +
cex = 2
 
)
 
)
 +
}
 +
 +
if(saveobjects) {
 +
objects.put(list = ls())
 +
cat(c("All objects archived. Write down the key of the run to retrieve them with objects.get. Objects: ",
 +
ls(), "\n"))
 +
}
 +
 +
</rcode>
 +
 +
==== Sensitivity analysis ====
 +
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=1zu5BF0w5a3miRtv Sensitivity analysis 26.7.2015] with 750 iterations
 +
 +
<rcode label="Run sensitivity analysis" graphics=1 store=0 variables="
 +
name:num|description:How many iterations? (For more, run on your own computer)|type:slider|options:1;100;1|default:10
 +
">
 +
### THIS CODE IS FROM PAGE [[Climate change policies and health in Kuopio]] (Op_en5461, code_name = "")
 +
library(OpasnetUtils)
 +
library(ggplot2)
 +
 +
### Technical parameters
 +
openv.setN(num)
 +
#rm(list = ls()) # Remove existing objects (necessary on your own computer)
 +
saveobjects <- FALSE
 +
objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]] findrest
 +
 +
obstime <- Ovariable("obstime", data = data.frame(Obsyear = factor(seq(2010, 2030, 10), ordered = TRUE), Result = 1))
 +
 +
## Additional index needed in followup of ovariables efficiencyShares and stockBuildings
 +
 +
year <- Ovariable("year", data = data.frame(
 +
Constructed = factor(
 +
c("1799-1899", "1900-1909", "1910-1919", "1920-1929", "1930-1939", "1940-1949",
 +
"1950-1959", "1960-1969", "1970-1979", "1980-1989", "1990-1999",
 +
"2000-2010", "2011-2019", "2020-2029", "2030-2039", "2040-2049"
 +
),
 +
ordered = TRUE
 +
),
 +
Time = c(1880, 1910 + 0:14 * 10),
 +
Result = 1
 +
))
  
heatingEnergy <- EvalOutput(heatingEnergy, verbose = TRUE)
+
###################### Decisions
heatingEnergy <- unkeep(heatingEnergy, cols = "Building2", sources = TRUE, prevresults = TRUE)
 
  
if(exists("server")) # The following code only works from Opasnet server.
+
decisions <- opbase.data('Op_en5461', subset = "Decisions") # [[Climate change policies and health in Kuopio]]
{
 
temp <- buildings * districts
 
temp@output <- temp@output[temp@output$Year == 2040 , ]
 
temp <- unkeep(temp, sources = TRUE, prevresults = TRUE)
 
temp@output <- dropall(temp@output)
 
temp <- oapply(temp, cols = c("Building", "Heating", "Efficiency", "Renovation"), FUN = "sum", na.rm = TRUE)
 
  
MyRmap(
+
DecisionTableParser(decisions)
ova2spat(temp, coord = c("E", "N"), proj4string = "+init=epsg:3067"), # National Land Survey uses EPSG:3067 (ETRS-TM35FIN)
+
 
plotvar = "Result", legend_title = "Floor area", numbins = 8, pch = 19, cex = 2
+
# Remove previous decisions, if any.
)
+
 
 +
forgetDecisions <- function() {
 +
for(i in ls(envir = openv)) {
 +
if("dec_check" %in% names(openv[[i]])) openv[[i]]$dec_check <- FALSE
 +
}
 +
return(cat("Decisions were forgotten.\n"))
 
}
 
}
  
####### Calculate emissions
+
forgetDecisions()
 +
 
 +
############################ IMPORT DATA AND MODELS
 +
 
 +
objects.latest("Op_en5417", code_name = "initiate") # [[Population of Kuopio]]
 +
objects.latest("Op_en5932", code_name = "initiatetest") # [[Building stock in Kuopio]] Building ovariables:
 +
objects.latest("Op_en6289", code_name = "buildingstest") # [[Building model]] # Generic building model.
 +
 
 +
###################### Energy and emissions
  
#emis <- heatingEnergy
+
objects.latest("Op_en5488", code_name = "energyUseAnnual") # [[Energy use of buildings]] energyUse
#emis@output <- emis@output[emis@output$Year >= 1980 , ]
+
objects.latest("Op_en5488", code_name = "efficiencyShares") # [[Energy use of buildings]]  
#emis <- oapply(emis, cols = c("Efficiency", "Renovation", "Building"), FUN = "sum")
+
objects.latest("Op_en2791", code_name = "emissionstest") # [[Emission factors for burning processes]]
#emis@output$Year <- as.numeric(as.character(emis@output$Year))
+
objects.latest("Op_en2791", code_name = "emissionFactors") # [[Emission factors for burning processes]]
 +
objects.latest("Op_en7328", code_name = "emissionLocations") # [[Kuopio energy production]]
 +
objects.latest("Op_en7328", code_name = "fuelShares") # [[Kuopio energy production]]
 +
objects.latest("Op_en5141", code_name = "fuelUse") # [[Energy balance]]
  
emissions <- Ovariable("emissions",
+
## Exposure and health assessment
dependencies = data.frame(
 
Name = c(
 
"heatingEnergy",
 
"fuelTypes",
 
"emissionFactors"
 
)
 
),
 
formula = function(...) {
 
  
out <- oapply(heatingEnergy, cols = c("Building", "Efficiency"), FUN = sum)
+
objects.latest("Op_en5813", code_name = "exposure") # [[Intake fractions of PM]] uses Humbert iF as default.
out <- out * fuelTypes * emissionFactors * 3.6  * 1E-9 # convert from kWh /a to MJ /a and mg to ton
+
objects.latest('Op_en2261', code_name = 'totcases') # [[Health impact assessment]] totcases and dependencies.
 +
objects.latest('Op_en5461', code_name = 'DALYs') # [[Climate change policies and health in Kuopio]] DALYs, DW, L
  
out <- unkeep(out * emissionLocations, sources = TRUE, prevresults = TRUE)
+
##################### CALCULATIONS
  
out@output$Emission_site <- as.factor(ifelse(
+
constructionAreas <- EvalOutput(constructionAreas)
out@output$Emission_site == "At site of consumption",
+
constructionAreas@output$City_area <- "City centre"# We are not interested in locations in this analysis.
as.character(out@output$City_area),
+
constructionAreas <- oapply(constructionAreas, cols = "", FUN = sum)
as.character(out@output$Emission_site)
+
renovationRate <- EvalOutput(renovationRate) * 10 # Rates for 10-year periods
))
+
renovationShares <- EvalOutput(renovationShares)
 +
stockBuildings <- EvalOutput(stockBuildings)
 +
stockBuildings@output$City_area <- "City centre"
 +
stockBuildings@output$Building <- "Apartment houses"
 +
stockBuildings <- oapply(stockBuildings, cols = c(""), FUN = sum)
 +
changeBuildings <- EvalOutput(changeBuildings)
 +
changeBuildings@output$City_area <- "City centre"
 +
changeBuildings@output$Building <- "Apartment houses"
 +
changeBuildings@output <- changeBuildings@output[changeBuildings@output$EfficiencyPolicy == "BAU" , ]
 +
changeBuildings <- oapply(changeBuildings, cols = c(""), FUN = sum)
  
out <- oapply(
+
buildings <- EvalOutput(buildings)
out,
+
buildings@output <- buildings@output[buildings@output$Time == "2030" , ]
cols = c("Heating", "Burner", "Fuel", "City_area"),
+
energyUse <- EvalOutput(energyUse)
FUN = sum
+
energyUse <- oapply(energyUse, cols = c(
)
+
"Efficiency",
}
+
"Renovation"
)
+
), FUN = sum)
#"Emission_site", "Emission_height",  
+
fuelUse <- EvalOutput(fuelUse)
 +
fuelUse <- fuelUse * 1E-3 *3600 # kWh -> MJ
 +
fuelUse <- oapply(fuelUse, cols = c(
 +
"Time"
 +
), FUN = sum)
 
emissions <- EvalOutput(emissions)
 
emissions <- EvalOutput(emissions)
 +
emissions <- oapply(emissions, cols = c(
 +
"Fuel",
 +
"City_area",
 +
"Emission_site",
 +
"Heating"
 +
), FUN = sum)
  
#############################################
+
population <- 1E+5 # stockBuildings is using another population to divide floor area into City areas.
  
ggplot(emissions@output, aes(x = Year, weight = Result, fill = Emission_site)) + geom_bar() + facet_grid( Pollutant ~ ., scales = "free_y")
+
exposure <- EvalOutput(exposure)
 +
exposure@output <- exposure@output[exposure@output$Area == "Average" , ] # Kuopio is an average area,
 +
# rather than rural or urban.
 +
exposure <- oapply(exposure, cols = c(
 +
    "Emission_height",
 +
"Area"
 +
), FUN = sum)
  
 +
totcases <- EvalOutput(totcases)
 +
totcases <- oapply(totcases, cols = c("Age", "Sex"), FUN = sum)
  
#ggplot(health@output) + geom_bar() + theme_gray(base_size = BS) + labs(title = "Health impacts of fuel and renovation policy") +
+
DALYs <- EvalOutput(DALYs)
#aes(x = Year, weight = Result, fill = Heating) + labs(y = "Premature deaths (# /a)") #  + facet_grid(FuelPolicy ~ RenovationPolicy)
 
  
##############------------------------------
+
cost <- Ovariable("cost",
### Use these population and iF values in health impact assessment. Why?
+
dependencies = data.frame(Name = c("DALYs", "emissions")),
 +
formula = function(...) {
 +
dals <- DALYs
 +
dals@output <- dals@output[dals@output$Time == "2030" , ]
 +
dals <- oapply(DALYs, INDEX = c("EfficiencyPolicy", "RenovationPolicy", "FuelPolicy", "Iter"), FUN = sum)
 +
emi <- emissions
 +
emi@output <- emi@output[emi@output$Pollutant == "CO2direct" & emi@output$Time == "2030" , ]
 +
emi <- oapply(emissions, INDEX = c("EfficiencyPolicy", "RenovationPolicy", "FuelPolicy", "Iter"), FUN = sum)
 +
cost <- dals * 50000 + emi * 15
 +
bau <- cost
 +
bau@output <- subset(bau@output, FuelPolicy == "BAU" & RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU")
 +
bau <- unkeep(bau, cols = c( "EfficiencyPolicy", "RenovationPolicy", "FuelPolicy"), prevresults = TRUE)
 +
bau <- bau * Ovariable(
 +
output = data.frame(Objective = c("Direct", "BAU comparison"), Result = c(0, 1)),
 +
marginal = c(TRUE, FALSE)
 +
)
 +
cost <- cost - bau
 +
return(cost)
 +
}
 +
)
  
pop <- 5E+5
+
t1 <- subset(construction@output, Building == "Apartment houses")
 +
t2 <- subset(efficiencyRatio@output, Efficiency == "New")
 +
t3 <- subset(efficiencyShares@output, Efficiency == "New" & Time == "2030" & EfficiencyPolicy == "BAU")
 +
t4 <- subset(emissionFactors@output, Fuel == "Peat" & Pollutant == "PM2.5")
 +
t5 <- subset(emissionFactors@output, Fuel == "Peat" & Pollutant == "CO2direct")
 +
t6 <- subset(energyFactor@output, Building == "Apartment houses" & Heating == "District")
 +
t7 <- subset(ERF@output, Exposure_agent == "PM2.5" & Response == "Total mortality")
 +
t8 <- subset(heatingShares@output, Heating == "District" & Building == "Apartment houses" & Time == "2030")
 +
t9 <- subset(renovationShares@output, RenovationPolicy == "Active renovation" & Renovation == "Sheath reform" & Obsyear == "2030")
  
iF <- 1E-7
+
testvariable <- Ovariable("testvariable", data = data.frame(
 +
Iter = c(
 +
t1$Iter,
 +
t2$Iter,
 +
t3$Iter,
 +
t4$Iter,
 +
t5$Iter,
 +
t6$Iter,
 +
t7$Iter,
 +
t8$Iter,
 +
t9$Iter
 +
),
 +
Variable = c(
 +
rep("Construction of apartment houses", openv$N),
 +
rep("Efficiency ratio", openv$N),
 +
rep("Efficiency shares", openv$N),
 +
rep("PM2.5 emission factor", openv$N),
 +
rep("CO2 emission factor", openv$N),
 +
rep("Energy factor of apartment houses", openv$N),
 +
rep("Exposure-response funtion of PM2.5", openv$N),
 +
rep("Future heating shares", openv$N),
 +
rep("Shares of renovation types", openv$N)
 +
),
 +
Result = c(
 +
t1$constructionResult,
 +
t2$efficiencyRatioResult,
 +
t3$efficiencySharesResult,
 +
t4$emissionFactorsResult,
 +
t5$emissionFactorsResult,
 +
t6$energyFactorResult,
 +
t7$ERFResult,
 +
t8$heatingSharesResult,
 +
t9$renovationSharesResult
 +
)
 +
))
  
exposure <- Ovariable("exposure",  
+
tornado <- Ovariable("tornado",  
# emis is in ton /a
+
dependencies = data.frame(Name = c("cost", "testvariable")),
# iF = conc (g /m3) * pop (#) * BR (m3 /s) / emis (g /s) <=> conc = emis * iF / BR / pop # conc is the exposure concentration
 
dependencies = data.frame(Name = c("emis2", "iF", "pop")),
 
 
formula = function(...) {
 
formula = function(...) {
BR <- 20 # Nominal breathing rate (m^3 /d)
+
test <- cost * testvariable
BR <- BR / 24 / 3600 # m^3 /s
+
indices <- unique(test@output[test@marginal & ! colnames(test@output) %in% "Iter"])
out <- 1E+12 / 365 / 24 / 3600 # Emission scaling from ton /a to ug /s.
+
out <- data.frame()
out <- (emis2 * out) * iF / BR / pop # the actual equation
+
for(i in 1:nrow(indices)) {
out <- unkeep(out, prevresults = TRUE, sources = TRUE)
+
temp <- merge(test, indices[i,])@output
 +
temp <- cor(
 +
temp[[paste(cost@name, "Result", sep = "")]],
 +
temp[[paste(testvariable@name, "Result", sep = "")]],
 +
method = "spearman"
 +
)
 +
out <- rbind(out, data.frame(indices[i,], Result = temp))
 +
}
 
return(out)
 
return(out)
 
}
 
}
 
)
 
)
exposure <- EvalOutput(exposure, verbose = TRUE)
 
  
colnames(exposure@output)[colnames(exposure@output) == "Pollutant"] <- "Exposure_agent"
+
tornado <- EvalOutput(tornado)
ggplot(exposure@output, aes(x = Year, weight = exposureResult)) + geom_bar() + facet_grid(Exposure_agent ~ FuelPolicy, scales = "free_y")
+
 
 +
ggplot(tornado@output, aes(x = Variable, y = tornadoResult, colour = Objective)) +
 +
geom_point(position = "jitter", size = 2)+coord_flip() + theme_gray(base_size = 24) +
 +
labs(
 +
title = "Importance diagram with direct or incremental cost",
 +
y = "Spearman correlation vs. cost",
 +
x = "Uncertain input variable to correlate"
 +
)
 +
 
 +
cortable <- tornado@output
 +
# Remove those that actually are not probabilistic
 +
cortable <- cortable[!cortable$Variable %in% c("CO2 emission factor", "Energy factor of apartment houses") , ]
 +
cortable <- reshape(
 +
cortable,
 +
v.names = "tornadoResult",
 +
timevar = "Objective",
 +
idvar = c("FuelPolicy", "RenovationPolicy", "EfficiencyPolicy", "Variable"),
 +
drop = c("costSource", "testvariableSource", "tornadoSource"),
 +
direction = "wide"
 +
)
 +
 
 +
cat("Spearman correlations between the outcome (cost) and probabilistic input variables. Cost is either A) direct cost or B) incremental compared with BAU.\n")
 +
 
 +
oprint(cortable)
 +
 
 +
if(saveobjects) {
 +
objects.put(list = ls())
 +
cat(c("All objects archived. Write down the key of the run to retrieve them with objects.get. Objects: ",
 +
ls(), "\n"))
 +
}
 +
 
 +
</rcode>
 +
 
 +
==== Model version 1 ====
 +
 
 +
:''This model version was used to produce the submitted manuscript in spring 2015.
 +
 
 +
[[heande:Kuopio housing]]
 +
 
 +
; Calculate building stock into the future
 +
* The dynamics is calculated by adding building floor area at time points greater than construction year, and by subtracting when time point is greater than demolition year. This is done by building category, not individually.
 +
* Also the renovation dynamics is built using event years: at an event, a certain amount of floor area is moved from one energy efficiency category to another.
 +
* Full data are stored in the ovariables. Before evaluating, extra columns and rows are removed. The first part of the code is about this.
 +
 
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=s3zYXviOuNZtzMZz Full model run with corrected table 13th March 2015]
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=Tm0DmRTpr2qTAaVW Full model run 23 Feb 2015]
 +
* [http://en.opasnet.org/en-opwiki/index.php?title=Special:RTools&id=CcSsz4RJAZFaAAmE Old example model run] (running the model takes more than 6 min, so use this ready-made result)
 +
 
 +
<rcode graphics=1 store=0 variables="name:server|type:hidden|default:TRUE">
 +
 
 +
### THIS CODE IS FROM PAGE [[Climate change policies and health in Kuopio]] (Op_en5461, code_name = "")
 +
 
 +
# Siirrä Kuopion-datat kässäristä linkin taakse Opasnettiin
 +
# KÄssäriin vain yhteenvetotaulukko joka kaupungista.
 +
# Mieti mitä sanotaan sisäilmasta. Perusmalli toimii ilmankin, ja Matin nostama miljoonan sisäilman hankaluus pitäisi lähinnä keskustella. Käytetäänkä ylileveitä jakaumia?
 +
# Onko järkeä yhdistää kaupungit? Silloin tulisi NA:ta eri päätösten kohdalle, ja tämä pitäisi huomioida kuvissa (muutenkin kannattaisi slaissata data ennen kuvien piirtämistä).
 +
# Tarkista iF jota käytetään: Mikä on iF-summary?
 +
 
 +
 
 +
library(OpasnetUtils)
 +
library(ggplot2)
 +
library(rgdal)
 +
library(maptools)
 +
library(RColorBrewer)
 +
library(classInt)
 +
#library(OpasnetUtilsExt)
 +
library(RgoogleMaps)
 +
 
 +
openv.setN(0) # use medians instead of whole sampled distributions
 +
 
 +
objects.latest("Op_en6007", code_name = "answer") # [[OpasnetUtils/Drafts]] findrest
 +
 
 +
obstime <- data.frame(Startyear = (192:205) * 10) # Observation years must be defined for an assessment.
 +
 
 +
## Additional index needed in followup of ovariables efficiencyShares and stockBuildings
 +
 
 +
year <- Ovariable("year", data = data.frame(
 +
Constructed = factor(
 +
c("1799-1899", "1900-1909", "1910-1919", "1920-1929", "1930-1939", "1940-1949",
 +
"1950-1959", "1960-1969", "1970-1979", "1980-1989", "1990-1999",
 +
"2000-2010", "2011-2019", "2020-2029", "2030-2039", "2040-2049"
 +
),
 +
ordered = TRUE
 +
),
 +
Time = c(1880, 1905 + 0:14 * 10),
 +
Result = 1
 +
))
 +
 
 +
BS <- 24
 +
heating_before <- FALSE
 +
efficiency_before <- TRUE
 +
figstofile <- FALSE
 +
 
 +
###################### Decisions
 +
 
 +
decisions <- opbase.data('Op_en5461', subset = "Decisions") # [[Climate change policies and health in Kuopio]]
 +
 
 +
DecisionTableParser(decisions)
 +
 
 +
# Remove previous decisions, if any.
 +
rm(
 +
"buildings",
 +
"stockBuildings",
 +
"changeBuildings",
 +
"efficiencyShares",
 +
"energyUse",
 +
"heatingShares",
 +
"renovationShares",
 +
"renovationRate",
 +
"fuelShares",
 +
"year",
 +
envir = openv
 +
)
 +
 
 +
############################ City-specific data
 +
 
 +
####!------------------------------------------------
 +
objects.latest("Op_en5417", code_name = "initiate") # [[Population of Kuopio]]
 +
# population: City_area
 +
objects.latest("Op_en5932", code_name = "initiate") # [[Building stock in Kuopio]] Building ovariables:
 +
# buildingStock: Building, Constructed, City_area
 +
# rateBuildings: Age, (RenovationPolicy)
 +
# renovationShares: Renovation
 +
# construction: Building
 +
# constructionAreas: City_area
 +
# buildingTypes: Building, Building2
 +
# heatingShares: Building, Heating, Eventyear
 +
# heatingSharesNew: Building2, Heating
 +
# eventyear: Constructed, Eventyear
 +
# efficiencyShares: Time, Efficiency
 +
 
 +
renovationRate <- EvalOutput(renovationRate) * 10 # Rates for 10-year periods
 +
 
 +
#################### Energy use (needed for buildings submodel)
 +
 
 +
####!------------------------------------------------
 +
objects.latest("Op_en5488", code_name = "initiate") # [[Energy use of buildings]]
 +
# energyUse: Building, Heating
 +
# efficiencyShares: Efficiency, Constructed
 +
# renovationRatio: Efficiency, Building2, Renovation
 +
####i------------------------------------------------
 +
 
 +
###################### Actual building model
 +
# The building stock is measured as m^2 floor area.
 +
 
 +
####!------------------------------------------------
 +
objects.latest("Op_en6289", code_name = "initiate") # [[Building model]] # Generic building model.
 +
# buildings: formula-based
 +
# heatingEnergy: formula-based
 +
####i------------------------------------------------
  
totcases <- EvalOutput(totcases)
+
buildings <- EvalOutput(buildings)
#totcases@output <- totcases@output[!is.na(result(totcases)) , ] # Not needed with new oapply
 
  
#cases <- totcases * Ovariable("incre", data = data.frame(Exposcen = c("BAU", "No exposure"), Result = c(1, -1)))
+
buildings@output$RenovationPolicy <- factor(
cases <- oapply(totcases, cols = c("Exposcen", "Age", "Sex", "City_area"), FUN = sum)
+
buildings@output$RenovationPolicy,
 +
levels = c("BAU", "Active renovation", "Effective renovation"),
 +
ordered = TRUE
 +
)
  
DW <- Ovariable("DW", data = data.frame(directs["Trait"], Result = directs$DW))
+
buildings@output$EfficiencyPolicy <- factor(
L <- Ovariable("L", data = data.frame(directs["Trait"], Result = directs$L))
+
buildings@output$EfficiencyPolicy,
 +
levels = c("BAU", "Active efficiency"),
 +
ordered = TRUE
 +
)
  
#ggplot(cases@output[cases@output$Causes == "PM2.5+" , ], aes(x = Year, weight = Result/10, fill = Disease)) + geom_bar() + facet_grid(FuelPolicy ~ RenovationPolicy, scale = "free_y")
+
bui <- oapply(buildings * 1E-6, cols = c("City_area", "buildingsSource"), FUN = sum)@output
  
DALYs <- cases * DW * L
+
ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Heating)) + geom_bar(binwidth = 5) +
#DALYs <- oapply(DALYs, cols = c("Trait"), FUN = sum)
+
theme_gray(base_size = BS) +
DALYs@output <- DALYs@output[DALYs@output$Trait != "Lung cancer" , ] # Has to be removed to avoid double counting.
+
labs(
 +
title = "Building stock in Kuopio",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
#ggplot(DALYs@output[DALYs@output$Causes == "PM2.5+" , ], aes(x = Year, weight = Result/10, fill = Response.metric)) + geom_bar() + facet_grid(FuelPolicy ~ RenovationPolicy, scale = "free_y")
+
if(figstofile) ggsave("Figure3.eps", width = 8, height = 7)
ggplot(DALYs@output, aes(x = Year, weight = Result, fill = Trait)) + geom_bar() + facet_grid(RenovationPolicy ~ FuelPolicy)
 
  
 +
ggplot(subset(bui, EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Renovation)) +
 +
geom_bar(binwidth = 5) +
 +
facet_grid(. ~ RenovationPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio by renovation policy",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
############################# Plot graphs
+
ggplot(subset(bui, RenovationPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Efficiency)) + geom_bar(binwidth = 5) +
 +
facet_grid(. ~ EfficiencyPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio by efficiency policy",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
######## Buildings in Kuopio on map
+
ggplot(subset(bui, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU"), aes(x = Time, weight = buildingsResult, fill = Building)) + geom_bar(binwidth = 5) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Building stock in Kuopio",
 +
x = "Time",
 +
y = "Floor area (M m2)"
 +
)
  
if(exists("server")) # The following code only works from Opasnet server.
+
###################### Energy and emissions
{
 
if(language == "EN") lege2 <- "Age of building" else lege2 <- "Rakennuksen ikä"
 
  
shp <- readOGR('PG:host=localhost user=postgres dbname=spatial_db','kuopio_house')
+
####!------------------------------------------------
proj4string(shp) <- ("+init=epsg:3067") # The map projection of NLS Finland.
+
objects.latest("Op_en2791", code_name = "initiate") # [[Emission factors for burning processes]]
 +
# emissionFactors: Burner, Fuel, Pollutant
 +
# fuelShares: Heating, Burner, Fuel
 +
####i------------------------------------------------
  
epsg4326String <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")
+
heatingEnergy <- EvalOutput(heatingEnergy)
shp2 <- spTransform(shp,epsg4326String) # Convert to longitude-latitude projection.
 
  
MyRmap(shp2, plotvar = "ika", legend_title = lege2, numbins = 8, pch = 19, cex = 0.3) # Draw the map.
+
################ Transport and fate
}
 
  
if(exists("server")) BS <- 24 else BS <- 12
+
objects.latest("Op_en5813", code_name = "initiate") # [[Intake fractions of PM]], iF
  
### Impact graphs in ENGLISH
+
emissions <- EvalOutput(emissions)
 +
emissions@output$Time <- as.numeric(as.character(emissions@output$Time))
  
ggplot(buildings@output) + geom_bar() + theme_gray(base_size = BS) +
+
# Plot energy need and emissions
aes(x = Building, weight = buildingsResult/1000000, fill = Heating) + labs(y = "Floor area (M m2)", title = "Building impacts of renovation policy") + coord_flip() # + facet_grid(. ~ RenovationPolicy)
 
  
plo <- ggplot(buildings@output) + geom_bar() + facet_grid(. ~ RenovationPolicy) + theme_gray(base_size = BS) +
+
ggplot(subset(heatingEnergy@output, EfficiencyPolicy == "BAU"), aes(x = Time, weight = heatingEnergyResult * 1E-6, fill = Heating)) + geom_bar(binwidth = 5) +
aes(x = Year, weight = buildingsResult/1000000, fill = Renovation) + labs(y = "Floor area (M m2)",
+
facet_wrap( ~ RenovationPolicy) + theme_gray(base_size = BS) +
title = "Building impacts of renovation policy")
+
labs(
 +
title = "Energy used in heating in Kuopio",
 +
x = "Time",
 +
y = "Heating energy (GWh /a)"
 +
)
  
print(plo)
+
if(figstofile) ggsave("Figure4.eps", width = 11, height = 7)
  
ggplot(heatingEnergy@output) + geom_bar() + theme_gray(base_size = BS) + labs(title = "Energy impacts of renovation policy") +
+
emis <- truncateIndex(emissions, cols = "Emission_site", bins = 5)@output
aes(x = Building, weight = heatingEnergyResult/1E+6, fill = Heating) + labs(y = "Heating energy need (GWh /a)") + coord_flip() #  + facet_grid(. ~ RenovationPolicy)
 
  
plo <- ggplot(heatingEnergy@output) + geom_bar() + facet_grid(. ~ RenovationPolicy) + theme_gray(base_size = BS) +  
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
labs(title = "Energy impacts of renovation policy", y = "Heating energy need (GWh /a)") +
+
facet_grid(Pollutant ~ FuelPolicy, scale = "free_y") + theme_gray(base_size = BS) +
aes(x = Year, weight = heatingEnergyResult/1E+6, fill = Heating)
+
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
print(plo)
+
if(figstofile) ggsave("Figure5.eps", width = 8, height = 7)
  
emis@output <- emis@output[emis@output$Renovation == "BAU" , ]
+
ggplot(heatingEnergy@output, aes(x = Time, weight = heatingEnergyResult * 1E-6, fill = Heating)) + geom_bar(binwidth = 5) +
 +
facet_grid(EfficiencyPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Energy used in heating in Kuopio",
 +
x = "Time",
 +
y = "Heating energy (GWh /a)"
 +
)
  
ggplot(emis@output) + geom_bar() + facet_grid(Pollutant ~ . , scales = "free_y") + theme_gray(base_size = BS) + labs(title = "Emission impacts of biofuel policy") +
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
aes(x = Heating, weight = Result, fill = Fuel) + labs(y = "Emissions to air (ton /a)") + theme(axis.text.x = element_text(angle = 90, hjust = 1))
+
facet_grid(Pollutant ~ FuelPolicy, scale = "free_y") + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
plo <- ggplot(emis@output) + geom_bar() + facet_grid(Pollutant ~ FuelPolicy, scales = "free_y") + theme_gray(base_size = BS) +  
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Emission_site)) + geom_bar(binwidth = 5) +
labs(title = "Emission impacts of biofuel policy", y = "Emissions to air (ton /a)") +
+
facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
aes(x = Year, weight = Result, fill = Fuel)
+
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
print(plo)
+
ggplot(subset(emis, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = emissionsResult, fill = Fuel)) + geom_bar(binwidth = 5) +
 +
facet_grid(Pollutant ~ RenovationPolicy, scale = "free_y") + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Emissions from heating in Kuopio",
 +
x = "Time",
 +
y = "Emissions (ton /a)"
 +
)
  
# plo <- ggplot(health@output) + geom_bar() + facet_grid(FuelPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
+
###################### Health assessment
# labs(title = "Health impacts of fuel and renovation policy", y = "Premature deaths (# /a)") +
 
# aes(x = Year, weight = Result, fill = Heating)
 
#
 
# print(plo)
 
  
### Impact graphs in FINNISH
+
####!------------------------------------------------
 +
objects.latest('Op_en2261', code_name = 'initiate') # [[Health impact assessment]] dose, RR, totcases.
 +
objects.latest('Op_en5917', code_name = 'initiate') # [[Disease risk]] disincidence
 +
directs <- tidy(opbase.data("Op_en5461", subset = "Direct inputs"), direction = "wide") # [[Climate change policies and health in Kuopio]]
 +
####i------------------------------------------------
  
if(FALSE) {
+
colnames(directs) <- gsub(" ", "_", colnames(directs))
  
plo <- ggplot(buildings@output) + geom_bar() + facet_grid(. ~ Remonttipolitiikka) + theme_gray(base_size = BS) +
+
### Use these population and iF values in health impact assessment. Why?
aes(x = Year, weight = buildingsResult/1000000, fill = Renovation) + labs(y = "Rakennuspinta-ala (M m2)",
 
title = "Remonttipolitiikan vaikutus rakennuskantaan")
 
  
print(plo)
+
frexposed <- 1 # fraction of population that is exposed
 +
bgexposure <- 0 # Background exposure to an agent (a level below which you cannot get in practice)
 +
BW <- 70 # Body weight (is needed for RR calculations although it is irrelevant for PM2.5)
  
plo <- ggplot(heatingEnergy@output) + geom_bar() + facet_grid(. ~ Remonttipolitiikka) + theme_gray(base_size = BS) +
+
population <- 1E+5
labs(title = "Remonttipolitiikan vaikutus energiankulutukseen", y = "Lämmitysenergian tarve (GWh /a)") +
 
aes(x = Year, weight = heatingEnergyResult/1E+6, fill = Heating)
 
  
print(plo)
+
exposure <- EvalOutput(exposure, verbose = TRUE)
  
emis@output <- emis@output[emis@output$Remonttipolitiikka == "BAU" , ]
+
ggplot(subset(exposure@output, RenovationPolicy == "BAU" & EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) +
 +
geom_bar(binwidth = 5) + facet_grid(Area ~ Emission_height) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Exposure to PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Average PM2.5 (µg/m3)"
 +
)
  
plo <- ggplot(emis@output) + geom_bar() + facet_grid(Pollutant ~ Bioenergiapolitiikka, scales = "free_y") +
+
exposure@output <- exposure@output[exposure@output$Area == "Average" , ] # Kuopio is an average area,
theme_gray(base_size = BS) + labs(title = "Bioenergiapolitiikan päästövaikutukset", y = "Päästöt ilmaan (ton /a)") +
+
# rather than rural or urban.
aes(x = Year, weight = Result, fill = Fuel)
 
  
print(plo)
+
ggplot(subset(exposure@output, EfficiencyPolicy == "BAU"), aes(x = Time, weight = exposureResult, fill = Heating)) + geom_bar(binwidth = 5) + facet_grid(FuelPolicy ~ RenovationPolicy) + theme_gray(base_size = BS) +
 +
labs(
 +
title = "Exposure to PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Average PM2.5 (µg/m3)"
 +
)
  
# plo <- ggplot(health@output) + geom_bar() + facet_grid(Bioenergiapolitiikka ~ Remonttipolitiikka) + theme_gray(base_size = BS) +
+
totcases <- EvalOutput(totcases)
# labs(title = "Remontti- ja bioenergiapolitiikan terveysvaikutukset", y = "Ennenaikaisia kuolemia (# /a)") +
+
totcases@output$Time <- as.numeric(as.character(totcases@output$Time))
# aes(x = Year, weight = Result, fill = Heating)
+
totcases <- oapply(totcases, cols = c("Age", "Sex"), FUN = sum)
#
 
# print(plo)
 
}
 
  
ggplot(dose@output, aes(x = Year, y = doseResult, colour = RenovationPolicy)) + geom_point() + facet_grid(. ~ FuelPolicy)
+
ggplot(subset(totcases@output, EfficiencyPolicy == "BAU" & FuelPolicy == "BAU"), aes(x = Time, weight = totcasesResult, fill = Heating))+geom_bar(binwidth = 5) +  
 +
facet_grid(Trait ~ RenovationPolicy) +
 +
theme_gray(base_size = BS) +
 +
labs(
 +
title = "Health effects of PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Health effects (deaths /a)"
 +
)
  
ggplot(totcases@output, aes(x = Year, y = totcasesResult, colour = Trait)) + geom_point() + facet_grid(Trait ~ FuelPolicy)
+
DW <- Ovariable("DW", data = data.frame(directs["Trait"], Result = directs$DW))
 +
L <- Ovariable("L", data = data.frame(directs["Trait"], Result = directs$L))
  
ggplot(RR@output, aes(x = RRResult, colour = Trait)) + geom_density()
+
DALYs <- totcases * DW * L
  
#ggplot(cases@output, aes(x = Year, weight = Result, fill = Trait)) + geom_bar() + facet_grid(RenovationPolicy ~ #FuelPolicy)
+
cat("Total DALYs/a by different combinations of policy options.\n")
  
############ Health impact graph corrected. This should be done in a previous stage.
+
temp <- DALYs
 +
temp@output <- subset(
 +
temp@output,
 +
as.character(Time) %in% c("2010", "2030") & Trait == "Total mortality"
 +
)
  
ter <- DALYs
+
oprint(oapply(temp, INDEX = c("Time", "EfficiencyPolicy", "RenovationPolicy", "FuelPolicy"), FUN = sum))
ter2 <- ter
 
ter2@output <- ter@output[
 
ter@output$Bioenergiapolitiikka == "BAU" &
 
ter@output$Remonttipolitiikka == "BAU" ,
 
]
 
ter2 <- unkeep(ter2, cols = c("Bioenergiapolitiikka", "Remonttipolitiikka"))
 
  
bau <- Ovariable(data = data.frame(
+
ggplot(subset(DALYs@output, FuelPolicy == "BAU" & Trait == "Total mortality"), aes(x = Time, weight = Result, fill = Heating))+geom_bar(binwidth = 5) +
Bioenergiapolitiikka = rep(c("BAU", "Bioenergian lisäys"), each = 2),
+
facet_grid(EfficiencyPolicy ~ RenovationPolicy) +
Remonttipolitiikka = rep(c("Aktiivinen remontointi", "BAU"), times = 2),
+
theme_gray(base_size = BS) +
Result = 1
+
labs(
))
+
title = "Health effects in DALYs of PM2.5 from heating in Kuopio",
 +
x = "Time",
 +
y = "Health effects (DALY /a)"
 +
)
  
bau <- bau * Ovariable(data = data.frame(
+
ggplot(subset(DALYs@output, Time == 2030 & Trait == "Total mortality"), aes(x = FuelPolicy, weight = Result, fill = Heating))+geom_bar() +
Year = c(1980, 1990, 2000, 2010, 2020, 2030, 2040, 2050),
+
facet_grid(EfficiencyPolicy ~ RenovationPolicy) +
Result = c(1,1,1,1,0,0,0,0)
+
theme_gray(base_size = BS) +
))
+
labs(
 +
title = "Health effects in DALYs of PM2.5 from heating in Kuopio",
 +
x = "Biofuel policy in district heating",
 +
y = "Health effects (DALY /a)"
 +
)
  
ter <- ter * (1 - bau) + ter2 * bau
+
######## Buildings in Kuopio on map
levels(ter@output$Heating) <- c("Kaukolämpö", "Sähkö", "Maalämpö", "Öljy", "Puu")
 
colnames(ter@output)[colnames(ter@output) == "Heating"] <- "Lämmitys"
 
  
ggplot(ter@output[ter@output$Tehokkuuspolitiikka == "BAU" , ], aes(x = Year, weight = Result/get("N", envir=openv),
+
# Calculate locations for Kuopio districts
fill = Lämmitys)) + geom_bar() + facet_grid(Remonttipolitiikka ~ Bioenergiapolitiikka) +
 
labs(y = "Pienhiukkasten terveyshaitta")
 
  
ggplot(cases@output, aes(x = Year, weight = totcasesResult, fill = Trait)) + geom_bar() + facet_grid(RenovationPolicy ~ FuelPolicy)
+
temp <- buildings
 +
temp@output <- subset(temp@output,
 +
Time == 2030 & EfficiencyPolicy == "BAU" & RenovationPolicy == "BAU"
 +
)
 +
temp <- unkeep(temp, sources = TRUE, prevresults = TRUE)
 +
temp <- oapply(temp, cols = c("Building", "Heating", "Efficiency", "Renovation"), FUN = sum)
  
ggplot(DALYs@output, aes(x = Year, weight = Result, fill = Trait)) + geom_bar() + facet_grid(RenovationPolicy ~ FuelPolicy)
+
####!------------------------------------------------
 +
districts <- tidy(opbase.data("Op_en5932.kuopio_city_districts"), widecol = "Location") # [[Building stock in Kuopio]]
 +
####i------------------------------------------------
 +
 
 +
colnames(districts) <- gsub("[ \\.]", "_", colnames(districts))
 +
districts <- Ovariable("districts", data = data.frame(districts, Result = 1))
  
############# Building stock in Kuopio
+
temp <- temp * districts
################ EI TARVITTANE?
 
  
energyEfficiency@data$Efficiency <- factor(
+
MyRmap(
energyEfficiency@data$Efficiency,
+
ova2spat(
levels = c("Old", "New", "Low-energy", "Passive"),
+
temp,  
ordered = TRUE
+
coord = c("E", "N"),  
 +
proj4string = "+init=epsg:3067"
 +
), # National Land Survey uses EPSG:3067 (ETRS-TM35FIN)
 +
plotvar = "Result",  
 +
legend_title = "Floor area",  
 +
numbins = 8,
 +
pch = 19,
 +
cex = 2
 
)
 
)
  
Line 529: Line 1,019:
  
 
* [[Building stock in Kuopio]]
 
* [[Building stock in Kuopio]]
* [[Exposure to PM2.5 in Finland]]
+
* [[Intake fractions of PM]]
 
* [[OpasnetUtils/Drafts]]
 
* [[OpasnetUtils/Drafts]]
 
* [[Energy use of buildings]]
 
* [[Energy use of buildings]]
 +
* [[Kuopio energy production]]
 
* [[Emission factors for burning processes]]
 
* [[Emission factors for burning processes]]
 
* [[Population of Kuopio]]
 
* [[Population of Kuopio]]
* [http://www.doria.fi/bitstream/handle/10024/94404/isbn9789522655578.pdf?sequence=2 Sanni Väisänen]: Greenhouse gas emissions from peat and biomass-derived fuels, electricity and heat — Estimation of various production chains by using LCA methodology {{comment|# |This work should be carefully read. It may affect conclusions.|--[[User:Jouni|Jouni]] ([[User talk:Jouni|talk]]) 13:27, 20 March 2014 (EET)}}
+
* [[Building model]]
 +
* [[Health impact assessment]]
 +
* [[Disease risk]]
 +
* [[ERFs of environmental pollutants]]
 +
* [[Burden of disease in Finland]]
 +
* [[Climate change policies and health in Kuopio]] DALY weights etc
  
 
===Decisions===
 
===Decisions===
  
 +
* Efficiency policy (index EfficiencyPolicy): Relates to the shares of efficiency types when new buildings are built (ovariable efficiencyShares).
 +
** BAU: The shares are like in [[Energy use of buildings#Energy efficiency in heating]]
 +
** Active efficiency: Passive buildings increase the market share by 25 and 10 %-units at the expense of low-energy buildings since 2020 and 2040, respectively.
 +
* Biofuel policy (index FuelPolicy): Increase the share of biofuels in the Haapaniemi power plant (ovariable fuelShares).
 +
** BAU: The shares are like in [[Emission factors for burning processes#Emission factors for heating]] (Fuel use in different heating types): Peat 84 %, wood 4 %, heavy oil 12 %.
 +
** Biofuel increase: Peat 49.5 %, wood 49.5 %, heavy oil 1 %.
 +
* Renovation policy (index RenovationPolicy): Existing buildings are renovated (typically after 25 years of age) for better energy efficiency. Different renovations produce different results (ovariables renovationRate, renovationShares).
 +
** BAU: Default renovation rate is 3 % /a if the age of the building is >= 25 a. For renovation shares, see [[Building stock in Kuopio#Renovations]].
 +
** Active renovation: The renovation rate of all renovation types is 4.5 % /a.
 +
** Effective renovation: The renovation rate is 3 % /a as in BAU, but all renovations are the most effective. i.e. sheath reforms.
 +
 +
{{hidden|
 
<t2b name='Decisions' index='Decision maker,Decision,Option,Variable,Cell,Change,Unit' obs='Amount' desc='Description' unit='-'>
 
<t2b name='Decisions' index='Decision maker,Decision,Option,Variable,Cell,Change,Unit' obs='Amount' desc='Description' unit='-'>
Builders|EfficiencyPolicy|BAU|efficienciesNew|Efficiency:Passive;Constructed:2020-2029|Add||0|
+
Builders|EfficiencyPolicy|BAU|efficiencyShares||Add||0|
Builders|EfficiencyPolicy|Active efficiency|efficienciesNew|Efficiency:Passive;Constructed:2020-2029|Add||0.3|Given as fraction because that's how it is calculated in the model
+
Builders|EfficiencyPolicy|Active efficiency|efficiencyShares|Efficiency:Passive;Time:2020,2025,2030,2035|Add|fraction|0.25|All input must be given in units that are used in respective ovariables.
Builders|EfficiencyPolicy|Active efficiency|efficienciesNew|Efficiency:Low-energy;Constructed:2020-2029|Add||-0.3|Given as fraction because that's how it is calculated in the model
+
Builders|EfficiencyPolicy|Active efficiency|efficiencyShares|Efficiency:Passive;Time:2040,2045,2050|Add|fraction|0.1|
Kuopion Energia|FuelPolicy|BAU|fuelTypes||Add||0|
+
Builders|EfficiencyPolicy|Active efficiency|efficiencyShares|Efficiency:Low-energy;Time:2020,2025,2030,2035|Add|fraction|-0.25|
Kuopion Energia|FuelPolicy|Biofuel increase|fuelTypes|Burner:Large fluidized bed;Fuel:Wood;Year:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.495|
+
Builders|EfficiencyPolicy|Active efficiency|efficiencyShares|Efficiency:Low-energy;Time:2040,2024,2050|Add|fraction|-0.1|
Kuopion Energia|FuelPolicy|Biofuel increase|fuelTypes|Burner:Large fluidized bed;Fuel:Peat;Year:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.495|
+
Kuopion Energia|FuelPolicy|BAU|fuelShares||Add||0|
Kuopion Energia|FuelPolicy|Biofuel increase|fuelTypes|Burner:Large fluidized bed;Fuel:Heavy oil;Year:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.01|
+
Kuopion Energia|FuelPolicy|Biofuel increase|fuelShares|Burner:Large fluidized bed;Fuel:Wood;Time:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.495|
Building owner|RenovationPolicy|BAU|renovation||Multiply||1|
+
Kuopion Energia|FuelPolicy|Biofuel increase|fuelShares|Burner:Large fluidized bed;Fuel:Peat;Time:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.495|
Building owner|RenovationPolicy|Active renovation|renovation||Multiply||1.5|
+
Kuopion Energia|FuelPolicy|Biofuel increase|fuelShares|Burner:Large fluidized bed;Fuel:Heavy oil;Time:2015,2020,2025,2030,2035,2040,2045,2050|Replace|fraction|0.01|
Building owner|RenovationPolicy|Effective renovation|renovation||Multiply||1|
+
Building owner|RenovationPolicy|BAU|renovationRate||Multiply|1 /a|1|
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Windows|Replace|%|0|
+
Building owner|RenovationPolicy|Active renovation|renovationRate||Multiply|1 /a|1.5|
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Technical systems|Replace|%|0|
+
Building owner|RenovationPolicy|Effective renovation|renovationRate||Multiply|1 /a|1|
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Sheath reform|Replace|%|1|
+
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Windows|Replace|fraction|0|
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:General|Replace|%|0|
+
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Technical systems|Replace|fraction|0|
Building owner|RenovationPolicy|BAU|renovationShares||Add|%|0|
+
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:Sheath reform|Replace|fraction|1|
Building owner|RenovationPolicy|Active renovation|renovationShares||Add|%|0|
+
Building owner|RenovationPolicy|Effective renovation|renovationShares|Renovation:General|Replace|fraction|0|
 +
Building owner|RenovationPolicy|BAU|renovationShares||Add|fraction|0|
 +
Building owner|RenovationPolicy|Active renovation|renovationShares||Add|fraction|0|
 
</t2b>
 
</t2b>
 +
}}
  
 
=== Direct inputs ===
 
=== Direct inputs ===
  
<t2b name='Direct inputs' index='Exposure agent,Trait,Observation' locations='Cases,DW,L' desc='Description' unit='-'>
+
<t2b name='Direct inputs' index='Exposure agent,Response,Observation' locations='Cases,DW,L' desc='Description' unit='-'>
 
PM2.5|Total mortality|877|1|11|Actually "Mortality (all cause)". In 2009 for Pohjois-Savo area 1090 / 100 000 from death cause registry.
 
PM2.5|Total mortality|877|1|11|Actually "Mortality (all cause)". In 2009 for Pohjois-Savo area 1090 / 100 000 from death cause registry.
 
PM2.5|Work loss days (WLDs)|323135|0.02|0.003|
 
PM2.5|Work loss days (WLDs)|323135|0.02|0.003|
Line 577: Line 1,088:
 
|Lung cancer||1|11|Guesswork. The same as total mortality.
 
|Lung cancer||1|11|Guesswork. The same as total mortality.
 
</t2b>
 
</t2b>
 +
 +
<rcode name="DALYs" label="Initiate DALYs (developers only)" embed=1>
 +
# Code Climate change policies and health in Kuopio/DW
 +
library(OpasnetUtils)
 +
 +
directs <- tidy(opbase.data("Op_en5461", subset = "Direct inputs"), direction = "wide") # [[Climate change policies and health in Kuopio]]
 +
colnames(directs) <- gsub(" ", "_", colnames(directs))
 +
 +
DW <- Ovariable("DW", data = data.frame(directs["Response"], Result = directs$DW))
 +
L <- Ovariable("L", data = data.frame(directs["Response"], Result = directs$L))
 +
 +
DALYs <- Ovariable("DALYs",
 +
dependencies = data.frame(Name = c("DW", "L")),
 +
formula = function(...) {
 +
out <- totcases * DW * L
 +
return(out)
 +
}
 +
)
 +
 +
objects.store(DALYs, DW, L)
 +
cat("Objects DALYs, DW, L stored.\n")
 +
 +
</rcode>
  
 
===Specific actions - real and potential===
 
===Specific actions - real and potential===
Line 603: Line 1,137:
 
* Well-being...
 
* Well-being...
  
Who are the stakeholders in the assessment [[Climate change policies and health in Kuopio]] and what are their values (i.e., what variables do they want to optimize)? Result is a weight factor for a multi-criteria decision analysis (see e.g. [[:en:Weighted product model|Weighted product model]]).
+
An [http://en.opasnet.org/en-opwiki/index.php?title=Climate_change_policies_and_health_in_Kuopio&oldid=34738 archived version] was planning to use [[:en:Weighted product model|Weighted product model]] to summarise results, but the idea was dropped.
  
<t2b name="Endpoints" index="Stakeholder,Variable,Cell,Observation" locations="Model,Result,Description" unit="-">
+
* Stakeholders: City of Kuopio, Citizens, Budget office of Kuopio
City of Kuopio|Greenhouse gas emissions in Kuopio|Sector: Total|Weighted sum|1|
 
Citizens|Greenhouse gas emissions in Kuopio|Sector: Total|Weighted product|0.5|
 
Citizens|Health impacts of climate policies in Kuopio|Sector: Total|Weighted product|0.5|
 
Budget office of Kuopio|City budget total||Weighted sum|1|
 
</t2b>
 
  
 
===Assessment-specific data===
 
===Assessment-specific data===

Latest revision as of 16:52, 11 January 2016


Main message:
Question:

What are the most beneficial ways from public health point of view to reduce GHG emissions in Kuopio?

Answer:

The target of 40 % GHG reduction seems realistic due to reforms in Haapaniemi power plant, assuming that GHG emissions for wood-based fuel is 0. Life-cycle impacts of the wood-based fuel have not yet been estimated.


{{#display_map: 62.900223, 27.637482, Kuopio | zoom = 11 }}

Scope

Question

What are potential climate policies that reach the greenhouse emission targets in the city of Kuopio for years 2010-2030? What are their effects on health and well-being, and what recommendations can be given based on this? The national greenhouse emission target is to reduce greenhouse gas emissions by 20 % between 1990 and 2020; the city of Kuopio has its own, more ambitious target of 40 % for the same time period.

Answer

Conclusions

The target of 40 % GHG reduction seems realistic due to reforms in Haapaniemi power plant, assuming that GHG emissions for wood-based fuel is 0. Life-cycle impacts of the wood-based fuel have not yet been estimated.

Results

Model version 2

This model version was used to produce the corrected manuscript in July 2015.
  • Model run 21.7.2015 runs to the end but emissions are too large exp for wood after 1980.
  • Model run 22.7.2015 Bugs with fuelShares fixed. Now results are similar to the ones in the manuscript. Except that health impacts are 2-3 times higher, only partly due to higher wood burning in the 2000's.
  • Model run 23.7.2015 archived version. Also renovationShares and changeBuildings data corrected.
  • Model run 24.7.2015 archived version. This was used for the manuscript.

+ Show code

Sensitivity analysis

How many iterations? (For more, run on your own computer):

+ Show code

Model version 1

This model version was used to produce the submitted manuscript in spring 2015.
Calculate building stock into the future
  • The dynamics is calculated by adding building floor area at time points greater than construction year, and by subtracting when time point is greater than demolition year. This is done by building category, not individually.
  • Also the renovation dynamics is built using event years: at an event, a certain amount of floor area is moved from one energy efficiency category to another.
  • Full data are stored in the ovariables. Before evaluating, extra columns and rows are removed. The first part of the code is about this.

+ Show code

Rationale

Error creating thumbnail: Unable to save thumbnail to destination
Causal diagram of the building model.

Dependencies

Decisions

  • Efficiency policy (index EfficiencyPolicy): Relates to the shares of efficiency types when new buildings are built (ovariable efficiencyShares).
  • Biofuel policy (index FuelPolicy): Increase the share of biofuels in the Haapaniemi power plant (ovariable fuelShares).
  • Renovation policy (index RenovationPolicy): Existing buildings are renovated (typically after 25 years of age) for better energy efficiency. Different renovations produce different results (ovariables renovationRate, renovationShares).
    • BAU: Default renovation rate is 3 % /a if the age of the building is >= 25 a. For renovation shares, see Building stock in Kuopio#Renovations.
    • Active renovation: The renovation rate of all renovation types is 4.5 % /a.
    • Effective renovation: The renovation rate is 3 % /a as in BAU, but all renovations are the most effective. i.e. sheath reforms.



Direct inputs

Direct inputs(-)
ObsExposure agentResponseCasesDWLDescription
1PM2.5Total mortality877111Actually "Mortality (all cause)". In 2009 for Pohjois-Savo area 1090 / 100 000 from death cause registry.
2PM2.5Work loss days (WLDs)3231350.020.003
3PM2.5Restricted activity days (RADs)318670.070.0032.1 million in whole Finland
4PM2.5Infant mortality3181<1 year old 2009 data for Pohjois-Savo area 244 / 100 000 from death registry. In 2009 in Kuopio 1110 <1 year olds.
5PM2.5COPD3390.09915Actually "Chronic bronchitis (>15 year olds)". Kelasto, includes astma cases too
6PM2.5Cardiovascular hospital admissions (number)21090.2530.01721424 in year 2010 in Kuopio hospital. Hospital serves area with 817166 inhabitats.
7PM2.5Respiratory hospital admissions11500.0430.02In 2007 1429.55 hospital discharges for respiratory disease / 100 000 in whole Finland. http://data.euro.who.int/hfadb/
8PM2.5Asthma medication use (children aged 5-14)620.04315Kelasto
9Mold/dampnessAsthma development (>15 year olds)2520.04315Kelasto-database
10Mold/dampnessAsthma development (5-14 year olds)620.04315Kelasto-database
11NoiseHighly annoyed0.021
12NoiseSleep disturbance0.071
13NoiseMyocardial infarction12890.4390.01966313101 cases in Kuopio university Hospital in year 2010. Hospital serves area with 817166 inhabitats.
14ECCardiovascular mortality3660.0430.02In 2009 for Pohjois-Savo area 455 / 100 000 from death cause registry.
15Cardiopulmonary111Guesswork. The same as total mortality
16Lung cancer111Guesswork. The same as total mortality.

+ Show code

Specific actions - real and potential

Error creating thumbnail: Unable to save thumbnail to destination
The plume of Haapaniemi power plant in January, 2014.
Error creating thumbnail: Unable to save thumbnail to destination
The Iloharju heat plant is only used when the heat demand is high, i.e. at temperatures below ca. -15 °C. January, 2014.
  • Energy production
    • New power plant unit in Haapaniemi: ability to use significantly more biomass in the production of district heat (2014)
    • Enhancement of dispersed energy production with biofuels
    • Wide scale transition to renewable energy sources in heating
  • Building stock
    • Energy efficiency of buildings is increased: new stricter building regulations in Finland (2/2013)
    • Education to building owners and managers: semblance of best practicies in heating and other use of energy. Possible reduction in energy use of building stock is about 10%, and mere beneficial health effects are expected.
  • Land use and transport
    • If possible, PM emissions and noise are calculated based on updated version of Kuopio´s traffic network
    • Alternatively, the effect of increased use of biofuels on GHG and CO2 emissions is evaluated.
    • Possibilities of rail traffic in Kuopio
  • Other...

Indicators

  • Cardiovascular mortality
  • Pulmonar mortality
  • Well-being...

An archived version was planning to use Weighted product model to summarise results, but the idea was dropped.

  • Stakeholders: City of Kuopio, Citizens, Budget office of Kuopio

Assessment-specific data

Received

  • Building stock data
    • Building registry
    • Use of electricity by building type or type of activity
    • Use of district heat by contract
    • Amount of building stock renovated per year
    • Amount of new building stock per year during 2010-2012
    • Energy consumption in some of city´s own buildings before and after renovation
  • Energy production
    • Fuels and emissions of Haapaniemi CHP plant
  • Traffic
    • Regional plan on public transport

To be gathered

  • Updated traffic network model?
  • Estimates of the amount, area, volume and energy class of new buildings during next years (about 2014-2020)

See also

Urgenche research project 2011 - 2014: city-level climate change mitigation
Urgenche pages

Urgenche main page · Category:Urgenche · Urgenche project page (password-protected)

Relevant data
Building stock data in Urgenche‎ · Building regulations in Finland · Concentration-response to PM2.5 · Emission factors for burning processes · ERF of indoor dampness on respiratory health effects · ERF of several environmental pollutions · General criteria for land use · Indoor environment quality (IEQ) factors · Intake fractions of PM · Land use in Urgenche · Land use and boundary in Urgenche · Energy use of buildings

Relevant methods
Building model · Energy balance · Health impact assessment · Opasnet map · Help:Drawing graphs · OpasnetUtils‎ · Recommended R functions‎ · Using summary tables‎

City Kuopio
Climate change policies and health in Kuopio (assessment) · Climate change policies in Kuopio (plausible city-level climate policies) · Health impacts of energy consumption in Kuopio · Building stock in Kuopio · Cost curves for energy (prioritization of options) · Energy balance in Kuopio (energy data) · Energy consumption and GHG emissions in Kuopio by sector · Energy consumption classes (categorisation) · Energy consumption of heating of buildings in Kuopio · Energy transformations (energy production and use processes) · Fuels used by Haapaniemi energy plant · Greenhouse gas emissions in Kuopio · Haapaniemi energy plant in Kuopio · Land use in Kuopio · Building data availability in Kuopio · Password-protected pages: File:Heat use in Kuopio.csv · Kuopio housing

City Basel
Buildings in Basel (password-protected)

Energy balances
Energy balance in Basel · Energy balance in Kuopio · Energy balance in Stuttgart · Energy balance in Suzhou


References


Keywords

Climate Change, Kuopio, Green house gas emissions, Health, Energy

Related files

<mfanonymousfilelist></mfanonymousfilelist>