Last updated: 2022-12-21

Checks: 7 0

Knit directory: RECCAP2_CESM_ETHZ_submission_v2/

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(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 ba71c79. 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
    Modified:   data/overview/overview_files.csv
    Modified:   data/regions/RECCAP2_region_masks_all_clean.cvs

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 da54768 jens-daniel-mueller 2022-12-20 Build site.
Rmd eacb827 jens-daniel-mueller 2022-12-20 rebuild all with Nov2022 data before submission
Rmd 8f85007 GitHub 2022-12-20 Initial commit
html 8f85007 GitHub 2022-12-20 Initial commit

library(tidyverse)
library(gt)

1 Load data

This analysis is based on Table 3 of the RECCAP2-ocean protocol for model output, and statistics of the ETHZ CESM model output.

# read Table 3 from model protocol
table_3 <- read_csv(
  here::here(
    "data/overview",
    "RECCAP2-ocean_data_products_overview - Model_protocol_table3.csv"
  )
)

# replace placeholder variable name with actual CESM variable name
table_3_temp <- table_3 %>% 
  filter(variable_id == "epc100type / epc1000type") %>% 
  select(-variable_id)

table_3_temp <- expand_grid(
  table_3_temp,
  variable_id = c("epc100hard","epc1000hard","epc100soft","epc1000soft")
)

table_3 <- table_3 %>% 
  filter(variable_id != "epc100type / epc1000type")

table_3 <- bind_rows(table_3, table_3_temp)
rm(table_3_temp)

The list of files and sizes of the ETHZ CESM model output refers to the content in this folder:

# set path to output
path_CESM <-
  "/net/kryo/work/loher/CESM_output/RECCAP2/submit_Nov2022"
path_CESM
[1] "/net/kryo/work/loher/CESM_output/RECCAP2/submit_Nov2022"
# create list of CESM output files and sizes

CESM_files_names <- list.files(path = path_CESM,
                               pattern = ".nc")
CESM_files_sizes <-
  file.size(paste(path_CESM, CESM_files_names, sep = "/"))

CESM_files <- bind_cols(file_name = CESM_files_names,
                        file_size_MB = round(CESM_files_sizes * 1e-6, 1))

rm(CESM_files_names, CESM_files_sizes)

# extract variable_id and experiment_id from file name
CESM_files <- CESM_files %>%
  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"
  )) %>%
  select(-c(file_name))
# join file list and tab 3
overview <- full_join(table_3, CESM_files) %>%
  arrange(variable_id)

rm(CESM_files, table_3)

# write overview file
overview %>%
  write_csv("data/overview/overview_files.csv")

2 Overview CESM output

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
2 | 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
fice 485.2
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 7,278.00
2 | 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
2 | Priority: 3
alpha 485.2
total 485.20
3 | Priority: 1
dissic 2426.0
epc 2426.0
so 2426.0
talk 2426.0
thetao 2426.0
total 12,130.00
3 | 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

2.1 Submission tar files

# create list of CESM output files and sizes

CESM_files_names_tar <- list.files(path = path_CESM,
                                   pattern = ".tar")
CESM_files_sizes_tar <-
  file.size(paste(path_CESM, CESM_files_names_tar, sep = "/"))

CESM_files_tar <- bind_cols(
  file_name = CESM_files_names_tar,
  file_size_GB = round(CESM_files_sizes_tar * 1e-9, 1))

rm(path_CESM, CESM_files_names_tar, CESM_files_sizes_tar)

# extract variable_id and experiment_id from file name
CESM_files_tar
# A tibble: 0 × 2
# … with 2 variables: file_name <chr>, file_size_GB <dbl>

sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.4

Matrix products: default
BLAS:   /usr/local/R-4.2.2/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.2.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] gt_0.8.0        forcats_0.5.2   stringr_1.4.1   dplyr_1.0.10   
 [5] purrr_0.3.5     readr_2.1.3     tidyr_1.2.1     tibble_3.1.8   
 [9] ggplot2_3.4.0   tidyverse_1.3.2 workflowr_1.7.0

loaded via a namespace (and not attached):
 [1] httr_1.4.4          sass_0.4.4          bit64_4.0.5        
 [4] vroom_1.6.0         jsonlite_1.8.3      here_1.0.1         
 [7] modelr_0.1.10       bslib_0.4.1         assertthat_0.2.1   
[10] getPass_0.2-2       googlesheets4_1.0.1 cellranger_1.1.0   
[13] yaml_2.3.6          pillar_1.8.1        backports_1.4.1    
[16] glue_1.6.2          digest_0.6.30       promises_1.2.0.1   
[19] rvest_1.0.3         colorspace_2.0-3    htmltools_0.5.3    
[22] httpuv_1.6.6        pkgconfig_2.0.3     broom_1.0.1        
[25] haven_2.5.1         scales_1.2.1        processx_3.8.0     
[28] whisker_0.4         later_1.3.0         tzdb_0.3.0         
[31] timechange_0.1.1    git2r_0.30.1        googledrive_2.0.0  
[34] generics_0.1.3      ellipsis_0.3.2      cachem_1.0.6       
[37] withr_2.5.0         cli_3.4.1           magrittr_2.0.3     
[40] crayon_1.5.2        readxl_1.4.1        evaluate_0.18      
[43] ps_1.7.2            fs_1.5.2            fansi_1.0.3        
[46] xml2_1.3.3          tools_4.2.2         hms_1.1.2          
[49] gargle_1.2.1        lifecycle_1.0.3     munsell_0.5.0      
[52] reprex_2.0.2        callr_3.7.3         compiler_4.2.2     
[55] jquerylib_0.1.4     rlang_1.0.6         grid_4.2.2         
[58] rstudioapi_0.14     rmarkdown_2.18      gtable_0.3.1       
[61] DBI_1.1.3           R6_2.5.1            lubridate_1.9.0    
[64] knitr_1.41          fastmap_1.1.0       bit_4.0.5          
[67] utf8_1.2.2          rprojroot_2.0.3     stringi_1.7.8      
[70] parallel_4.2.2      Rcpp_1.0.9          vctrs_0.5.1        
[73] dbplyr_2.2.1        tidyselect_1.2.0    xfun_0.35