Last updated: 2021-03-02
Checks: 7 0
Knit directory: RECCAP2_CESM_ETHZ_submission/
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(20210113)
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 73037f1. 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/
Untracked files:
Untracked: code/Workflowr_project_managment.R
Untracked: data/overview/
Untracked: data/regions/
Unstaged changes:
Modified: analysis/_site.yml
Deleted: analysis/time_series.Rmd
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/overview.Rmd
) and HTML (docs/overview.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 | 063851d | jens-daniel-mueller | 2021-03-02 | Build site. |
html | 510b5a3 | jens-daniel-mueller | 2021-03-02 | Build site. |
Rmd | 5611ec5 | jens-daniel-mueller | 2021-03-02 | maps and time series of 2D data |
html | 026469a | jens-daniel-mueller | 2021-03-02 | Build site. |
html | d5e90cc | jens-daniel-mueller | 2021-02-26 | Build site. |
html | 57e8a05 | jens-daniel-mueller | 2021-02-26 | Build site. |
html | 73f18f3 | jens-daniel-mueller | 2021-02-26 | Build site. |
html | a79220a | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 8e6db0f | jens-daniel-mueller | 2021-01-13 | compute file sizes |
html | c22d518 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 87263ed | jens-daniel-mueller | 2021-01-13 | compute file sizes |
html | 84feb00 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 5f65727 | jens-daniel-mueller | 2021-01-13 | compute file sizes |
html | 4c87be2 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 82a2eb3 | jens-daniel-mueller | 2021-01-13 | formatting html output |
html | 81ae5ed | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 08c888f | jens-daniel-mueller | 2021-01-13 | formatting html output |
html | dad12a3 | jens-daniel-mueller | 2021-01-13 | Build site. |
html | 496f842 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | eb798b2 | jens-daniel-mueller | 2021-01-13 | formatting html output |
html | 4d1bb9a | jens-daniel-mueller | 2021-01-13 | Build site. |
html | a8fe1a7 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 7491062 | jens-daniel-mueller | 2021-01-13 | compiled summary stats |
html | 2734e37 | jens-daniel-mueller | 2021-01-13 | Build site. |
Rmd | 05be0a9 | jens-daniel-mueller | 2021-01-13 | included overview |
library(tidyverse)
library(gt)
This analysis is based on Table 3 of the RECCAP2-ocean protocol for model output, and statistics of the ETHZ CESM model output.
The file list of the ETHZ CESM model output was created by running:
ls -l > /UP_home/jenmueller/Projects/RECCAP2_CESM_ETHZ_submission/data/overview/CESM_files.txt
while in folder:
/nfs/kryo/work/loher/CESM_output/RECCAP2/submit_Dec2020/split
# prepare tab 3
tab3 <- read_csv(
here::here(
"data/overview",
"RECCAP2-ocean_data_products_overview - Model_protocol_table3.csv"
)
)
tab3_temp <- tab3 %>%
filter(variable_id == "epc100type / epc1000type") %>%
select(-variable_id)
tab3_temp <- expand_grid(
tab3_temp,
variable_id = c("epc100hard","epc1000hard","epc100soft","epc1000soft")
)
tab3 <- tab3 %>%
filter(variable_id != "epc100type / epc1000type")
tab3 <- bind_rows(tab3, tab3_temp)
rm(tab3_temp)
# prepare cesm file list
CESM_files <- read_table2("data/overview/CESM_files.txt",
col_names = FALSE,
skip = 1)
CESM_files <- CESM_files %>%
select(X5, X9) %>%
rename(file_size = X5,
file_name = X9) %>%
mutate(
variable_id = str_split(file_name,
pattern = "_CESM",
simplify = TRUE)[, 1],
experiment_id = str_sub(string = file_name,-19,-19)
) %>%
mutate(
experiment_id = if_else(
experiment_id %in% c("A", "B", "C", "D"),
experiment_id,
"ancillary"
),
variable_id = if_else(variable_id == "atmpco2", "pco2atm", variable_id),
file_size_MB = file_size*1e-6
) %>%
select(-c(file_name, file_size))
# join file list and tab 3
overview <- full_join(tab3, CESM_files) %>%
arrange(variable_id)
overview <- overview %>%
filter(!is.na(experiment_id),
variable_id != "siconc") %>%
mutate(file_size_MB = round(file_size_MB,1))
rm(CESM_files, tab3)
overview %>%
write_csv("data/overview/overview_files.csv")
Overview table of output files created. Please note, that for each listed variable, four experiment_id (A-D) versions
exist.
overview %>%
group_by(variable_id, dimension, priority) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE) %>%
arrange(dimension, priority) %>%
gt(
rowname_col = "variable_id",
groupname_col = c("dimension", "priority"),
row_group.sep = " | Priority: "
) %>%
summary_rows(groups = TRUE,
fns = list(total = "sum"))
file_size_MB | |
---|---|
2D | Priority: 1 | |
chlos | 485.2 |
dissicos | 485.2 |
epc100 | 485.2 |
epcalc100 | 485.2 |
fgco2 | 485.2 |
fgco2_glob | 0.0 |
fgco2_reg | 0.0 |
intphyc | 485.2 |
intpp | 485.2 |
intzooc | 485.2 |
mld | 485.2 |
sos | 485.2 |
spco2 | 485.2 |
talkos | 485.2 |
tos | 485.2 |
zeu | 485.2 |
total | 6,792.80 |
2D | Priority: 2 | |
dfeos | 485.2 |
epc1000 | 485.2 |
epc1000hard | 485.2 |
epc1000soft | 485.2 |
epc100hard | 485.2 |
epc100soft | 485.2 |
intdiac | 485.2 |
intphynd | 485.2 |
Kw | 485.2 |
no3os | 485.2 |
o2os | 485.2 |
pco2atm | 485.2 |
po4os | 485.2 |
sios | 485.2 |
total | 6,792.80 |
2D | Priority: 3 | |
alpha | 485.2 |
total | 485.20 |
3D | Priority: 1 | |
dissic | 2426.0 |
epc | 2426.0 |
so | 2426.0 |
talk | 2426.0 |
thetao | 2426.0 |
total | 12,130.00 |
3D | Priority: 2 | |
no3 | 2426.0 |
o2 | 2426.0 |
po4 | 2426.0 |
si | 2426.0 |
total | 9,704.00 |
NA | Priority: NA | |
area | 0.3 |
Area_tot_native | 0.0 |
Atm_CO2 | 0.0 |
mask_sfc | 0.3 |
mask_vol | 15.6 |
Vol_tot_native | 0.0 |
volume | 15.6 |
total | 31.80 |
In the following, the sum of file sizes is calculated for some variants to group the files. Grouping variables are named according to Table 3 in the model protocol.
overview %>%
group_by(experiment_id) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE) %>%
arrange(file_size_MB, experiment_id)
# A tibble: 5 x 2
experiment_id file_size_MB
<chr> <dbl>
1 ancillary 31.8
2 A 8976.
3 B 8976.
4 C 8976.
5 D 8976.
overview <- overview %>%
filter(experiment_id != "ancillary",
!is.na(priority))
Ancillary data will be excluded for the following analysis, but needs to be included into one of the tar levels, or provided seperately.
overview %>%
group_by(dimension, priority) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE)
# A tibble: 5 x 3
# Groups: dimension [2]
dimension priority file_size_MB
<chr> <dbl> <dbl>
1 2D 1 6793.
2 2D 2 6793.
3 2D 3 485.
4 3D 1 12130
5 3D 2 9704
overview %>%
group_by(dimension, experiment_id) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE)
# A tibble: 8 x 3
# Groups: dimension [2]
dimension experiment_id file_size_MB
<chr> <chr> <dbl>
1 2D A 3518.
2 2D B 3518.
3 2D C 3518.
4 2D D 3518.
5 3D A 5458.
6 3D B 5458.
7 3D C 5458.
8 3D D 5458.
overview %>%
group_by(dimension, priority, experiment_id) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE)
# A tibble: 20 x 4
# Groups: dimension, priority [5]
dimension priority experiment_id file_size_MB
<chr> <dbl> <chr> <dbl>
1 2D 1 A 1698.
2 2D 1 B 1698.
3 2D 1 C 1698.
4 2D 1 D 1698.
5 2D 2 A 1698.
6 2D 2 B 1698.
7 2D 2 C 1698.
8 2D 2 D 1698.
9 2D 3 A 121.
10 2D 3 B 121.
11 2D 3 C 121.
12 2D 3 D 121.
13 3D 1 A 3032.
14 3D 1 B 3032.
15 3D 1 C 3032.
16 3D 1 D 3032.
17 3D 2 A 2426
18 3D 2 B 2426
19 3D 2 C 2426
20 3D 2 D 2426
phy_vars <- c(
"fgco2",
"fgco2_glob",
"fgco2_reg",
"spco2",
"fice",
"Kw",
"pco2atm",
"alpha",
"mld",
"tos",
"sos",
"dissicos",
"talkos",
"no3os",
"po4os",
"sios"
)
To support the analysis of surface fluxes, following 2D-variables could be tarred separately:
fgco2, fgco2_glob, fgco2_reg, spco2, fice, Kw, pco2atm, alpha, mld, tos, sos, dissicos, talkos, no3os, po4os, sios
overview <- overview %>%
mutate(tar = case_when(
variable_id %in% phy_vars &
dimension == "2D" ~ "phy_surf",
TRUE ~ "rest"
))
overview %>%
group_by(tar, dimension) %>%
summarise_at("file_size_MB", sum, na.rm = TRUE)
# A tibble: 3 x 3
# Groups: tar [2]
tar dimension file_size_MB
<chr> <chr> <dbl>
1 phy_surf 2D 6308.
2 rest 2D 7763.
3 rest 3D 21834
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 forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2
[5] purrr_0.3.4 readr_1.4.0 tidyr_1.1.2 tibble_3.0.4
[9] ggplot2_3.3.2 tidyverse_1.3.0 workflowr_1.6.2
loaded via a namespace (and not attached):
[1] tidyselect_1.1.0 xfun_0.18 haven_2.3.1 colorspace_1.4-1
[5] vctrs_0.3.5 generics_0.0.2 htmltools_0.5.0 yaml_2.2.1
[9] utf8_1.1.4 blob_1.2.1 rlang_0.4.9 later_1.1.0.1
[13] pillar_1.4.7 withr_2.3.0 glue_1.4.2 DBI_1.1.0
[17] dbplyr_1.4.4 modelr_0.1.8 readxl_1.3.1 lifecycle_0.2.0
[21] munsell_0.5.0 gtable_0.3.0 cellranger_1.1.0 rvest_0.3.6
[25] evaluate_0.14 knitr_1.30 httpuv_1.5.4 fansi_0.4.1
[29] broom_0.7.2 Rcpp_1.0.5 checkmate_2.0.0 promises_1.1.1
[33] backports_1.1.10 scales_1.1.1 jsonlite_1.7.1 fs_1.5.0
[37] hms_0.5.3 digest_0.6.27 stringi_1.5.3 rprojroot_2.0.2
[41] grid_4.0.3 here_0.1 cli_2.1.0 tools_4.0.3
[45] sass_0.2.0 magrittr_1.5 crayon_1.3.4 whisker_0.4
[49] pkgconfig_2.0.3 ellipsis_0.3.1 xml2_1.3.2 reprex_0.3.0
[53] lubridate_1.7.9 assertthat_0.2.1 rmarkdown_2.5 httr_1.4.2
[57] rstudioapi_0.13 R6_2.5.0 git2r_0.27.1 compiler_4.0.3