diff --git a/.Rhistory b/.Rhistory deleted file mode 100644 index 636bc90..0000000 --- a/.Rhistory +++ /dev/null @@ -1,512 +0,0 @@ -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -ggsave(f -'#34cceb' -winter.layer = conv.layer %>% filter(!is.na(winter)) %>% -mutate(col =ifelse(winter == 'winter18-19', '#34cceb', ifelse(winter == 'winter19-20','#1b535e' ,'#dead1b'))) %>% -mutate(date = as.Date(format(Time, format ='%m-%d'), format ='%m-%d' )) %>% -mutate(day = day(Time), -hour = hour(Time), -week = week(Time), -datetime = ifelse(month > 6, lubridate::make_datetime(2020, month, day, hour, 0, 0), lubridate::make_datetime(2021, month, day, hour, 0, 0))) %>% -filter(!is.na(winter)) -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.5) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.01)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.01)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -ggsave(filename = 'figs/energy_hourly.png', plot = p1, width = 30, height = 15, units = 'cm') -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.5) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.01)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.01)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.5) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.001)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.001)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.5) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.005)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.005)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.5) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.003)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.003)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -ggsave(filename = 'figs/energy_hourly.png', plot = p1, width = 30, height = 15, units = 'cm') -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.0) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.003)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.003)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 45, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -ggsave(filename = 'figs/energy_hourly.png', plot = p1, width = 30, height = 15, units = 'cm') -p1 <- ggplot(winter.layer) + -geom_line(aes(datetime, energy, col = winter), linewidth = 1.0) + -# facet_wrap(~ winter , ncol= 1, scales = 'free_x') + -# scale_color_gradientn(colours = rev(RColorBrewer::brewer.pal(11, 'RdYlBu'))) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(5e7, 1.25e8)+ -labs(y = expression(paste("Internal energy (J ",m^-2,")")), x = "") + -geom_vline(xintercept= winter.layer$datetime[ which(abs(winter.layer$minT - 4) < 0.003)], col = winter.layer$col[ which(abs(winter.layer$minT - 4) < 0.003)]) + -theme_bw()+theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); p1 -ggsave(filename = 'figs/energy_hourly.png', plot = p1, width = 30, height = 15, units = 'cm') -unique(m_df_timeseries$variable) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 )) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=(ts1/ts2/ts3) + (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -plot_breaks -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 5000000) -plot_breaks -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 2000000) -plot_breaks -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 )) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -#### -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 )) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(3, 4.5) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -#### -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 )) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(3.2, 4.5) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.2, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.5, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.5, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -#### -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 )) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.7, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) +plot_layout(guides = "collect") & theme(legend.position = 'bottom')& plot_annotation(tag_levels = 'A');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -m_df_timeseries -str(m_df_timeseries) -ts6_deep <- ggplot(m_df_timeseries %>% filter(variable == 7.45 & week == 2)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.7, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6_deep <- ggplot(m_df_timeseries %>% filter(variable == 7.45 & week == 2)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.7, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank());ts6_deep -p3 -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) + plot_annotation(tag_levels = 'A')+plot_layout(guides = "collect") & theme(legend.position = 'bottom');p3 -p3=(ts1/ts2/ts3) | (ts4/ts5/ts6) + plot_annotation(tag_levels = 'A')+plot_layout(guides = "collect")+ theme(legend.position = 'bottom');p3 -p3=((ts1/ts2/ts3) | (ts4/ts5/ts6)) + plot_annotation(tag_levels = 'A')+plot_layout(guides = "collect") & theme(legend.position = 'bottom');p3 -ggsave(filename = 'figs/wtemptimeseries.png', plot = p3, width = 30, height = 30, units = 'cm') -winter.layer %>% filter(winter == 'winter18-19') %>% -summarise(min = min(energy)) -winter.layer %>% filter(winter == 'winter18-19') %>% -summarise(min = min(energy, na.rm =T)) -winter.layer %>% filter(winter == 'winter19-20') %>% -summarise(min = min(energy, na.rm =T)) -winter.layer %>% filter(winter == 'winter20-21') %>% -summarise(min = min(energy, na.rm =T)) -unique(m_df_timeseries$week) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==49), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==53), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==54), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==52), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -plot_datetime = m_df_timeseries$datetime -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 3600) -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==52), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -plot_label -plot_datetime = m_df_timeseries$datetime -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 3600*24) -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==52), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 3600*30 ) -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==52), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 3600*24 ) -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==52), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 & week ==52)) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 & week ==52)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(3.2, 4.5) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05& week ==52)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.2, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45& week ==52)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.5, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 & week ==52)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.7, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=((ts1/ts2/ts3) | (ts4/ts5/ts6)) + plot_annotation(tag_levels = 'A')+plot_layout(guides = "collect") & theme(legend.position = 'bottom');p3 -plot_datetime = m_df_timeseries$datetime -# plot_label = (format(m_df_timeseries$Time, format ='%m-%d %H:00:00') ) -plot_breaks = seq(min(plot_datetime), max(plot_datetime), 3600*24 ) -plot_label = format(as.POSIXct((plot_breaks), origin='1970-01-01'), format ='%m-%d %H:00:00') -match(plot_breaks, plot_datetime) -week_plot = 2 -ts1 <- ggplot(m_df_timeseries %>% filter(variable == 0.75 & week ==week_plot), aes(datetime, value, color = winter)) + -geom_line() + -ylab('Water temperature (\u00B0C)') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ggtitle("0.75 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()); ts1 -ts2 <- ggplot(m_df_timeseries %>% filter(variable == 1.55 & week ==week_plot)) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylab('Water temperature (\u00B0C)') + -ggtitle("1.55 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts3 <- ggplot(m_df_timeseries %>% filter(variable == 2.55 & week ==week_plot)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -ylim(3.2, 4.5) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylab('Water temperature (\u00B0C)') + -ggtitle("2.55 m depth") + -theme_bw() +theme(legend.position = "bottom" ,axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts4 <- ggplot(m_df_timeseries %>% filter(variable == 3.05& week ==week_plot)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.2, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("3.05 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts5 <- ggplot(m_df_timeseries %>% filter(variable == 5.45& week ==week_plot)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.5, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("5.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -ts6 <- ggplot(m_df_timeseries %>% filter(variable == 7.45 & week ==week_plot)) + -scale_x_continuous(breaks = plot_breaks,labels= plot_label) + -geom_line(aes(datetime, value, color = winter)) + scale_color_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -scale_fill_manual(values = c('#34cceb','#1b535e','#dead1b'), name = 'Winter') + -ylim(3.7, 4.5) + -ylab('Water temperature (\u00B0C)') + -ggtitle("7.45 m depth") + -theme_bw() +theme(legend.position = "bottom", axis.text.x = element_text(angle = 15, vjust = 0.5, hjust = 1), axis.title.x = element_blank()) -p3=((ts1/ts2/ts3) | (ts4/ts5/ts6)) + plot_annotation(tag_levels = 'A')+plot_layout(guides = "collect") & theme(legend.position = 'bottom');p3