-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflow_dash_ncoast.qmd
638 lines (525 loc) · 18.7 KB
/
flow_dash_ncoast.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
---
title: "FLOWdash N Coast"
logo: assets/wdfw_logo_stacked_fullcolor.png
format:
dashboard:
orientation: rows
theme: lux
embed-resources: true
---
```{r setup, include=FALSE, warning=FALSE, message=FALSE}
#knitr::opts_chunk$set(echo = FALSE, warning = FALSE, message = FALSE, fig.width = 10, fig.height = 13)
library("tidyverse", quietly = T)
theme_set(theme_minimal())
# #workbook of basic site/station metadata: `usgs_sites`
# readxl::read_excel("~/T/DFW-Team WDFW Watershed Synthesis - flow_trees_heat/usgs_sites_dailyQ_focal.xlsx") |>
# select(site_no, station_nm) |>
# mutate(station_nm = str_remove(station_nm, ", WA$") |>
# str_replace("RIVER", "R") |>
# str_replace("NEAR", "Nr") |>
# str_replace("HIGHWAY", "HWY") |>
# str_to_title()) |>
# slice(19:16) |> unlist()
sites <- data.frame(
site_no = c("12043000","12041200","12040500","12039500"),
station_nm = c("Calawah R Nr Forks","Hoh R At Us Hwy 101 Nr Forks","Queets R Nr Clearwater","Quinault R At Quinault Lake")
)
q_obs_range <- c(as.Date("1979-01-01"), Sys.Date())
#build uniform object inserting NAs for missing obs during q_obs_range
#rebuild/overwrite y, m, and yday since `complete` inserts many NAs
#then calc per site per CALENDAR year
# - cumulative sum of daily mean flow (weird but useful proxy for overall annual volume, 'wet/dry year')
# - 7day moving average of daily mean flow
usgs_q_dv <- list.files("data", pattern = paste0("usgs_dailyQ_", sites$site_no, collapse = "|"), full.names = T) |>
map_df(~readRDS(.x)) |>
#group_by(site_no) |> summarise(dmin = min(date), dmax = max(date))
tidyr::complete(site_no, date = full_seq(q_obs_range, 1))|>
mutate(
year = year(date),
month = month(date), yday = yday(date)
#,q_dv_mean = if_else(q_dv_mean < 0, NA_real_, q_dv_mean)
) |>
# mutate(
# q_dv_mean_sum = cumsum(q_dv_mean),
# #,q_dv_mean_7d = slider::slide_dbl(q_dv_mean, ~mean(., na.rm=T), .before = 3, .after = 3),
# .by = c(site_no, year)
# ) |>
left_join(sites, by = "site_no") |>
select(site_no, station_nm, everything())
##add yday median daily Q across years (all and decadal)
usgs_q_dv <- bind_rows(
usgs_q_dv |> mutate(year = as.character(year))
,
map2_df(
c(1980,1990,2000,2010,1979),
c(1989,1999,2009,2019,2024),
~usgs_q_dv |>
filter(between(year, .x, .y)) |>
summarise(
year = paste0("median_",.x,"_",.y),
q_dv_mean = median(q_dv_mean),
.by = c(site_no, yday)
)
)
)
usgs_bfs <- readRDS("data/usgs_bfs_pred.rds") |>
filter(site_no %in% sites$site_no)
nwm_fcst <- list.files("data", pattern = paste0("nwm_", sites$site_no, collapse = "|"), full.names = T) |>
map_df(~readRDS(.x))
nwfsc_st <- list.files("data", pattern = paste0("nwfsc_st_pred_", sites$site_no, collapse = "|"), full.names = T) |>
map_df(~readRDS(.x)) |>
mutate(
year = as.character(year(date)), month = month(date), yday = yday(date)
)
crc_sites <- list.files("data", pattern = paste0("wdfw_crc_", sites$site_no, collapse = "|"), full.names = T) |>
map_df(~readRDS(.x)) |>
left_join(sites, by = "site_no") |>
select(site_no, station_nm, everything())
#rr_wb_coho <- readRDS("data/rr_wb_coho.rds")
rangeslider_thickness <- 0.05
#wacolors::pal_vector("ferries",n=46)
#length(unlist(wacolors::wacolors[1:9])) #50
#wacolors::pal_vector("washington_pass",n=length(2024:1979))
pal <- set_names(
c(
rep(c(wacolors::wacolors$washington_pass, wacolors::wacolors$palouse),
length.out = length(2024:1979)),
# #median(s)
c("#B96000","darkblue","lightgreen","grey80","cyan"),
#nwm forecast
alpha("purple",c(0.8,0.4)),
#usgs baseflow forecast
"#DF3383", rep("#8A6172",2)
),
c(2024:1979,
usgs_q_dv |> distinct(year) |> filter(str_detect(year, "median")) |> pull(year) |> sort(), # 'median',
'nwm_mr_mean', 'nwm_lr_mean',
'usgs_bfs','usgs_bfs_05','usgs_bfs_95'
))
plot_q_dv <- function(site, log10 = T){
d <- usgs_q_dv |>
filter(site_no==site) |>
select(date, year, yday, q_dv_mean) |>
bind_rows(
nwm_fcst |>
filter(site_no == site, str_detect(memb, "mean")) |>
select(yday, year = memb, q_dv_mean = cfs)
)
if(site %in% unique(usgs_bfs$site_no)){
d <- bind_rows(
d,
usgs_bfs |>
filter(site_no == site) |>
select(yday, starts_with("usgs_bfs")) |>
pivot_longer(cols = starts_with("usgs_bfs"),
names_to = 'year',
values_to = 'q_dv_mean'
)
)
}
p <- d |>
plotly::plot_ly(
type = 'scatter', mode = 'lines',
name = ~year, x = ~yday, y = ~q_dv_mean,
color = ~year, colors = pal,
hovertext = ~format(date, format = '%b-%d')
) |>
plotly::layout(
legend = list(traceorder = 'reversed'),
xaxis = list(
title = 'Day of year',
ticktext = format(seq.Date(as.Date("2024-01-01"),as.Date("2024-12-01"), by = 'month'), format = '%b-%d'),
tickvals = yday(seq.Date(as.Date("2024-01-01"),as.Date("2024-12-01"), by = 'month'))
),
yaxis = list(title = 'cfs')
)
if (log10){
p <- p |> plotly::layout(yaxis = list(type = "log"))
}
p
}
#plot_q_dv(sites$site_no[1])
plot_q_quant <- function(site){
usgs_q_dv |>
filter(site_no == site, year != "2024") |>
group_by(year) |>
summarise(
q10 = quantile(q_dv_mean, p = 0.10, na.rm = T),
q05 = quantile(q_dv_mean, p = 0.05, na.rm = T),
q01 = quantile(q_dv_mean, p = 0.01, na.rm = T),
min = min(q_dv_mean),
.groups = "drop") |>
pivot_longer(-year, names_to = "quantile", values_to = "cfs") |>
plotly::plot_ly(
type = "bar", x = ~year, y = ~cfs,
color = ~quantile,
colors = c(q10 = "darkblue",
q05 = "blue",
q01 = "lightblue",
min = "#016C72"
)) |>
plotly::rangeslider(thickness = rangeslider_thickness) |>
plotly::layout(
#barmode = 'overlay',
xaxis = list(title='')
)
}
plot_t_dv <- function(site){
d <- nwfsc_st |>
filter(site_no==site) |>
select(date, year, yday, st_pred)
p <- d |>
plotly::plot_ly(
type = 'scatter', mode = 'lines',
name = ~year, x = ~yday, y = ~st_pred,
color = ~year, colors = pal,
hovertext = ~format(date, format = '%b-%d')
) |>
plotly::layout(
legend = list(traceorder = 'reversed'),
shapes = list(
list(type = "rect", fillcolor = "red", opacity = 0.2,
y0 = 20, y1 = 22, x0 = 0, x1 = 366),
list(type = "rect", fillcolor = "orange", opacity = 0.2,
y0 = 18, y1 = 20, x0 = 0, x1 = 366),
list(type = "rect", fillcolor = "yellow", opacity = 0.2,
y0 = 16, y1 = 18, x0 = 0, x1 = 366)
),
xaxis = list(
title = 'Day of year',
ticktext = format(seq.Date(as.Date("2024-01-01"),as.Date("2024-12-01"), by = 'month'), format = '%b-%d'),
tickvals = yday(seq.Date(as.Date("2024-01-01"),as.Date("2024-12-01"), by = 'month'))
),
yaxis = list(title = 'degC')
)
p
}
plot_crc <- function(site){
d <- crc_sites |>
filter(
site_no == site,
between(statmonth, 6, 10)
) |>
arrange(year, statmonth) |>
mutate(
year = as.character(year),
statmonth = factor(statmonth, levels = 6:10),
year_species = paste0(year,"_",species),
est_tot = cumsum(est), .by = c(site_no, station_nm, species, year)
) |>
select(year, species, year_species, statmonth, est_tot)
p <- d |>
plotly::plot_ly(
type = 'scatter', mode = 'lines+markers',
name = ~year_species, x = ~statmonth, y = ~est_tot, symbol = ~species,
color = ~year, colors = pal
) |>
plotly::layout(
legend = list(traceorder = 'reversed'),
xaxis = list(title = 'Month'),
yaxis = list(title = 'Cumulative catch est.')
)
p
}
```
```{r data_rebuild_q_dv, eval=FALSE}
#not `complete()` here since no reason to store potentially lots of NA for long qobsrange
walk(
sites$site_no
,
~dataRetrieval::readNWISdv(
.x, parameterCd = "00060",
startDate = q_obs_range[1],
endDate = q_obs_range[2]
) |>
as_tibble() |>
mutate(year = year(Date), month = month(Date), yday = yday(Date)) |>
select(site_no, date = Date, year, month, yday, q_dv_mean = X_00060_00003) |>
saveRDS(paste0("data/usgs_dailyQ_", .x,".rds"))
)
```
```{r data_rebuild_bfs, eval=FALSE}
#add new USGS baseflow predictions...
huc4 <- c("1710","1711")
url <- paste0("https://wa.water.usgs.gov/projects/baseflows/out/bfprj_HUC",huc4,".csv")
map_df(url, ~readr::read_csv(.x)) |>
mutate(yday = yday(Date)) |>
select(
site_no = SiteID, date = Date, yday,
usgs_bfs = Baseflow.cfs,
usgs_bfs_05 = StreamflowCB05.cfs,
usgs_bfs_95 = StreamflowCB95.cfs
) |>
saveRDS("data/usgs_bfs_pred.rds")
```
```{r data_rebuild_nwm, eval=FALSE}
sites$COMID <- map_int(
sites$site_no,
~nhdplusTools::discover_nhdplus_id(
nldi_feature = list(featureSource = "nwissite",
featureID = paste0("USGS-",.x)))
)
get_nwm <- function(comid){
mr <- httr2::request(paste0("https://api.water.noaa.gov/nwps/v1/reaches/",comid,"/streamflow?series=medium_range")) |>
httr2::req_headers(Accept = "application/json") |>
httr2::req_perform() |>
httr2::resp_body_json() |>
purrr::pluck("mediumRange")
lr <- httr2::request(paste0("https://api.water.noaa.gov/nwps/v1/reaches/",comid,"/streamflow?series=long_range")) |>
httr2::req_headers(Accept = "application/json") |>
httr2::req_perform() |>
httr2::resp_body_json() |>
purrr::pluck("longRange")
#probably a more elegant way to do this...
nwm <- set_names(
c(mr, lr),
c(paste0("mr_",names(mr)),paste0("lr_",names(lr)))
)
nwm <- map_df(
names(nwm),
~bind_rows(nwm[[.x]]$data) |> mutate(memb = paste0("nwm_",.x))
) |>
mutate(
yday = lubridate::yday(lubridate::as_datetime(validTime))
) |>
summarise(
cfs = mean(flow), .by = c(memb,yday)
)
return(nwm)
}
# get_nwm(sites$COMID[2]) -> nwm
# nwm |> pivot_wider(names_from = memb, values_from = flow) |> print(n=Inf)
nwm <- map2(
sites$site_no, sites$COMID,
~get_nwm(.y) |>
mutate(site_no = .x)
)
walk(nwm, ~saveRDS(.x, file = paste0("data/nwm_",.x$site_no[1],".rds")))
```
```{r data_rebuild_crc, eval=FALSE}
mdb_file_path <- "~/T/DFW-Team WDFW Watershed Synthesis - data_common/crc/Sport Harvest Estimates 20230213.mdb"
crc <- inner_join(
readr::read_csv(I(
system2(
"mdb-export",
args = paste(str_replace_all(mdb_file_path, " ", "\\\\ "),"Area"),
stdout = T)
))
,
readr::read_csv(I(
system2(
"mdb-export",
args = paste(str_replace_all(mdb_file_path, " ", "\\\\ "),"Catch"),
stdout = T)
))
, by = "AreaID"
) |>
select(
AreaCode, AreaName, AreaType, AreaWRIA,
CatchYear, CatchStatMonth, Species, CatchEst #, CatchVariance?
) |>
rename_with(~tolower(.) |> str_remove("catch")) |>
filter(
#year >= 2000,
species %in% c("Coho","Chinook")
)
crc |>
filter(str_detect(areaname, "Hoh|Queets|Quinault|Sol|Calawah|Bogach")) |>
count(areacode, areaname)
#Calawah, combining Bogachiel, Calawah, Sol Duc
#may need to revise?
crc |>
filter(areacode %in% c("398","400","406")) |>
mutate(site_no = sites$site_no[1]) |>
group_by(site_no, year, statmonth, species) |>
summarise(est = sum(est), .groups = "drop") |>
saveRDS(file = paste0("data/wdfw_crc_",sites$site_no[1],".rds"))
#Hoh, combining above & below Oxbow areas
crc |>
filter(areacode %in% c("348","350")) |>
mutate(site_no = sites$site_no[2]) |>
group_by(site_no, year, statmonth, species) |>
summarise(est = sum(est), .groups = "drop") |>
saveRDS(file = paste0("data/wdfw_crc_",sites$site_no[2],".rds"))
#Queets
crc |>
filter(areacode == "394") |>
mutate(site_no = sites$site_no[3]) |>
saveRDS(file = paste0("data/wdfw_crc_",sites$site_no[3],".rds"))
#Quinault
crc |>
filter(areacode == "410") |>
mutate(site_no = sites$site_no[4]) |>
saveRDS(file = paste0("data/wdfw_crc_",sites$site_no[4],".rds"))
```
```{r data_rebuild_st_pred, eval=FALSE}
#could also think about adding/integrating NWM via AWS flow_trees_apps.qmd>>nwm_zarr_pull2
# # #single HUC10 prediction file is n-COMIDs by n-days in 1990-2021
# # #need to know gage HUC10 to figure out model prediction file
# # #then need to know gage COMID since values are by COMID-day
# # #but gage/reach may or may not actually be in the dataset
# #gets HUC10 by service given an sf object
# #this workbook already has HUC8s per gage...
sites <- sites |>
left_join(
readxl::read_excel("~/T/DFW-Team WDFW Watershed Synthesis - flow_trees_heat/usgs_sites_dailyQ_focal.xlsx") |>
filter(site_no %in% sites$site_no) |>
select(site_no, lon = dec_long_va, lat = dec_lat_va) |>
mutate(
huc10 = map2_chr(
lon, lat,
~suppressMessages(
nhdplusTools::get_huc(
sf::st_as_sf(data.frame(lon = .x, lat = .y), coords = c("lon","lat"), crs = sf::st_crs(4326)),
type = 'huc10')$huc10)
)
)
, by = "site_no"
)
sites$COMID <- map_int(
sites$site_no,
~nhdplusTools::discover_nhdplus_id(
nldi_feature = list(featureSource = "nwissite",
featureID = paste0("USGS-",.x)))
)
#big object
stp <- map_df(
sites$huc10,
~read_csv(paste0("~/T/DFW-Team WDFW Watershed Synthesis - data_common/st_pred/st_pred_171001/st_pred_",.x,".csv")) |>
select(date = tim.date, COMID, st_pred = prd.stream_temp)
) |>
drop_na(st_pred)
# 3 of 4 for N Coast gages
distinct(stp, COMID) |>
inner_join(sites, by = "COMID") |>
split(~site_no) |>
map(
~left_join(
.x |> select(site_no, COMID),
stp,
by = "COMID") |>
saveRDS(paste0("data/nwfsc_st_pred_",.x$site_no,".rds"))
)
# #do not want HUC10 'average' steam temp across COMIDs
# #but could also take max daily pred across spatial range
# #would be better to add HUC10 stratification, mutate in col in map_df
# stp |>
# group_by(date) |>
# summarise(st_pred_max = max(st_pred, na.rm = T))
```
# About
## Row
::: {.card title="Daily flows - observed & forecast"}
This card displays mean daily streamflow per-day-of-year overlaid by year, with the median per day across years for reference.
In addition, [current predictions](https://wa.water.usgs.gov/projects/baseflows/BFS_downloads_index.html) and confidence intervals from the USGS WA Water Science Center near-term [baseflow forecast](https://www.usgs.gov/tools/baseflow-forecasts-selected-sites-united-states) are shown alongside National Water Model [(NWM)](https://water.noaa.gov/about/nwm) reach streamflow forecasts from NOAA's National Water Prediction Service [NWPS API](https://api.water.noaa.gov/nwps/v1/docs/).
As for all other cards:
- click the lower right corner to expand the card
- double-click on any legend entry to highlight it (then single-click others to add individually or double-click again to return all)
- zoom to any area of interest.
built `r Sys.time()`
:::
## Row
::: {.card title="Annual low flows: Q10, Q05, Q01, Qmin"}
This card displays per-year minimum values of daily mean streamflow volume in cfs (cubic feet per second) as measured at the USGS gaging stations (`r paste(unlist(unite(sites, col = "nn", sep = " ")), collapse = " & ")`).
[`r sites$site_no[1]`](`r paste0('https://waterdata.usgs.gov/monitoring-location/',sites$site_no[1],'/#parameterCode=00060&period=P365D&showMedian=true')`)
[`r sites$site_no[2]`](`r paste0('https://waterdata.usgs.gov/monitoring-location/',sites$site_no[2],'/#parameterCode=00060&period=P365D&showMedian=true')`)
[`r sites$site_no[3]`](`r paste0('https://waterdata.usgs.gov/monitoring-location/',sites$site_no[3],'/#parameterCode=00060&period=P365D&showMedian=true')`)
[`r sites$site_no[4]`](`r paste0('https://waterdata.usgs.gov/monitoring-location/',sites$site_no[4],'/#parameterCode=00060&period=P365D&showMedian=true')`)
In addition to the annual minimum, per-year sample quantiles illustrate longer term relative differences at several low flow magnitudes. For example, ~90% of observed daily mean flows in a year were greater than and ~10% were less than the dark blue 'Q10'.
:::
::: {.card title="Annual Catch Record Card estimates"}
This card displays annual estimated Chinook and coho recreational harvest in the [CRC](https://wdfw.wa.gov/licenses/fishing/catch-record-card) data records.
:::
::: {.card title="Estimated daily stream temperatures, Siegel et al. 2023"}
This card displays the [Siegel et al. 2023](https://journals.plos.org/water/article?id=10.1371/journal.pwat.0000119) estimated daily stream temperature for the medium resolution NHD+ COMID (flowline+local catchment) associated with the displayed USGS streamflow gage.
Fitting to the NorWeST database, "This model reflects mechanistic processes using publicly available climate and landscape covariates in a Generalized Additive Model framework. We allowed covariates to interact while accounting for nonlinear relationships between temporal and spatial covariates to better capture seasonal patterns."
Values displayed here are from the [publicly available datasets of results](https://zenodo.org/records/8174951).
:::
```{r, include=FALSE}
i <- 1
```
# `r unite(sites,"no_nm")$no_nm[i]`
## Row
```{r}
#| title: Flows - observed & forecast
plot_q_dv(site = sites$site_no[i], log10 = T)
```
## Row
```{r}
#| title: Annual low flows
plot_q_quant(sites$site_no[i])
```
```{r}
#| title: Catch (CRC)
plot_crc(sites$site_no[i])
```
```{r}
#| title: Stream temp (Siegel et al. 2023)
plot_t_dv(sites$site_no[i])
```
```{r, include=FALSE}
i <- 2
```
# `r unite(sites,"no_nm")$no_nm[i]`
## Row
```{r}
#| title: Flows - observed & forecast
plot_q_dv(site = sites$site_no[i], log10 = T)
```
## Row
```{r}
#| title: Annual low flows
plot_q_quant(sites$site_no[i])
```
```{r}
#| title: Catch (CRC)
plot_crc(sites$site_no[i])
```
```{r}
#| title: Stream temp (Siegel et al. 2023)
plot_t_dv(sites$site_no[i])
```
```{r, include=FALSE}
i <- 3
```
# `r unite(sites,"no_nm")$no_nm[i]`
## Row
```{r}
#| title: Flows - observed & forecast
plot_q_dv(site = sites$site_no[i], log10 = T)
```
## Row
```{r}
#| title: Annual low flows
plot_q_quant(sites$site_no[i])
```
```{r}
#| title: Catch (CRC)
plot_crc(sites$site_no[i])
```
```{r}
#| title: Stream temp (Siegel et al. 2023)
plot_t_dv(sites$site_no[i])
```
```{r, include=FALSE}
i <- 4
```
# `r unite(sites,"no_nm")$no_nm[i]`
## Row
```{r}
#| title: Flows - observed & forecast
plot_q_dv(site = sites$site_no[i], log10 = T)
```
## Row
```{r}
#| title: Annual low flows
plot_q_quant(sites$site_no[i])
```
```{r}
#| title: Catch (CRC)
plot_crc(sites$site_no[i])
```
```{r}
#| title: Stream temp (Siegel et al. 2023)
plot_t_dv(sites$site_no[i])
```