Last updated: 2021-07-22

Checks: 7 0

Knit directory: emlr_obs_v_XXX/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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(20200707) 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 6a7f226. 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/

Unstaged changes:
    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/analysis_budgets.Rmd) and HTML (docs/analysis_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
Rmd 6a7f226 jens-daniel-mueller 2021-07-22 surface dcant mapping seperate
html 426b2df jens-daniel-mueller 2021-07-21 Build site.
html 971ce87 jens-daniel-mueller 2021-07-13 Build site.
Rmd 89d9fcb jens-daniel-mueller 2021-07-13 complete revision
html 910d64a jens-daniel-mueller 2021-07-02 Build site.
html 1cbf907 jens-daniel-mueller 2021-07-02 Build site.
html 955f5dc jens-daniel-mueller 2021-06-29 Build site.
html 9480f94 jens-daniel-mueller 2021-06-29 Build site.
html d054c39 jens-daniel-mueller 2021-06-24 Build site.
html 4fcd066 jens-daniel-mueller 2021-06-24 Build site.
html 3b6387f jens-daniel-mueller 2021-06-18 Build site.
html 7a8d5f8 jens-daniel-mueller 2021-06-15 Build site.
Rmd 3695731 jens-daniel-mueller 2021-06-15 included budget assesment
html e0660fe jens-daniel-mueller 2021-06-15 Build site.
Rmd 430b829 jens-daniel-mueller 2021-06-15 included budget assesment
html 3052a6c jens-daniel-mueller 2021-06-15 Build site.
html 3cb64bd jens-daniel-mueller 2021-06-15 Build site.
html c6b3da6 jens-daniel-mueller 2021-06-14 Build site.
html 48c73fc jens-daniel-mueller 2021-06-14 Build site.
html 439ee80 jens-daniel-mueller 2021-06-11 Build site.
html 33ffcab jens-daniel-mueller 2021-06-10 Build site.
html 7e1f407 jens-daniel-mueller 2021-06-10 Build site.
html 2cbe18c jens-daniel-mueller 2021-06-10 added zonal mean section control plots
html 69c79d0 jens-daniel-mueller 2021-06-08 Build site.
html 1772903 jens-daniel-mueller 2021-06-07 Build site.
html 594ed9a jens-daniel-mueller 2021-06-04 Build site.
html db7df0e jens-daniel-mueller 2021-06-04 rebuild without overlapping eras
html 2edc791 jens-daniel-mueller 2021-06-04 Build site.
html 207339d jens-daniel-mueller 2021-06-03 Build site.
html 315710b jens-daniel-mueller 2021-06-03 include anomalous changes
html be90356 jens-daniel-mueller 2021-06-02 Build site.
html d37a85d jens-daniel-mueller 2021-05-31 Build site.
html 4b7a5ee jens-daniel-mueller 2021-05-28 Build site.
html 12b455a jens-daniel-mueller 2021-05-27 Build site.
Rmd ee13efb jens-daniel-mueller 2021-05-27 optional source of local params fully implemented
html 8c736a6 jens-daniel-mueller 2021-05-27 Build site.
Rmd dc8e4e1 jens-daniel-mueller 2021-05-27 optional source of local params implemented
html 25bd183 jens-daniel-mueller 2021-05-26 Build site.
html b79cb2d jens-daniel-mueller 2021-05-20 Build site.
html 62bd574 jens-daniel-mueller 2021-05-20 Build site.
html 7c56c39 jens-daniel-mueller 2021-05-19 Build site.
html 0de759e jens-daniel-mueller 2021-05-13 Build site.
html 52e7583 jens-daniel-mueller 2021-05-12 Build site.
html 969e631 jens-daniel-mueller 2021-05-12 Build site.
html d2a83bc jens-daniel-mueller 2021-04-16 Build site.
html c0a47df jens-daniel-mueller 2021-04-16 Build site.
html 50290e8 jens-daniel-mueller 2021-04-16 overlapping eras
html a00ec94 jens-daniel-mueller 2021-04-16 Build site.
Rmd 82df560 jens-daniel-mueller 2021-04-16 corrected tref assignment
html b6fe355 jens-daniel-mueller 2021-04-16 Build site.
html 81b7c6d jens-daniel-mueller 2021-04-16 Build site.
html 0a6099c jens-daniel-mueller 2021-04-16 Build site.
html ddec5b7 jens-daniel-mueller 2021-04-15 Build site.
html 29edae5 jens-daniel-mueller 2021-04-14 Build site.
html 099d566 jens-daniel-mueller 2021-04-14 Build site.
html bb44686 jens-daniel-mueller 2021-04-14 Build site.
html bf40480 jens-daniel-mueller 2021-04-13 Build site.
html 9f31fe3 jens-daniel-mueller 2021-04-13 Build site.
html 6eecb54 jens-daniel-mueller 2021-04-13 Build site.
Rmd b9c18c8 jens-daniel-mueller 2021-04-13 included model data
html f6ed7de jens-daniel-mueller 2021-04-13 Build site.
Rmd 3efd03e jens-daniel-mueller 2021-04-13 included model data
html c98be84 jens-daniel-mueller 2021-04-13 Build site.
html 338dd3c jens-daniel-mueller 2021-04-09 Build site.
html a79ca2c jens-daniel-mueller 2021-04-09 included model data
html 7831fd3 jens-daniel-mueller 2021-04-09 Build site.
html 20b26d4 jens-daniel-mueller 2021-04-08 Build site.
html c0895f8 jens-daniel-mueller 2021-04-07 Build site.
html 156d5b7 jens-daniel-mueller 2021-04-07 Build site.
html d21a452 jens-daniel-mueller 2021-04-07 Build site.
Rmd 296db5c jens-daniel-mueller 2021-04-07 included model data

1 Version ID

The results displayed on this site correspond to the Version_ID: v_XXX

2 Data sources

dcant estimates from this sensitivity case:

  • Mean and SD per grid cell (lat, lon, depth)
  • Zonal mean and SD (basin, lat, depth)
  • Inventories (lat, lon)
dcant_budget_basin_AIP <-
  read_csv(paste(path_version_data,
                 "dcant_budget_basin_AIP.csv",
                 sep = "")) %>% 
  filter(method == "total") %>% 
  select(-method)

dcant_budget_basin_AIP_mod_truth <-
  read_csv(paste(
    path_version_data,
    "dcant_budget_basin_AIP_mod_truth.csv",
    sep = ""
  )) %>% 
  filter(method == "total") %>% 
  select(-method)

dcant_budget_basin_AIP <- bind_rows(dcant_budget_basin_AIP,
                                    dcant_budget_basin_AIP_mod_truth)

rm(dcant_budget_basin_AIP_mod_truth)

tref <-
  read_csv(paste(path_version_data,
                 "tref.csv",
                 sep = ""))

3 Time periods

tref
# A tibble: 2 x 2
  era       median_year
  <chr>           <dbl>
1 2000-2009        2004
2 2010-2019        2014
duration <- sort(tref$median_year)[2] - sort(tref$median_year)[1]
duration
[1] 10

4 dcant budgets

4.1 Standard depth

Results integrated over the upper 3000 m

dcant_budget_basin_AIP %>%
  filter(inv_depth == params_global$inventory_depth_standard) %>%
  ggplot(aes(estimate, value, fill=basin_AIP)) +
  scale_fill_brewer(palette = "Dark2") +
  geom_col() +
  facet_grid(~data_source)

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13
dcant_budget_basin_AIP %>%
  filter(inv_depth == params_global$inventory_depth_standard) %>%
  pivot_wider(names_from = estimate,
              values_from = value) %>% 
  gt(
    rowname_col = "basin_AIP",
    groupname_col = c("data_source", "inv_depth"),
    row_group.sep = " | Depth: "
  ) %>%
  summary_rows(groups = TRUE,
               fns = list(total = "sum"))
dcant dcant_pos
mod | Depth: 3000
Atlantic 5.590 5.796
Indian 6.571 6.644
Pacific 10.255 10.703
total 22.42 23.14
obs | Depth: 3000
Atlantic 7.824 8.054
Indian 6.612 6.819
Pacific 14.739 15.279
total 29.18 30.15
mod_truth | Depth: 3000
Atlantic 5.108 5.126
Indian 5.604 5.621
Pacific 10.011 10.115
total 20.72 20.86
dcant_budget_basin_AIP_bias <- dcant_budget_basin_AIP %>%
  filter(data_source %in% c("mod", "mod_truth")) %>%
  select(data_source, basin_AIP, inv_depth, estimate, value) %>%
  pivot_wider(names_from = data_source,
              values_from = value) %>%
  mutate(dcant_bias = mod - mod_truth,
         dcant_bias_rel = dcant_bias / mod_truth * 100)

dcant_budget_basin_AIP_bias %>% 
  filter(inv_depth == params_global$inventory_depth_standard) %>% 
  ggplot(aes(dcant_bias, estimate, fill=basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col() +
  scale_fill_brewer(palette = "Dark2")

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13
dcant_budget_basin_AIP_bias %>% 
  filter(inv_depth == params_global$inventory_depth_standard) %>% 
  ggplot(aes(dcant_bias_rel, estimate, fill=basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col(position = "dodge") +
  scale_fill_brewer(palette = "Dark2")

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13

4.2 Other depths

Results integrated over the upper 100, 500, 1000, 3000, 10^{4} m

dcant_budget_basin_AIP %>%
  ggplot(aes(data_source, value, fill=basin_AIP)) +
  scale_fill_brewer(palette = "Dark2") +
  geom_col() +
  facet_grid(inv_depth ~ estimate, scales = "free_y")

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13
910d64a jens-daniel-mueller 2021-07-02
1cbf907 jens-daniel-mueller 2021-07-02
955f5dc jens-daniel-mueller 2021-06-29
d054c39 jens-daniel-mueller 2021-06-24
4fcd066 jens-daniel-mueller 2021-06-24
7a8d5f8 jens-daniel-mueller 2021-06-15
e0660fe jens-daniel-mueller 2021-06-15
c6b3da6 jens-daniel-mueller 2021-06-14
7e1f407 jens-daniel-mueller 2021-06-10
2cbe18c jens-daniel-mueller 2021-06-10
69c79d0 jens-daniel-mueller 2021-06-08
1772903 jens-daniel-mueller 2021-06-07
594ed9a jens-daniel-mueller 2021-06-04
db7df0e jens-daniel-mueller 2021-06-04
2edc791 jens-daniel-mueller 2021-06-04
207339d jens-daniel-mueller 2021-06-03
315710b jens-daniel-mueller 2021-06-03
be90356 jens-daniel-mueller 2021-06-02
d37a85d jens-daniel-mueller 2021-05-31
4b7a5ee jens-daniel-mueller 2021-05-28
25bd183 jens-daniel-mueller 2021-05-26
62bd574 jens-daniel-mueller 2021-05-20
7c56c39 jens-daniel-mueller 2021-05-19
52e7583 jens-daniel-mueller 2021-05-12
969e631 jens-daniel-mueller 2021-05-12
d2a83bc jens-daniel-mueller 2021-04-16
c0a47df jens-daniel-mueller 2021-04-16
50290e8 jens-daniel-mueller 2021-04-16
a00ec94 jens-daniel-mueller 2021-04-16
b6fe355 jens-daniel-mueller 2021-04-16
81b7c6d jens-daniel-mueller 2021-04-16
0a6099c jens-daniel-mueller 2021-04-16
ddec5b7 jens-daniel-mueller 2021-04-15
29edae5 jens-daniel-mueller 2021-04-14
099d566 jens-daniel-mueller 2021-04-14
bb44686 jens-daniel-mueller 2021-04-14
bf40480 jens-daniel-mueller 2021-04-13
9f31fe3 jens-daniel-mueller 2021-04-13
f6ed7de jens-daniel-mueller 2021-04-13
dcant_budget_basin_AIP %>%
  pivot_wider(names_from = estimate,
              values_from = value) %>% 
  gt(
    rowname_col = "basin_AIP",
    groupname_col = c("data_source", "inv_depth"),
    row_group.sep = " | Depth: "
  ) %>%
  summary_rows(groups = TRUE,
               fns = list(total = "sum"))
dcant dcant_pos
mod | Depth: 100
Atlantic 1.061 1.061
Indian 0.834 0.834
Pacific 2.083 2.084
total 3.98 3.98
mod | Depth: 500
Atlantic 3.522 3.524
Indian 3.035 3.041
Pacific 6.966 6.969
total 13.52 13.53
mod | Depth: 1000
Atlantic 4.593 4.599
Indian 4.714 4.744
Pacific 9.159 9.177
total 18.47 18.52
mod | Depth: 3000
Atlantic 5.590 5.796
Indian 6.571 6.644
Pacific 10.255 10.703
total 22.42 23.14
mod | Depth: 10000
Atlantic 5.638 5.928
Indian 6.601 6.762
Pacific 10.414 11.156
total 22.65 23.85
obs | Depth: 100
Atlantic 1.074 1.079
Indian 0.894 0.903
Pacific 2.237 2.246
total 4.21 4.23
obs | Depth: 500
Atlantic 3.932 3.959
Indian 3.333 3.360
Pacific 7.661 7.706
total 14.93 15.03
obs | Depth: 1000
Atlantic 5.797 5.835
Indian 4.752 4.857
Pacific 10.732 10.812
total 21.28 21.50
obs | Depth: 3000
Atlantic 7.824 8.054
Indian 6.612 6.819
Pacific 14.739 15.279
total 29.18 30.15
obs | Depth: 10000
Atlantic 8.142 8.756
Indian 7.445 7.725
Pacific 16.119 16.983
total 31.71 33.46
mod_truth | Depth: 100
Atlantic 0.930 0.930
Indian 0.796 0.796
Pacific 1.983 1.983
total 3.71 3.71
mod_truth | Depth: 500
Atlantic 3.409 3.410
Indian 3.118 3.118
Pacific 7.061 7.067
total 13.59 13.60
mod_truth | Depth: 1000
Atlantic 4.523 4.530
Indian 4.652 4.652
Pacific 9.146 9.156
total 18.32 18.34
mod_truth | Depth: 3000
Atlantic 5.108 5.126
Indian 5.604 5.621
Pacific 10.011 10.115
total 20.72 20.86
mod_truth | Depth: 10000
Atlantic 5.151 5.180
Indian 5.678 5.700
Pacific 10.227 10.341
total 21.06 21.22
dcant_budget_basin_AIP_bias %>% 
  ggplot(aes(dcant_bias, estimate, fill=basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col() +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ .)

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13
910d64a jens-daniel-mueller 2021-07-02
1cbf907 jens-daniel-mueller 2021-07-02
955f5dc jens-daniel-mueller 2021-06-29
d054c39 jens-daniel-mueller 2021-06-24
4fcd066 jens-daniel-mueller 2021-06-24
7a8d5f8 jens-daniel-mueller 2021-06-15
e0660fe jens-daniel-mueller 2021-06-15
c6b3da6 jens-daniel-mueller 2021-06-14
7e1f407 jens-daniel-mueller 2021-06-10
2cbe18c jens-daniel-mueller 2021-06-10
69c79d0 jens-daniel-mueller 2021-06-08
1772903 jens-daniel-mueller 2021-06-07
594ed9a jens-daniel-mueller 2021-06-04
db7df0e jens-daniel-mueller 2021-06-04
2edc791 jens-daniel-mueller 2021-06-04
207339d jens-daniel-mueller 2021-06-03
315710b jens-daniel-mueller 2021-06-03
be90356 jens-daniel-mueller 2021-06-02
d37a85d jens-daniel-mueller 2021-05-31
4b7a5ee jens-daniel-mueller 2021-05-28
25bd183 jens-daniel-mueller 2021-05-26
62bd574 jens-daniel-mueller 2021-05-20
7c56c39 jens-daniel-mueller 2021-05-19
52e7583 jens-daniel-mueller 2021-05-12
969e631 jens-daniel-mueller 2021-05-12
d2a83bc jens-daniel-mueller 2021-04-16
c0a47df jens-daniel-mueller 2021-04-16
50290e8 jens-daniel-mueller 2021-04-16
a00ec94 jens-daniel-mueller 2021-04-16
b6fe355 jens-daniel-mueller 2021-04-16
81b7c6d jens-daniel-mueller 2021-04-16
0a6099c jens-daniel-mueller 2021-04-16
ddec5b7 jens-daniel-mueller 2021-04-15
29edae5 jens-daniel-mueller 2021-04-14
099d566 jens-daniel-mueller 2021-04-14
bb44686 jens-daniel-mueller 2021-04-14
bf40480 jens-daniel-mueller 2021-04-13
9f31fe3 jens-daniel-mueller 2021-04-13
6eecb54 jens-daniel-mueller 2021-04-13
dcant_budget_basin_AIP_bias %>% 
  ggplot(aes(dcant_bias_rel, estimate, fill=basin_AIP)) +
  geom_vline(xintercept = 0) +
  geom_col(position = "dodge") +
  scale_fill_brewer(palette = "Dark2") +
  facet_grid(inv_depth ~ .)

Version Author Date
426b2df jens-daniel-mueller 2021-07-21
971ce87 jens-daniel-mueller 2021-07-13

5 Write csv

dcant_budget_basin_AIP_bias %>%
  write_csv(paste(path_version_data,
                  "dcant_budget_basin_AIP_bias.csv", sep = ""))

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2

Matrix products: default
BLAS:   /usr/local/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.0.3/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] gt_0.2.2         kableExtra_1.3.1 marelac_2.1.10   shape_1.4.5     
 [5] scales_1.1.1     ggforce_0.3.3    metR_0.9.0       scico_1.2.0     
 [9] patchwork_1.1.1  collapse_1.5.0   forcats_0.5.0    stringr_1.4.0   
[13] dplyr_1.0.5      purrr_0.3.4      readr_1.4.0      tidyr_1.1.2     
[17] tibble_3.0.4     ggplot2_3.3.3    tidyverse_1.3.0  workflowr_1.6.2 

loaded via a namespace (and not attached):
 [1] fs_1.5.0                 lubridate_1.7.9          gsw_1.0-5               
 [4] RColorBrewer_1.1-2       webshot_0.5.2            httr_1.4.2              
 [7] rprojroot_2.0.2          tools_4.0.3              backports_1.1.10        
[10] utf8_1.1.4               R6_2.5.0                 DBI_1.1.0               
[13] colorspace_1.4-1         withr_2.3.0              tidyselect_1.1.0        
[16] compiler_4.0.3           git2r_0.27.1             cli_2.1.0               
[19] rvest_0.3.6              xml2_1.3.2               sass_0.2.0              
[22] labeling_0.4.2           checkmate_2.0.0          digest_0.6.27           
[25] rmarkdown_2.5            oce_1.2-0                pkgconfig_2.0.3         
[28] htmltools_0.5.0          dbplyr_1.4.4             rlang_0.4.10            
[31] readxl_1.3.1             rstudioapi_0.11          farver_2.0.3            
[34] generics_0.0.2           jsonlite_1.7.1           magrittr_1.5            
[37] Matrix_1.2-18            Rcpp_1.0.5               munsell_0.5.0           
[40] fansi_0.4.1              lifecycle_1.0.0          stringi_1.5.3           
[43] whisker_0.4              yaml_2.2.1               MASS_7.3-53             
[46] grid_4.0.3               blob_1.2.1               parallel_4.0.3          
[49] promises_1.1.1           crayon_1.3.4             lattice_0.20-41         
[52] haven_2.3.1              hms_0.5.3                seacarb_3.2.14          
[55] knitr_1.30               pillar_1.4.7             reprex_0.3.0            
[58] glue_1.4.2               evaluate_0.14            RcppArmadillo_0.10.1.2.0
[61] data.table_1.13.2        modelr_0.1.8             vctrs_0.3.5             
[64] tweenr_1.0.2             httpuv_1.5.4             testthat_2.3.2          
[67] cellranger_1.1.0         gtable_0.3.0             polyclip_1.10-0         
[70] assertthat_0.2.1         xfun_0.18                broom_0.7.5             
[73] RcppEigen_0.3.3.7.0      later_1.1.0.1            viridisLite_0.3.0       
[76] ellipsis_0.3.1           here_0.1