Last updated: 2024-04-26
Checks: 7 0
Knit directory:
bgc_argo_r_argodata/analysis/
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 f37a13f. 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: .Rproj.user/
Untracked files:
Untracked: analysis/draft.Rmd
Untracked: load_argo_core_output.txt
Unstaged changes:
Modified: analysis/_site.yml
Modified: analysis/child/cluster_analysis_base.Rmd
Modified: analysis/load_argo_core.Rmd
Modified: analysis/load_broullon_DIC_TA_clim.Rmd
Modified: code/Workflowr_project_managment.R
Modified: code/start_background_job.R
Modified: code/start_background_job_load.R
Modified: code/start_background_job_partial.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/argo_oxygen.Rmd
) and HTML
(docs/argo_oxygen.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 | 780276c | mlarriere | 2024-04-19 | Build site. |
html | 1a72545 | mlarriere | 2024-04-12 | Build site. |
html | 91f08a6 | mlarriere | 2024-04-07 | Build site. |
html | db21f55 | mlarriere | 2024-04-06 | Build site. |
html | 113c3e8 | mlarriere | 2024-04-01 | Build site. |
html | f9de50e | ds2n19 | 2024-01-01 | Build site. |
html | 07d4eb8 | ds2n19 | 2023-12-20 | Build site. |
html | fa6cf38 | ds2n19 | 2023-12-14 | Build site. |
Rmd | 64fd104 | ds2n19 | 2023-12-14 | revised coverage analysis and SO focused cluster analysis. |
html | f110b74 | ds2n19 | 2023-12-13 | Build site. |
Rmd | fa9795c | ds2n19 | 2023-12-12 | dependencies listed are start of markdown files. |
html | e60ebd2 | ds2n19 | 2023-12-07 | Build site. |
html | cec2a2a | ds2n19 | 2023-11-24 | Build site. |
Rmd | 59f5cc4 | ds2n19 | 2023-11-23 | Moved spatiotemporal analysis to use aligned profiles. |
html | 80c16c2 | ds2n19 | 2023-11-15 | Build site. |
Rmd | 8edb9f4 | ds2n19 | 2023-10-17 | BGC load process aligned to core load. Associated changes to pH and oxygen analysis. |
Rmd | 1ae81b3 | ds2n19 | 2023-10-11 | reworked core load process to work initially by year and then finally create consolidated all years files. |
Rmd | 44f5720 | ds2n19 | 2023-10-09 | manual commit |
html | 7b3d8c5 | pasqualina-vonlanthendinenna | 2022-08-29 | Build site. |
html | bdd516d | pasqualina-vonlanthendinenna | 2022-05-23 | Build site. |
html | 4173c20 | jens-daniel-mueller | 2022-05-12 | Build site. |
html | dfe89d7 | jens-daniel-mueller | 2022-05-12 | Build site. |
html | 710edd4 | jens-daniel-mueller | 2022-05-11 | Build site. |
Rmd | 2f20a76 | jens-daniel-mueller | 2022-05-11 | rebuild all after subsetting AB profiles and code cleaning |
Explore BGC-Argo oxygen data through timeseries and climatological maps
doxy_bgc_observed.rds - bgc preprocessed folder, created by doxy_vertical_align. Not this file is written BEFORE the vertical alignment stage.
path_argo <- '/nfs/kryo/work/updata/bgc_argo_r_argodata'
path_emlr_utilities <- "/nfs/kryo/work/jenmueller/emlr_cant/utilities/files/"
path_argo <- '/nfs/kryo/work/datasets/ungridded/3d/ocean/floats/bgc_argo'
# /nfs/kryo/work/datasets/ungridded/3d/ocean/floats/bgc_argo/preprocessed_bgc_data
path_argo_preprocessed <- paste0(path_argo, "/preprocessed_bgc_data")
Load in delayed-mode, adjusted oxygen data from the BGC-Argo synthetic profile files
path_argo_preprocessed <- paste0(path_argo, "/preprocessed_bgc_data")
oxy_merge <-
read_rds(file = paste0(path_argo_preprocessed, "/doxy_bgc_observed.rds"))
Focus on surface oxygen (top 10 m of the watercolumn) in the Southern Ocean, south of 30ºS
# select only best pH data (with QC flag 1) below 30ºS, for the top 10 m of the watercolumn
oxy_surface <- oxy_merge %>%
filter(lat <= -30, # keep only data at or south of 30ºS
depth <= 10) # keep only data above or at 10 m depth
# check the correct latitudes, QC flags, and depth levels have been filtered
# max(oxy_surface$lat)
# min(oxy_surface$lat)
# table(oxy_surface$doxy_adjusted_qc)
# max(oxy_surface$depth)
# max(oxy_surface$date)
# min(oxy_surface$date)
Create a map of climatological monthly oxygen values, from January 2013 to August 2021, for the region south of 30ºS
# average oxygen values in the top 10 m for each month in each 2 x 2º longitude/latitude grid
oxy_mean <- oxy_surface %>%
group_by(lat, lon, month) %>%
summarise(oxy_ave_month = mean(doxy_adjusted))
# read in the map from updata
map <-
read_rds(paste(path_emlr_utilities,
"map_landmask_WOA18.rds",
sep = ""))
# map a monthly climatology of surface oxygen
map +
geom_tile(data = oxy_mean,
aes(lon, lat, fill = oxy_ave_month)) +
lims(y = c(-85, -25)) +
scale_fill_gradientn(colors = oceColorsJet(n = oxy_mean$oxy_ave_month)) +
labs(x = 'lon',
y = 'lat',
fill = 'dissolved oxygen \n(µmol kg-1)',
title = 'Monthly average surface dissolved oxygen values') +
theme(legend.position = 'bottom')+
facet_wrap(~month)
Plot a timeseries of monthly-mean dissolved oxygen for the region south of 30ºS for the upper 10 m of the watercolumn
# plot a timeseries of monthly values over the whole southern ocean south of 30ºS
oxy_month <- oxy_surface %>%
group_by(year, month) %>%
summarise(oxy_ave = mean(doxy_adjusted))
# timeseries of monthly pH values (separate panels for each month)
oxy_month %>%
ggplot(aes(x = year, y = oxy_ave)) +
facet_wrap(~month) +
geom_line() +
geom_point() +
scale_x_continuous(breaks = seq(2013, 2021, 2))+
labs(x = 'year',
y = 'dissolved O2 (µmol kg-1)',
title = 'monthly mean dissolved oxygen (south of 30ºS)')
Monthly average dissolved oxygen, per year, over the whole region south of 30ºS
# timeseries of monthly oxygen values for each year (separate years on the same plot)
oxy_month %>%
ggplot(aes(x = month, y = oxy_ave, group = year, col = as.character(year)))+
geom_line()+
geom_point()+
scale_x_continuous(breaks = seq(1, 12, 1))+
labs(x = 'month',
y = 'dissolved O2 (µmol kg-1)',
title = 'monthly mean dissolved oxygen (south of 30ºS)',
col = 'year')
Focus on surface oxygen (upper 10 m) in the north-east Pacific (10ºN - 70ºN, -190ºE, -140ºE)
# select only best oxygen data (with QC flag 1) between 10 and 70ºN, and 190 and 140ºW, for the top 10 m of the watercolumn
oxy_nepacific <- oxy_merge %>%
filter(between(lat, 10, 70),
between(lon, 190, 240), # keep only data for the NE Pacific
depth <= 10) # keep only data above or at 10 m depth
# longitudes larger than -180ºE are lon-380
Create a map of climatological monthly surface oxygen values, in the north-east Pacific ocean (10ºN - 70ºN, -190ºE, -140ºE)
# average oxygen values in the top 10 m for each month in each 2 x 2º longitude/latitude grid
oxy_mean_nepacific <- oxy_nepacific %>%
group_by(lat, lon, month) %>%
summarise(oxy_ave_month = mean(doxy_adjusted))
# map a monthly climatology of surface oxygen (Jan 2013 - August 2021)
map +
geom_tile(data = oxy_mean_nepacific,
aes(lon, lat, fill = oxy_ave_month)) +
lims(y = c(5, 60),
x = c(180, 250)) +
scale_fill_gradientn(colors = oceColorsJet(n = oxy_mean_nepacific$oxy_ave_month)) +
labs(x = 'lon',
y = 'lat',
fill = 'dissolved oxygen \n(µmol kg-1)',
title = 'Monthly average surface dissolved oxygen') +
theme(legend.position = 'right')+
facet_wrap(~month)
Timeseries of monthly mean oxygen for the northeast Pacific
# plot a timeseries of monthly values over the whole NE Pacific
oxy_month_nepacific <- oxy_nepacific %>%
group_by(year, month) %>%
summarise(oxy_ave = mean(doxy_adjusted))
# timeseries of monthly pH values (separate panels for each month)
oxy_month_nepacific %>%
ggplot(aes(x = year, y = oxy_ave)) +
facet_wrap(~month) +
geom_line() +
geom_point() +
scale_x_continuous(breaks = seq(2013, 2021, 2))+
labs(x = 'year',
y = 'dissolved O2 (µmol kg-1)',
title = 'monthly mean dissolved oxygen (NE Pacific)')
Timeseries of monthly surface oxygen, per year, in the NE Pacific
# timeseries of monthly oxygen values for each year (separate years on the same plot)
oxy_month_nepacific %>%
ggplot(aes(x = month, y = oxy_ave, group = year, col = as.character(year)))+
geom_line()+
geom_point()+
scale_x_continuous(breaks = seq(1, 12, 1))+
labs(x = 'month',
y = 'dissolved O2 (µmol kg-1)',
title = 'monthly mean dissolved oxygen (NE Pacific)',
col = 'year')
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] oce_1.7-10 gsw_1.1-1 lubridate_1.9.0 timechange_0.1.1
[5] argodata_0.1.0 forcats_0.5.2 stringr_1.5.0 dplyr_1.1.3
[9] purrr_1.0.2 readr_2.1.3 tidyr_1.3.0 tibble_3.2.1
[13] 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 highr_0.9 httr_1.4.4
[13] pillar_1.9.0 rlang_1.1.1 googlesheets4_1.0.1
[16] readxl_1.4.1 rstudioapi_0.15.0 whisker_0.4
[19] jquerylib_0.1.4 rmarkdown_2.18 labeling_0.4.2
[22] googledrive_2.0.0 munsell_0.5.0 broom_1.0.5
[25] compiler_4.2.2 httpuv_1.6.6 modelr_0.1.10
[28] xfun_0.35 pkgconfig_2.0.3 htmltools_0.5.8.1
[31] tidyselect_1.2.0 workflowr_1.7.0 fansi_1.0.3
[34] crayon_1.5.2 withr_2.5.0 tzdb_0.3.0
[37] dbplyr_2.2.1 later_1.3.0 grid_4.2.2
[40] jsonlite_1.8.3 gtable_0.3.1 lifecycle_1.0.3
[43] DBI_1.2.2 git2r_0.30.1 magrittr_2.0.3
[46] scales_1.2.1 cli_3.6.1 stringi_1.7.8
[49] cachem_1.0.6 farver_2.1.1 fs_1.5.2
[52] promises_1.2.0.1 xml2_1.3.3 bslib_0.4.1
[55] ellipsis_0.3.2 generics_0.1.3 vctrs_0.6.4
[58] tools_4.2.2 glue_1.6.2 RNetCDF_2.6-1
[61] hms_1.1.2 fastmap_1.1.0 yaml_2.3.6
[64] colorspace_2.0-3 gargle_1.2.1 rvest_1.0.3
[67] knitr_1.41 haven_2.5.1 sass_0.4.4