# Introduction

The latest forecast discussions for Northern Alaska have included warnings that we are likely to experience an extended period of below normal temperatures starting at the end of this week, and yesterday’s Deep Cold blog post discusses the similarity of model forecast patterns to patterns seen in the 1989 and 1999 extreme cold events.

Our dogs spend most of their time in the house when we’re home, but if both of us are at work they’re outside in the dog yard. They have insulated dog houses, but when it’s colder than −15° F, we put them into a heated dog barn. That means one of us has to come home in the middle of the day to let them out to go to the bathroom.

Since we’re past the Winter Solstice, and day length is now increasing, I was curious to see if that has an effect on daily temperature, hopeful that the frequency of days when we need to put the dogs in the barn is decreasing.

# Methods

We’ll use daily minimum and maximum temperature data from the Fairbanks International Airport station, keeping track of how many years the temperatures are below −15° F and dividing by the total to get a frequency. We live in a cold valley on Goldstream Creek, so our temperatures are typically several degrees colder than the Fairbanks Airport, and we often don’t warm up as much during the day as in other places, but minimum airport temperature is a reasonable proxy for the overall winter temperature at our house.

# Results

The following plot shows the frequency of minimum (the top of each line) and maximum (the bottom) temperature colder than −15° F at the airport over the period of record, 1904−2016. The curved blue line represents a best fit line through the minimum temperature frequency, and the vertical blue line is drawn at the date when the frequency is the highest.

The maximum frequency is January 12th, so we have a few more days before the likelihood of needing to put the dogs in the barn starts to decline. The plot also shows that we could still reach that threshold all the way into April.

For fun, here’s the same plot using −40° as the threshold:

The date when the frequency starts to decline is shifted slightly to January 15th, and you can see the frequencies are lower. In mid-January, we can expect minimum temperature to be colder than −15° F more than half the time, but temperatures colder than −40° are just under 15%. There’s also an interesting anomaly in mid to late December where the frequency of very cold temperatures appears to drop.

# Appendix: R code

```
library(tidyverse)
library(lubridate)
library(scales)
noaa <- src_postgres(host="localhost", dbname="noaa")
fairbanks <- tbl(noaa, build_sql("SELECT * FROM ghcnd_pivot
WHERE station_name='FAIRBANKS INTL AP'")) %>%
collect()
save(fairbanks, file="fairbanks_ghcnd.rdat")
for_plot <- fairbanks %>%
mutate(doy=yday(dte),
dte_str=format(dte, "%d %b"),
min_below=ifelse(tmin_c < -26.11,1,0),
max_below=ifelse(tmax_c < -26.11,1,0)) %>%
filter(dte_str!="29 Feb") %>%
mutate(doy=ifelse(leap_year(dte) & doy>60, doy-1, doy),
doy=(doy+31+28+31+30)%%365) %>%
group_by(doy, dte_str) %>%
mutate(n_min=sum(ifelse(!is.na(min_below), 1, 0)),
n_max=sum(ifelse(!is.na(max_below), 1, 0))) %>%
summarize(min_freq=sum(min_below, na.rm=TRUE)/max(n_min, na.rm=TRUE),
max_freq=sum(max_below, na.rm=TRUE)/max(n_max, na.rm=TRUE))
x_breaks <- for_plot %>%
filter(doy %in% seq(49, 224, 7))
stats <- tibble(doy=seq(49, 224),
pred=predict(loess(min_freq ~ doy,
for_plot %>%
filter(doy >= 49, doy <= 224))))
max_stats <- stats %>%
arrange(desc(pred)) %>% head(n=1)
p <- ggplot(data=for_plot,
aes(x=doy, ymin=min_freq, ymax=max_freq)) +
geom_linerange() +
geom_smooth(aes(y=min_freq), se=FALSE, size=0.5) +
geom_segment(aes(x=max_stats$doy, xend=max_stats$doy,
y=-Inf, yend=max_stats$pred),
colour="blue", size=0.5) +
scale_x_continuous(name=NULL,
limits=c(49, 224),
breaks=x_breaks$doy,
labels=x_breaks$dte_str) +
scale_y_continuous(name="Frequency of days colder than −15° F",
breaks=pretty_breaks(n=10)) +
theme_bw() +
theme(axis.text.x=element_text(angle=30, hjust=1))
# Minus 40
for_plot <- fairbanks %>%
mutate(doy=yday(dte),
dte_str=format(dte, "%d %b"),
min_below=ifelse(tmin_c < -40,1,0),
max_below=ifelse(tmax_c < -40,1,0)) %>%
filter(dte_str!="29 Feb") %>%
mutate(doy=ifelse(leap_year(dte) & doy>60, doy-1, doy),
doy=(doy+31+28+31+30)%%365) %>%
group_by(doy, dte_str) %>%
mutate(n_min=sum(ifelse(!is.na(min_below), 1, 0)),
n_max=sum(ifelse(!is.na(max_below), 1, 0))) %>%
summarize(min_freq=sum(min_below, na.rm=TRUE)/max(n_min, na.rm=TRUE),
max_freq=sum(max_below, na.rm=TRUE)/max(n_max, na.rm=TRUE))
x_breaks <- for_plot %>%
filter(doy %in% seq(63, 203, 7))
stats <- tibble(doy=seq(63, 203),
pred=predict(loess(min_freq ~ doy,
for_plot %>%
filter(doy >= 63, doy <= 203))))
max_stats <- stats %>%
arrange(desc(pred)) %>% head(n=1)
q <- ggplot(data=for_plot,
aes(x=doy, ymin=min_freq, ymax=max_freq)) +
geom_linerange() +
geom_smooth(aes(y=min_freq), se=FALSE, size=0.5) +
geom_segment(aes(x=max_stats$doy, xend=max_stats$doy,
y=-Inf, yend=max_stats$pred),
colour="blue", size=0.5) +
scale_x_continuous(name=NULL,
limits=c(63, 203),
breaks=x_breaks$doy,
labels=x_breaks$dte_str) +
scale_y_continuous(name="Frequency of days colder than −40°",
breaks=pretty_breaks(n=10)) +
theme_bw() +
theme(axis.text.x=element_text(angle=30, hjust=1))
```