p1 <- sens_cond %>%
dplyr::filter(t <= 365) %>%
ggplot(aes(x = t, y = T_input, linetype = as.factor(T_level))) +
geom_line(linewidth = 0.75) +
geom_line(data = state_input_timeseries, aes(x = yday, y = T_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(10, 35, 5), limits = c(10, 33.5)) +
labs(y = expression("Temperature ("*degree*"C)")) +
prettyplot_MS()
p2 <- sens_cond %>%
dplyr::filter(t <= 365 & T_level == 1) %>%
ggplot(aes(x = t, y = I_input)) +
geom_line(linewidth = 0.75) +
geom_line(data = state_input_timeseries, aes(x = yday, y = I_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(0, 700, 100), limits = c(0, 660)) +
labs(y = expression("Irradiance ("*mu*"mol m"^-2*" s"^-1*")")) +
prettyplot_MS()
p3 <- sens_cond %>%
dplyr::filter(t <= 365 & T_level == 1) %>%
ggplot(aes(x = t, y = U_input)) +
geom_line(linewidth = 0.75) +
geom_line(data = state_input_timeseries, aes(x = yday, y = UV_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(0, 0.6, 0.1), limits = c(0, 0.575)) +
labs(y = expression("Water velocity (m"^-1*" s"^-1*")")) +
prettyplot_MS()
p4 <- sens_cond %>%
dplyr::filter(t <= 365 & T_level == 1) %>%
ggplot(aes(x = t, y = S_input)) +
geom_line(linewidth = 0.75) +
geom_line(data = state_input_timeseries, aes(x = yday, y = S_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(33.1, 36.8, 0.3), limits = c(34, 36.11)) +
labs(y = expression("Salinity (g L"^-1*")")) +
prettyplot_MS()
pdata1 <- sens_cond %>%
dplyr::filter(t <= 365 & T_level == 1) %>%
mutate(Ni_input = set_units(Ni_input, "mg m-3") %>% set_units("umol L-1") %>% drop_units(),
Am_input = set_units(Am_input, "mg m-3") %>% set_units("umol L-1") %>% drop_units())
pdata2 <- state_input_timeseries %>%
mutate(Ni_input_mean = set_units(Ni_input_mean, "mg m-3") %>% set_units("umol L-1") %>% drop_units(),
Am_input_mean = set_units(Am_input_mean, "mg m-3") %>% set_units("umol L-1") %>% drop_units())
p5 <- pdata1 %>%
ggplot(aes(x = t, y = Ni_input)) +
geom_line(linewidth = 0.75) +
geom_line(data = pdata2, aes(x = yday, y = Ni_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(0, 5, 0.5), limits = c(0, 3)) +
labs(y = nitrate_lab, x = "Day of the year") +
prettyplot_MS()
p6 <- pdata1 %>%
ggplot(aes(x = t, y = Am_input)) +
geom_line(linewidth = 0.75) +
geom_line(data = pdata2, aes(x = yday, y = Am_input_mean, colour = state), linetype = "dotted", inherit.aes = F) +
scale_y_continuous(breaks = seq(0, 10, 0.1), limits = c(0, 0.5)) +
labs(y = ammonium_lab, x = "Day of the year") +
prettyplot_MS()
plot_grid(
plot_grid(
p1 + rm.x() + tlabel("A"),
p2 + rm.x() + tlabel("B"),
p3 + rm.x() + tlabel("C"),
p4 + rm.x() + tlabel("D"),
p5 + tlabel("E"),
p6 + tlabel("F"),
ncol = 2, align = "hv"
),
ggdraw(),
# draw_label("Day of the year", size = 12, fontfamily = "serif"),
ncol = 1,
rel_heights = c(0.95, 0.05)
)