• 1 Load data
  • 2 Overview CESM output
    • 2.1 Submission tar files

Last updated: 2021-07-08

Checks: 7 0

Knit directory: RECCAP2_ROMS_Atlantic_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 6c110d4. 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

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
Rmd 6c110d4 jens-daniel-mueller 2021-07-08 rerun with v20210707, the submitted files
html 9d76b3a jens-daniel-mueller 2021-06-29 Build site.
html d9c4ccc jens-daniel-mueller 2021-06-24 Build site.
Rmd 40d42e5 jens-daniel-mueller 2021-06-24 rerun with v20210624
html c75940a jens-daniel-mueller 2021-06-18 Build site.
Rmd ef0c1e2 jens-daniel-mueller 2021-06-18 drop non-existing files from overview
html d6726c7 jens-daniel-mueller 2021-06-18 Build site.
Rmd b0421c2 jens-daniel-mueller 2021-06-18 correct experiment id extraction from file name
html 80a141b jens-daniel-mueller 2021-06-18 Build site.
Rmd 16cb621 jens-daniel-mueller 2021-06-18 build after copying and adapting template
Rmd 74e0e12 Jens Müller 2021-06-18 Initial commit
html 74e0e12 Jens Müller 2021-06-18 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_ROMS <-
  "/net/kryo/work/loher/ROMS/RECCAP2/Atlantic_global_proto/submit_20210707"
path_ROMS
[1] "/net/kryo/work/loher/ROMS/RECCAP2/Atlantic_global_proto/submit_20210707"
# create list of CESM output files and sizes

ROMS_files_names <- list.files(path = path_ROMS,
                               pattern = ".nc")
ROMS_files_sizes <-
  file.size(paste(path_ROMS, ROMS_files_names, sep = "/"))

ROMS_files <- bind_cols(file_name = ROMS_files_names,
                        file_size_MB = round(ROMS_files_sizes * 1e-6, 1))

rm(ROMS_files_names, ROMS_files_sizes)

# extract variable_id and experiment_id from file name
ROMS_files <- ROMS_files %>%
  mutate(
    variable_id = str_split(file_name,
                            pattern = "_ROMS",
                            simplify = TRUE)[, 1],
    experiment_id = str_sub(string = file_name, -29, -29)
  ) %>%
  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, ROMS_files) %>%
  arrange(variable_id) %>% 
  filter(!is.na(file_size_MB))

rm(ROMS_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
2D | Priority: 1
dissicos 14.6
epc100 18.4
fgco2 19.5
fgco2_glob 0.0
fice 1.9
intpp 18.6
mld 18.5
sos 14.3
spco2 16.3
talkos 14.3
tos 17.8
total 154.20
2D | Priority: 2
dfeos 18.4
epc1000 15.9
no3os 18.8
o2os 16.2
pco2atm 13.5
po4os 18.6
sios 18.6
total 120.00
2D | Priority: 3
alpha 16.4
total 16.40
3D | Priority: 1
dissic 18.5
epc 23.7
so 17.7
talk 17.8
thetao 22.4
total 100.10
3D | Priority: 2
no3 23.4
o2 21.1
po4 23.3
si 23.5
total 91.30
NA | Priority: NA
area 0.3
Area_tot_native 0.0
Atm_CO2 0.0
mask_sfc 0.3
mask_vol 4.2
ROMS-Atlantic-ETHZ_Ancillary_data_v20210707.tar 8.9
Vol_tot_native 0.0
volume 4.2
total 17.90

2.1 Submission tar files

# create list of CESM output files and sizes

ROMS_files_names_tar <- list.files(path = path_ROMS,
                                   pattern = ".tar")
ROMS_files_sizes_tar <-
  file.size(paste(path_ROMS, ROMS_files_names_tar, sep = "/"))

ROMS_files_tar <- bind_cols(
  file_name = ROMS_files_names_tar,
  file_size_GB = round(ROMS_files_sizes_tar * 1e-9, 1))

rm(path_ROMS, ROMS_files_names_tar, ROMS_files_sizes_tar)

# extract variable_id and experiment_id from file name
ROMS_files_tar
# A tibble: 4 x 2
  file_name                                       file_size_GB
  <chr>                                                  <dbl>
1 ROMS-Atlantic-ETHZ_2D_BIO_v20210707.tar                  0.1
2 ROMS-Atlantic-ETHZ_2D_CO2_v20210707.tar                  0.2
3 ROMS-Atlantic-ETHZ_3D_ALL_v20210707.tar                  0.2
4 ROMS-Atlantic-ETHZ_Ancillary_data_v20210707.tar          0  

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.5    
 [5] purrr_0.3.4     readr_1.4.0     tidyr_1.1.2     tibble_3.0.4   
 [9] ggplot2_3.3.3   tidyverse_1.3.0 workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.5       lubridate_1.7.9  here_0.1         utf8_1.1.4      
 [5] assertthat_0.2.1 rprojroot_2.0.2  digest_0.6.27    R6_2.5.0        
 [9] cellranger_1.1.0 backports_1.1.10 reprex_0.3.0     evaluate_0.14   
[13] httr_1.4.2       pillar_1.4.7     rlang_0.4.10     readxl_1.3.1    
[17] rstudioapi_0.11  whisker_0.4      blob_1.2.1       checkmate_2.0.0 
[21] rmarkdown_2.5    munsell_0.5.0    broom_0.7.5      compiler_4.0.3  
[25] httpuv_1.5.4     modelr_0.1.8     xfun_0.18        pkgconfig_2.0.3 
[29] htmltools_0.5.0  tidyselect_1.1.0 fansi_0.4.1      crayon_1.3.4    
[33] dbplyr_1.4.4     withr_2.3.0      later_1.1.0.1    grid_4.0.3      
[37] jsonlite_1.7.1   gtable_0.3.0     lifecycle_1.0.0  DBI_1.1.0       
[41] git2r_0.27.1     magrittr_1.5     scales_1.1.1     cli_2.1.0       
[45] stringi_1.5.3    fs_1.5.0         promises_1.1.1   xml2_1.3.2      
[49] ellipsis_0.3.1   generics_0.0.2   vctrs_0.3.5      tools_4.0.3     
[53] glue_1.4.2       hms_0.5.3        yaml_2.2.1       colorspace_1.4-1
[57] rvest_0.3.6      knitr_1.30       haven_2.3.1      sass_0.2.0