Outdoor air temperature in Finland: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(updated to match Helsinki energy decision 2015 data needs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:


== Answer ==
== Answer ==
<rcode graphics=1 embed=1>
library(OpasnetUtils)
library(ggplot2)
objects.latest("Op_en2959", code_name = "temperatures")
ggplot(subset(temperdays@data, Time %in% c("2013", "2030", "2050")), aes(x = Temperature, y = Result, color = Time, group = Time))+geom_line()
</rcode>


== Rationale ==
== Rationale ==
Line 17: Line 26:
=== Calculations ===
=== Calculations ===


<rcode embed=0>
<rcode name="temperatures" label="Initiate temperatures (for developers only)" embed=1>
## This is code is Op_en2959/temperatures [[Outdoor air temperature in Finland]]
## This is code is Op_en2959/temperatures [[Outdoor air temperature in Finland]]
library(OpasnetUtils)
library(OpasnetUtils)


ta <- opbase.data("Op_en2959", subset = "Vantaa") # [[Outdoor air temperature in Finland]]
ta <- opbase.data("Op_en2959", subset = "Vantaa") # [[Outdoor air temperature in Finland]]
hours <- as.character(ta$Date)
levels(ta$Year)[as.numeric(as.character(levels(ta$Year))) < 2015] <- "2012"
ta$Date <- as.POSIXct(paste(ta$Year, ta$Month, ta$Day, sep = "-"))


hours <- as.POSIXct(strptime(hours, format = "%Y-%b-%d %H:%M:%S"))
days <- aggregate(ta[c(
hours <- hours + as.difftime(as.character(ta$Time), format = "%H:%M")
"Temperature" # We only need temperature, but it is easy to take any other variable as well.
# "Relative_humidity",
# "Wind_direction",
# "Wind_speed",
# "Direct_normal_solar_radiation",
# "Diffuse_horisontal_radiation",
# "Result" # Global_horizontal_radiation
)], ta[c("Date", "Year")], FUN = mean)
colnames(days)[colnames(days) == "Temperature"] <- "Result"
days$Temperature <- cut(days$Result, breaks = seq(-30, 33, 3))
temperatures <- Ovariable("temperatures", data = aggregate(days["Result"], days[c("Temperature", "Year")], FUN = mean))
temperdays <- Ovariable("temperdays", data = aggregate(days["Result"], days[c("Temperature", "Year")], FUN = length))


# Adjust temperature data: 2.3 C is the average difference between Kuopio and Helsinki
years = data.frame(Time = 1985:2070, Year = c(rep("2012", 36), rep("2030", 20), rep("2050", 30)))
hours <- data.frame(Time = hours, Result = as.numeric(as.character(ta$Result)) + 2.3)
hours <- hours[!is.na(hours$Result) , ]
hours$Date <- as.POSIXct(strptime(format(hours$Time, "%Y-%m-%d"), format = "%Y-%m-%d"))
hours <- hours[hours$Time >= as.POSIXct("2014-03-01 00:00:00") & hours$Time < as.POSIXct("2015-03-01 00:00:00") , ]


days <- aggregate(hours["Result"], hours["Date"], FUN = mean)
temperatures@data <- merge(temperatures@data, years)
days$Temperature <- cut(days$Result, breaks = seq(-30, 33, 3))
temperatures@data$Year <- NULL
temperatures <- Ovariable("temperature", data = aggregate(days["Result"], days["Temperature"], FUN = mean))
temperdays@data <- merge(temperdays@data, years)
temperdays <- Ovariable("temperdays", data = aggregate(days["Result"], days["Temperature"], FUN = length))
temperdays@data$Year <- NULL


objects.store(temperatures, temperdays)
objects.store(temperatures, temperdays)
cat("Objects temperature, temperdays stored.\n")
cat("Objects temperatures, temperdays stored.\n")


#ggplot(hours, aes(x = Time, y = Result))+geom_line() + geom_point(data = days, aes(x = Date, y = Result, colour = "Daily mean", size = 2))
#ggplot(hours, aes(x = Time, y = Result))+geom_line() + geom_point(data = days, aes(x = Date, y = Result, colour = "Daily mean", size = 2))
Line 50: Line 67:
*[[CLAIH assessment]]
*[[CLAIH assessment]]


{{Helsinki energy decision}}
{{Helsinki energy decision 2015}}


==References==
==References==
Line 56: Line 73:
<references/>
<references/>


== Related files ==
== Related files ==<!-- __OBI_TS:1444568741 -->

Latest revision as of 08:20, 12 October 2015

Question

What are the outdoor air temperatures in Finland previously, now and in the future in different climate areas?

Answer

+ Show code

Rationale

Data from Statistics Finland:

Calculations

+ Show code


See also

Helsinki energy decision 2015
In English
Assessment Main page | Helsinki energy decision options 2015
Helsinki data Building stock in Helsinki | Helsinki energy production | Helsinki energy consumption | Energy use of buildings | Emission factors for burning processes | Prices of fuels in heat production | External cost
Models Building model | Energy balance | Health impact assessment | Economic impacts
Related assessments Climate change policies in Helsinki | Climate change policies and health in Kuopio | Climate change policies in Basel
In Finnish
Yhteenveto Helsingin energiapäätös 2015 | Helsingin energiapäätöksen vaihtoehdot 2015 | Helsingin energiapäätökseen liittyviä arvoja | Helsingin energiapäätös 2015.pptx

References


Related files