Last updated: 2022-07-16

Checks: 7 0

Knit directory: emlr_obs_analysis/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210412) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version cbde57a. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/
    Ignored:    output/other/
    Ignored:    output/publication/

Untracked files:
    Untracked:  figure/

Unstaged changes:
    Modified:   analysis/_site.yml
    Modified:   analysis/child/budget_analysis_plot_data.Rmd
    Modified:   code/Workflowr_project_managment.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/multi_model_assesment_AIP_budgets.Rmd) and HTML (docs/multi_model_assesment_AIP_budgets.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 692c937 jens-daniel-mueller 2022-07-16 Build site.
html 1aabfea jens-daniel-mueller 2022-07-12 Build site.
Rmd 567c3ed jens-daniel-mueller 2022-07-12 revised bias decomposition
html 19a6206 jens-daniel-mueller 2022-07-07 Build site.
Rmd 32ccba5 jens-daniel-mueller 2022-07-07 generalized plots to config parameter
html a607959 jens-daniel-mueller 2022-07-07 Build site.
Rmd 989d616 jens-daniel-mueller 2022-07-07 generalized plots to config parameter
html 15b7172 jens-daniel-mueller 2022-07-06 Build site.
Rmd de43671 jens-daniel-mueller 2022-07-06 rebuild after rerunning analysis with bias decomposition
html ca27982 jens-daniel-mueller 2022-07-06 Build site.
html b44c72a jens-daniel-mueller 2022-07-03 Build site.
html df21d31 jens-daniel-mueller 2022-07-01 Build site.
html 9393c07 jens-daniel-mueller 2022-06-28 Build site.
Rmd 2a3cf97 jens-daniel-mueller 2022-06-28 included basin-hemisphere bias, and bias contributions
html a13a7cf jens-daniel-mueller 2022-06-28 Build site.
Rmd ef081b3 jens-daniel-mueller 2022-06-28 rebuild with additional analysis

version_id_pattern <- "y"
config <- "gobm"

1 Read files

print(version_id_pattern)
[1] "y"
# identify required version IDs

Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
                            pattern = paste0("v_1", "y"))

Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
                            pattern = paste0("v_2", "y"))

Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
                            pattern = paste0("v_3", "y"))

Version_IDs <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)

# print(Version_IDs)

1.1 Global

for (i_Version_IDs in Version_IDs) {
  # i_Version_IDs <- Version_IDs[1]
  
  # print(i_Version_IDs)
  
  path_version_data     <-
    paste(path_observations,
          i_Version_IDs,
          "/data/",
          sep = "")
  
  # load and join data files
  
  dcant_budget_global <-
    read_csv(paste(path_version_data,
                   "dcant_budget_global.csv",
                   sep = ""))
  
  dcant_budget_global_mod_truth <-
    read_csv(paste(
      path_version_data,
      "dcant_budget_global_mod_truth.csv",
      sep = ""
    ))
  
  dcant_budget_global_bias <-
    read_csv(paste(path_version_data,
                   "dcant_budget_global_bias.csv",
                   sep = ""))
  
  lm_best_predictor_counts <-
    read_csv(paste(path_version_data,
                   "lm_best_predictor_counts.csv",
                   sep = ""))
  
  lm_best_dcant <-
    read_csv(paste(path_version_data,
                   "lm_best_dcant.csv",
                   sep = ""))
  
  dcant_budget_global <- bind_rows(dcant_budget_global,
                                      dcant_budget_global_mod_truth)
  
  dcant_budget_global <- dcant_budget_global %>%
    mutate(Version_ID = i_Version_IDs)
  
  dcant_budget_global_bias <- dcant_budget_global_bias %>%
    mutate(Version_ID = i_Version_IDs)
  
  lm_best_predictor_counts <- lm_best_predictor_counts %>%
    mutate(Version_ID = i_Version_IDs)
  
  lm_best_dcant <- lm_best_dcant %>%
    mutate(Version_ID = i_Version_IDs)

  params_local <-
    read_rds(paste(path_version_data,
                   "params_local.rds",
                   sep = ""))
  
  params_local <- bind_cols(
    Version_ID = i_Version_IDs,
    gobm := str_c(params_local$gobm, collapse = "|"),
    tref1 = params_local$tref1,
    tref2 = params_local$tref2)
  
  tref <- read_csv(paste(path_version_data,
                         "tref.csv",
                         sep = ""))
  
  params_local <- params_local %>%
    mutate(
      median_year_1 = sort(tref$median_year)[1],
      median_year_2 = sort(tref$median_year)[2],
      duration = median_year_2 - median_year_1,
      period = paste(median_year_1, "-", median_year_2)
    )
  
  if (exists("dcant_budget_global_all")) {
    dcant_budget_global_all <-
      bind_rows(dcant_budget_global_all, dcant_budget_global)
  }
  
  if (!exists("dcant_budget_global_all")) {
    dcant_budget_global_all <- dcant_budget_global
  }
  
  if (exists("dcant_budget_global_bias_all")) {
    dcant_budget_global_bias_all <-
      bind_rows(dcant_budget_global_bias_all,
                dcant_budget_global_bias)
  }

  if (!exists("dcant_budget_global_bias_all")) {
    dcant_budget_global_bias_all <- dcant_budget_global_bias
  }
  
    
  if (exists("lm_best_predictor_counts_all")) {
    lm_best_predictor_counts_all <-
      bind_rows(lm_best_predictor_counts_all, lm_best_predictor_counts)
  }
  
  if (!exists("lm_best_predictor_counts_all")) {
    lm_best_predictor_counts_all <- lm_best_predictor_counts
  }
    
  if (exists("lm_best_dcant_all")) {
    lm_best_dcant_all <-
      bind_rows(lm_best_dcant_all, lm_best_dcant)
  }
  
  if (!exists("lm_best_dcant_all")) {
    lm_best_dcant_all <- lm_best_dcant
  }
  
  if (exists("params_local_all")) {
    params_local_all <- bind_rows(params_local_all, params_local)
  }
  
  if (!exists("params_local_all")) {
    params_local_all <- params_local
  }
  
  
}

rm(
  dcant_budget_global,
  dcant_budget_global_bias,
  dcant_budget_global_mod_truth,
  lm_best_predictor_counts,
  lm_best_dcant,
  params_local,
  tref
)

1.2 Basins

# Version_IDs <- Version_IDs[1:length(Version_IDs)-1]

for (i_Version_IDs in Version_IDs) {
  # i_Version_IDs <- Version_IDs[1]
  
  # print(i_Version_IDs)
  
  path_version_data     <-
    paste(path_observations,
          i_Version_IDs,
          "/data/",
          sep = "")
  
  # load and join data files
  
  dcant_budget_basin_AIP <-
    read_csv(paste(path_version_data,
                   "dcant_budget_basin_AIP.csv",
                   sep = ""))
  
  dcant_budget_basin_AIP_mod_truth <-
    read_csv(paste(
      path_version_data,
      "dcant_budget_basin_AIP_mod_truth.csv",
      sep = ""
    ))
  
    
  dcant_budget_basin_AIP <- bind_rows(dcant_budget_basin_AIP,
                                      dcant_budget_basin_AIP_mod_truth)
  
  dcant_budget_basin_AIP_bias <-
    read_csv(paste(path_version_data,
                   "dcant_budget_basin_AIP_bias.csv",
                   sep = ""))
  
  dcant_slab_budget_bias <-
    read_csv(paste0(path_version_data,
                    "dcant_slab_budget_bias.csv"))

  dcant_slab_budget <-
    read_csv(paste0(path_version_data,
                    "dcant_slab_budget.csv"))

  dcant_budget_basin_AIP <- dcant_budget_basin_AIP %>%
    mutate(Version_ID = i_Version_IDs)
  
  dcant_budget_basin_AIP_bias <- dcant_budget_basin_AIP_bias %>%
    mutate(Version_ID = i_Version_IDs)
  
  dcant_slab_budget <- dcant_slab_budget %>%
    mutate(Version_ID = i_Version_IDs)
  
  dcant_slab_budget_bias <- dcant_slab_budget_bias %>%
    mutate(Version_ID = i_Version_IDs)
  
  if (exists("dcant_budget_basin_AIP_all")) {
    dcant_budget_basin_AIP_all <-
      bind_rows(dcant_budget_basin_AIP_all, dcant_budget_basin_AIP)
  }
  
  if (!exists("dcant_budget_basin_AIP_all")) {
    dcant_budget_basin_AIP_all <- dcant_budget_basin_AIP
  }
  
  if (exists("dcant_budget_basin_AIP_bias_all")) {
    dcant_budget_basin_AIP_bias_all <-
      bind_rows(dcant_budget_basin_AIP_bias_all,
                dcant_budget_basin_AIP_bias)
  }
  
  if (!exists("dcant_budget_basin_AIP_bias_all")) {
    dcant_budget_basin_AIP_bias_all <- dcant_budget_basin_AIP_bias
  }
  
  if (exists("dcant_slab_budget_all")) {
    dcant_slab_budget_all <-
      bind_rows(dcant_slab_budget_all, dcant_slab_budget)
  }
  
  if (!exists("dcant_slab_budget_all")) {
    dcant_slab_budget_all <- dcant_slab_budget
  }
  
  if (exists("dcant_slab_budget_bias_all")) {
    dcant_slab_budget_bias_all <-
      bind_rows(dcant_slab_budget_bias_all,
                dcant_slab_budget_bias)
  }
  
  if (!exists("dcant_slab_budget_bias_all")) {
    dcant_slab_budget_bias_all <- dcant_slab_budget_bias
  }
  
}

rm(
  dcant_budget_basin_AIP,
  dcant_budget_basin_AIP_bias,
  dcant_budget_basin_AIP_mod_truth,
  dcant_slab_budget,
  dcant_slab_budget_bias
)

1.3 Basins hemisphere

# Version_IDs <- Version_IDs[1:length(Version_IDs)-1]

for (i_Version_IDs in Version_IDs) {
  # i_Version_IDs <- Version_IDs[1]
  
  # print(i_Version_IDs)
  
  path_version_data     <-
    paste(path_observations,
          i_Version_IDs,
          "/data/",
          sep = "")
  
  # load and join data files
  
  dcant_budget_basin_MLR <-
    read_csv(paste(path_version_data,
                   "dcant_budget_basin_MLR.csv",
                   sep = ""))
  
  dcant_budget_basin_MLR_mod_truth <-
    read_csv(paste(
      path_version_data,
      "dcant_budget_basin_MLR_mod_truth.csv",
      sep = ""
    ))
  
    
  dcant_budget_basin_MLR <- bind_rows(dcant_budget_basin_MLR,
                                      dcant_budget_basin_MLR_mod_truth)
  

  dcant_budget_basin_MLR <- dcant_budget_basin_MLR %>%
    mutate(Version_ID = i_Version_IDs)

  if (exists("dcant_budget_basin_MLR_all")) {
    dcant_budget_basin_MLR_all <-
      bind_rows(dcant_budget_basin_MLR_all, dcant_budget_basin_MLR)
  }
  
  if (!exists("dcant_budget_basin_MLR_all")) {
    dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR
  }

  
}

rm(
  dcant_budget_basin_MLR,
  dcant_budget_basin_MLR_mod_truth
)

1.4 Steady state

for (i_Version_IDs in Version_IDs) {
  # i_Version_IDs <- Version_IDs[1]
  
  # print(i_Version_IDs)
  
  path_version_data     <-
    paste(path_observations,
          i_Version_IDs,
          "/data/",
          sep = "")
  
  # load and join data files
  
  dcant_obs_budget <-
    read_csv(paste0(path_version_data,
                    "anom_dcant_obs_budget.csv"))
  
  dcant_obs_budget <- dcant_obs_budget %>%
    mutate(Version_ID = i_Version_IDs)
  
  if (exists("dcant_obs_budget_all")) {
    dcant_obs_budget_all <-
      bind_rows(dcant_obs_budget_all, dcant_obs_budget)
  }
  
  if (!exists("dcant_obs_budget_all")) {
    dcant_obs_budget_all <- dcant_obs_budget
  }
  
}


rm(dcant_obs_budget)

1.5 Atm CO2

co2_atm <-
  read_csv(paste(path_preprocessing,
                 "co2_atm.csv",
                 sep = ""))
params_local_all <- params_local_all %>%
  mutate(gobm = str_split(gobm, "_v2", simplify = TRUE)[,1])
dcant_budget_global_all <- dcant_budget_global_all %>%
  filter(estimate == "dcant", 
         method == "total") %>% 
  select(-c(estimate, method)) %>% 
  rename(dcant = value)

dcant_budget_global_all_depth <- dcant_budget_global_all

dcant_budget_global_all <- dcant_budget_global_all %>%
  filter(inv_depth == params_global$inventory_depth_standard)

dcant_budget_global_bias_all <- dcant_budget_global_bias_all %>%
  filter(estimate == "dcant") %>%
  select(-c(estimate))

dcant_budget_global_bias_all_depth <- dcant_budget_global_bias_all

dcant_budget_global_bias_all <- dcant_budget_global_bias_all %>%
  filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_basin_AIP_all <- dcant_budget_basin_AIP_all %>%
  filter(estimate == "dcant", 
         method == "total") %>% 
  select(-c(estimate, method)) %>% 
  rename(dcant = value)

dcant_budget_basin_AIP_all_depth <- dcant_budget_basin_AIP_all

dcant_budget_basin_AIP_all <- dcant_budget_basin_AIP_all %>%
  filter(inv_depth == params_global$inventory_depth_standard)

dcant_budget_basin_AIP_bias_all <- dcant_budget_basin_AIP_bias_all %>%
  filter(estimate == "dcant") %>% 
  select(-c(estimate))

dcant_budget_basin_AIP_bias_all_depth <- dcant_budget_basin_AIP_bias_all

dcant_budget_basin_AIP_bias_all <- dcant_budget_basin_AIP_bias_all %>%
  filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR_all %>%
  filter(estimate == "dcant", 
         method == "total") %>% 
  select(-c(estimate, method)) %>% 
  rename(dcant = value)

# dcant_budget_basin_MLR_all_depth <- dcant_budget_basin_MLR_all

dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR_all %>%
  filter(inv_depth == params_global$inventory_depth_standard)

# dcant_budget_basin_MLR_bias_all <- dcant_budget_basin_MLR_bias_all %>%
#   filter(estimate == "dcant") %>% 
#   select(-c(estimate))
# 
# dcant_budget_basin_MLR_bias_all_depth <- dcant_budget_basin_MLR_bias_all
# 
# dcant_budget_basin_MLR_bias_all <- dcant_budget_basin_MLR_bias_all %>%
#   filter(inv_depth == params_global$inventory_depth_standard)

2 Bias thresholds

global_bias_rel_max <- 10
global_bias_rel_max
[1] 10
regional_bias_rel_max <- 20
regional_bias_rel_max
[1] 20

3 Individual cases

3.1 Global

3.1.1 Absoulte values

legend_title = expression(atop(Delta * C[ant],
                               (mu * mol ~ kg ^ {
                                 -1
                               })))

dcant_budget_global_all %>%
  ggplot(aes(period, dcant, col = gobm)) +
  geom_jitter(width = 0.05, height = 0) +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(. ~ data_source) +
  ylim(0,NA) +
  theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.1.2 Biases

dcant_budget_global_bias_all %>%
  ggplot(aes(period, dcant_bias, col=gobm)) +
  geom_hline(yintercept = 0) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(atop(Delta * C[ant] ~ bias,
                               (PgC)))) +
  geom_point() +
  theme(axis.text.x = element_blank(),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
b44c72a jens-daniel-mueller 2022-07-03
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
p_global_bias <-
  dcant_budget_global_bias_all %>%
  ggplot() +
  geom_hline(yintercept = global_bias_rel_max * c(-1, 1),
             linetype = 2) +
  geom_hline(yintercept = 0) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(Delta * C[ant] ~ bias ~ ("%")),
       title = "Model-based assesment") +
  theme(axis.title.x = element_blank()) +
  geom_point(aes(period, dcant_bias_rel, col = gobm),
  alpha = 0.7) +
  theme(axis.text.x = element_text(angle = 45, hjust = 1),
        axis.title.x = element_blank())

p_global_bias

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
b44c72a jens-daniel-mueller 2022-07-03
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_global_bias_all %>%
  group_by(period) %>%
  summarise(
    dcant_bias_sd = sd(dcant_bias),
    dcant_bias = mean(dcant_bias),
    dcant_bias_rel_sd = sd(dcant_bias_rel),
    dcant_bias_rel = mean(dcant_bias_rel)
  ) %>%
  ungroup() %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
period dcant_bias_sd dcant_bias dcant_bias_rel_sd dcant_bias_rel
1994 - 2004 0.8376077 -0.3138 4.786161 -1.691222
1994 - 2014 2.3573210 0.3994 5.820911 1.292799
2004 - 2014 1.9956957 0.6398 8.976596 3.487171

3.2 Basins

3.2.1 Absoulte values

dcant_budget_basin_AIP_all %>%
  ggplot(aes(period, dcant, col = gobm)) +
  geom_jitter(width = 0.05, height = 0) +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(basin_AIP ~ data_source) +
  ylim(0,NA) +
  theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.2.2 Biases

dcant_budget_basin_AIP_bias_all %>%
  ggplot(aes(period, dcant_bias, col=gobm)) +
  geom_hline(yintercept = 0) +
  geom_point() +
  facet_grid(basin_AIP ~ .)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
b44c72a jens-daniel-mueller 2022-07-03
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_basin_AIP_bias_all %>%
  ggplot() +
  geom_tile(aes(y = 0, height = regional_bias_rel_max * 2,
                x = "2004 - 2014", width = Inf,
                fill = "bias\nthreshold"), alpha = 0.5) +
  geom_hline(yintercept = 0) +
  scale_fill_manual(values = "grey70", name = "") +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(Delta ~ C[ant] ~ bias)) +
  theme(axis.title.x = element_blank()) +
  geom_jitter(aes(period, dcant_bias_rel, col = gobm),
              width = 0.05, height = 0) +
  facet_grid(. ~ basin_AIP)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
p_regional_bias <- 
  dcant_budget_basin_AIP_bias_all %>%
  ggplot() +
  geom_hline(yintercept = regional_bias_rel_max * c(-1,1),
             linetype = 2) +
  geom_hline(yintercept = 0) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(Delta * C[ant] ~ bias ~ ("%")),
       title = "Model-based assesment") +
  theme(axis.title.x = element_blank()) +
  geom_point(aes(period, dcant_bias_rel, col = gobm),
             alpha = 0.7) +
    theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank()) +
  facet_grid(. ~ basin_AIP) +
  theme(
  strip.background = element_blank(),
  strip.text.x = element_blank()
)

p_regional_bias

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.3 Slab budgets

3.3.1 Absolute values

dcant_slab_budget_all %>%
  filter(data_source == "obs",
         period != "1994 - 2014") %>% 
  ggplot(aes(gobm, dcant, fill = gamma_slab)) +
  geom_hline(yintercept = 0, col = "red") +
  geom_col() +
  scale_fill_scico_d(direction = -1) +
  facet_grid(basin_AIP ~ period)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
dcant_slab_budget_all %>%
  filter(data_source == "obs",
         period != "1994 - 2014") %>%
  group_by(basin_AIP) %>%
  group_split() %>%
  map(
    ~ ggplot(data = .x,
             aes(gobm, dcant, fill = gamma_slab)) +
      geom_hline(yintercept = 0) +
      geom_col() +
      scale_fill_scico_d(direction = -1) +
      labs(title = paste("data_source:", unique(.x$basin_AIP))) +
      facet_grid(gamma_slab ~ period)
  )
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[3]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.3.2 Bias

dcant_slab_budget_bias_all %>%
  filter(period != "1994 - 2014") %>%
  group_by(basin_AIP) %>%
  group_split() %>%
  # head(1) %>% 
  map(
    ~ ggplot(data = .x,
             aes(gamma_slab, dcant_bias, fill = gamma_slab)) +
      geom_col() +
      coord_flip() +
      scale_x_discrete(limits = rev) +
      scale_fill_scico_d(direction = -1) +
      facet_grid(period ~ gobm) +
      labs(title = paste("data_source:", unique(.x$basin_AIP)))
    )
[[1]]
Warning: Removed 10 rows containing missing values (position_stack).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]
Warning: Removed 24 rows containing missing values (position_stack).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[3]]
Warning: Removed 48 rows containing missing values (position_stack).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.3.3 Spread

dcant_slab_budget_all %>%
  filter(period != "1994 - 2014",
         data_source != "mod_truth") %>%
  group_by(data_source, basin_AIP, gamma_slab, period) %>%
  summarise(dcant_range = max(dcant) - min(dcant)) %>%
  ungroup() %>%
  group_split(basin_AIP) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(gamma_slab, dcant_range, fill = gamma_slab)) +
      geom_col() +
      coord_flip() +
      scale_x_discrete(limits = rev) +
      scale_fill_scico_d(direction = -1) +
      facet_grid(period ~ data_source) +
      labs(title = paste("data_source:", unique(.x$basin_AIP)))
  )
`summarise()` has grouped output by 'data_source', 'basin_AIP', 'gamma_slab'.
You can override using the `.groups` argument.
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28

[[3]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28

3.4 Basins hemisphere

3.4.1 Absoulte values

dcant_budget_basin_MLR_all %>%
  ggplot(aes(period, dcant, col = gobm)) +
  geom_jitter(width = 0.05, height = 0) +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(basin ~ data_source) +
  ylim(0,NA) +
  theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

3.4.2 Biases

dcant_budget_basin_MLR_bias_all <-
  dcant_budget_basin_MLR_all %>%
  filter(data_source %in% c("mod", "mod_truth")) %>%
  pivot_wider(names_from = data_source,
              values_from = dcant) %>%
  mutate(dcant_bias = mod - mod_truth,
         dcant_bias_rel = 100*(mod - mod_truth)/mod_truth)
  
dcant_budget_basin_MLR_bias_all %>%   
  ggplot(aes(period, dcant_bias, col=gobm)) +
  geom_hline(yintercept = 0) +
  geom_point() +
  facet_grid(basin ~ .)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
dcant_budget_basin_MLR_bias_all %>%
  ggplot() +
  geom_tile(aes(y = 0, height = regional_bias_rel_max * 2,
                x = "2004 - 2014", width = Inf,
                fill = "bias\nthreshold"), alpha = 0.5) +
  geom_hline(yintercept = 0) +
  scale_fill_manual(values = "grey70", name = "") +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(Delta ~ C[ant] ~ bias)) +
  theme(axis.title.x = element_blank()) +
  geom_jitter(aes(period, dcant_bias_rel, col = gobm),
              width = 0.05, height = 0) +
  facet_grid(. ~ basin)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
p_regional_bias <- 
  dcant_budget_basin_MLR_bias_all %>%
  ggplot() +
  geom_hline(yintercept = regional_bias_rel_max * c(-1,1),
             linetype = 2) +
  geom_hline(yintercept = 0) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = expression(Delta * C[ant] ~ bias ~ ("%")),
       title = "Model-based assesment") +
  theme(axis.title.x = element_blank()) +
  geom_point(aes(period, dcant_bias_rel, col = gobm),
             alpha = 0.7) +
    theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank()) +
  facet_grid(. ~ basin) +
  theme(
  strip.background = element_blank(),
  strip.text.x = element_blank()
)

p_regional_bias

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
dcant_budget_basin_MLR_bias_all %>%
  group_by(period, basin) %>%
  summarise(
    dcant_bias_sd = sd(dcant_bias),
    dcant_bias = mean(dcant_bias),
    dcant_bias_rel_sd = sd(dcant_bias_rel),
    dcant_bias_rel = mean(dcant_bias_rel)
  ) %>%
  ungroup() %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
`summarise()` has grouped output by 'period'. You can override using the
`.groups` argument.
period basin dcant_bias_sd dcant_bias dcant_bias_rel_sd dcant_bias_rel
1994 - 2004 Indian 0.8424330 -0.0824 21.041315 -3.3282402
1994 - 2004 N_Atlantic 0.2403316 0.0704 10.438812 5.0063917
1994 - 2004 N_Pacific 0.4604050 -0.0126 13.433353 2.1191473
1994 - 2004 S_Atlantic 0.3894134 -0.2196 15.636000 -9.6319880
1994 - 2004 S_Pacific 0.4531983 -0.0702 9.329050 -0.4167691
1994 - 2014 Indian 0.9514468 0.0670 9.448118 0.4486357
1994 - 2014 N_Atlantic 0.4760228 -0.2348 7.584695 -2.0723336
1994 - 2014 N_Pacific 0.7081534 0.1704 10.435996 4.1979188
1994 - 2014 S_Atlantic 0.3539552 0.7846 6.771791 14.8029728
1994 - 2014 S_Pacific 0.9230132 -0.3874 7.109100 -2.7478168
2004 - 2014 Indian 1.2032717 0.1448 24.781363 3.7123369
2004 - 2014 N_Atlantic 0.3192768 -0.3102 7.853929 -8.3870648
2004 - 2014 N_Pacific 0.2272516 0.1464 6.899964 4.7981904
2004 - 2014 S_Atlantic 0.7234226 0.9844 23.523630 35.2616140
2004 - 2014 S_Pacific 0.7802202 -0.3260 10.872242 -4.9663216

4 Ensemble

4.1 Global

dcant_budget_global_all_in <- dcant_budget_global_all %>% 
  filter(data_source %in% c("mod", "obs"))

dcant_budget_global_ensemble <- dcant_budget_global_all_in %>% 
  group_by(data_source, period, tref2) %>% 
  summarise(dcant_mean = mean(dcant),
            dcant_sd = sd(dcant),
            dcant_range = max(dcant)- min(dcant)) %>% 
  ungroup()
`summarise()` has grouped output by 'data_source', 'period'. You can override
using the `.groups` argument.

4.1.1 Mean

legend_title = expression(Delta * C[ant]~(PgC))

ggplot() +
  geom_col(data = dcant_budget_global_ensemble,
           aes(x = period,
               y = dcant_mean),
           fill = "darkgrey") +
  geom_errorbar(
    data = dcant_budget_global_ensemble,
    aes(
      x = period,
      y = dcant_mean,
      ymax = dcant_mean + dcant_sd,
      ymin = dcant_mean - dcant_sd
    ),
    width = 0.1
  ) +
  geom_point(
    data = dcant_budget_global_all,
    aes(period, dcant, col = gobm),
    alpha = 0.7,
    position = position_jitter(width = 0.2, height = 0)
  ) +
  scale_y_continuous(limits = c(0,70), expand = c(0,0)) +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(. ~ data_source) +
  labs(y = legend_title) +
  theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
p_global_dcant <- ggplot() +
  geom_col(data = dcant_budget_global_ensemble %>% 
             filter(data_source == "obs"),
           aes(x = period,
               y = dcant_mean),
           fill = "darkgrey") +
    geom_point(
    data = dcant_budget_global_all %>% 
             filter(data_source == "obs"),
    aes(period, dcant, col = gobm),
    alpha = 0.7,
    position = position_jitter(width = 0.1, height = 0)
  ) +
  geom_errorbar(
    data = dcant_budget_global_ensemble %>% 
             filter(data_source == "obs"),
    aes(
      x = period,
      y = dcant_mean,
      ymax = dcant_mean + dcant_sd,
      ymin = dcant_mean - dcant_sd
    ),
    width = 0.1
  ) +
  scale_y_continuous(limits = c(0,70), expand = c(0,0)) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = legend_title,
       title = "Observation-based results") +
  theme(axis.text.x = element_blank(),
        axis.title.x = element_blank())

p_global_dcant_bias <-
p_global_dcant / p_global_bias +
  plot_layout(guides = 'collect',
              heights = c(2,1))

p_global_dcant_bias

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
b44c72a jens-daniel-mueller 2022-07-03
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
# ggsave(plot = p_global_dcant_bias,
#        path = here::here("output/publication"),
#        filename = "Fig_global_dcant_budget.png",
#        height = 5,
#        width = 5)

rm(p_global_bias, p_global_dcant, p_global_dcant_bias)

4.1.2 Mean vs atm CO2

dcant_ensemble <- dcant_budget_global_ensemble %>% 
  filter(data_source == "obs",
         period != "1994 - 2014") %>% 
  select(year = tref2, dcant_mean, dcant_sd)

tcant_S04 <- bind_cols(year = 1994, dcant_mean = 118, dcant_sd = 19)

tcant_ensemble <- full_join(dcant_ensemble, tcant_S04)
Joining, by = c("year", "dcant_mean", "dcant_sd")
tcant_ensemble <- left_join(tcant_ensemble, co2_atm)
Joining, by = "year"
co2_atm_pi <- bind_cols(pCO2 = 280, dcant_mean = 0, year = 1750, dcant_sd = 0)

tcant_ensemble <- full_join(tcant_ensemble, co2_atm_pi)
Joining, by = c("year", "dcant_mean", "dcant_sd", "pCO2")
tcant_ensemble <- tcant_ensemble %>% 
  arrange(year) %>% 
  mutate(tcant = cumsum(dcant_mean),
         tcant_sd = cumsum(dcant_sd))

tcant_ensemble %>% 
  ggplot(aes(pCO2, tcant, ymin = tcant - tcant_sd, ymax = tcant + tcant_sd)) +
  geom_ribbon(fill = "grey80") +
  geom_point() +
  geom_line() +
  scale_x_continuous(breaks = seq(280, 400, 30),
                     sec.axis = dup_axis(labels =  c(1750, 1940, 1980, 2000, 2015),
                                         name = "Year")) +
  geom_text(aes(label = year), nudge_x = -5, nudge_y = 5) +
  labs(x = expression(Atmospheric~pCO[2]~(µatm)),
       y = expression(Total~oceanic~C[ant]~(PgC)))

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28
# ggsave(path = "output/publication",
#        filename = "Fig_global_dcant_budget_vs_atm_pCO2.png",
#        height = 4,
#        width = 7)

4.1.3 Sum decades

dcant_budget_global_all_in_sum <-
  dcant_budget_global_all_in %>%
  filter(period != "1994 - 2014") %>%
  arrange(tref1) %>%
  group_by(data_source, gobm) %>%
  mutate(dcant = dcant + lag(dcant)) %>% 
  ungroup() %>%
  drop_na() %>% 
  mutate(estimate = "sum")

dcant_budget_global_all_in_sum <-
  bind_rows(
    dcant_budget_global_all_in_sum,
    dcant_budget_global_all_in %>%
      filter(period == "1994 - 2014") %>%
      mutate(estimate = "direct")
  )

ggplot() +
  geom_point(
    data = dcant_budget_global_all_in_sum,
    aes(estimate, dcant, col = gobm),
    alpha = 0.7,
    position = position_jitter(width = 0, height = 0)
  ) +
  scale_y_continuous(limits = c(0,70), expand = c(0,0)) +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(. ~ data_source) +
  theme(axis.text.x = element_text(angle = 45, hjust=1),
        axis.title.x = element_blank())

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

4.1.4 Mean bias

dcant_budget_global_ensemble_bias <- full_join(
  dcant_budget_global_ensemble %>%
    filter(data_source == "mod") %>% 
    select(period, dcant_mean, dcant_sd),
  dcant_budget_global_all %>%
    filter(data_source == "mod_truth",
           gobm == unique(dcant_budget_global_all$gobm)[1]) %>% 
    select(period, dcant)
)
Joining, by = "period"
dcant_budget_global_ensemble_bias <- dcant_budget_global_ensemble_bias %>% 
  mutate(dcant_mean_bias = dcant_mean - dcant,
         dcant_mean_bias_rel = 100 * dcant_mean_bias / dcant)

dcant_budget_global_ensemble_bias %>%
  ggplot(aes(period, dcant_mean_bias)) +
  geom_hline(yintercept = 0) +
  geom_point()

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_global_ensemble_bias %>%
  ggplot(aes(period, dcant_mean_bias_rel)) +
  geom_hline(yintercept = 0) +
  geom_point()

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28

4.1.5 Vertical patterns

4.1.5.1 Absoulte values

dcant_budget_global_all_depth %>%
  filter(data_source != "mod_truth") %>% 
  group_by(data_source) %>%
  group_split() %>%
  # head(1) %>%
  map(
    ~  ggplot(data = .x,
              aes(dcant, gobm, fill=period)) +
      geom_vline(xintercept = 0) +
      geom_col(position = "dodge") +
      scale_fill_brewer(palette = "Dark2") +
      facet_grid(inv_depth ~ .) +
      labs(title = paste("data_source:", unique(.x$data_source)))
  )
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

4.1.5.2 Biases

dcant_budget_global_bias_all_depth %>%
  ggplot(aes(dcant_bias, gobm, fill = period)) +
  geom_vline(xintercept = 0) +
  geom_col(position = "dodge") +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ .)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_global_bias_all_depth %>%
  ggplot(aes(dcant_bias_rel, gobm, fill = period)) +
  geom_vline(xintercept = 0) +
  geom_col(position = "dodge") +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ .)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
rm(dcant_budget_global_all,
   dcant_budget_global_all_depth,
   dcant_budget_global_bias_all,
   dcant_budget_global_bias_all_depth,
   dcant_budget_global_ensemble,
   dcant_budget_global_ensemble_bias)

4.2 Basins

dcant_budget_basin_AIP_ensemble <- dcant_budget_basin_AIP_all %>% 
  filter(data_source %in% c("mod", "obs")) %>% 
  group_by(basin_AIP, data_source, period) %>% 
  summarise(dcant_mean = mean(dcant),
            dcant_sd = sd(dcant),
            dcant_range = max(dcant)- min(dcant)) %>% 
  ungroup()
`summarise()` has grouped output by 'basin_AIP', 'data_source'. You can override
using the `.groups` argument.

4.2.1 Mean

dcant_budget_basin_AIP_ensemble %>%
  ggplot(aes(period, dcant_mean, col=basin_AIP)) +
  geom_pointrange(aes(ymax = dcant_mean + dcant_sd,
                      ymin = dcant_mean - dcant_sd),
                  shape = 21) +
  facet_grid(. ~ data_source)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28
p_regional_dcant <- ggplot() +
  geom_col(
    data = dcant_budget_basin_AIP_ensemble %>%
      filter(data_source == "obs"),
    aes(x = period,
        y = dcant_mean),
    fill = "darkgrey"
  ) +
  geom_point(
    data = dcant_budget_basin_AIP_all %>%
      filter(data_source == "obs"),
    aes(period, dcant, col = gobm),
    position = position_jitter(width = 0.1, height = 0),
    alpha = 0.7
  ) +
  geom_errorbar(
    data = dcant_budget_basin_AIP_ensemble %>%
      filter(data_source == "obs"),
    aes(
      x = period,
      y = dcant_mean,
      ymax = dcant_mean + dcant_sd,
      ymin = dcant_mean - dcant_sd
    ),
    width = 0.1
  ) +
  scale_y_continuous(limits = c(0, 35), expand = c(0, 0)) +
  scale_color_brewer(palette = "Dark2") +
  labs(y = legend_title,
       title = "Observation-based results") +
  theme(axis.text.x = element_blank(),
        axis.title.x = element_blank()) +
  facet_grid(. ~ basin_AIP)

p_regional_dcant_bias <-
p_regional_dcant / p_regional_bias +
  plot_layout(guides = 'collect',
              heights = c(2,1))

p_regional_dcant_bias

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
# ggsave(plot = p_regional_dcant_bias,
#        path = "output/publication",
#        filename = "Fig_regional_dcant_budget.png",
#        height = 5,
#        width = 10)

rm(p_regional_bias, p_regional_dcant, p_regional_dcant_bias)

4.2.2 Mean bias

dcant_budget_basin_AIP_ensemble_bias <- full_join(
  dcant_budget_basin_AIP_ensemble %>%
    filter(data_source == "mod") %>% 
    select(basin_AIP, period, dcant_mean, dcant_sd),
  dcant_budget_basin_AIP_all %>%
    filter(data_source == "mod_truth",
           gobm == unique(dcant_budget_basin_AIP_all$gobm)[1]) %>% 
    select(basin_AIP, period, dcant)
)
Joining, by = c("basin_AIP", "period")
dcant_budget_basin_AIP_ensemble_bias <- dcant_budget_basin_AIP_ensemble_bias %>% 
  mutate(dcant_mean_bias = dcant_mean - dcant,
         dcant_mean_bias_rel = 100 * dcant_mean_bias / dcant)


dcant_budget_basin_AIP_ensemble_bias %>%
  ggplot(aes(period, dcant_mean_bias, col = basin_AIP)) +
  geom_hline(yintercept = 0) +
  geom_point()

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_basin_AIP_ensemble_bias %>%
  ggplot(aes(period, dcant_mean_bias_rel, col = basin_AIP)) +
  geom_hline(yintercept = 0) +
  geom_point()

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
a13a7cf jens-daniel-mueller 2022-06-28

4.2.3 Vertical patterns

4.2.3.1 Absoulte values

dcant_budget_basin_AIP_all_depth %>%
  filter(data_source != "mod_truth") %>%
  group_by(data_source) %>%
  group_split() %>%
  # head(1) %>%
  map(
    ~  ggplot(data = .x,
              aes(dcant, gobm, fill = basin_AIP)) +
      geom_vline(xintercept = 0) +
      geom_col() +
      scale_fill_brewer(palette = "Dark2") +
      facet_grid(inv_depth ~ period) +
      labs(title = paste("data_source:", unique(.x$data_source)))
  )
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

4.2.3.2 Biases

dcant_budget_basin_AIP_bias_all_depth %>%
  ggplot(aes(dcant_bias, gobm, fill = basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col() +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
dcant_budget_basin_AIP_bias_all_depth %>%
  ggplot(aes(dcant_bias_rel, gobm, fill = basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col(position = "dodge") +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

5 Steady state

dcant_obs_budget_all %>%
  group_by(inv_depth) %>%
  group_split() %>%
  # head(1) %>% 
  map(
    ~ ggplot(data = .x,
             aes(estimate, dcant_pos, fill = basin_AIP)) +
      scale_fill_brewer(palette = "Dark2") +
      geom_col() +
      facet_grid(gobm ~ period) +
      labs(title = paste("inventory depth:",unique(.x$inv_depth)))
  )
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[3]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[4]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[5]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

6 Predictor analysis

lm_best_predictor_counts_all <-
  full_join(lm_best_predictor_counts_all,
            params_local_all)
Joining, by = "Version_ID"
lm_best_predictor_counts_all <- lm_best_predictor_counts_all %>% 
  mutate(n_predictors_total = rowSums(across(aou:temp), na.rm = TRUE)/10)

lm_best_predictor_counts_all %>%
  ggplot(aes(x = gobm, y = n_predictors_total)) +
  # ggdist::stat_halfeye(
  #   adjust = .5,
  #   width = .6,
  #   .width = 0,
  #   justification = -.2,
  #   point_colour = NA
  # ) +
  geom_boxplot(width = 0.5,
               outlier.shape = NA) +
  gghalves::geom_half_point(
    side = "l",
    range_scale = .4,
    alpha = .5,
    aes(col = gamma_slab)
  ) +
  scale_color_viridis_d() +
  facet_grid(basin ~ data_source)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
lm_best_predictor_counts_all %>%
  pivot_longer(aou:temp,
               names_to = "predictor",
               values_to = "count") %>%
  group_split(predictor) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(gobm, count, color = gamma_slab)) +
      geom_jitter(alpha = 0.5) +
      scale_color_viridis_d() +
      labs(title = paste0("predictor:", unique(.x$predictor))) +
      coord_cartesian(ylim = c(0, 10)) +
      facet_grid(basin ~ data_source)
  )
[[1]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[2]]
Warning: Removed 7 rows containing missing values (geom_point).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[3]]
Warning: Removed 2 rows containing missing values (geom_point).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[4]]
Warning: Removed 12 rows containing missing values (geom_point).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[5]]
Warning: Removed 1 rows containing missing values (geom_point).

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[6]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

[[7]]

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28
lm_best_dcant_all <-
  full_join(lm_best_dcant_all,
            params_local_all)
Joining, by = "Version_ID"
lm_best_dcant_all %>%
  count(basin, data_source, gamma_slab, gobm, period) %>%
  ggplot(aes(gobm, n)) +
  geom_jitter(height = 0, alpha = 0.3) +
  facet_grid(basin ~ data_source)

Version Author Date
ca27982 jens-daniel-mueller 2022-07-06
9393c07 jens-daniel-mueller 2022-06-28
a13a7cf jens-daniel-mueller 2022-06-28

7 Drift and bias

dcant_budget_global_all_dissic %>%
  filter(estimate == "dcant") %>%
  ggplot(aes(inv_depth, value, col = !!sym(config))) +
  geom_hline(yintercept = 0) +
  scale_color_brewer(palette = "Dark2") +
  geom_point() +
  geom_path() +
  labs(y = "DIC change (PgC)") +
  facet_grid(data_source ~ period, scales = "free_y")

Version Author Date
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition <-
  dcant_budget_global_bias_all_decomposition %>%
  filter(estimate == "dcant") %>%
  select(inv_depth, dcant_bias, contribution, !!sym(config), period) %>%
  pivot_wider(names_from = contribution,
              values_from = dcant_bias)

dcant_budget_global_bias_all_decomposition <-
  full_join(
    dcant_budget_global_bias_all_decomposition,
    dcant_budget_global_bias_all_depth %>%
      select(inv_depth, !!sym(config), period, mod_truth)
  )
Joining, by = c("inv_depth", "gobm", "period")
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(`dcant offset`, `delta C* - mod_truth`, col = !!sym(config))) +
  geom_vline(xintercept = 0, col = "grey50") +
  geom_hline(yintercept = 0, col = "grey50") +
  geom_abline(intercept = 0, slope = 1) +
  geom_point() +
  coord_fixed() +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(`dcant offset`, `C* prediction error`, col = !!sym(config))) +
  geom_vline(xintercept = 0, col = "grey50") +
  geom_hline(yintercept = 0, col = "grey50") +
  geom_abline(intercept = 0, slope = 1) +
  geom_point() +
  coord_fixed() +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(
    `dcant offset`,
    `C* prediction error` + `delta C* - mod_truth`,
    col = !!sym(config)
  )) +
  geom_vline(xintercept = 0, col = "grey50") +
  geom_hline(yintercept = 0, col = "grey50") +
  geom_abline(intercept = 0, slope = 1) +
  geom_point() +
  coord_fixed() +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(`dcant offset`, `C* drift`, col = !!sym(config))) +
  geom_vline(xintercept = 0, col = "grey50") +
  geom_hline(yintercept = 0, col = "grey50") +
  geom_abline(intercept = 0, slope = 1) +
  geom_point() +
  coord_fixed() +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(
    `dcant offset` - `C* drift`,
    `C* prediction error`,
    col = !!sym(config)
  )) +
  geom_vline(xintercept = 0, col = "grey50") +
  geom_hline(yintercept = 0, col = "grey50") +
  geom_abline(intercept = 0, slope = 1) +
  geom_point() +
  coord_fixed() +
  scale_color_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ period)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(
    x = period,
    fill = !!sym(config),
    col = !!sym(config)
  )) +
  geom_hline(yintercept = 0) +
  geom_point(
    aes(y = `dcant offset`, shape = "dcant offset"),
    position = position_nudge(x = -0.05),
    alpha = 0.5
  ) +
  geom_point(
    aes(y = `dcant offset` - `C* drift`, shape = "dcant offset - C* drift"),
    position = position_nudge(x = 0.05),
    alpha = 0.5
  ) +
  scale_color_brewer(palette = "Dark2") +
  scale_fill_brewer(palette = "Dark2") +
  scale_shape_manual(values = c(21,23)) +
  facet_grid(inv_depth ~ .)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
19a6206 jens-daniel-mueller 2022-07-07
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition <-
  dcant_budget_global_bias_all_decomposition %>%
  mutate(
    `dcant offset rel` = 100 * `dcant offset` / mod_truth,
    `dcant offset rel corr` = 100 * (`dcant offset` - `C* drift`) / mod_truth,
    `C* prediction error rel` = 100 * (`C* prediction error`) / mod_truth
  )

dcant_budget_global_bias_all_decomposition %>%
  ggplot(aes(
    x = period,
    fill = !!sym(config),
    col = !!sym(config)
  )) +
  geom_hline(yintercept = 0) +
  geom_point(
    aes(y = `dcant offset rel`, shape = "dcant offset"),
    position = position_nudge(x = -0.05),
    alpha = 0.5
  ) +
  geom_point(
    aes(y = `dcant offset rel corr`, shape = "dcant offset - C* drift"),
    position = position_nudge(x = 0.05),
    alpha = 0.5
  ) +
  scale_color_brewer(palette = "Dark2") +
  scale_fill_brewer(palette = "Dark2") +
  scale_shape_manual(values = c(21,23)) +
  facet_grid(inv_depth ~ .)

Version Author Date
1aabfea jens-daniel-mueller 2022-07-12
a607959 jens-daniel-mueller 2022-07-07
15b7172 jens-daniel-mueller 2022-07-06
dcant_budget_global_bias_all_decomposition <-
  dcant_budget_global_bias_all_decomposition %>%
  pivot_longer(-c(inv_depth:period),
               names_to = "estimate",
               values_to = "value")


dcant_budget_global_bias_all_decomposition %>%
  group_by(inv_depth, estimate) %>%
  summarise(mean = mean(value),
            sd = sd(value)) %>%
  ungroup() %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
`summarise()` has grouped output by 'inv_depth'. You can override using the
`.groups` argument.
inv_depth estimate mean sd
100 C* drift 0.1633333 0.1710567
100 C* prediction error -0.0312667 0.6405197
100 C* prediction error rel -1.0436107 16.9355123
100 dcant offset 0.4414000 0.2574745
100 dcant offset rel 9.3751238 4.4571134
100 dcant offset rel corr 5.9257890 5.2377855
100 delta C* - mod_truth -0.4052667 0.2440399
100 mod_truth 4.6806667 1.7266649
500 C* drift 0.7099333 0.8009617
500 C* prediction error -0.5059333 0.9965189
500 C* prediction error rel -2.8984298 6.2769646
500 dcant offset 0.2129333 0.7892171
500 dcant offset rel 1.6295952 5.4628266
500 dcant offset rel corr -2.6876093 5.9847749
500 delta C* - mod_truth -0.6005333 0.7226971
500 mod_truth 16.2416000 6.0717693
1000 C* drift 1.2996000 1.5895238
1000 C* prediction error -1.1192000 1.2330623
1000 C* prediction error rel -5.2463822 6.0424515
1000 dcant offset -0.0748000 0.7153128
1000 dcant offset rel -0.3627622 3.2024571
1000 dcant offset rel corr -6.2851543 5.3690952
1000 delta C* - mod_truth -0.2750667 1.4726121
1000 mod_truth 21.9682667 8.1719535
3000 C* drift 1.0312667 2.6474791
3000 C* prediction error -0.0789333 1.7583971
3000 C* prediction error rel -1.0198587 8.3489093
3000 dcant offset 0.2418000 1.7611901
3000 dcant offset rel 1.0295826 6.6388331
3000 dcant offset rel corr -3.3944487 7.9351738
3000 delta C* - mod_truth -0.9985333 2.7568477
3000 mod_truth 26.9395333 10.5539591
10000 C* drift 0.5536000 2.3199567
10000 C* prediction error 0.4213333 2.1438709
10000 C* prediction error rel 0.7642686 10.1691404
10000 dcant offset 0.3358667 2.0422875
10000 dcant offset rel 1.1584124 8.4808972
10000 dcant offset rel corr -1.3241870 9.5095944
10000 delta C* - mod_truth -1.4048000 2.3443270
10000 mod_truth 27.4528000 10.6671793
dcant_budget_global_bias_all_decomposition %>%
  group_by(inv_depth, estimate, period) %>%
  summarise(mean = mean(value),
            sd = sd(value)) %>%
  ungroup() %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
`summarise()` has grouped output by 'inv_depth', 'estimate'. You can override
using the `.groups` argument.
inv_depth estimate period mean sd
100 C* drift 1994 - 2004 0.1264000 0.1223797
100 C* drift 1994 - 2014 0.2450000 0.2445557
100 C* drift 2004 - 2014 0.1186000 0.1228161
100 C* prediction error 1994 - 2004 -0.4626000 0.6315464
100 C* prediction error 1994 - 2014 -0.0558000 0.4961670
100 C* prediction error 2004 - 2014 0.4246000 0.5457250
100 C* prediction error rel 1994 - 2004 -13.8381946 18.5352883
100 C* prediction error rel 1994 - 2014 -0.7131767 7.0158549
100 C* prediction error rel 2004 - 2014 11.4205392 14.5638041
100 dcant offset 1994 - 2004 0.2404000 0.1299550
100 dcant offset 1994 - 2014 0.6600000 0.2540492
100 dcant offset 2004 - 2014 0.4238000 0.1999392
100 dcant offset rel 1994 - 2004 7.3062593 3.9299005
100 dcant offset rel 1994 - 2014 9.4129577 3.6914916
100 dcant offset rel 2004 - 2014 11.4061545 5.4727400
100 dcant offset rel corr 1994 - 2004 3.5264312 6.2280762
100 dcant offset rel corr 1994 - 2014 5.9762800 4.4761463
100 dcant offset rel corr 2004 - 2014 8.2746559 4.8062214
100 delta C* - mod_truth 1994 - 2004 -0.4960000 0.1123766
100 delta C* - mod_truth 1994 - 2014 -0.6078000 0.1415528
100 delta C* - mod_truth 2004 - 2014 -0.1120000 0.0818932
100 mod_truth 1994 - 2004 3.2988000 0.0765029
100 mod_truth 1994 - 2014 7.0210000 0.1854926
100 mod_truth 2004 - 2014 3.7222000 0.1132374
500 C* drift 1994 - 2004 0.5312000 0.5660664
500 C* drift 1994 - 2014 1.0648000 1.1569806
500 C* drift 2004 - 2014 0.5338000 0.5918021
500 C* prediction error 1994 - 2004 -0.3940000 0.7408380
500 C* prediction error 1994 - 2014 -0.7568000 1.3079041
500 C* prediction error 2004 - 2014 -0.3670000 1.0477421
500 C* prediction error rel 1994 - 2004 -3.3150638 6.3127917
500 C* prediction error rel 1994 - 2014 -2.8671621 5.4512596
500 C* prediction error rel 2004 - 2014 -2.5130636 8.2419410
500 dcant offset 1994 - 2004 0.6942000 0.2699957
500 dcant offset 1994 - 2014 0.3294000 0.9130642
500 dcant offset 2004 - 2014 -0.3848000 0.7213562
500 dcant offset rel 1994 - 2004 6.2441089 2.7726387
500 dcant offset rel 1994 - 2014 1.4624678 3.8951990
500 dcant offset rel 2004 - 2014 -2.8177913 5.4965821
500 dcant offset rel corr 1994 - 2004 1.6029467 4.6432751
500 dcant offset rel corr 1994 - 2014 -2.8384871 4.8397104
500 dcant offset rel corr 2004 - 2014 -6.8272875 5.9931495
500 delta C* - mod_truth 1994 - 2004 -0.4180000 0.5539418
500 delta C* - mod_truth 1994 - 2014 -0.9008000 1.0411300
500 delta C* - mod_truth 2004 - 2014 -0.4828000 0.5153069
500 mod_truth 1994 - 2004 11.2928000 0.6955877
500 mod_truth 1994 - 2014 24.3624000 1.5054598
500 mod_truth 2004 - 2014 13.0696000 0.8109179
1000 C* drift 1994 - 2004 0.9632000 1.1404338
1000 C* drift 1994 - 2014 1.9492000 2.3157796
1000 C* drift 2004 - 2014 0.9864000 1.1781669
1000 C* prediction error 1994 - 2004 -1.2892000 1.0834137
1000 C* prediction error 1994 - 2014 -1.6686000 1.4784929
1000 C* prediction error 2004 - 2014 -0.3998000 0.9494613
1000 C* prediction error rel 1994 - 2004 -8.5559132 7.4231131
1000 C* prediction error rel 1994 - 2014 -5.0379750 4.4688004
1000 C* prediction error rel 2004 - 2014 -2.1452586 5.1913139
1000 dcant offset 1994 - 2004 0.0754000 0.6068878
1000 dcant offset 1994 - 2014 -0.0938000 1.0264622
1000 dcant offset 2004 - 2014 -0.2060000 0.5645777
1000 dcant offset rel 1994 - 2004 0.4195485 3.9426250
1000 dcant offset rel 1994 - 2014 -0.3290955 3.0419614
1000 dcant offset rel 2004 - 2014 -1.1787397 3.0819694
1000 dcant offset rel corr 1994 - 2004 -5.9082890 7.0997961
1000 dcant offset rel corr 1994 - 2014 -6.2297624 5.3948598
1000 dcant offset rel corr 2004 - 2014 -6.7174114 4.5791480
1000 delta C* - mod_truth 1994 - 2004 -0.1420000 1.1237411
1000 delta C* - mod_truth 1994 - 2014 -0.4124000 2.2248976
1000 delta C* - mod_truth 2004 - 2014 -0.2708000 1.1538447
1000 mod_truth 1994 - 2004 15.2022000 0.6975544
1000 mod_truth 1994 - 2014 32.9522000 1.5164777
1000 mod_truth 2004 - 2014 17.7504000 0.8219095
3000 C* drift 1994 - 2004 0.7580000 1.9961306
3000 C* drift 1994 - 2014 1.5470000 4.0023757
3000 C* drift 2004 - 2014 0.7888000 2.0072749
3000 C* prediction error 1994 - 2004 -1.1414000 2.0082257
3000 C* prediction error 1994 - 2014 -0.0894000 1.8964548
3000 C* prediction error 2004 - 2014 0.9940000 0.5849671
3000 C* prediction error rel 1994 - 2004 -6.9363306 11.5872045
3000 C* prediction error rel 1994 - 2014 -0.6150967 4.5304746
3000 C* prediction error rel 2004 - 2014 4.4918512 2.6911377
3000 dcant offset 1994 - 2004 -0.3138000 0.8376077
3000 dcant offset 1994 - 2014 0.3994000 2.3573210
3000 dcant offset 2004 - 2014 0.6398000 1.9956957
3000 dcant offset rel 1994 - 2004 -1.6912222 4.7861609
3000 dcant offset rel 1994 - 2014 1.2927988 5.8209107
3000 dcant offset rel 2004 - 2014 3.4871712 8.9765960
3000 dcant offset rel corr 1994 - 2004 -6.4214999 11.3892983
3000 dcant offset rel corr 1994 - 2014 -3.1145758 6.4233854
3000 dcant offset rel corr 2004 - 2014 -0.6472704 5.3313224
3000 delta C* - mod_truth 1994 - 2004 -0.6786000 1.9899151
3000 delta C* - mod_truth 1994 - 2014 -1.4980000 4.1639329
3000 delta C* - mod_truth 2004 - 2014 -0.8190000 2.1960331
3000 mod_truth 1994 - 2004 18.5858000 2.4063525
3000 mod_truth 1994 - 2014 40.4094000 5.3503176
3000 mod_truth 2004 - 2014 21.8234000 2.9476288
10000 C* drift 1994 - 2004 0.4126000 1.7614975
10000 C* drift 1994 - 2014 0.8304000 3.5297635
10000 C* drift 2004 - 2014 0.4178000 1.7697222
10000 C* prediction error 1994 - 2004 -0.9288000 2.5605655
10000 C* prediction error 1994 - 2014 0.7434000 1.8957720
10000 C* prediction error 2004 - 2014 1.4494000 1.4855325
10000 C* prediction error rel 1994 - 2004 -5.8662487 14.0691777
10000 C* prediction error rel 1994 - 2014 1.4217831 4.3388021
10000 C* prediction error rel 2004 - 2014 6.7372713 6.7143085
10000 dcant offset 1994 - 2004 -0.3582000 1.5052962
10000 dcant offset 1994 - 2014 0.6230000 2.0526338
10000 dcant offset 2004 - 2014 0.7428000 2.6845577
10000 dcant offset rel 1994 - 2004 -2.2206170 8.0567393
10000 dcant offset rel 1994 - 2014 1.6779302 5.1601749
10000 dcant offset rel 2004 - 2014 4.0179241 11.6348840
10000 dcant offset rel corr 1994 - 2004 -4.8938233 12.8815358
10000 dcant offset rel corr 1994 - 2014 -0.7937951 6.1508113
10000 dcant offset rel corr 2004 - 2014 1.7150575 9.2152657
10000 delta C* - mod_truth 1994 - 2004 -0.9356000 1.6575388
10000 delta C* - mod_truth 1994 - 2014 -2.1072000 3.4780208
10000 delta C* - mod_truth 2004 - 2014 -1.1716000 1.8524601
10000 mod_truth 1994 - 2004 18.9678000 2.2522747
10000 mod_truth 1994 - 2014 41.1792000 5.0491414
10000 mod_truth 2004 - 2014 22.2114000 2.8003547

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.3

Matrix products: default
BLAS:   /usr/local/R-4.1.2/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.1.2/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] kableExtra_1.3.4 colorspace_2.0-2 marelac_2.1.10   shape_1.4.6     
 [5] ggforce_0.3.3    metR_0.11.0      scico_1.3.0      patchwork_1.1.1 
 [9] collapse_1.7.0   forcats_0.5.1    stringr_1.4.0    dplyr_1.0.7     
[13] purrr_0.3.4      readr_2.1.1      tidyr_1.1.4      tibble_3.1.6    
[17] ggplot2_3.3.5    tidyverse_1.3.1  workflowr_1.7.0 

loaded via a namespace (and not attached):
 [1] fs_1.5.2           gghalves_0.1.1     bit64_4.0.5        lubridate_1.8.0   
 [5] gsw_1.0-6          RColorBrewer_1.1-2 webshot_0.5.2      httr_1.4.2        
 [9] rprojroot_2.0.2    tools_4.1.2        backports_1.4.1    bslib_0.3.1       
[13] utf8_1.2.2         R6_2.5.1           DBI_1.1.2          withr_2.4.3       
[17] tidyselect_1.1.1   processx_3.5.2     bit_4.0.4          compiler_4.1.2    
[21] git2r_0.29.0       cli_3.1.1          rvest_1.0.2        xml2_1.3.3        
[25] labeling_0.4.2     sass_0.4.0         scales_1.1.1       checkmate_2.0.0   
[29] SolveSAPHE_2.1.0   callr_3.7.0        systemfonts_1.0.3  digest_0.6.29     
[33] svglite_2.0.0      rmarkdown_2.11     oce_1.5-0          pkgconfig_2.0.3   
[37] htmltools_0.5.2    highr_0.9          dbplyr_2.1.1       fastmap_1.1.0     
[41] rlang_1.0.2        readxl_1.3.1       rstudioapi_0.13    jquerylib_0.1.4   
[45] generics_0.1.1     farver_2.1.0       jsonlite_1.7.3     vroom_1.5.7       
[49] magrittr_2.0.1     Rcpp_1.0.8         munsell_0.5.0      fansi_1.0.2       
[53] lifecycle_1.0.1    stringi_1.7.6      whisker_0.4        yaml_2.2.1        
[57] MASS_7.3-55        grid_4.1.2         parallel_4.1.2     promises_1.2.0.1  
[61] crayon_1.4.2       haven_2.4.3        hms_1.1.1          seacarb_3.3.0     
[65] knitr_1.37         ps_1.6.0           pillar_1.6.4       reprex_2.0.1      
[69] glue_1.6.0         evaluate_0.14      getPass_0.2-2      data.table_1.14.2 
[73] modelr_0.1.8       vctrs_0.3.8        tzdb_0.2.0         tweenr_1.0.2      
[77] httpuv_1.6.5       cellranger_1.1.0   gtable_0.3.0       polyclip_1.10-0   
[81] assertthat_0.2.1   xfun_0.29          broom_0.7.11       later_1.3.0       
[85] viridisLite_0.4.0  ellipsis_0.3.2     here_1.0.1