library(devtools)
library(CSLSiso)
library(CSLSdata)
library(dplyr) #for pipes, filtering, and selecting
library(stringr) #for str_c
library(reshape2) #for melting
library(ggplot2) #for plotting
library(extrafont) #for fonts
library(knitr)
library(scales) # for ::
get_dynamic_sites <- function(lake){
  weather         <- CSLSdata::weather
  lst             <- CSLSdata::lst_HOBO[[lake]]
  isotopes        <- CSLSdata::isotopes[[lake]]
  lake_levels     <- CSLSdata::lake_levels[[lake]]
  gw_levels       <- CSLSdata::gw_levels[[lake]]
  elev_area_vol   <- CSLSdata::elev_area_vol[[lake]]
  dictionary      <- CSLSdata::dictionary[[lake]]

  # Identify monthly timeseries with complete coverage of input data
  timeseries <- find_timeseries(isotopes, lake_levels, gw_levels,
                              dictionary, by_gw_iso = TRUE)

  monthly_isotopes  <- summarise_isotopes(isotopes, dictionary, timeseries, 
                                          lake_levels, gw_levels)
  monthly_isotopes            <- monthly_isotopes %>%
                                 filter(is.na(.data$GWin_sites) == FALSE &
                                          .data$GWin_sites != "") %>%
                                 select(.data$date, .data$GWin_sites)
  monthly_isotopes$date       <- format(monthly_isotopes$date, "%b %Y")
  upgradient_sites            <- as.data.frame(cbind(monthly_isotopes$date, 
                                                     monthly_isotopes$GWin_sites))
  colnames(upgradient_sites)  <- c("Month", "Upgradient Wells")
  return(upgradient_sites)
}
get_upgradient_sites <- function(lake){
  dictionary       <- CSLSdata::dictionary[[lake]]
  upgradient_sites <- dictionary %>% 
                      filter(.data$static_iso_class == "upgradient") %>%
                      select(.data$static_iso_class, .data$site_id)
  upgradient_sites <- str_c(unique(upgradient_sites$site_id), collapse = ", ")
  return(upgradient_sites)
}

get_water_level_diff <- function(lake){
  lake_levels     <- CSLSdata::lake_levels[[lake]]
  gw_levels       <- CSLSdata::gw_levels[[lake]]
  for (i in 1:nrow(gw_levels)) {
    today <- gw_levels$date[i]
    gw    <- gw_levels$level_m[i]
    lk    <- lake_levels$level_m[lake_levels$date == today]
    if (length(lk) > 0) {
      gw_levels$diff_m[i] <- gw - lk
    } else {
      gw_levels$diff_m[i] <- NA
    }
  }
  return(gw_levels)
}

Overview

This document is a deeper dive into:

  1. How the timing of isotope measurements compares with the daily water level difference between lake and well levels.
  2. How isotope measurements at each well plot relative to the Local Meteoric Water Line.
  3. How d18O measurements, specifically, vary over time at each well.


When looking at the water level difference plots, keep in mind that when the well plots above the dashed line, it is upgradient of the lake. When it plots below the dashed line, it is downgradient of the lake. Water level measurements are shown at a daily timestep.

To determine if a well is upgradient or downgradient for a given measurement record, we look at the previous month of daily water level differences. If the median of these daily differences is less than 1cm (i.e, less than the precision of HOBO U20 loggers), the isotope measurement is not used. Otherwise, if the mean of the daily differences is greater than 0, it is considered an upgradient well.

include_graphics(system.file("images", 
                             "water_level_diff.png", 
                             package = "CSLSiso", 
                             mustWork = TRUE))


When looking at the Local Meteoric Water Line plots, keep in mind that measurements closest to the meteoric water line are most likely inflowing groundwater wells while measurements drifting off to the right are likely outflowing groundwater wells (or the lake itself), which are influenced by evaporation.

include_graphics(system.file("images", 
                             "isotope_signatures.png", 
                             package = "CSLSiso", 
                             mustWork = TRUE))

Lakes

Pleasant Lake

lake = "Pleasant"
upgradient_sites      <- get_upgradient_sites(lake)
lake_isotopes         <- CSLSdata::isotopes[[lake]]
lake_isotopes$diff_m  <- 0
water_level_diff      <- get_water_level_diff(lake)
level_plot            <- plot_levels(lake, water_level_diff, lake_isotopes)
iso_plot              <- plot_iso(lake, lake_isotopes)
d18O_plot             <- plot_d18O(lake, lake_isotopes)

It looks like most wells at Pleasant Lake have had a consistent relationship with the lake over time:

Aaron mentioned at an earlier meeting that PSNT-11 may have a well construction issue which causes it to respond very strongly to precipitation events. We have removed this well from analysis.

The "upgradient" wells used in the monthly water budget analysis (as determined by relative lake levels and well levels in the 30 days prior to the measurement) are:

sites <- get_dynamic_sites(lake)
knitr::kable(sites)
level_plot
iso_plot
d18O_plot

Long Lake

lake = "Long"
upgradient_sites      <- get_upgradient_sites(lake)
lake_isotopes         <- CSLSdata::isotopes[[lake]]
lake_isotopes$diff_m  <- 0
water_level_diff      <- get_water_level_diff(lake)
level_plot            <- plot_levels(lake, water_level_diff, lake_isotopes)
iso_plot              <- plot_iso(lake, lake_isotopes)
d18O_plot             <- plot_d18O(lake, lake_isotopes)

It looks like there are a few wells that are consistently upgradient of Long Lake, but classifications are more dynamic here:

Note that: LL-01B, LL-02B, LL-05C, and LL-09B are deeper wells drilled next to the shallower monitoring wells. What plots as LL-05 here is called LL-05B in the DNR water levels database.

The "upgradient" wells used in the monthly water budget analysis (as determined by relative lake levels and well levels in the 30 days prior to the measurement) are:

sites <- get_dynamic_sites(lake)
knitr::kable(sites)
level_plot
iso_plot
d18O_plot

Plainfield Lake

lake = "Plainfield"
upgradient_sites      <- get_upgradient_sites(lake)
lake_isotopes         <- CSLSdata::isotopes[[lake]]
lake_isotopes$diff_m  <- 0
water_level_diff      <- get_water_level_diff(lake)
level_plot            <- plot_levels(lake, water_level_diff, lake_isotopes)
iso_plot              <- plot_iso(lake, lake_isotopes)
d18O_plot             <- plot_d18O(lake, lake_isotopes)

As at Long Lake, a few wells are consistently upgradient of Plainfield Lake, but classifications are more dynamic here:

The "upgradient" wells used in the monthly water budget analysis (as determined by relative lake levels and well levels in the 30 days prior to the measurement) are:

sites <- get_dynamic_sites(lake)
knitr::kable(sites)
level_plot
iso_plot
d18O_plot

Session Info

The version of R and the versions of packages in use when this R Markdown file was created are listed here:

devtools::session_info()


cvoter/isoH2Obudget documentation built on Jan. 13, 2020, 4:41 a.m.