Last updated: 2023-12-06

Checks: 7 0

Knit directory: bgc_argo_r_argodata/

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(20211008) 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 83269d5. 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:    output/

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/load_OceanSODA.Rmd) and HTML (docs/load_OceanSODA.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 80c16c2 ds2n19 2023-11-15 Build site.
html 4b55c43 ds2n19 2023-10-12 Build site.
html 1ae81b3 ds2n19 2023-10-11 reworked core load process to work initially by year and then finally create consolidated all years files.
html 44f5720 ds2n19 2023-10-09 manual commit
html 8106f80 ds2n19 2023-10-04 Build site.
Rmd 4098e9d ds2n19 2023-10-04 Revised version of OceanSODA product -v2023
html 7b3d8c5 pasqualina-vonlanthendinenna 2022-08-29 Build site.
html bdd516d pasqualina-vonlanthendinenna 2022-05-23 Build site.
html dfe89d7 jens-daniel-mueller 2022-05-12 Build site.
html 710edd4 jens-daniel-mueller 2022-05-11 Build site.
html 6a6e874 pasqualina-vonlanthendinenna 2022-04-29 Build site.
html 2d44f8a pasqualina-vonlanthendinenna 2022-04-29 Build site.
html e61c08e pasqualina-vonlanthendinenna 2022-04-27 Build site.
html 10036ed pasqualina-vonlanthendinenna 2022-04-26 Build site.
Rmd 3e1ac14 pasqualina-vonlanthendinenna 2022-04-26 separated loading data pages, added mayot biomes, switched to pH and temp flag A

Task

Load in OceanSODA surface pH and SST data

OceanSODA

Temperature

OceanSODA <-
  tidync::hyper_tibble(paste(
    path_updata,
    "/OceanSODA_ETHZ-v2023.OCADS.01_1982-2022.nc",
    sep = ""
  ))

OceanSODA <- OceanSODA %>% 
  mutate(date = as.Date(time, origin = '1982-01-15'),
         year = year(date)) %>% 
  mutate(lon = if_else(lon < 20, lon + 360, lon)) %>% 
  mutate(
    lat = cut(lat, seq(-90, 90, 1), seq(-89.5, 89.5, 1)),
    lat = as.numeric(as.character(lat)),
    lon = cut(lon, seq(20, 380, 1), seq(20.5, 379.5, 1)),
    lon = as.numeric(as.character(lon))
  ) %>% 
  filter(year >= 1995)

OceanSODA_temp <- OceanSODA %>% 
  select(year, date, lon, lat, temperature)

OceanSODA_temp %>% 
  write_rds(file = paste0(path_argo_preprocessed, '/OceanSODA_temp.rds'))

pH

OceanSODA <- OceanSODA %>% 
  select(year, date, lat, lon, ph_total, ph_total_uncert) 
  
OceanSODA %>% 
  write_rds(file = paste0(path_argo_preprocessed, '/OceanSODA.rds'))

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

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] lubridate_1.9.0  timechange_0.1.1 forcats_0.5.2    stringr_1.5.0   
 [5] dplyr_1.1.3      purrr_1.0.2      readr_2.1.3      tidyr_1.3.0     
 [9] tibble_3.2.1     ggplot2_3.4.4    tidyverse_1.3.2 

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