Last updated: 2022-04-08

Checks: 7 0

Knit directory: emlr_obs_preprocessing/

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(20200707) 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 875f247. 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:    analysis/figure/
    Ignored:    data/
    Ignored:    output/

Untracked files:
    Untracked:  code/IO_1990_own_crossover_analysis_backup.R
    Untracked:  code/analysis_regional_clusters.Rmd
    Untracked:  code/read_GLODAPv2_2020.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/read_GLODAPv2_2021.Rmd) and HTML (docs/read_GLODAPv2_2021.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 875f247 jens-daniel-mueller 2022-04-08 restrict IO crossover to > 40S
html 481712d jens-daniel-mueller 2022-04-08 Build site.
Rmd fd862ed jens-daniel-mueller 2022-04-08 compared CRM and xover results for IO 1990
html ebfaa81 jens-daniel-mueller 2022-04-08 Build site.
Rmd 86fd022 jens-daniel-mueller 2022-04-08 compared CRM and xover results for IO 1990
html 8f9904b jens-daniel-mueller 2022-04-07 Build site.
Rmd 7659624 jens-daniel-mueller 2022-04-07 removed cruise 18LU20080702
html aea9afe jens-daniel-mueller 2022-04-07 Build site.
Rmd af08e38 jens-daniel-mueller 2022-04-07 rerun all with lat max 65N and without arcic
html 278cf74 jens-daniel-mueller 2022-04-06 Build site.
Rmd 91cc53e jens-daniel-mueller 2022-04-06 added offset analysis for phosphate
html b788368 jens-daniel-mueller 2022-04-06 Build site.
Rmd 34b376c jens-daniel-mueller 2022-04-06 added offset analysis for regular parameters
html 71f5724 jens-daniel-mueller 2022-04-06 Build site.
Rmd 4508b0a jens-daniel-mueller 2022-04-06 added decadal offset uncertainty
html f4c820e jens-daniel-mueller 2022-04-06 Build site.
Rmd 08d9b61 jens-daniel-mueller 2022-04-06 fixed conversion error in cstar_tco2_talk
html 37dce62 jens-daniel-mueller 2022-04-06 Build site.
Rmd e64b534 jens-daniel-mueller 2022-04-06 updated coverage maps for xover
html 1f9c888 jens-daniel-mueller 2022-04-05 Build site.
Rmd c1e234e jens-daniel-mueller 2022-04-05 use only xover north of 40S
html f088f55 jens-daniel-mueller 2022-04-01 Build site.
Rmd d23e425 jens-daniel-mueller 2022-04-01 rerun all including arctic and North Atlantic biome
html dde77eb jens-daniel-mueller 2022-04-01 Build site.
Rmd a1ea47d jens-daniel-mueller 2022-04-01 rerun all including arctic and North Atlantic biome
html 68c5278 jens-daniel-mueller 2022-03-15 Build site.
Rmd a49100c jens-daniel-mueller 2022-03-15 corrected sign of cstar phosphate contribution
html 8fd2480 jens-daniel-mueller 2022-03-15 Build site.
Rmd ffa9cb3 jens-daniel-mueller 2022-03-15 updated offset plots with restricted y range
html 9e284d1 jens-daniel-mueller 2022-03-14 Build site.
Rmd cbadbca jens-daniel-mueller 2022-03-14 updated offset plots
html 253dc15 jens-daniel-mueller 2022-03-14 Build site.
Rmd 7e9cd4c jens-daniel-mueller 2022-03-14 mean decadal offsets in cstar units
html ee27ba1 jens-daniel-mueller 2022-03-14 Build site.
Rmd ff606d9 jens-daniel-mueller 2022-03-14 converted offsets to cstar units
html 66761b9 jens-daniel-mueller 2022-03-14 Build site.
Rmd 0bbb21d jens-daniel-mueller 2022-03-14 converted offsets to cstar units
html 1f48613 jens-daniel-mueller 2022-03-14 Build site.
Rmd 1dedeef jens-daniel-mueller 2022-03-14 converted offsets to cstar units
html 6aedeb8 jens-daniel-mueller 2022-03-14 Build site.
Rmd 4688c81 jens-daniel-mueller 2022-03-14 converted offsets to cstar units
html ceae601 jens-daniel-mueller 2022-03-14 Build site.
Rmd 19cd114 jens-daniel-mueller 2022-03-14 revised cruise mean offset plots
html 744b90f jens-daniel-mueller 2022-03-11 Build site.
Rmd aae5fc5 jens-daniel-mueller 2022-03-11 revised cruise mean offsets
html 84ca078 jens-daniel-mueller 2022-03-11 Build site.
Rmd f9a4a5b jens-daniel-mueller 2022-03-11 revised cruise-by_cruise
html efd6581 jens-daniel-mueller 2022-03-11 Build site.
Rmd a5262b7 jens-daniel-mueller 2022-03-11 revised cruise-by_cruise
html 25fef5b jens-daniel-mueller 2022-03-11 Build site.
Rmd 064dea1 jens-daniel-mueller 2022-03-11 revised cruise-by_cruise
html 02a01ef jens-daniel-mueller 2022-03-10 Build site.
Rmd c6d5f07 jens-daniel-mueller 2022-03-10 revised crossover analysis
html e3d1a2b jens-daniel-mueller 2022-03-10 Build site.
Rmd a706c3e jens-daniel-mueller 2022-03-10 revised xover analysis
html 070ca03 jens-daniel-mueller 2022-03-09 Build site.
Rmd 204f92a jens-daniel-mueller 2022-03-09 revised crossover analysis
html 9db485e jens-daniel-mueller 2022-02-25 Build site.
Rmd ad16b56 jens-daniel-mueller 2022-02-25 added cruise by cruise annual mean offset analysis
html fecc329 jens-daniel-mueller 2022-02-25 Build site.
Rmd 4030fe6 jens-daniel-mueller 2022-02-25 added cruise by cruise offset analysis
html 29af13b jens-daniel-mueller 2022-02-16 Build site.
Rmd 9755b16 jens-daniel-mueller 2022-02-16 cruise wise crossover analysis
html 6e65117 jens-daniel-mueller 2022-02-16 Build site.
Rmd fc1cf80 jens-daniel-mueller 2022-02-15 rerun with flux products
html cf43743 jens-daniel-mueller 2022-02-15 Build site.
Rmd 04014b7 jens-daniel-mueller 2022-02-15 decadal crossover evaluation pre subbasin
html 4a7550e jens-daniel-mueller 2022-02-15 Build site.
Rmd 856705f jens-daniel-mueller 2022-02-15 decadal crossover evaluation pre subbasin
html 8804a83 jens-daniel-mueller 2022-02-15 Build site.
Rmd 0c2d719 jens-daniel-mueller 2022-02-15 decadal crossover evaluation pre subbasin
html e1243c2 jens-daniel-mueller 2022-02-15 Build site.
Rmd 8eced63 jens-daniel-mueller 2022-02-15 decadal crossover evaluation pre subbasin
html efc2025 jens-daniel-mueller 2022-02-15 Build site.
Rmd 73fc278 jens-daniel-mueller 2022-02-15 decadal crossover evaluation pre subbasin
html 4d9d1cd jens-daniel-mueller 2022-01-17 Build site.
Rmd 0a1ca07 jens-daniel-mueller 2022-01-17 rerun without saving expocodes
html 9075296 jens-daniel-mueller 2022-01-12 Build site.
Rmd 86182f0 jens-daniel-mueller 2022-01-12 data contribution per cruise
html ecc669f jens-daniel-mueller 2022-01-04 Build site.
Rmd 98d874a jens-daniel-mueller 2022-01-04 calculate crossover of gap filled data
html 2620d02 jens-daniel-mueller 2022-01-03 Build site.
Rmd ee1e44a jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html ca3a146 jens-daniel-mueller 2022-01-03 Build site.
Rmd f71bc69 jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html 6e1b56c jens-daniel-mueller 2022-01-03 Build site.
Rmd c5258b1 jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html 9febbb8 jens-daniel-mueller 2022-01-03 Build site.
Rmd cd89345 jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html 1a9c797 jens-daniel-mueller 2022-01-03 Build site.
Rmd cde43c6 jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html 494beda jens-daniel-mueller 2022-01-03 Build site.
Rmd 47811bd jens-daniel-mueller 2022-01-03 plot crossover of gap filled data
html 51ec1fe jens-daniel-mueller 2021-12-23 Build site.
Rmd 468c324 jens-daniel-mueller 2021-12-23 added crossover cruise subsetting
html 28ed51f jens-daniel-mueller 2021-12-21 Build site.
Rmd f99a7ce jens-daniel-mueller 2021-12-21 print tables with flagging number
html fcff192 jens-daniel-mueller 2021-12-21 Build site.
Rmd e60be65 jens-daniel-mueller 2021-12-21 added flagging profiles
html a87f8c7 jens-daniel-mueller 2021-12-20 Build site.
Rmd 7511f8c jens-daniel-mueller 2021-12-20 revised IO analysis
html 2704ff6 jens-daniel-mueller 2021-12-20 Build site.
Rmd f4696af jens-daniel-mueller 2021-12-20 added cruise maps
html 7f65d3a jens-daniel-mueller 2021-12-20 Build site.
Rmd 208283d jens-daniel-mueller 2021-12-20 revised missing cruise crossover analysis
html 6106236 jens-daniel-mueller 2021-12-20 Build site.
Rmd 953ac0a jens-daniel-mueller 2021-12-20 revised missing cruise crossover analysis
html d5ef2c6 jens-daniel-mueller 2021-12-20 Build site.
Rmd 0b0800e jens-daniel-mueller 2021-12-20 restructured IO crossover analysis
html 00227e6 jens-daniel-mueller 2021-12-20 Build site.
Rmd 8728169 jens-daniel-mueller 2021-12-20 added IO crossover analysis
html e810585 jens-daniel-mueller 2021-12-16 Build site.
Rmd aca9273 jens-daniel-mueller 2021-12-16 added maps per expocode
html 6aa4b75 jens-daniel-mueller 2021-12-16 Build site.
Rmd 3511fa7 jens-daniel-mueller 2021-12-16 f == 9 analysis added
html 163f976 jens-daniel-mueller 2021-12-16 Build site.
Rmd 7fa3a99 jens-daniel-mueller 2021-12-16 added cumulative data contribution as threshold
html be0850d jens-daniel-mueller 2021-12-16 Build site.
Rmd 8db3760 jens-daniel-mueller 2021-12-16 plot maps of f and qc data loss
html 61d5f49 jens-daniel-mueller 2021-12-15 Build site.
Rmd be2f94e jens-daniel-mueller 2021-12-15 analyse IO 1990 CRM data from Millero 1998 - TA only
html d454df1 jens-daniel-mueller 2021-12-15 Build site.
Rmd 7802f47 jens-daniel-mueller 2021-12-15 analyse IO 1990 CRM data from Millero 1998
html ce6cdae jens-daniel-mueller 2021-12-15 Build site.
Rmd acff553 jens-daniel-mueller 2021-12-15 plot qc data loss by cruise size
html 7ace7ab jens-daniel-mueller 2021-12-15 Build site.
Rmd 554383a jens-daniel-mueller 2021-12-15 plot qc data loss by cruise size
html faa6b3c jens-daniel-mueller 2021-12-15 Build site.
Rmd be8751d jens-daniel-mueller 2021-12-15 started data loss assesment
html 70923f2 jens-daniel-mueller 2021-12-14 Build site.
Rmd 1acf7ff jens-daniel-mueller 2021-12-14 checked P18 nitrate data - quadratic fit
html b68b58e jens-daniel-mueller 2021-12-13 Build site.
Rmd 4c002c1 jens-daniel-mueller 2021-12-13 checked P18 nitrate data
html de20732 jens-daniel-mueller 2021-12-08 Build site.
Rmd badaed2 jens-daniel-mueller 2021-12-08 plotted f maps
html daa43b9 jens-daniel-mueller 2021-12-06 Build site.
Rmd b578bd9 jens-daniel-mueller 2021-12-06 plotted qc maps
html 2b22ffe jens-daniel-mueller 2021-11-24 Build site.
Rmd 1b7ec1f jens-daniel-mueller 2021-11-24 revised combined IO NS and EW analysis
html 0ef46e8 jens-daniel-mueller 2021-11-23 Build site.
Rmd 7fb15cf jens-daniel-mueller 2021-11-23 combined IO NS and EW analysis
html f2871b9 jens-daniel-mueller 2021-11-20 Build site.
Rmd 46c1246 jens-daniel-mueller 2021-11-19 rerun with GLODAP cast column
html 375d7c7 jens-daniel-mueller 2021-11-18 Build site.
Rmd 1839007 jens-daniel-mueller 2021-11-18 delta EW crossover values determined
html f30883c jens-daniel-mueller 2021-11-18 Build site.
Rmd 7acd48c jens-daniel-mueller 2021-11-18 delta crossover values determined
html 2e6c3f1 jens-daniel-mueller 2021-11-18 Build site.
Rmd 49ca05c jens-daniel-mueller 2021-11-18 delta crossover values determined
html 16dab59 jens-daniel-mueller 2021-11-18 Build site.
Rmd 620b6f4 jens-daniel-mueller 2021-11-18 delta crossover values determined
html 42965b9 jens-daniel-mueller 2021-11-18 Build site.
Rmd 69dbb5f jens-daniel-mueller 2021-11-18 crossing checks
html c9363ce jens-daniel-mueller 2021-11-18 Build site.
Rmd 6bc79d6 jens-daniel-mueller 2021-11-18 crossing checks
html 0908ee5 jens-daniel-mueller 2021-11-15 Build site.
html 6d6a23e jens-daniel-mueller 2021-11-01 Build site.
Rmd 2f36786 jens-daniel-mueller 2021-11-01 preprocess adjustment table, create new basinmaps
html 2a50fa9 jens-daniel-mueller 2021-10-28 Build site.
Rmd 67de9ab jens-daniel-mueller 2021-10-28 preprocess tracers
html a96bf9e jens-daniel-mueller 2021-10-27 Build site.
Rmd d99b131 jens-daniel-mueller 2021-10-27 added time series plots
html fde6c32 jens-daniel-mueller 2021-10-27 Build site.
Rmd db93d9f jens-daniel-mueller 2021-10-27 added time series plots
html 7db7e6a jens-daniel-mueller 2021-10-27 Build site.
Rmd d6fb0dc jens-daniel-mueller 2021-10-27 added time series plots
html 68d67e7 jens-daniel-mueller 2021-10-27 Build site.
Rmd b4ea199 jens-daniel-mueller 2021-10-27 added time series plots
html 7987bb7 jens-daniel-mueller 2021-10-21 Build site.
Rmd b64c54d jens-daniel-mueller 2021-10-21 added inventory layer depth
html 8d1aaf8 jens-daniel-mueller 2021-10-20 Build site.
Rmd 5bce752 jens-daniel-mueller 2021-10-20 corrected qc flag in glodap
html dc8d958 jens-daniel-mueller 2021-10-20 Build site.
Rmd b2ccc04 jens-daniel-mueller 2021-10-20 corrected qc flag in glodap
html 2438c5a jens-daniel-mueller 2021-08-30 Build site.
Rmd 4296433 jens-daniel-mueller 2021-08-30 rerun GLODAP preprocessing with officially released file
html e49875a jens-daniel-mueller 2021-07-07 Build site.
html 6312bd4 jens-daniel-mueller 2021-07-07 Build site.
Rmd 4905409 jens-daniel-mueller 2021-07-07 rerun with new setup_obs.Rmd file
html 58bc706 jens-daniel-mueller 2021-07-06 Build site.
Rmd 0db89e1 jens-daniel-mueller 2021-07-06 rerun with revised variable names
html f600971 jens-daniel-mueller 2021-07-02 Build site.
html 98599d8 jens-daniel-mueller 2021-06-27 Build site.
Rmd 4f9c370 jens-daniel-mueller 2021-06-27 update to latest GLODAP pre-release
html 265c4ef jens-daniel-mueller 2021-06-04 Build site.
html c79346a jens-daniel-mueller 2021-06-03 Build site.
html 9d8353f jens-daniel-mueller 2021-05-31 Build site.
Rmd b948168 jens-daniel-mueller 2021-05-31 ingest GLODAPv2_2021 beta data

path_glodapv2_2021  <- "/nfs/kryo/work/updata/glodapv2_2021/"
path_glodapv2_CRM  <- "/nfs/kryo/work/updata/glodapv2_CRM/"
path_crossover <- "/nfs/kryo/work/updata/glodapv2_crossover"

path_preprocessing  <- paste(path_root, "/observations/preprocessing/", sep = "")

1 Read files

1.1 Adjusted data

Main data source for this project is GLODAPv2.2021_Merged_Master_File.csv downloaded from https://www.ncei.noaa.gov/data/oceans/ncei/ocads/data/0237935/GLODAPv2.2021_Merged_Master_File.csv on Aug 30, 2021.

GLODAP <-
  read_csv(
    paste(
      path_glodapv2_2021,
      "GLODAPv2.2021_Merged_Master_File_20210830.csv",
      sep = ""
    ),
    na = "-9999",
    col_types = cols(.default = col_double())
  )


GLODAP <- GLODAP %>%
  rename_with(~str_remove(., 'G2'))

1.2 Adjustment table

GLODAP_adjustments <-
  read_csv(
    paste(
      path_glodapv2_2021,
      "GLODAPv2.2021_adjustments_last_updated_on_2021_05_10.csv",
      sep = ""
    ),
    na = c("-666", "-777", "-888", "-999"),
    skip = 2
  )

1.3 Expocodes

GLODAP_expocodes <-
  read_tsv(
    paste(
      path_glodapv2_2021,
      "EXPOCODES.txt",
      sep = ""
    ),
    col_names = c("cruise", "cruise_expocode")
  )

1.4 Crossover tables

# tables from glodapv2, provided by Steven van Heuven

glodapv2_xover_files <- fs::dir_ls(paste0(path_crossover, "/glodapv2"))

glodapv2_xover <- glodapv2_xover_files %>% 
  map_dfr(read_csv, .id = "parameter")

glodapv2_xover <- glodapv2_xover %>% 
  mutate(parameter = str_remove(parameter, ".csv"),
         parameter = str_sub(parameter, -3))


glodapv2_xover <- glodapv2_xover %>% 
  mutate(parameter = recode(parameter,
                            "ALK" = "talk",
                            "DIC" = "tco2",
                            "NO3" = "nitrate",
                            "_O2" = "oxygen",
                            "PO4" = "phosphate",
                            "SAL" = "salinity",
                            "SIL" = "silicate"))

# Note: In the files provided by Steven von Heuven
# the column names sigma_ratio and sigma_offset_sd were swapped

glodapv2_xover_absolute <- glodapv2_xover %>% 
  filter(parameter %in% c("salinity", "talk", "tco2")) %>% 
  select(parameter,
         offset = sigma_offset,
         offset_sd = sigma_ratio,
         cruise_A = CruiseA_EXPOCODE,
         cruise_B = CruiseB_EXPOCODE)

glodapv2_xover_ratio <- glodapv2_xover %>% 
  filter(!(parameter %in% c("salinity", "talk", "tco2"))) %>% 
  select(parameter,
         offset = sigma_offset_sd,
         offset_sd = sigma_ratio_sd,
         cruise_A = CruiseA_EXPOCODE,
         cruise_B = CruiseB_EXPOCODE)

glodapv2_xover <- bind_rows(
  glodapv2_xover_absolute,
  glodapv2_xover_ratio
)


rm(glodapv2_xover_files,
   glodapv2_xover_absolute, glodapv2_xover_ratio)

# tables created between glodapv2 and glodapv2.2021
# provided by Nico Lange

glodapv2_2021_xover_files <- fs::dir_ls(paste0(path_crossover, "/glodapv2_2021"))

glodapv2_2021_xover <- glodapv2_2021_xover_files %>% 
  map_dfr(readxl::read_excel)

glodapv2_2021_xover <- glodapv2_2021_xover %>%
  rename(parameter = Parameter) %>%
  mutate(parameter = recode(parameter,
                            "alkalinity" = "talk")) %>%
  filter(
    parameter %in%
      c(
        "tco2",
        "nitrate",
        "oxygen",
        "phosphate",
        "salinity",
        "silicate",
        "talk"
      )
  )


glodapv2_2021_xover <- glodapv2_2021_xover %>% 
  rename(offset = Offset,
         offset_sd = Std,
         cruise_A = Cruise_A,
         cruise_B = Cruise_B)

rm(glodapv2_2021_xover_files)

# tables for data not qc'ed in the regular GLODAP release
# provided by Nico Lange

glodapv2_2021_xover_files_add <-
  fs::dir_ls(paste0(path_crossover, "/glodapv2_2021_additional_crossover"))

glodapv2_2021_xover_add <- glodapv2_2021_xover_files_add %>% 
  map_dfr(readxl::read_excel)

glodapv2_2021_xover_add <- glodapv2_2021_xover_add %>%
  rename(parameter = Parameter) %>%
  mutate(parameter = recode(parameter,
                            "alkalinity" = "talk"))


glodapv2_2021_xover_add <- glodapv2_2021_xover_add %>% 
  rename(offset = Offset,
         offset_sd = Std,
         cruise_A = Cruise_A,
         cruise_B = Cruise_B)

rm(glodapv2_2021_xover_files_add)

1.5 Missing/flagged cruises

I generated this file manually based on the analysis presented in the Data loss section below.

GLODAP_cruises_missing <-
  read_csv(
    paste(
      path_glodapv2_2021,
      "GLODAPv2.2021_major_cruises_missing_flagged.csv",
      sep = ""
    )
  )

1.6 IO CRM data

CRM_IO_meas_talk <-
  read_csv(
    paste(
      path_glodapv2_CRM,
      "/Millero_1998_Tab2.csv",
      sep = ""
    )
  )

CRM_IO_meas_tco2 <-
  read_csv(
    paste(
      path_glodapv2_CRM,
      "/Johnson_1998_Tab3.csv",
      sep = ""
    )
  )

CRM_ref_values <-
  read_csv(
    paste(
      path_glodapv2_CRM,
      "/Dickson_CRM_reference_values_20211215.csv",
      sep = ""
    )
  )

2 Data preparation

2.1 Correct talk qc flag

From an email conversation with Nico Lange

Yes, we are aware of these faulty(!) calculated TA data (using DIC and fCO2). It is linked to v2.2020 where we’ve added fCO2 to the “missing carbon calculation matrix”. Overall, including fCO2 in these calculations has worked great to fill some missing carbon gaps. However, for this cruise in particular the fCO2 values have most likely been converted wrongly to 20°C and are thus off! The problem of this all is that we haven’t really done a 2nd QC on the fCO2 values neither have we defined the corresponding “G2fCO2qc” variable, hence for the sake of consistency we kept all fCO2 values in. Again and unfortunately, in this particular case it led to the bad calculations of TA data…. We plan to do a full 2nd QC on all (!) fCO2 data for v3.

But you have indeed found a flaw in our merging script, as the corresponding calculated TA values should not have received a 2nd QC flag of 1! I missed out on adding a line to our merging script to accommodate for the non-existence of 2nd fCO2 flags in the carbon calculation matrix.

So long story short: Thank you very much for finding this flaw and letting me know of it!

and

Yes, the all calculated TA data from cruise 695 should have a talkqc of 0 (as they are based upon un QC’d fCO2 data…).

And no (thanks to your hint and questions), I figured that this wrongly assigned 2nd QC flag is a problem for all calculated carbon data, which used fCO2 for the calculations. However, luckily this is not really often the case.

You can check if thats the case by looking at which other carbon parameters are measured, i.e. by checking their primary flags (e.g. G2talkf, G2tco2f and G2phts25p0f and G2fco2f). If only two are measured and one of them is fCO2, it means that the other carbon parameters (the ones with a primary flag of 0) are calculated using fCO2. Hence, for these instances no 2nd QC is done and the corresponding qc flag should be 0 and not 1.

# calculate number of measured co2 system variables

GLODAP <- GLODAP %>%
  mutate(measured_CO2_vars = rowSums(select(., c(
    tco2f, talkf, fco2f, phts25p0f
  )) == 2))

# identify cruises on which talk/tco2 was calculated

talk_qc_error_cruises <- GLODAP %>%
  select(cruise, tco2:phtsqc, measured_CO2_vars) %>% 
  filter(measured_CO2_vars == 2,
         fco2f == 2,
         talkf == 0) %>% 
  distinct(cruise, talkf, talkqc, fco2f)

tco2_qc_error_cruises <- GLODAP %>%
  select(cruise, tco2:phtsqc, measured_CO2_vars) %>% 
  filter(measured_CO2_vars == 2,
         fco2f == 2,
         tco2f == 0) %>% 
  distinct(cruise, tco2f, tco2qc, fco2f)

talk_qc_error_cruises %>% 
  write_csv("data/talk_qc_error_cruises_GLODAPv2_2021.csv")

tco2_qc_error_cruises %>% 
  write_csv("data/tco2_qc_error_cruises_GLODAPv2_2021.csv")

rm(talk_qc_error_cruises, tco2_qc_error_cruises)


# set qc = 0 for tco2 and talk values calculated from fco2   

GLODAP <- GLODAP %>%
  mutate(tco2qc = if_else(measured_CO2_vars == 2 &
                            fco2f == 2 & tco2f == 0,
                          0,
                          tco2qc))

GLODAP <- GLODAP %>%
  mutate(talkqc = if_else(measured_CO2_vars == 2 &
                            fco2f == 2 & talkf == 0,
                          0,
                          talkqc))

GLODAP <- GLODAP %>% 
  select(-measured_CO2_vars)

2.2 Harmonize nomenclature

# create date column
GLODAP <- GLODAP %>%
  mutate(date = ymd(paste(year, month, day))) %>%
  relocate(date)

# harmonize column names
GLODAP <- GLODAP  %>%
  rename(sal = salinity,
         temp = temperature)

# harmonize coordinates
GLODAP <- GLODAP  %>%
  rename(lon = longitude,
         lat = latitude) %>%
  mutate(lon = if_else(lon < 20, lon + 360, lon))

2.3 Horizontal gridding

For merging with other data sets, all observations were grouped into latitude intervals of:

  • 1° x 1°
GLODAP <- m_grid_horizontal(GLODAP)
map + 
  geom_tile(
    data = GLODAP %>% 
      filter(!is.na(gamma)) %>% 
      count(lon, lat),
    aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(direction = -1)

GLODAP %>% 
  ggplot(aes(depth, gamma-sigma0)) +
  geom_hline(yintercept = 0) +
  geom_bin2d() +
  ylim(c(-1,1)) +
  scale_fill_viridis_c(trans = "log10")

2.4 Apply basin mask

# use only three basin to assign general basin mask
# ie this is not specific to the MLR fitting
basinmask_5 <- basinmask %>% 
  filter(MLR_basins == "5") %>% 
  select(lat, lon, basin)

basinmask <- basinmask %>% 
  filter(MLR_basins == "2") %>% 
  select(lat, lon, basin_AIP)

GLODAP <- inner_join(GLODAP, basinmask)

2.5 Add expocodes

GLODAP <- right_join(
  GLODAP_expocodes,
  GLODAP)

2.6 Add row number

GLODAP <- GLODAP  %>%  
  mutate(row_number = row_number()) %>% 
  relocate(row_number)

2.7 Split CO2 and tracers

Measurements of CO2 system and other biogeochemical parameters are separated from the measurements of halogenated tracers.

# remove irrelevant columns
GLODAP <- GLODAP %>%
  select(-c(region,
            month:minute,
            maxsampdepth, sigma0:sigma4,
            nitrite:nitritef))


GLODAP_tracer <- GLODAP %>% 
  select(row_number:gamma,
         cfc11:sf6f,
         basin_AIP)

# select relevant columns
GLODAP <- GLODAP %>%
  select(row_number:talkqc,
         basin_AIP)

2.8 Subset measured data

2.8.1 tco2

The vast majority of rows is removed due to missing tco2 observations.

GLODAP <- GLODAP %>% 
  filter(!is.na(tco2))

2.8.2 tracer

Rows are removed if no tracer observation is available.

GLODAP_tracer <- GLODAP_tracer %>%
  filter(if_any(
    c(
      cfc11,
      cfc12,
      cfc113,
      ccl4,
      sf6,
      pcfc11,
      pcfc12,
      pcfc113,
      pccl4,
      psf6
    ),
    ~ !is.na(.)
  ))

2.9 Create clean observations grid

2.9.1 tco2

GLODAP_obs_grid <- GLODAP %>% 
  count(lat, lon)
GLODAP_grid_year <- GLODAP %>%
  count(lat, lon, year)

map +
  geom_tile(data = GLODAP_grid_year,
              aes(lon, lat)) +
  facet_wrap(~ year, ncol=3)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
dc8d958 jens-daniel-mueller 2021-10-20

2.9.2 tracer

GLODAP_obs_grid_tracer <- GLODAP_tracer %>% 
  count(lat, lon)
GLODAP_grid_year_tracer <- GLODAP_tracer %>%
  count(lat, lon, year)

map +
  geom_tile(data = GLODAP_grid_year_tracer,
              aes(lon, lat)) +
  facet_wrap(~ year, ncol=3)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
2a50fa9 jens-daniel-mueller 2021-10-28

3 Flagging

In this sections, I explore the data coverage with respect to the flagging scheme. Data are not manipulated in this section.

3.1 qc

qc_flag <- GLODAP %>%
  mutate(decade = m_grid_decade(year),
         .after = year) %>%
  filter(!is.na(decade)) %>%
  select(lon, lat, basin_AIP, decade, cruise_expocode, ends_with("qc"))

qc_flag_grid <- qc_flag %>%
  pivot_longer(ends_with("qc"),
               names_to = "parameter",
               values_to = "value") %>%
  count(lon, lat, decade, parameter, value)

p_qc_flag_map <- qc_flag_grid %>%
  group_split(value) %>%
  # head(1) %>%
  map(
    ~ map +
      geom_tile(data = .x,
                aes(lon, lat, fill = n)) +
      facet_grid(parameter ~ decade) +
      labs(title = paste("qc flag =", unique(.x$value))) +
      scale_fill_viridis_c(
        option = "magma",
        direction = -1,
        trans = "log10"
      )
  )

p_qc_flag_map
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
daa43b9 jens-daniel-mueller 2021-12-06

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
daa43b9 jens-daniel-mueller 2021-12-06
pdf("output/qc_flag_coverage_maps.pdf")
p_qc_flag_map
[[1]]

[[2]]
dev.off()
png 
  2 
qc_flag_grid_all_1 <- qc_flag %>%
  filter(
    if_all(ends_with("qc"), ~ . == 1)) %>%
  count(lon, lat, decade)

map +
  geom_tile(data = qc_flag_grid_all_1,
            aes(lon, lat, fill = n)) +
  facet_grid(decade ~ .) +
  labs(title = "All parameters qc == 1") +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
rm(qc_flag, qc_flag_grid, p_qc_flag_map, qc_flag_grid_all_1)

3.2 f

f_flag <- GLODAP %>%
  mutate(decade = m_grid_decade(year),
         .after = year) %>%
  filter(!is.na(decade)) %>%
  select(lon, lat, basin_AIP, decade, cruise_expocode, ends_with("f"))

f_flag_grid <- f_flag %>%
  pivot_longer(ends_with("f"),
               names_to = "parameter",
               values_to = "value") %>%
  count(lon, lat, decade, parameter, value)

p_f_flag_map <- f_flag_grid %>% 
  group_split(value) %>%
  # head(1) %>%
  map(
    ~map +
  geom_tile(data = .x,
            aes(lon, lat, fill=n)) +
  facet_grid(parameter ~ decade) +
  labs(title = paste("f flag =", unique(.x$value))) +
    scale_fill_viridis_c(option = "magma",
                         direction = -1,
                         trans = "log10")
  )

p_f_flag_map
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
de20732 jens-daniel-mueller 2021-12-08

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
de20732 jens-daniel-mueller 2021-12-08

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
de20732 jens-daniel-mueller 2021-12-08
pdf("output/f_flag_coverage_maps.pdf")
p_f_flag_map
[[1]]

[[2]]

[[3]]
dev.off()
png 
  2 
f_flag_grid_all_2 <- f_flag %>%
  filter(
    if_all(ends_with("f"), ~ . == 2)) %>%
  count(lon, lat, decade)

map +
  geom_tile(data = f_flag_grid_all_2,
            aes(lon, lat, fill = n)) +
  facet_grid(decade ~ .) +
  labs(title = "All parameters f == 2") +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
rm(f_flag, f_flag_grid, p_f_flag_map, f_flag_grid_all_2)

4 Data loss

In this section, I explore the potential loss of data if certain quality quality flag criteria are not met by the observations.

loss_all <- GLODAP %>%
  mutate(decade = m_grid_decade(year),
         .after = year) %>%
  filter(!is.na(decade))


loss <- loss_all %>%
  filter(if_all(ends_with("f"), ~ . != 9))

map +
  geom_tile(data = loss_all %>% distinct(lon, lat, decade),
            aes(lon, lat, fill = "incl f = 9")) +
  geom_tile(data = loss %>% distinct(lon, lat, decade),
            aes(lon, lat, fill = "excl f = 9")) +
  scale_fill_brewer(palette = "Set1") +
  facet_grid(decade ~ .) +
  labs(title = "All available data") +
  theme(legend.title = element_blank())

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16
loss_all_n <- loss_all %>%
  count(basin_AIP, decade)

loss_n <- loss %>%
  count(basin_AIP, decade)

4.1 qc

Here, I analysis the loss of data due to qc flagging, based on the samples were all parameters are available (i.e. where f-flag != 9).

# prepare qc loss data
loss_qc <- loss %>%
  select(lon, lat, basin_AIP, decade, cruise_expocode, ends_with("qc")) %>%
  pivot_longer(ends_with("qc"),
               names_to = "parameter",
               values_to = "value") %>%
  mutate(parameter = str_remove(parameter, "qc"))

# compute fraction of qc loss per parameters and cruise
loss_qc <- loss_qc %>%
  count(cruise_expocode, basin_AIP, decade, parameter, value) %>%
  pivot_wider(
    names_from = value,
    names_prefix = "qc_",
    values_from = n,
    values_fill = 0
  ) %>%
  mutate(n_cruise = qc_0 + qc_1,
         category = if_else(qc_0 <= 0.1 * (n_cruise), "OK", "loss"))

# calculate number of parameters with loss
# separately for target/predictor variables
loss_qc_cruise <- loss_qc %>%
  mutate(parameter_class = if_else(
    parameter %in% c("tco2", "talk", "phosphate"),
    "target",
    "predictor"
  )) %>%
  count(cruise_expocode,
        basin_AIP,
        decade,
        n_cruise,
        parameter_class,
        category) %>%
  pivot_wider(names_from = category,
              values_from = n,
              values_fill = 0) %>%
  select(-OK) %>%
  pivot_wider(names_from = parameter_class,
              values_from = loss) %>%
  group_by(basin_AIP, decade) %>%
  mutate(rank_n_cruise = rank(-n_cruise)) %>%
  ungroup()

# combine with total number of observations
loss_qc_cruise <- full_join(loss_qc_cruise, loss_n)

# calculate relative contribution of cruise samples to total
loss_qc_cruise <- loss_qc_cruise %>% 
  mutate(n_cruise_rel = 100 * n_cruise / n) %>% 
  arrange(basin_AIP, decade, -n_cruise_rel) %>% 
  group_by(basin_AIP, decade) %>% 
  mutate(n_cruise_rel_cum = cumsum(n_cruise_rel)) %>% 
  ungroup() %>% 
  select(-n)

loss_qc_cruise <- loss_qc_cruise %>% 
  pivot_longer(predictor:target,
               names_to = "parameter_class",
               values_to = "loss") %>% 
  mutate(loss = as.factor(loss))

grey_plasma <- c("grey80", viridisLite::plasma(4))

# filter large cruises
loss_qc_cruise <- loss_qc_cruise %>%
  filter(n_cruise_rel >= 3)

loss_qc_cruise %>%
  group_split(basin_AIP) %>%
  # head(3) %>%
  map(
    ~ ggplot(data = .x,
             aes(rank_n_cruise, n_cruise_rel, fill = loss)) +
      geom_point(shape = 21, size = 2) +
      scale_fill_manual(values = grey_plasma,
                        name = "variables missing") +
      facet_grid(decade ~ parameter_class) +
      labs(title = paste("basin_AIP:", unique(.x$basin_AIP))) +
      ylim(0, NA)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
be0850d jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
be0850d jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
be0850d jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15
loss_qc_cruise %>%
  filter(loss != 0) %>%
  select(basin_AIP,
         decade,
         parameter_class,
         rank_n_cruise,
         cruise_expocode,
         loss) %>%
  arrange(basin_AIP, decade, parameter_class, rank_n_cruise) %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
basin_AIP decade parameter_class rank_n_cruise cruise_expocode loss
Atlantic 1989-1999 target 11 06MT19900123 1
Atlantic 1989-1999 target 12 33LK19960415 1
Atlantic 2000-2009 predictor 8 35TH20010823 3
Atlantic 2000-2009 predictor 14 33RO20070710 1
Atlantic 2000-2009 target 8 35TH20010823 2
Atlantic 2000-2009 target 9 74DI20040404 1
Atlantic 2000-2009 target 10 35TH20080610 1
Atlantic 2000-2009 target 12 35TH20040604 1
Atlantic 2000-2009 target 13 35TH20020611 1
Atlantic 2010-2020 predictor 5 74EQ20151206 1
Atlantic 2010-2020 target 12 35TH20100608 1
Atlantic 2010-2020 target 13 29AH20160617 1
Indian 1989-1999 target 11 320619960503 1
Pacific 1989-1999 predictor 2 31DS19940126 1
Pacific 1989-1999 predictor 4 31DS19920907 3
Pacific 1989-1999 target 4 31DS19920907 3
Pacific 1989-1999 target 6 316N19930222 1
Pacific 1989-1999 target 7 316N19921006 1
Pacific 1989-1999 target 8 90KD19920214 1
loss_grid <- loss %>% distinct(lon, lat, cruise_expocode)

loss_qc_grid <- left_join(loss_qc_cruise,
                          loss_grid)

map +
  geom_tile(data = loss_qc_grid,
            aes(lon, lat, fill = loss)) +
  facet_grid(decade ~ parameter_class) +
  scale_fill_manual(values = grey_plasma)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
be0850d jens-daniel-mueller 2021-12-16
loss_qc_grid %>% filter(loss != 0) %>%
  group_split(parameter_class, decade) %>%
  # head(1) %>%
  map(
    ~ map +
      geom_tile(data = .x,
                aes(lon, lat, fill = cruise_expocode)) +
      scale_fill_brewer(palette = "Paired") +
      facet_grid(decade ~ parameter_class)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
rm(loss_qc_cruise, loss_qc_grid)

4.2 f

Here, I analysis the loss of data due to f flagging, based on the samples were all parameters are available (i.e. where f-flag != 9).

# prepare qc loss data
loss_f <- loss %>% 
  select(lon, lat, basin_AIP, decade, cruise_expocode, ends_with("f")) %>%
  pivot_longer(ends_with("f"),
               names_to = "parameter",
               values_to = "value") %>% 
  mutate(parameter = str_remove(parameter, "f"))

# compute fraction of qc loss per parameters and cruise
loss_f <- loss_f %>%
  count(cruise_expocode, basin_AIP, decade, parameter, value) %>%
  pivot_wider(
    names_from = value,
    names_prefix = "f_",
    values_from = n,
    values_fill = 0
  ) %>%
  mutate(n_cruise = f_0 + f_2,
         category = if_else(f_0 <= 0.1 * (n_cruise), "OK", "loss"))

# calculate number of parameters with loss
# separately for target/predictor variables
loss_f_cruise <- loss_f %>%
  mutate(parameter_class = if_else(
    parameter %in% c("tco2", "talk", "phosphate"),
    "target",
    "predictor"
  )) %>%
  count(cruise_expocode,
        basin_AIP,
        decade,
        n_cruise,
        parameter_class,
        category) %>% 
  pivot_wider(names_from = category,
              values_from = n,
              values_fill = 0) %>% 
  select(-OK) %>% 
  pivot_wider(names_from = parameter_class,
              values_from = loss) %>% 
  group_by(basin_AIP, decade) %>%
  mutate(rank_n_cruise = rank(-n_cruise)) %>%
  ungroup()

# combine with total number of observations
loss_f_cruise <- full_join(loss_f_cruise, loss_n)

# calculate relative contribution of cruise samples to total
loss_f_cruise <- loss_f_cruise %>% 
  mutate(n_cruise_rel = 100 * n_cruise / n) %>% 
  arrange(basin_AIP, decade, -n_cruise_rel) %>% 
  group_by(basin_AIP, decade) %>% 
  mutate(n_cruise_rel_cum = cumsum(n_cruise_rel)) %>% 
  ungroup() %>% 
  select(-n)

loss_f_cruise <- loss_f_cruise %>% 
  pivot_longer(predictor:target,
               names_to = "parameter_class",
               values_to = "loss") %>% 
  mutate(loss = as.factor(loss))

grey_plasma <- c("grey80", viridisLite::plasma(4))

# filter large cruises
loss_f_cruise <- loss_f_cruise %>%
    filter(n_cruise_rel >= 3)

loss_f_cruise %>%
  group_split(basin_AIP) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(rank_n_cruise, n_cruise, fill = loss)) +
      geom_point(shape = 21, size = 2) +
      scale_fill_manual(values = grey_plasma,
                        name = "variables missing") +
      facet_grid(decade ~ parameter_class) +
      labs(title = paste("basin_AIP:", unique(.x$basin_AIP))) +
      ylim(0, NA)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
ce6cdae jens-daniel-mueller 2021-12-15
loss_f_cruise %>%
  filter(loss != 0) %>%
  select(basin_AIP,
         decade,
         parameter_class,
         rank_n_cruise,
         cruise_expocode,
         loss) %>%
  arrange(basin_AIP, decade, parameter_class, rank_n_cruise) %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
basin_AIP decade parameter_class rank_n_cruise cruise_expocode loss
Atlantic 1989-1999 target 1 323019940104 1
Atlantic 1989-1999 target 7 33RO19980123 1
Atlantic 1989-1999 target 9 35A319950113 1
Atlantic 1989-1999 target 11 06MT19900123 1
Atlantic 1989-1999 target 12 33LK19960415 1
Atlantic 2000-2009 target 8 35TH20010823 1
Atlantic 2000-2009 target 9 74DI20040404 1
Atlantic 2000-2009 target 10 35TH20080610 1
Atlantic 2000-2009 target 12 35TH20040604 1
Atlantic 2000-2009 target 13 35TH20020611 1
Atlantic 2010-2020 target 9 33RO20110926 1
Atlantic 2010-2020 target 12 35TH20100608 1
Atlantic 2010-2020 target 13 29AH20160617 1
Indian 1989-1999 target 11 320619960503 1
Indian 2000-2009 target 3 33RR20080204 1
Pacific 1989-1999 target 3 31DS19960105 1
Pacific 1989-1999 target 6 316N19930222 1
Pacific 1989-1999 target 7 316N19921006 1
Pacific 1989-1999 target 8 90KD19920214 1
Pacific 2000-2009 target 1 33RO20071215 1
Pacific 2000-2009 target 6 318M20091121 1
Pacific 2010-2020 target 4 320620170703 1
Pacific 2010-2020 target 9 318M20091121 2
rm(loss_n)
loss_grid <- loss %>% distinct(lon, lat, cruise_expocode)

loss_f_grid <- left_join(loss_f_cruise,
                          loss_grid)
map +
  geom_tile(data = loss_f_grid,
            aes(lon, lat, fill = loss)) +
  facet_grid(decade ~ parameter_class) +
  scale_fill_manual(values = grey_plasma)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
6aa4b75 jens-daniel-mueller 2021-12-16
163f976 jens-daniel-mueller 2021-12-16
be0850d jens-daniel-mueller 2021-12-16
loss_f_grid %>% filter(loss != 0) %>%
  group_split(parameter_class, decade) %>%
  # head(1) %>%
  map(
    ~ map +
      geom_tile(data = .x,
                aes(lon, lat, fill = cruise_expocode)) +
      scale_fill_brewer(palette = "Paired") +
      facet_grid(decade ~ parameter_class)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16
rm(loss_f_cruise, loss_f_grid)
rm(loss_grid)

4.3 f == 9

Here, I analysis the loss of data due to unavailability (i.e. where f-flag == 9).

loss_f9 <- loss_all %>% 
  select(lon, lat, basin_AIP, decade, cruise_expocode, ends_with("f")) %>%
  pivot_longer(ends_with("f"),
               names_to = "parameter",
               values_to = "value") %>% 
  mutate(parameter = str_remove(parameter, "f"))

loss_f9 <- loss_f9 %>%
  count(cruise_expocode, basin_AIP, decade, parameter, value) %>%
  pivot_wider(
    names_from = value,
    names_prefix = "f_",
    values_from = n,
    values_fill = 0
  ) %>%
  mutate(n_cruise = f_0 + f_2 + f_9,
         category = if_else(f_9 <= 0.1 * (n_cruise), "OK", "loss"))

loss_f9_cruise <- loss_f9 %>%
  mutate(parameter_class = if_else(
    parameter %in% c("tco2", "talk", "phosphate"),
    "target",
    "predictor"
  )) %>%
  count(cruise_expocode,
        basin_AIP,
        decade,
        n_cruise,
        parameter_class,
        category) %>% 
  pivot_wider(names_from = category,
              values_from = n,
              values_fill = 0) %>% 
  select(-OK) %>% 
  pivot_wider(names_from = parameter_class,
              values_from = loss) %>% 
  group_by(basin_AIP, decade) %>%
  mutate(rank_n_cruise = rank(-n_cruise)) %>%
  ungroup()

loss_f9_cruise <- full_join(loss_f9_cruise, loss_all_n)

loss_f9_cruise <- loss_f9_cruise %>% 
  mutate(n_cruise_rel = 100 * n_cruise / n) %>% 
  arrange(basin_AIP, decade, -n_cruise_rel) %>% 
  group_by(basin_AIP, decade) %>% 
  mutate(n_cruise_rel_cum = cumsum(n_cruise_rel)) %>% 
  ungroup() %>% 
  select(-n)

loss_f9_cruise <- loss_f9_cruise %>% 
  pivot_longer(predictor:target,
               names_to = "parameter_class",
               values_to = "loss") %>% 
  mutate(loss = as.factor(loss))

grey_plasma <- c("grey80", viridisLite::plasma(4))

loss_f9_cruise <- loss_f9_cruise %>%
    filter(n_cruise_rel >= 3)

loss_f9_cruise %>%
  group_split(basin_AIP) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(rank_n_cruise, n_cruise, fill = loss)) +
      geom_point(shape = 21, size = 2) +
      scale_fill_manual(values = grey_plasma,
                        name = "variables missing") +
      facet_grid(decade ~ parameter_class) +
      labs(title = paste("basin_AIP:", unique(.x$basin_AIP))) +
      ylim(0, NA)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
6aa4b75 jens-daniel-mueller 2021-12-16
loss_f9_cruise %>% 
  filter(loss != 0) %>% 
  select(basin_AIP, decade, parameter_class, rank_n_cruise, cruise_expocode) %>% 
  arrange(basin_AIP, decade, parameter_class, rank_n_cruise) %>% 
  kable() %>% 
  kable_styling() %>% 
  scroll_box(height = "300px")
basin_AIP decade parameter_class rank_n_cruise cruise_expocode
Atlantic 1989-1999 predictor 2 316N19871123
Atlantic 1989-1999 predictor 4 06AQ19980328
Atlantic 1989-1999 predictor 6 74DI19970807
Atlantic 1989-1999 target 2 316N19871123
Atlantic 1989-1999 target 3 33RO19980123
Atlantic 1989-1999 target 4 06AQ19980328
Atlantic 1989-1999 target 6 74DI19970807
Atlantic 1989-1999 target 7 33MW19930704
Atlantic 2000-2009 target 1 33RO20050111
Atlantic 2000-2009 target 2 33RO20030604
Atlantic 2000-2009 target 3 06AQ20050122
Atlantic 2000-2009 target 4 06AQ20080210
Atlantic 2010-2020 predictor 10 06M220170104
Atlantic 2010-2020 predictor 11 06AQ20120107
Atlantic 2010-2020 target 3 33RO20110926
Atlantic 2010-2020 target 6 29HE20130320
Atlantic 2010-2020 target 10 06M220170104
Indian 1989-1999 predictor 1 316N19951202
Indian 1989-1999 predictor 3 316N19950310
Indian 1989-1999 predictor 7 35MF19960220
Indian 1989-1999 target 1 316N19951202
Indian 1989-1999 target 5 316N19941201
Indian 1989-1999 target 8 320619960503
Indian 1989-1999 target 10 316N19950611
Indian 1989-1999 target 12 35MF19930123
Indian 2000-2009 predictor 10 09AR20071216
Indian 2000-2009 target 7 09AR20060102
Indian 2010-2020 predictor 8 09AR20141205
Indian 2010-2020 target 5 325020190403
Indian 2010-2020 target 8 09AR20141205
Pacific 1989-1999 predictor 6 33MW19920224
Pacific 1989-1999 target 1 316N19920502
Pacific 1989-1999 target 6 33MW19920224
Pacific 2000-2009 predictor 8 325020060213
loss_all_grid <- loss_all %>% distinct(lon, lat, cruise_expocode)

loss_f9_grid <- left_join(loss_f9_cruise,
                          loss_all_grid)
map +
  geom_tile(data = loss_f9_grid,
            aes(lon, lat, fill = loss)) +
  facet_grid(decade ~ parameter_class) +
  scale_fill_manual(values = grey_plasma)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
6aa4b75 jens-daniel-mueller 2021-12-16
loss_f9_grid %>% filter(loss != 0) %>%
  group_split(parameter_class, decade) %>%
  # head(1) %>%
  map(
    ~ map +
      geom_tile(data = .x,
                aes(lon, lat, fill = cruise_expocode)) +
      scale_fill_brewer(palette = "Paired") +
      facet_grid(decade ~ parameter_class)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
e810585 jens-daniel-mueller 2021-12-16
rm(loss_f9_cruise, loss_f9_grid)
rm(loss_all_grid)
rm(loss_all_n)
rm(loss)

4.4 Relevant cruises

Below, I plot the most relevant cruises that would be lost when applying the strictest quality flagging criteria. These cruises were hand-picked, based on the relevance analysis shown above.

expocodes_missing <- GLODAP_cruises_missing %>%
  distinct(cruise_expocode) %>%
  pull()

missing_cruise_grid <- loss_all %>%
  filter(cruise_expocode %in% expocodes_missing) %>% 
  distinct(cruise_expocode, decade, lon, lat)

missing_cruise_grid %>%
  group_split(decade) %>%
  # head(1) %>%
  map(
    ~ map +
      geom_tile(data = .x,
                aes(lon, lat, fill = str_sub(
                  cruise_expocode, 1, 4
                ))) +
      facet_grid(decade ~ .) +
      scale_fill_brewer(palette = "Paired",
                        name = "RV")
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10

4.5 P18 phosphate

Here I analyse the phosphate data from section P18, which was repeated 3 times.

P18 <- GLODAP %>% 
  filter(cruise_expocode %in% c("33RO20161119",
                                "33RO20071215",
                                "31DS19940126"))
# plot raw data section
P18 %>% 
  filter(!is.na(nitrate)) %>% 
  ggplot(aes(lat, depth, col= nitrate)) +
  geom_point() +
  scale_color_viridis_c() +
  scale_y_reverse() +
  facet_grid(cruise_expocode ~.)

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
70923f2 jens-daniel-mueller 2021-12-14
b68b58e jens-daniel-mueller 2021-12-13
# grid section data
P18_grid <- P18 %>% 
  select(lat, lon, depth, cruise_expocode, nitrate) %>% 
  mutate(depth = as.numeric(as.character(cut(depth,
                     seq(0,1e4, 500), 
                     seq(250,1e4,500))))) %>% 
  group_by(lat, depth, cruise_expocode) %>% 
  summarise(nitrate = mean(nitrate, na.rm=TRUE)) %>% 
  ungroup()

P18_grid %>% 
  ggplot(aes(lat, depth, fill= nitrate)) +
  geom_tile() +
  scale_fill_viridis_c() +
  scale_y_reverse() +
  facet_grid(cruise_expocode ~.)

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
70923f2 jens-daniel-mueller 2021-12-14
b68b58e jens-daniel-mueller 2021-12-13
# calculate gridded offsets
P18_grid_offset <- P18_grid %>%
  pivot_wider(names_from = cruise_expocode,
              values_from = nitrate) %>%
  mutate(
    delta_nitrate_1994_2007 = (`31DS19940126` - `33RO20071215`) / `33RO20071215`,
    delta_nitrate_1994_2016 = (`31DS19940126` - `33RO20161119`) / `33RO20071215`,
    delta_nitrate_2007_2016 = (`33RO20071215` - `33RO20161119`) / `33RO20071215`
  ) %>%
  select(lat, depth, starts_with("delta")) %>%
  pivot_longer(
    starts_with("delta"),
    values_to = "delta_nitrate",
    names_to = "years",
    names_prefix = "delta_nitrate_"
  ) %>%
  filter(delta_nitrate > -20,
         depth > 1500)

P18_grid_offset %>% 
  ggplot(aes(lat, depth, fill = delta_nitrate)) +
  geom_tile() +
  scale_fill_divergent() +
  scale_y_reverse() +
  facet_grid(years ~.)

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
70923f2 jens-daniel-mueller 2021-12-14
b68b58e jens-daniel-mueller 2021-12-13
P18_grid_offset %>%
  group_by(lat, years) %>%
  summarise(delta_nitrate = mean(delta_nitrate, na.rm = TRUE)) %>%
  ungroup() %>%
  ggplot(aes(lat, delta_nitrate, col = years, fill = years)) +
  geom_hline(yintercept = 0) +
  stat_smooth(method = "lm", formula = y ~ x + I(x ^ 2)) +
  geom_point() +
  geom_line()

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
70923f2 jens-daniel-mueller 2021-12-14
rm(P18, P18_grid, P18_grid_offset)

4.6 A16

A16 <- GLODAP %>% 
  filter(cruise_expocode %in% c(
    "33MW19930704" #A16N-1993
    ))

map + 
  geom_tile(data = A16 %>% distinct(lon, lat),
            aes(lon, lat))

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
70923f2 jens-daniel-mueller 2021-12-14
A16 %>% 
  select(ends_with(c("qc"))) %>% 
  pivot_longer(everything(),
               names_to = "flag",
               values_to = "value") %>% 
  distinct(flag, value)
# A tibble: 9 × 2
  flag        value
  <chr>       <dbl>
1 salinityqc      1
2 oxygenqc        1
3 nitrateqc       1
4 silicateqc      1
5 phosphateqc     1
6 tco2qc          1
7 talkqc          1
8 talkqc          0
9 tco2qc          0
rm(A16)

5 Adjustments

Typically, the reasons for multiple expocode entries of the same cruise in the adjustment table list are:

  1. The cruise adjustments are different for different station, i.e. station split (e.g. 316N19821201)

-> How to merge? Based on first and last station? Cruise_ID not in GLODAP merged master file.

  1. The cruise adjustments are different for different legs (e.g. 316N19871123.6) but have been merged into one cruise (316N19871123) for the product

-> How to merge? Based on first and last station?

  1. The cruise adjustments have been updated/changed through the versions, here always look for the most recent entry (see table below) (e.g. 320620180309)

For the expocodes not listed in the expocode list the reason is that INDIGO has been splitted into three cruises: 35MF1985-1987 and the same holds for SAVE (316N1987 - 6legs). Further 49HH20011208 has been assigned wrongly and corrected to 49HH20011127.

Remove expocode INDIGO and maintain only 35MF19850224. Remove expocode SAVE and maintain only 316N1987.

GLODAP_adjustments <- GLODAP_adjustments %>%
  select(cruise_expocode,
         first_station, last_station,
         version,
         calculated_carbon_parameter,
         ends_with("_adj")) %>% 
  rename(talk_adj = alkalinity_adj)

# Remove cruises INDIGO and SAVE

GLODAP_adjustments <- 
  GLODAP_adjustments %>% 
  filter(!(cruise_expocode %in% c("INDIGO", "SAVE")))

# correct expocode 49HH20011208 to 49HH20011127

GLODAP_adjustments <- 
  GLODAP_adjustments %>% 
  mutate(cruise_expocode = if_else(
    cruise_expocode == "49HH20011208",
    "49HH20011127",
    cruise_expocode
  ))


# select latest adjustment versions
GLODAP_adjustments <- 
  GLODAP_adjustments %>% 
  group_by(cruise_expocode, first_station) %>% 
  mutate(n = n(),
         version_max = max(version)) %>%
  ungroup() %>% 
  filter(version == version_max | is.na(version)) %>% 
  select(-c(version_max, version, n))

# harmonize multiple cruise expocodes of 316N1987
GLODAP_adjustments <- GLODAP_adjustments %>% 
  mutate(cruise_expocode = str_split(cruise_expocode,
                                     "\\.",
                                     simplify = TRUE)[,1])

# correct one wrong last_cruise label
GLODAP_adjustments <- GLODAP_adjustments %>%
  mutate(
    last_station = if_else(
      cruise_expocode == "318M20091121" &
        first_station == 1,
      127,
      last_station
    )
  )

# merge with expocode table
GLODAP_adjustments <-
  full_join(GLODAP_adjustments, GLODAP_expocodes) %>%
  relocate(cruise)


GLODAP_adjustments_NA_cruises <- 
  GLODAP_adjustments %>% 
  filter(is.na(cruise))

GLODAP_adjustments_duplicated_cruises <- 
  GLODAP_adjustments %>% 
  group_by(cruise_expocode, cruise) %>% 
  mutate(n = n()) %>%
  ungroup() %>% 
  filter(n != 1)


GLODAP_adjustments %>% 
  pivot_longer(salinity_adj:c13_adj,
               names_to = "parameter",
               values_to = "adjustment") %>% 
  ggplot(aes(adjustment)) +
  geom_histogram() +
  scale_y_log10() +
  facet_wrap(~ parameter, scales = "free_x")

Version Author Date
6d6a23e jens-daniel-mueller 2021-11-01
rm(GLODAP_adjustments_duplicated_cruises,
   GLODAP_adjustments_NA_cruises)

6 Crossover preparation

6.1 Histograms

GLODAP_adjustments_long <- GLODAP_adjustments %>%
  select(
    cruise_expocode,
    first_station,
    last_station,
    tco2_adj,
    talk_adj,
    phosphate_adj,
    nitrate_adj,
    oxygen_adj,
    silicate_adj,
    salinity_adj
  ) %>%
  pivot_longer(tco2_adj:salinity_adj,
               names_to = "parameter",
               values_to = "adjustment") %>% 
  mutate(parameter = str_remove(parameter, "_adj"))

p_adjustment_histo <- GLODAP_adjustments_long %>% 
  ggplot(aes(adjustment)) +
  geom_histogram() +
  scale_y_log10() +
  facet_wrap(~ parameter, scales = "free_x", ncol = 1)

p_xover_histo <- 
  ggplot() +
  geom_histogram(data = glodapv2_xover,
                 aes(offset)) +
  labs(title = "v2") +
  scale_y_log10() +
  facet_wrap(~ parameter, scales = "free_x", ncol = 1)

p_xover_histo_2021 <- 
  ggplot() +
  geom_histogram(data = glodapv2_2021_xover,
                 aes(offset)) +
  labs(title = "v2_2021") +
  scale_y_log10() +
  facet_wrap(~ parameter, scales = "free_x", ncol = 1)

p_xover_histo + p_xover_histo_2021 + p_adjustment_histo

Version Author Date
a87f8c7 jens-daniel-mueller 2021-12-20
d5ef2c6 jens-daniel-mueller 2021-12-20
rm(p_xover_histo, p_xover_histo_2021, p_adjustment_histo)

6.2 Adjustment correction

The crossover analysis I received refer to unadjusted data. In order to analyse remaining crossover biases that are relevant for the adjusted data, the crossover results are adjusted with the same value that was also applied to the data.

# join crossover and adjustments
glodapv2_xover <- left_join(
  glodapv2_xover,
  GLODAP_adjustments_long %>%
    select(
      cruise_A = cruise_expocode,
      parameter,
      first_station_A = first_station,
      last_station_A = last_station,
      adjustment_A = adjustment
    )
)

glodapv2_xover <- left_join(
  glodapv2_xover,
  GLODAP_adjustments_long %>%
    select(
      cruise_B = cruise_expocode,
      parameter,
      first_station_B = first_station,
      last_station_B = last_station,
      adjustment_B = adjustment
    )
)

glodapv2_xover <- glodapv2_xover %>% 
  mutate(adjustment_A = if_else(
    parameter %in% c("salinity", "talk", "tco2"),
    replace_na(adjustment_A, 0),
    replace_na(adjustment_A, 1)
  )) %>% 
  mutate(adjustment_B = if_else(
    parameter %in% c("salinity", "talk", "tco2"),
    replace_na(adjustment_B, 0),
    replace_na(adjustment_B, 1)
  ))



# apply adjustment to crossover
glodapv2_xover <- glodapv2_xover  %>%
  mutate(offset_adj = 
           if_else(parameter %in% c("salinity", "talk", "tco2"),
                   offset + adjustment_A - adjustment_B,
                   offset * adjustment_A / adjustment_B))
# join crossover and adjustments
glodapv2_2021_xover <- left_join(
  glodapv2_2021_xover,
  GLODAP_adjustments_long %>%
    select(
      cruise_A = cruise_expocode,
      parameter,
      first_station_A = first_station,
      last_station_A = last_station,
      adjustment_A = adjustment
    )
)

glodapv2_2021_xover <- left_join(
  glodapv2_2021_xover,
  GLODAP_adjustments_long %>%
    select(
      cruise_B = cruise_expocode,
      parameter,
      first_station_B = first_station,
      last_station_B = last_station,
      adjustment_B = adjustment
    )
)

glodapv2_2021_xover <- glodapv2_2021_xover %>% 
  mutate(adjustment_A = if_else(
    parameter %in% c("salinity", "talk", "tco2"),
    replace_na(adjustment_A, 0),
    replace_na(adjustment_A, 1)
  )) %>% 
  mutate(adjustment_B = if_else(
    parameter %in% c("salinity", "talk", "tco2"),
    replace_na(adjustment_B, 0),
    replace_na(adjustment_B, 1)
  ))


# apply adjustment to crossover
glodapv2_2021_xover <- glodapv2_2021_xover  %>%
  mutate(offset_adj = 
           if_else(parameter %in% c("salinity", "talk", "tco2"),
                   offset + adjustment_A,
                   offset * adjustment_A))
xover <- bind_rows(glodapv2_xover,
                   glodapv2_2021_xover)

rm(glodapv2_xover,
   glodapv2_2021_xover)


xover <- xover %>%
  mutate(date_A = ymd(str_sub(cruise_A, 5, 12)),
         date_B = ymd(str_sub(cruise_B, 5, 12)))

# Remove cruises with expocodes starting with "OMEX"
# for which dates cannot be extracted from expocode

xover <- xover %>%
  filter(!is.na(date_A),
         !is.na(date_B))


xover <- xover %>% 
  filter(!is.na(offset_adj))

7 Crossover analysis

7.0.1 Functions

# reverse cruise A and B
m_xover_reverse <- function(df) {
  df_rev <- df %>%
    rename(
      cruise_A_back = cruise_A,
      cruise_A = cruise_B,
      date_A_back = date_A,
      date_A = date_B,
      n_A_back = n_A,
      n_A = n_B,
      adjustment_A_back = adjustment_A,
      adjustment_A = adjustment_B
    ) %>%
    rename(cruise_B = cruise_A_back,
           date_B = date_A_back,
           n_B = n_A_back,
           adjustment_B = adjustment_A_back) %>%
    mutate(
      offset = if_else(
        parameter %in% c("salinity", "talk", "tco2"),
        -offset,
        1 / offset
      ),
      offset_adj = if_else(
        parameter %in% c("salinity", "talk", "tco2",
                         "cstar_total", "cstar_phosphate", "cstar_talk", "cstar_tco2", "cstar_tco2_talk"),
        -offset_adj,
        1 / offset_adj
      )
    )
  return(df_rev)
}


# extract cruise based on expocode
m_xover_cruise_extractation <- function (df, expocode) {
  
  xover_cruise_A <- df %>%
    filter(cruise_A %in% expocode)
  
  xover_cruise_B <- df %>%
    filter(cruise_B %in% expocode)
  
  xover_cruise_B_rev <- m_xover_reverse(df = xover_cruise_B)
  
  xover_cruise <- bind_rows(xover_cruise_A,
                            xover_cruise_B_rev)
  
  return(xover_cruise)
}

7.1 Missing/flagged data

Analyse crossover results for cruises that cause a relevant data gap, with the aim to inform the use of data from these cruises.

hline_intercept <-
  tibble(parameter = unique(xover$parameter)) %>%
  mutate(intercept = if_else(parameter %in% c("salinity", "talk", "tco2"),
                             0,
                             1))

for (i_expocodes_missing in expocodes_missing) {
  # i_expocodes_missing <- expocodes_missing[1]
  
  cruise <- GLODAP %>%
    filter(cruise_expocode == i_expocodes_missing) %>% 
    rename(salinity = sal)
  
  # extract parameter that cause qc loss
  parameter_qc <- loss_qc %>%
    filter(cruise_expocode == i_expocodes_missing,
           category == "loss") 
  
  parameter_qc <- parameter_qc %>%
    pull(parameter)
  
  print(paste("qc parameter:", parameter_qc))
  
  if (length(parameter_qc) > 0) {
    parameter_qc <- parameter_qc %>% str_c(.,"qc")
  }
  
  
  # extract parameter that cause f loss
  parameter_f <- loss_f %>%
    filter(cruise_expocode == i_expocodes_missing,
           category == "loss")
  
  parameter_f <- parameter_f %>%
    pull(parameter)
  
  print(paste("f parameter:", parameter_f))
    
  if (length(parameter_f) > 0) {
    parameter_f <- parameter_f %>% str_c(.,"f")
  }
  
  # extract parameter that cause f9 loss
  parameter_f9 <- loss_f9 %>%
    filter(cruise_expocode == i_expocodes_missing,
           category == "loss")
  
  parameter_f9 <- parameter_f9 %>%
    pull(parameter)
  
  print(paste("f9 parameter:", parameter_f9))
  
  if (length(parameter_f9) > 0) {
    parameter_f9 <- parameter_f9 %>% str_c(.,"f")
  }
  
  # extract unique loss parameters
  parameter_check <-
    unique(c(parameter_qc, parameter_f, parameter_f9))
  
  rm(parameter_qc, parameter_f, parameter_f9)
  

  xover_cruise <- m_xover_cruise_extractation(
    df = xover %>% mutate(n_A = 0,
                          n_B = 0),
    expocode = i_expocodes_missing
  )

  for (i_parameter_check in parameter_check) {
    # i_parameter_check <- parameter_check[1]
    
    cruise_flag_count <- cruise %>%
      count(lon, lat, !!sym(i_parameter_check)) %>%
      group_by(lon, lat) %>%
      mutate(n_rel = 100 * n / sum(n)) %>%
      ungroup()
    
    print(
      map +
        geom_tile(data = cruise_flag_count,
                  aes(lon, lat, fill = n_rel)) +
        scale_fill_viridis_c(option = "magma",
                             direction = -1) +
        facet_wrap(i_parameter_check, ncol = 2) +
        labs(title = i_expocodes_missing,
             subtitle = i_parameter_check)
    )
    
    i_parameter_check_var <- str_remove(i_parameter_check, "f")
    i_parameter_check_var <- str_remove(i_parameter_check_var, "qc")
    
    print(
      cruise %>% 
        ggplot(aes(!!sym(i_parameter_check_var), depth, fill=station)) +
        geom_point(alpha = 0.2, shape = 21) +
        scale_fill_viridis_c() +
        scale_y_reverse() +
        facet_wrap(i_parameter_check, ncol = 2) +
        labs(title = i_expocodes_missing,
             subtitle = i_parameter_check)
    )
    
  }

  p_crossover_ts <- xover_cruise %>%
    ggplot(aes(date_B, offset_adj)) +
    geom_vline(xintercept = ymd(str_sub(i_expocodes_missing, 5)),
               col = "red") +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_point() +
    facet_grid(parameter ~ ., scales = "free_y") +
    labs(title = i_expocodes_missing,
         subtitle = str_c(parameter_check, collapse = "+")) +
    theme(
      legend.position = "bottom",
      legend.direction = "vertical",
      axis.title.x = element_blank()
    )
  
  xover_cruise_decade <- xover_cruise %>%
    mutate(decade = m_grid_decade(year(date_B))) %>%
    filter(!is.na(decade)) %>%
    group_by(parameter, decade) %>%
    mutate(n = n()) %>%
    ungroup() %>% 
    filter(n > 2)
  
  
  p_crossover_decadal <-
    ggplot() +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_violin(
      data = xover_cruise_decade,
      aes(x = decade, y = offset_adj),
      fill = "gold"
    ) +
    geom_boxplot(
      data = xover_cruise_decade,
      aes(x = decade, y = offset_adj),
      width = 0.2
    ) +
    labs(title = "Decadal averages") +
    facet_grid(parameter ~ ., scales = "free_y") +
    theme(axis.title.x = element_blank(),
          axis.text.x = element_text(angle = 90))
  
  print(
  p_crossover_ts + p_crossover_decadal +
    plot_layout(widths = c(2, 1))
  )
  
  rm(p_crossover_ts, p_crossover_decadal)
  
}
[1] "qc parameter: "
[1] "f parameter: talk"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: talk"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: aou"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: nitrate"   "f9 parameter: phosphate"
[3] "f9 parameter: silicate"  "f9 parameter: talk"     

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: talk" "qc parameter: talk"
[1] "f parameter: talk" "f parameter: talk"
[1] "f9 parameter: talk" "f9 parameter: aou"  "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: aou"  "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20
[1] "qc parameter: talk"
[1] "f parameter: talk"
[1] "f9 parameter: phosphate" "f9 parameter: talk"     

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
7f65d3a jens-daniel-mueller 2021-12-20
6106236 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: talk"
[1] "f parameter: talk"
[1] "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: aou"      "f9 parameter: salinity"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: tco2" "f parameter: talk" "f parameter: tco2"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: nitrate"
[1] "f parameter: "
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: talk"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: talk"
[1] "f parameter: talk"
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: talk"
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: talk"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: tco2"
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: tco2"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: tco2"
[1] "f9 parameter: aou"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
fcff192 jens-daniel-mueller 2021-12-21
2704ff6 jens-daniel-mueller 2021-12-20
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: silicate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: tco2"
[1] "f parameter: tco2"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: tco2"
[1] "f parameter: tco2"
[1] "f9 parameter: nitrate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: tco2"
[1] "f parameter: tco2"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: nitrate"   "f9 parameter: phosphate"
[3] "f9 parameter: silicate" 

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: talk"
[1] "f parameter: talk"
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: nitrate"
[1] "f parameter: "
[1] "f9 parameter: "

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
e3d1a2b jens-daniel-mueller 2022-03-10
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: nitrate"   "f parameter: phosphate" "f parameter: silicate" 
[1] "f9 parameter: talk"      "f9 parameter: nitrate"  
[3] "f9 parameter: phosphate" "f9 parameter: silicate" 
[5] "f9 parameter: talk"     

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: talk"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
[1] "qc parameter: "
[1] "f parameter: "
[1] "f9 parameter: phosphate"

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
fcff192 jens-daniel-mueller 2021-12-21

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
fcff192 jens-daniel-mueller 2021-12-21
rm(xover_cruise, xover_cruise_decade)

7.2 IO 1990 data

IO_1990_expocodes <- GLODAP %>%
  filter(str_detect(cruise_expocode, "316N199") &
           basin_AIP == "Indian") %>%
  distinct(cruise_expocode) %>%
  pull()

xover_IO_1990 <-
  m_xover_cruise_extractation(df = xover %>% mutate(n_A = 0,
                                                    n_B = 0),
                              expocode = IO_1990_expocodes)


xover_IO_1990 <- xover_IO_1990 %>%
  mutate(RV = if_else(str_detect(cruise_B, "316N"),
                      "316N",
                      "other"))


xover_IO_1990_decade <- xover_IO_1990 %>%
    mutate(decade = m_grid_decade(year(date_B))) %>%
    filter(!is.na(decade),
           RV != "316N") %>% 
  arrange(date_B)


xover_IO_1990_decade %>%
  group_by(parameter, decade) %>%
  summarise(offset_adj_mean = mean(offset_adj, na.rm = TRUE),
            offset_adj_median = median(offset_adj, na.rm = TRUE)) %>%
  ungroup() %>%
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
parameter decade offset_adj_mean offset_adj_median
nitrate 1989-1999 0.9959899 0.9952475
nitrate 2000-2009 1.0018716 1.0034000
nitrate 2010-2020 0.9942423 0.9954335
oxygen 1989-1999 0.9986282 0.9974067
oxygen 2000-2009 0.9983700 1.0002000
oxygen 2010-2020 0.9992518 0.9981748
phosphate 1989-1999 0.9926563 0.9962076
phosphate 2000-2009 1.0050862 1.0052750
phosphate 2010-2020 1.0016116 1.0031516
salinity 1989-1999 -0.0016439 -0.0012000
salinity 2000-2009 -0.0009812 -0.0012000
salinity 2010-2020 -0.0008173 -0.0009442
silicate 1989-1999 0.9994382 1.0012621
silicate 2000-2009 1.0045634 1.0058000
silicate 2010-2020 1.0076910 1.0101825
talk 1989-1999 3.0075385 2.5782000
talk 2000-2009 2.3614576 2.9766000
talk 2010-2020 3.3860085 3.8736858
tco2 1989-1999 -0.7801709 -0.3723461
tco2 2000-2009 -2.6973312 -2.5524500
tco2 2010-2020 -2.0787148 -1.9810457
p_crossover_ts <- xover_IO_1990 %>%
  ggplot(aes(date_B, offset, col = RV)) +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_point(shape = 21) +
  scale_color_brewer(palette = "Set1") +
  facet_grid(parameter ~ ., scales = "free_y") +
  labs(title = "Crossover 316N199XXXXX") +
  theme(
    legend.position = "bottom",
    legend.direction = "vertical",
    axis.title.x = element_blank()
  )

p_crossover_decadal <-
  ggplot() +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_violin(data = xover_IO_1990_decade,
               aes(x = decade, y = offset), fill="gold") +
  geom_boxplot(data = xover_IO_1990_decade,
               aes(x = decade, y = offset),
               width = 0.2) +
  facet_grid(parameter ~ ., scales = "free_y") +
  labs(title = "Decadal offsets") +
  theme(axis.title.x = element_blank(),
        axis.text.x = element_text(angle = 90))


p_crossover_ts + p_crossover_decadal +
  plot_layout(widths = c(2, 1))

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
a87f8c7 jens-daniel-mueller 2021-12-20
d5ef2c6 jens-daniel-mueller 2021-12-20
00227e6 jens-daniel-mueller 2021-12-20
rm(p_crossover_ts, p_crossover_decadal)

p_crossover_ts <- xover_IO_1990 %>%
  ggplot(aes(date_B, offset_adj, col = RV)) +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_point(shape = 21) +
  scale_color_brewer(palette = "Set1") +
  facet_grid(parameter ~ ., scales = "free_y") +
  labs(title = "Crossover 316N199XXXXX") +
  theme(
    legend.position = "bottom",
    legend.direction = "vertical",
    axis.title.x = element_blank()
  )

p_crossover_decadal <-
  ggplot() +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_violin(data = xover_IO_1990_decade,
               aes(x = decade, y = offset_adj), fill="gold") +
  geom_boxplot(data = xover_IO_1990_decade,
               aes(x = decade, y = offset_adj),
               width = 0.2) +
  facet_grid(parameter ~ ., scales = "free_y") +
  labs(title = "Decadal offsets") +
  theme(axis.title.x = element_blank(),
        axis.text.x = element_text(angle = 90))

p_crossover_ts + p_crossover_decadal +
  plot_layout(widths = c(2, 1))

Version Author Date
744b90f jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
51ec1fe jens-daniel-mueller 2021-12-23
a87f8c7 jens-daniel-mueller 2021-12-20
d5ef2c6 jens-daniel-mueller 2021-12-20
00227e6 jens-daniel-mueller 2021-12-20
rm(p_crossover_ts, p_crossover_decadal)
# rm(xover_IO_1990, xover_IO_1990_decade)

7.3 5 basin

In this section, I analyse GLODAP’s crossover data separately for each of 5 subbasins. For this purpose, each cruise is taken into account that provided at least one measurement in the respective subbasin, irrespective of measurements done outside this subbasin.

7.3.1 Cruise-by-cruise

Here, I filter all crossover and use only those were both cruises covered the basin of interest.

# reformat basin labels
basinmask_5 <- basinmask_5 %>%
  mutate(
    basin = str_replace(basin, "_", ". "),
    basin = fct_relevel(
      basin,
      "N. Pacific",
      "S. Pacific",
      "N. Atlantic",
      "S. Atlantic",
      "Indian"
    )
  )

basins <- unique(basinmask_5$basin)
# basins <- basins[5]

GLODAP <- inner_join(GLODAP, basinmask_5)

GLODAP <- GLODAP %>%
  mutate(decade = m_grid_decade(year))

# remove cruise with phosphate offset > 1.3
GLODAP <- GLODAP %>% 
  filter(cruise_expocode != "18LU20080702")

# loop over all 5 subbasins
for (i_basin in basins) {
  # i_basin <- basins[3]
  
  # retrieve subbasin expocodes
  expocodes_basin <- GLODAP %>%
    filter(basin == i_basin,
           !is.na(decade)) %>% 
    count(cruise_expocode)
  
  GLODAP_basin <- GLODAP %>% 
    filter(cruise_expocode %in% expocodes_basin$cruise_expocode)
  
  # subset cruise with all qc flag = 1
  expocodes_basin_qc <- GLODAP_basin %>%
    select(cruise_expocode, ends_with("qc")) %>%
    filter(if_all(ends_with("qc"), ~ . == 1)) %>%
    distinct(cruise_expocode) %>%
    pull(cruise_expocode)
  
  # subset cruise with all f flag = 2
  expocodes_basin_f <- GLODAP_basin %>%
    select(cruise_expocode, ends_with("f")) %>%
    filter(if_all(ends_with("f"), ~ . == 2)) %>%
    distinct(cruise_expocode) %>%
    pull(cruise_expocode)
  
  # join qc and f cruises and identify lower number of observations
  expocodes_basin <- expocodes_basin %>%
    mutate(
      parameter_coverage = if_else(
        cruise_expocode %in% expocodes_basin_qc &
          cruise_expocode %in% expocodes_basin_f,
        "full",
        "partial"
      )
    )
  
  rm(expocodes_basin_f, expocodes_basin_qc)
  
  GLODAP_basin_grid <- GLODAP_basin %>%
    count(cruise_expocode, lat, lon, decade)
  
  print(
    map +
      geom_tile(data = GLODAP_basin_grid,
                aes(lon, lat, fill = n)) +
      scale_fill_viridis_c(
        option = "magma",
        direction = -1,
        trans = "log10"
      ) +
      labs(title = i_basin) +
      facet_grid(decade ~ .) +
      theme(legend.title = element_blank())
  )
  
  GLODAP_basin_grid <- full_join(GLODAP_basin_grid %>% select(-n),
                                 expocodes_basin)
  
  print(
    map +
      geom_tile(
        data = GLODAP_basin_grid %>% filter(parameter_coverage == "partial"),
        aes(lon, lat, fill = "partial")
      ) +
      geom_tile(
        data = GLODAP_basin_grid %>% filter(parameter_coverage == "full"),
        aes(lon, lat, fill = "full")
      ) +
      scale_fill_brewer(palette = "Set1") +
      labs(title = i_basin) +
      facet_grid(decade ~ .) +
      theme(legend.title = element_blank())
  )
  
  
  # only for the N Pacifc we remove xover from cruises that go further south than 40S
  if(i_basin %in% c("N. Pacific", "Indian")){
  
  expocodes_basin_removed_40S <- GLODAP_basin_grid %>%
    filter(lat < -40) %>%
    distinct(cruise_expocode) %>%
    pull()
  
  print(
    map +
      geom_tile(
        data = GLODAP_basin_grid %>%
          filter(
            parameter_coverage == "partial" &
              cruise_expocode %in% expocodes_basin_removed_40S
          ),
        aes(lon, lat, fill = "partial")
      ) +
      geom_tile(
        data = GLODAP_basin_grid %>%
          filter(
            parameter_coverage == "full" &
              cruise_expocode %in% expocodes_basin_removed_40S
          ),
        aes(lon, lat, fill = "full")
      ) +
      scale_fill_brewer(palette = "Set1") +
      labs(title = i_basin,
           subtitle = "Removed cruises") +
      facet_grid(decade ~ .) +
      theme(legend.title = element_blank())
  )
  
  expocodes_basin <- expocodes_basin %>% 
    filter(!(cruise_expocode %in% expocodes_basin_removed_40S))
  
  if (i_basin %in% c("N. Pacific")) {
    expocodes_xover_NP <- expocodes_basin
  }
  
  if (i_basin %in% c("Indian")) {
    expocodes_xover_IO <- expocodes_basin
  }
  
  print(
    map +
      # geom_tile(
      #   data = GLODAP_basin_grid %>%
      #     filter(
      #       parameter_coverage == "partial" &
      #         cruise_expocode %in% expocodes_basin$cruise_expocode
      #     ),
      #   aes(lon, lat, fill = "partial")
      # ) +
      geom_tile(
        data = GLODAP_basin_grid %>%
          filter(
            parameter_coverage == "full" &
              cruise_expocode %in% expocodes_basin$cruise_expocode
          ),
        aes(lon, lat, fill = "full")
      ) +
      scale_fill_brewer(palette = "Set1") +
      labs(title = i_basin,
           subtitle = "Maintained cruises") +
      facet_grid(decade ~ .) +
      theme(legend.title = element_blank())
  )
  
  }
  
  # filter crossover with both cruises falling into subbasin
  xover_basin <- xover %>%
    filter(
      cruise_A %in% expocodes_basin$cruise_expocode &
        cruise_B %in% expocodes_basin$cruise_expocode
    )

  xover_basin <- xover_basin %>%
    mutate(basin = i_basin)

  # combine with cruise meta data
  xover_basin <- left_join(
    xover_basin,
    expocodes_basin %>%
      rename(
        cruise_A = cruise_expocode,
        n_A = n,
        parameter_coverage_A = parameter_coverage
      )
  )
  
  xover_basin <- left_join(
    xover_basin,
    expocodes_basin %>%
      rename(
        cruise_B = cruise_expocode,
        n_B = n,
        parameter_coverage_B = parameter_coverage
      )
  )
  
  xover_basin <- xover_basin %>%
    mutate(
      parameter_coverage = if_else(
        parameter_coverage_A == "full" & parameter_coverage_B == "full",
        "full",
        "partial"
      ),
      n = n_A + n_B
    ) %>%
    select(-c(parameter_coverage_A, parameter_coverage_B))
  
  
  # reverse later cruise to cruise A
  xover_basin_A <- xover_basin %>%
    filter(date_A > date_B)
  
  xover_basin_B <- xover_basin %>%
    filter(date_A <= date_B)
  
  xover_basin_B_rev <- m_xover_reverse(df = xover_basin_B)
  
  
  xover_basin <- bind_rows(xover_basin_A,
                           xover_basin_B_rev)
  
  rm(xover_basin_A,
     xover_basin_B,
     xover_basin_B_rev)
  
  
  if (exists("xover_basin_all")) {
    xover_basin_all <-
      bind_rows(xover_basin_all, xover_basin)
  }
  
  if (!exists("xover_basin_all")) {
    xover_basin_all <- xover_basin
  }
  
  print(
    xover_basin %>%
      filter(
        !is.na(offset_adj),
        parameter %in% c("talk", "tco2"),
        parameter_coverage == "full"
      ) %>%
      mutate(offset_adj = cut(
        offset_adj, c(-Inf, -5, -2, -1, 1, 2, 5, Inf)
      )) %>%
      group_split(parameter) %>%
      # head(1) %>%
      map(
        ~ ggplot(data = .x,
                 aes(
                   date_A, date_B, fill = offset_adj, size = n
                 )) +
          geom_point(alpha = 0.5, shape = 21) +
          scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
          labs(title = paste(i_basin, "|", .x$parameter, "| full")) +
          coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                      ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
      )
  )
  
  print(
    xover_basin %>%
      filter(
        !is.na(offset_adj),
        parameter %in% c("phosphate"),
        parameter_coverage == "full"
      ) %>%
      mutate(offset_adj = cut(
        offset_adj, 1 + c(-Inf, -5, -2, -1, 1, 2, 5, Inf) /
          100
      )) %>%
      group_split(parameter) %>%
      # head(1) %>%
      map(
        ~ ggplot(data = .x,
                 aes(
                   date_A, date_B, fill = offset_adj, size = n
                 )) +
          geom_point(alpha = 0.5, shape = 21) +
          scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
          labs(title = paste(i_basin, "|", .x$parameter, "| full")) +
          coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                      ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
      )
  )
  
  print(
    xover_basin %>%
      filter(!is.na(offset_adj),
             parameter %in% c("talk", "tco2")) %>%
      mutate(offset_adj = cut(
        offset_adj, c(-Inf, -5, -2, -1, 1, 2, 5, Inf)
      )) %>%
      group_split(parameter) %>%
      # head(1) %>%
      map(
        ~ ggplot(data = .x,
                 aes(
                   date_A, date_B, fill = offset_adj, size = n
                 )) +
          geom_point(alpha = 0.5, shape = 21) +
          scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
          labs(title = paste(i_basin, "|", .x$parameter, "| partial")) +
          coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                      ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
      )
  )
  
  print(
    xover_basin %>%
      filter(!is.na(offset_adj),
             parameter %in% c("phosphate")) %>%
      mutate(offset_adj = cut(
        offset_adj, 1 + c(-Inf, -5, -2, -1, 1, 2, 5, Inf) /
          100
      )) %>%
      group_split(basin, parameter) %>%
      # head(1) %>%
      map(
        ~ ggplot(data = .x,
                 aes(
                   date_A, date_B, fill = offset_adj, size = n
                 )) +
          geom_point(alpha = 0.5, shape = 21) +
          scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
          labs(title = paste(i_basin, "|", .x$parameter, "| partial")) +
          coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                      ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
      )
  )
  
}

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
25fef5b jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
25fef5b jens-daniel-mueller 2022-03-11
[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
ee27ba1 jens-daniel-mueller 2022-03-14
84ca078 jens-daniel-mueller 2022-03-11
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
84ca078 jens-daniel-mueller 2022-03-11

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11
[[1]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
744b90f jens-daniel-mueller 2022-03-11
84ca078 jens-daniel-mueller 2022-03-11

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05

[[1]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05

[[2]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05

[[1]]

Version Author Date
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
37dce62 jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
rm(xover_basin, GLODAP_basin, GLODAP_basin_grid, expocodes_basin)

xover_basin <- xover_basin_all
rm(xover_basin_all)


# xover_basin_18LU20080702 <- xover_basin %>%
#   filter(cruise_A == "18LU20080702" |
#            cruise_B == "18LU20080702",
#          parameter_coverage == "full")
# 
# 
# map +
#   geom_tile(data = GLODAP %>%
#               filter(cruise_expocode == "18LU20080702") %>%
#               distinct(lon, lat),
#             aes(lon, lat))

7.3.2 Cruise-by-cruise C*

xover_basin <- xover_basin %>% 
    group_by(basin,
             cruise_A,
             cruise_B,
             date_A,
             date_B,
             n_A,
             n_B,
             n,
             parameter,
             parameter_coverage) %>%
    summarise(
      # offset_adj_sd = sd(offset_adj, na.rm = TRUE),
      offset_adj = mean(offset_adj, na.rm = TRUE)
    ) %>%
    ungroup()

# xover_basin %>% 
#   ggplot(aes(offset_adj_sd)) +
#   geom_histogram() +
#   facet_grid(basin ~ parameter, scales = "free_x")

xover_basin <- xover_basin %>% 
  filter(parameter %in% c("tco2", "talk", "phosphate")) %>% 
  pivot_wider(names_from = parameter,
              values_from = offset_adj)

GLODAP_deep_phosphate <- GLODAP %>% 
  filter(depth > 1500) %>% 
  group_by(basin) %>% 
  summarise(phosphate_mean = mean(phosphate, na.rm = TRUE)) %>% 
  ungroup()

xover_basin <- full_join(xover_basin,
                               GLODAP_deep_phosphate)

rm(GLODAP_deep_phosphate)

xover_basin <- xover_basin %>%
  mutate(
    cstar_tco2 = tco2,
    cstar_talk = -0.5 * talk,
    phosphate_fac = phosphate - 1,
    cstar_phosphate = -117 * phosphate_fac * phosphate_mean - 16 * 0.5 * phosphate_fac * phosphate_mean
  ) %>% 
  select(-phosphate_fac)


xover_basin %>%
  select(starts_with("cstar")) %>% 
  pivot_longer(starts_with("cstar"),
              names_to = "parameter",
              values_to = "value") %>% 
  ggplot(aes(value)) +
  geom_histogram() +
  facet_wrap(~parameter, scales = "free_x")

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
xover_basin <- xover_basin %>% 
  select(-c(phosphate_mean, tco2, talk))

xover_basin <- xover_basin %>% 
  mutate(cstar_total = cstar_tco2 + cstar_talk + cstar_phosphate,
         cstar_tco2_talk = cstar_tco2 + cstar_talk) %>% 
  pivot_longer(phosphate:cstar_tco2_talk,
               names_to = "parameter",
               values_to = "offset_adj")

xover_basin <- xover_basin %>% 
  drop_na()
xover_basin %>%
  filter(parameter_coverage == "full") %>% 
  # filter(basin == "N. Pacific") %>% 
  mutate(offset_adj = cut(offset_adj, c(-Inf, -5, -2, -1, 1, 2, 5, Inf))) %>%
  group_split(basin, parameter) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(
               date_A, date_B, fill = offset_adj, size = n
             )) +
      geom_point(alpha = 0.5, shape = 21) +
      scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
      labs(title = paste(.x$basin, "|", .x$parameter, "| full")) +
      coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                  ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[9]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14

[[10]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[11]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[12]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[13]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[14]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[15]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[16]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[17]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[18]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[19]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[20]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[21]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[22]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[23]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[24]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[25]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[26]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[27]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[28]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[29]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[30]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14
xover_basin %>%
  mutate(offset_adj = cut(offset_adj, c(-Inf, -5, -2, -1, 1, 2, 5, Inf))) %>%
  # filter(basin == "N. Pacific") %>% 
  group_split(basin, parameter) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(
               date_A, date_B, fill = offset_adj, size = n
             )) +
      geom_point(alpha = 0.5, shape = 21) +
      scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
      labs(title = paste(.x$basin, "|", .x$parameter, "| partial")) +
      coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
                  ylim = c(ymd("1990-01-01"), ymd("2021-01-01")))
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[9]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
1f48613 jens-daniel-mueller 2022-03-14

[[10]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[11]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[12]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[13]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[14]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[15]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[16]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[17]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[18]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[19]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[20]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[21]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[22]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[23]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[24]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[25]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[26]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[27]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[28]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[29]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[30]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
xover_basin %>%
  mutate(offset_adj = cut(offset_adj, c(-Inf, -5, -2, -1, 1, 2, 5, Inf))) %>%
  filter(parameter_coverage == "full") %>%
  ggplot(aes(date_A, date_B, fill = offset_adj, size = n)) +
  geom_point(alpha = 0.5, shape = 21) +
  scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
  coord_fixed(xlim = c(ymd("1990-01-01"), ymd("2021-01-01")),
              ylim = c(ymd("1990-01-01"), ymd("2021-01-01"))) +
  facet_grid(basin ~ parameter)

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

7.3.3 Cruise-by-cruise annual mean

xover_basin_annual <- xover_basin %>% 
  filter(parameter_coverage == "full") %>% 
  mutate(date_A = year(date_A),
         date_B = year(date_B)) %>% 
  group_by(date_A, date_B, parameter, basin) %>% 
  summarise(offset_adj_weighted_mean = weighted.mean(offset_adj, w = n),
            n = mean(n)) %>% 
  ungroup()

xover_basin_annual %>%
  mutate(offset_adj_weighted_mean = cut(offset_adj_weighted_mean, c(-Inf, -5, -2, -1, 1, 2, 5, Inf))) %>%
  group_split(basin, parameter) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(
               date_A, date_B, fill = offset_adj_weighted_mean, size = n)) +
      geom_point(shape = 21) +
      scale_fill_discrete_diverging(palette = "Blue-Red", drop = FALSE) +
      labs(title = paste(.x$basin, "|", .x$parameter, "| full")) +
      coord_fixed(xlim = c(1990,2021),
                  ylim = c(1990,2021))
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
1f48613 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[9]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[10]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[11]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[12]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[13]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[14]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[15]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[16]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[17]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[18]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[19]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[20]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
ee27ba1 jens-daniel-mueller 2022-03-14
66761b9 jens-daniel-mueller 2022-03-14

[[21]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[22]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[23]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[24]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[25]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15

[[26]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[27]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[28]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[29]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

[[30]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06

7.3.4 Cruise mean offsets

The aim of the decadal scale analysis is to investigate mean crossover offsets between all cruises from two decades.

expocodes_basin <- unique(c(xover_basin$cruise_A, xover_basin$cruise_B)) 


# loop over each cruises
# determine the mean decadal crossover from other cruises
for (i_cruise_expocode in expocodes_basin) {
  # i_cruise_expocode <- expocodes_basin[1]

  xover_cruise <- m_xover_cruise_extractation(
    df = xover_basin %>% mutate(adjustment_A = 0,
                                adjustment_B = 0,
                                offset = 0),
    expocode = i_cruise_expocode)
  
  xover_cruise <- xover_cruise %>% 
    select(-c(starts_with("adjustment"), offset))

  # calculate long-term mean offsets for cruise
  # Note: weighting is only done based on size of cruise B
  xover_cruise_partial <- xover_cruise %>%
    group_by(cruise_A, date_A, n_A, parameter, basin) %>%
    summarise(
      offset_adj_mean = mean(offset_adj, na.rm = TRUE),
      offset_adj_mean_weighted = weighted.mean(x = offset_adj, w = n_B, na.rm = TRUE)
    ) %>%
    ungroup()
  
  xover_cruise_full <- xover_cruise %>%
    filter(parameter_coverage == "full") %>%
    group_by(cruise_A, date_A, n_A, parameter, basin) %>%
    summarise(
      offset_adj_mean = mean(offset_adj, na.rm = TRUE),
      offset_adj_mean_weighted = weighted.mean(x = offset_adj, w = n_B, na.rm = TRUE)
    ) %>%
    ungroup()
  
  xover_cruise_long_term <- bind_rows(
    xover_cruise_full %>% mutate(parameter_coverage = "full"),
    xover_cruise_partial %>% mutate(parameter_coverage = "partial")
  )
  
  
  rm(xover_cruise_full,
     xover_cruise_partial)
  
  if (exists("xover_cruise_long_term_all")) {
    xover_cruise_long_term_all <-
      bind_rows(xover_cruise_long_term_all, xover_cruise_long_term)
  }
  
  if (!exists("xover_cruise_long_term_all")) {
    xover_cruise_long_term_all <- xover_cruise_long_term
  }
  
  
  # cut cruise B date into decades
  xover_cruise <- xover_cruise %>%
    mutate(decade = m_grid_decade(year(date_B))) %>%
    arrange(date_B)
  
  # calculate decadal mean offsets for cruise
  # Note: weighting is only done based on size of cruise B
  xover_cruise_decade_partial <- xover_cruise %>%
    group_by(cruise_A, date_A, n_A, parameter, decade, basin) %>%
    summarise(
      offset_adj_sd = sd(offset_adj, na.rm = TRUE),
      offset_adj_mean = mean(offset_adj, na.rm = TRUE),
      offset_adj_mean_weighted = weighted.mean(x = offset_adj, w = n_B, na.rm = TRUE)
    ) %>%
    ungroup()
  
  xover_cruise_decade_full <- xover_cruise %>%
    filter(parameter_coverage == "full") %>%
    group_by(cruise_A, date_A, n_A, parameter, decade, basin) %>%
    summarise(
      offset_adj_sd = sd(offset_adj, na.rm = TRUE),
      offset_adj_mean = mean(offset_adj, na.rm = TRUE),
      offset_adj_mean_weighted = weighted.mean(x = offset_adj, w = n_B, na.rm = TRUE)
    ) %>%
    ungroup()
  
  xover_cruise_decade <- bind_rows(
    xover_cruise_decade_full %>% mutate(parameter_coverage = "full"),
    xover_cruise_decade_partial %>% mutate(parameter_coverage = "partial")
  )
  
  
  rm(xover_cruise_decade_full,
     xover_cruise_decade_partial)
  
  if (exists("xover_cruise_decade_all")) {
    xover_cruise_decade_all <-
      bind_rows(xover_cruise_decade_all, xover_cruise_decade)
  }
  
  if (!exists("xover_cruise_decade_all")) {
    xover_cruise_decade_all <- xover_cruise_decade
  }
  
}


hline_intercept <-
  tibble(parameter = unique(xover_basin$parameter)) %>%
  mutate(intercept = if_else(parameter %in% c("phosphate"),
                             1,
                             0))

# xover_cruise_long_term_all %>%
#   filter(parameter_coverage == "full",
#          basin == "N. Pacific",
#          parameter == "phosphate",
#          abs(offset_adj_mean_weighted) > 1.05)

xover_cruise_long_term_all %>%
  filter(parameter_coverage == "full") %>% 
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(date_A, offset_adj_mean_weighted, size = n_A)) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_point(alpha = 0.3) +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ ., scales = "free_y")
  )

[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
9db485e jens-daniel-mueller 2022-02-25
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[2]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[3]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[4]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[5]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
9db485e jens-daniel-mueller 2022-02-25
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15
xover_cruise_decade_all %>%
  filter(parameter_coverage == "full") %>% 
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(date_A, offset_adj_mean_weighted, size = n_A)) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_point(alpha = 0.3) +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ decade, scales = "free_y")
  )

[[1]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[2]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[3]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[4]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
9db485e jens-daniel-mueller 2022-02-25
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15

[[5]]

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
8f9904b jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
744b90f jens-daniel-mueller 2022-03-11
25fef5b jens-daniel-mueller 2022-03-11
e3d1a2b jens-daniel-mueller 2022-03-10
070ca03 jens-daniel-mueller 2022-03-09
6e65117 jens-daniel-mueller 2022-02-16
4a7550e jens-daniel-mueller 2022-02-15
8804a83 jens-daniel-mueller 2022-02-15
e1243c2 jens-daniel-mueller 2022-02-15
xover_cruise_long_term_all <- xover_cruise_long_term_all %>%
  mutate(decade_A = m_grid_decade(year(date_A)))

xover_cruise_long_term_all %>%
  filter(parameter_coverage == "full") %>% 
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(n_A, offset_adj_mean_weighted, size = n_A, fill = decade_A)) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_point(alpha = 0.5, shape = 21) +
      scale_fill_discrete_sequential(palette = "viridis") +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ ., scales = "free_y")
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14
xover_cruise_decade_all <- xover_cruise_decade_all %>%
  mutate(decade_A = m_grid_decade(year(date_A))) 

xover_cruise_decade_all %>%
  filter(parameter_coverage == "full") %>% 
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(n_A, offset_adj_mean_weighted, size = n_A, fill = decade_A)) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_point(alpha = 0.5, shape = 21) +
      scale_fill_discrete_sequential(palette = "viridis") +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ decade, scales = "free_y")
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
8fd2480 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
6aedeb8 jens-daniel-mueller 2022-03-14
ceae601 jens-daniel-mueller 2022-03-14

7.3.4.1 PO

xover_cruise_decade_all %>%
  filter(
    parameter_coverage == "full",
    basin == "N. Pacific",
    decade != unique(xover_cruise_decade_all$decade)[1]
  ) %>%
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(
      data = .x,
      aes(
        n_A,
        offset_adj_mean_weighted,
        size = n_A,
        fill = decade_A
      )
    ) +
      geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_point(alpha = 0.5, shape = 21) +
      scale_fill_discrete_sequential(palette = "viridis") +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ decade, scales = "free_y")
  )
[[1]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14

7.3.5 Decadal averages

xover_cruise_long_term_all %>%
  filter(parameter_coverage == "full") %>%
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(decade_A, offset_adj_mean_weighted)) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_boxplot() +
      geom_point(aes(size = n_A), alpha = 0.3) +
      scale_fill_discrete_sequential(palette = "viridis") +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ ., scales = "free_y")
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
xover_cruise_long_term_all %>%
  group_by(basin, decade_A, parameter_coverage, parameter) %>%
  summarise(
    offset_adj_sd = sd(offset_adj_mean_weighted, na.rm = TRUE),
    offset_adj_mean_weighted = weighted.mean(offset_adj_mean_weighted, w = n_A)
  ) %>%
  ungroup() %>%
  drop_na() %>%
  filter(parameter_coverage == "full") %>%
  ggplot(
    aes(
      decade_A,
      offset_adj_mean_weighted,
      ymin = offset_adj_mean_weighted - offset_adj_sd,
      ymax = offset_adj_mean_weighted + offset_adj_sd
    )
  ) +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_linerange() +
  geom_point() +
  facet_grid(parameter ~ basin, scales = "free_y") +
  # coord_cartesian(ylim = c(-10,10)) +
  theme(axis.text.x = element_text(angle = 90))

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
xover_cruise_decade_all %>%
  filter(parameter_coverage == "full") %>%
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(
      data = .x,
      aes(
        decade_A,
        offset_adj_mean_weighted
      )
    ) +
        geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_boxplot() +
      geom_point(aes(size = n_A), alpha = 0.3) +
      scale_fill_discrete_sequential(palette = "viridis") +
      labs(title = paste(.x$basin, "| full")) +
      # coord_cartesian(ylim = c(-10,10)) +
      facet_grid(parameter ~ decade, scales = "free_y")
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[3]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[4]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[5]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14
xover_cruise_decade_all_stats <- xover_cruise_decade_all %>%
  group_by(basin, decade_A, decade, parameter_coverage, parameter) %>%
  summarise(
    offset_adj_sd = sd(offset_adj_mean_weighted),
    offset_adj_mean_weighted = weighted.mean(offset_adj_mean_weighted, w = n_A)
  ) %>%
  ungroup() %>%
  drop_na() %>%
  filter(parameter_coverage == "full")

xover_cruise_decade_all_stats %>%
  group_split(basin) %>%
  # head(1) %>%
  map(
    ~ ggplot(
      data = .x,
      aes(
        decade_A,
        offset_adj_mean_weighted,
        ymin = offset_adj_mean_weighted - offset_adj_sd,
        ymax = offset_adj_mean_weighted + offset_adj_sd
      )
    ) +
      geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
      geom_linerange() +
      geom_point() +
      labs(title = .x$basin) +
      facet_grid(parameter ~ decade, scales = "free_y") +
      # coord_cartesian(ylim = c(-10,10)) +
      theme(axis.text.x = element_text(angle = 90))
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06
b788368 jens-daniel-mueller 2022-04-06
71f5724 jens-daniel-mueller 2022-04-06
f4c820e jens-daniel-mueller 2022-04-06
1f9c888 jens-daniel-mueller 2022-04-05
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
68c5278 jens-daniel-mueller 2022-03-15
9e284d1 jens-daniel-mueller 2022-03-14
253dc15 jens-daniel-mueller 2022-03-14

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06

[[3]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
278cf74 jens-daniel-mueller 2022-04-06

[[4]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06

[[5]]

Version Author Date
278cf74 jens-daniel-mueller 2022-04-06
xover_cruise_decade_all_stats %>% 
  kable() %>%
  kable_styling() %>%
  scroll_box(height = "300px")
basin decade_A decade parameter_coverage parameter offset_adj_sd offset_adj_mean_weighted
Indian 1989-1999 1989-1999 full cstar_phosphate 0.9631055 -0.1826489
Indian 1989-1999 1989-1999 full cstar_talk 1.2424576 0.1373542
Indian 1989-1999 1989-1999 full cstar_tco2 1.0564448 0.1224673
Indian 1989-1999 1989-1999 full cstar_tco2_talk 1.5618456 0.2598215
Indian 1989-1999 1989-1999 full cstar_total 1.3419899 0.1392754
Indian 1989-1999 1989-1999 full phosphate 0.0033578 1.0006577
Indian 1989-1999 2000-2009 full cstar_phosphate 2.7976918 -1.4212444
Indian 1989-1999 2000-2009 full cstar_talk 1.2271519 -2.0396302
Indian 1989-1999 2000-2009 full cstar_tco2 1.0116962 -2.4013387
Indian 1989-1999 2000-2009 full cstar_tco2_talk 1.0726414 -4.4322588
Indian 1989-1999 2000-2009 full cstar_total 3.4564378 -5.7626271
Indian 1989-1999 2000-2009 full phosphate 0.0097916 1.0050585
Indian 1989-1999 2010-2020 full cstar_phosphate 1.9491732 -1.5370083
Indian 1989-1999 2010-2020 full cstar_talk 1.0551398 -1.9062670
Indian 1989-1999 2010-2020 full cstar_tco2 1.5527528 -1.3398019
Indian 1989-1999 2010-2020 full cstar_tco2_talk 1.7526136 -3.2460689
Indian 1989-1999 2010-2020 full cstar_total 2.3768977 -4.8299192
Indian 1989-1999 2010-2020 full phosphate 0.0068743 1.0054067
Indian 2000-2009 1989-1999 full cstar_phosphate 1.5481489 1.3617898
Indian 2000-2009 1989-1999 full cstar_talk 0.8491657 2.3770500
Indian 2000-2009 1989-1999 full cstar_tco2 0.9953539 2.1820878
Indian 2000-2009 1989-1999 full cstar_tco2_talk 1.1282869 4.5615973
Indian 2000-2009 1989-1999 full cstar_total 2.5521002 5.9071792
Indian 2000-2009 1989-1999 full phosphate 0.0053715 0.9952751
Indian 2000-2009 2000-2009 full cstar_phosphate 1.3681917 -0.7053242
Indian 2000-2009 2000-2009 full cstar_talk 0.8455740 0.2388593
Indian 2000-2009 2000-2009 full cstar_tco2 3.1444963 -0.7415573
Indian 2000-2009 2000-2009 full cstar_tco2_talk 2.3546141 -0.5026980
Indian 2000-2009 2000-2009 full cstar_total 3.2327337 -1.2080222
Indian 2000-2009 2000-2009 full phosphate 0.0047269 1.0024547
Indian 2000-2009 2010-2020 full cstar_phosphate 1.1956580 -0.6178377
Indian 2000-2009 2010-2020 full cstar_talk 0.4522808 -0.6743647
Indian 2000-2009 2010-2020 full cstar_tco2 1.4503446 0.3482799
Indian 2000-2009 2010-2020 full cstar_tco2_talk 1.2156743 -0.3785022
Indian 2000-2009 2010-2020 full cstar_total 1.7084040 -1.0971634
Indian 2000-2009 2010-2020 full phosphate 0.0041476 1.0021605
Indian 2010-2020 1989-1999 full cstar_phosphate 0.4838364 1.2571975
Indian 2010-2020 1989-1999 full cstar_talk 0.6533940 2.0861444
Indian 2010-2020 1989-1999 full cstar_tco2 2.2185765 1.8344808
Indian 2010-2020 1989-1999 full cstar_tco2_talk 2.2311179 3.9206252
Indian 2010-2020 1989-1999 full cstar_total 2.4527398 5.3403599
Indian 2010-2020 1989-1999 full phosphate 0.0016787 0.9956380
Indian 2010-2020 2000-2009 full cstar_phosphate 1.7372188 0.9188737
Indian 2010-2020 2000-2009 full cstar_talk 0.3475233 0.7699599
Indian 2010-2020 2000-2009 full cstar_tco2 3.2147801 -0.8264844
Indian 2010-2020 2000-2009 full cstar_tco2_talk 3.1986717 0.0195429
Indian 2010-2020 2000-2009 full cstar_total 1.6905531 0.8995135
Indian 2010-2020 2000-2009 full phosphate 0.0060275 0.9968119
N. Atlantic 1989-1999 1989-1999 full cstar_phosphate 1.8522680 0.0380725
N. Atlantic 1989-1999 1989-1999 full cstar_talk 0.7821484 0.0300445
N. Atlantic 1989-1999 1989-1999 full cstar_tco2 2.7996690 -0.0817260
N. Atlantic 1989-1999 1989-1999 full cstar_tco2_talk 2.3104955 -0.0516815
N. Atlantic 1989-1999 1989-1999 full cstar_total 3.6864755 -0.0136091
N. Atlantic 1989-1999 1989-1999 full phosphate 0.0125717 0.9998684
N. Atlantic 1989-1999 2000-2009 full cstar_phosphate 4.8433632 0.0539574
N. Atlantic 1989-1999 2000-2009 full cstar_talk 1.2732581 -0.2241677
N. Atlantic 1989-1999 2000-2009 full cstar_tco2 1.6783162 -1.9948989
N. Atlantic 1989-1999 2000-2009 full cstar_tco2_talk 1.4210953 -2.2190666
N. Atlantic 1989-1999 2000-2009 full cstar_total 2.9743525 -2.4779484
N. Atlantic 1989-1999 2000-2009 full phosphate 0.0298682 1.0002473
N. Atlantic 1989-1999 2010-2020 full cstar_phosphate 1.6190169 0.6525501
N. Atlantic 1989-1999 2010-2020 full cstar_talk 1.2065681 -0.0100468
N. Atlantic 1989-1999 2010-2020 full cstar_tco2 3.5527365 -4.2445403
N. Atlantic 1989-1999 2010-2020 full cstar_tco2_talk 3.0584075 -4.0768213
N. Atlantic 1989-1999 2010-2020 full cstar_total 4.5807196 -2.6425977
N. Atlantic 1989-1999 2010-2020 full phosphate 0.0104615 0.9958570
N. Atlantic 2000-2009 1989-1999 full cstar_phosphate 4.2749016 -0.5778945
N. Atlantic 2000-2009 1989-1999 full cstar_talk 1.1714038 0.3841504
N. Atlantic 2000-2009 1989-1999 full cstar_tco2 2.5424426 2.3950842
N. Atlantic 2000-2009 1989-1999 full cstar_tco2_talk 2.3725451 2.7792345
N. Atlantic 2000-2009 1989-1999 full cstar_total 4.3430704 2.5051509
N. Atlantic 2000-2009 1989-1999 full phosphate 0.0279895 1.0037837
N. Atlantic 2000-2009 2000-2009 full cstar_phosphate 2.1723560 -0.1020065
N. Atlantic 2000-2009 2000-2009 full cstar_talk 1.3523082 0.0211256
N. Atlantic 2000-2009 2000-2009 full cstar_tco2 1.8578489 0.1695433
N. Atlantic 2000-2009 2000-2009 full cstar_tco2_talk 2.2189836 0.1906689
N. Atlantic 2000-2009 2000-2009 full cstar_total 3.1817616 -0.1220870
N. Atlantic 2000-2009 2000-2009 full phosphate 0.0144409 1.0008083
N. Atlantic 2000-2009 2010-2020 full cstar_phosphate 1.6924360 -0.0797780
N. Atlantic 2000-2009 2010-2020 full cstar_talk 1.7415208 0.4601185
N. Atlantic 2000-2009 2010-2020 full cstar_tco2 1.5809408 -2.1016211
N. Atlantic 2000-2009 2010-2020 full cstar_tco2_talk 1.9126218 -1.9470059
N. Atlantic 2000-2009 2010-2020 full cstar_total 2.7052815 -2.4149582
N. Atlantic 2000-2009 2010-2020 full phosphate 0.0112367 1.0006677
N. Atlantic 2010-2020 1989-1999 full cstar_phosphate 1.8121239 -0.7423459
N. Atlantic 2010-2020 1989-1999 full cstar_talk 3.4551205 0.1980788
N. Atlantic 2010-2020 1989-1999 full cstar_tco2 4.4816869 3.7545364
N. Atlantic 2010-2020 1989-1999 full cstar_tco2_talk 5.8781328 4.0287865
N. Atlantic 2010-2020 1989-1999 full cstar_total 7.1281814 3.4634167
N. Atlantic 2010-2020 1989-1999 full phosphate 0.0118647 1.0048604
N. Atlantic 2010-2020 2000-2009 full cstar_phosphate 1.5687865 -0.2176621
N. Atlantic 2010-2020 2000-2009 full cstar_talk 4.0006327 -0.3790497
N. Atlantic 2010-2020 2000-2009 full cstar_tco2 1.8189240 2.0536913
N. Atlantic 2010-2020 2000-2009 full cstar_tco2_talk 4.7110837 1.9294120
N. Atlantic 2010-2020 2000-2009 full cstar_total 5.3005704 1.8472916
N. Atlantic 2010-2020 2000-2009 full phosphate 0.0102715 1.0014251
N. Atlantic 2010-2020 2010-2020 full cstar_phosphate 1.6764219 -0.5296656
N. Atlantic 2010-2020 2010-2020 full cstar_talk 4.8546717 -0.1181060
N. Atlantic 2010-2020 2010-2020 full cstar_tco2 2.3214161 -0.2500351
N. Atlantic 2010-2020 2010-2020 full cstar_tco2_talk 6.4542485 -0.4887707
N. Atlantic 2010-2020 2010-2020 full cstar_total 6.2593449 -0.9725758
N. Atlantic 2010-2020 2010-2020 full phosphate 0.0109467 1.0035063
N. Pacific 1989-1999 1989-1999 full cstar_phosphate 2.9031457 0.3388906
N. Pacific 1989-1999 1989-1999 full cstar_talk 1.5435045 0.2918820
N. Pacific 1989-1999 1989-1999 full cstar_tco2 2.4179817 0.2454546
N. Pacific 1989-1999 1989-1999 full cstar_tco2_talk 2.4524715 0.0002714
N. Pacific 1989-1999 1989-1999 full cstar_total 4.6338280 -0.1223613
N. Pacific 1989-1999 1989-1999 full phosphate 0.0087031 0.9990988
N. Pacific 1989-1999 2000-2009 full cstar_phosphate 2.2106020 1.9013209
N. Pacific 1989-1999 2000-2009 full cstar_talk 0.9325883 -0.7682435
N. Pacific 1989-1999 2000-2009 full cstar_tco2 1.8440585 -0.9353876
N. Pacific 1989-1999 2000-2009 full cstar_tco2_talk 1.9176931 -1.7372839
N. Pacific 1989-1999 2000-2009 full cstar_total 2.9806332 -0.0628394
N. Pacific 1989-1999 2000-2009 full phosphate 0.0065463 0.9944274
N. Pacific 1989-1999 2010-2020 full cstar_phosphate 2.9398619 -0.0561962
N. Pacific 1989-1999 2010-2020 full cstar_talk 0.7782306 -1.1099437
N. Pacific 1989-1999 2010-2020 full cstar_tco2 3.1072283 -0.6622350
N. Pacific 1989-1999 2010-2020 full cstar_tco2_talk 3.7988852 -1.8010645
N. Pacific 1989-1999 2010-2020 full cstar_total 5.4933185 -2.7533715
N. Pacific 1989-1999 2010-2020 full phosphate 0.0088138 1.0003003
N. Pacific 2000-2009 1989-1999 full cstar_phosphate 1.7564117 -1.7332870
N. Pacific 2000-2009 1989-1999 full cstar_talk 0.6795082 0.6840389
N. Pacific 2000-2009 1989-1999 full cstar_tco2 1.9871125 0.6181486
N. Pacific 2000-2009 1989-1999 full cstar_tco2_talk 2.1242334 1.2728314
N. Pacific 2000-2009 1989-1999 full cstar_total 2.8283687 -0.3992048
N. Pacific 2000-2009 1989-1999 full phosphate 0.0052770 1.0052076
N. Pacific 2000-2009 2000-2009 full cstar_phosphate 1.4722027 0.0578617
N. Pacific 2000-2009 2000-2009 full cstar_talk 0.7311559 -0.0934746
N. Pacific 2000-2009 2000-2009 full cstar_tco2 1.4445345 0.0574401
N. Pacific 2000-2009 2000-2009 full cstar_tco2_talk 1.3123636 -0.0636844
N. Pacific 2000-2009 2000-2009 full cstar_total 2.0223104 0.0204029
N. Pacific 2000-2009 2000-2009 full phosphate 0.0044159 0.9998675
N. Pacific 2000-2009 2010-2020 full cstar_phosphate 1.5728654 -2.0744786
N. Pacific 2000-2009 2010-2020 full cstar_talk 0.9337861 -1.2926457
N. Pacific 2000-2009 2010-2020 full cstar_tco2 1.5222497 0.2040770
N. Pacific 2000-2009 2010-2020 full cstar_tco2_talk 1.2867327 -1.0930911
N. Pacific 2000-2009 2010-2020 full cstar_total 2.2252692 -2.9708510
N. Pacific 2000-2009 2010-2020 full phosphate 0.0047591 1.0063129
N. Pacific 2010-2020 1989-1999 full cstar_phosphate 4.0064477 0.8913650
N. Pacific 2010-2020 1989-1999 full cstar_talk 1.8676394 1.3668892
N. Pacific 2010-2020 1989-1999 full cstar_tco2 1.9428379 1.3745740
N. Pacific 2010-2020 1989-1999 full cstar_tco2_talk 3.0886499 2.7671480
N. Pacific 2010-2020 1989-1999 full cstar_total 3.9362856 4.0920284
N. Pacific 2010-2020 1989-1999 full phosphate 0.0120372 0.9973219
N. Pacific 2010-2020 2000-2009 full cstar_phosphate 2.1182107 2.4417286
N. Pacific 2010-2020 2000-2009 full cstar_talk 1.0728870 1.0267488
N. Pacific 2010-2020 2000-2009 full cstar_tco2 2.2154265 0.6041904
N. Pacific 2010-2020 2000-2009 full cstar_tco2_talk 2.5942542 1.6645951
N. Pacific 2010-2020 2000-2009 full cstar_total 3.2604867 3.9058408
N. Pacific 2010-2020 2000-2009 full phosphate 0.0063640 0.9926640
N. Pacific 2010-2020 2010-2020 full cstar_phosphate 1.7076262 -0.0018951
N. Pacific 2010-2020 2010-2020 full cstar_talk 1.1080617 0.0185797
N. Pacific 2010-2020 2010-2020 full cstar_tco2 2.0383124 0.3148970
N. Pacific 2010-2020 2010-2020 full cstar_tco2_talk 1.9439389 0.2723060
N. Pacific 2010-2020 2010-2020 full cstar_total 2.7134913 0.4668651
N. Pacific 2010-2020 2010-2020 full phosphate 0.0051451 1.0000280
S. Atlantic 1989-1999 1989-1999 full cstar_phosphate 3.6533666 0.6772111
S. Atlantic 1989-1999 1989-1999 full cstar_talk 0.6802367 -0.1260930
S. Atlantic 1989-1999 1989-1999 full cstar_tco2 0.1127128 -0.0208932
S. Atlantic 1989-1999 1989-1999 full cstar_tco2_talk 0.7929495 -0.1469861
S. Atlantic 1989-1999 1989-1999 full cstar_total 2.8604170 0.5302250
S. Atlantic 1989-1999 1989-1999 full phosphate 0.0151919 0.9972416
S. Atlantic 1989-1999 2000-2009 full cstar_phosphate 1.9046798 2.1817999
S. Atlantic 1989-1999 2000-2009 full cstar_talk 0.2281703 0.7895083
S. Atlantic 1989-1999 2000-2009 full cstar_tco2 7.7139130 -2.2350374
S. Atlantic 1989-1999 2000-2009 full cstar_tco2_talk 7.8530770 -1.4273608
S. Atlantic 1989-1999 2000-2009 full cstar_total 5.8241503 0.3667068
S. Atlantic 1989-1999 2000-2009 full phosphate 0.0078051 0.9911257
S. Atlantic 1989-1999 2010-2020 full cstar_phosphate 1.7188044 0.6262581
S. Atlantic 1989-1999 2010-2020 full cstar_talk 1.4361594 -0.3308193
S. Atlantic 1989-1999 2010-2020 full cstar_tco2 4.6065674 -3.0446853
S. Atlantic 1989-1999 2010-2020 full cstar_tco2_talk 5.5140668 -3.3119987
S. Atlantic 1989-1999 2010-2020 full cstar_total 5.4092137 -2.5732439
S. Atlantic 1989-1999 2010-2020 full phosphate 0.0071103 0.9974669
S. Atlantic 2000-2009 1989-1999 full cstar_phosphate 9.5332955 -3.5368321
S. Atlantic 2000-2009 1989-1999 full cstar_talk 1.1677518 -0.6765031
S. Atlantic 2000-2009 1989-1999 full cstar_tco2 7.9800308 6.5653714
S. Atlantic 2000-2009 1989-1999 full cstar_tco2_talk 7.9389829 5.3320389
S. Atlantic 2000-2009 1989-1999 full cstar_total 5.7778471 2.4695920
S. Atlantic 2000-2009 1989-1999 full phosphate 0.0398555 1.0147863
S. Atlantic 2000-2009 2000-2009 full cstar_phosphate 2.2482082 -0.0277733
S. Atlantic 2000-2009 2000-2009 full cstar_talk 1.7408291 0.0496895
S. Atlantic 2000-2009 2000-2009 full cstar_tco2 1.8629766 -0.0178403
S. Atlantic 2000-2009 2000-2009 full cstar_tco2_talk 2.1431749 0.0318492
S. Atlantic 2000-2009 2000-2009 full cstar_total 1.1911401 0.0040758
S. Atlantic 2000-2009 2000-2009 full phosphate 0.0094163 1.0001700
S. Atlantic 2000-2009 2010-2020 full cstar_phosphate 2.1104503 0.0675796
S. Atlantic 2000-2009 2010-2020 full cstar_talk 0.9558312 -0.4722264
S. Atlantic 2000-2009 2010-2020 full cstar_tco2 1.2956370 -0.0742287
S. Atlantic 2000-2009 2010-2020 full cstar_tco2_talk 1.4839610 -0.5022185
S. Atlantic 2000-2009 2010-2020 full cstar_total 2.0043336 -0.2365135
S. Atlantic 2000-2009 2010-2020 full phosphate 0.0087869 0.9998224
S. Atlantic 2010-2020 1989-1999 full cstar_phosphate 2.5262567 -0.8890334
S. Atlantic 2010-2020 1989-1999 full cstar_talk 1.6787756 0.8356001
S. Atlantic 2010-2020 1989-1999 full cstar_tco2 6.1654300 4.4404975
S. Atlantic 2010-2020 1989-1999 full cstar_tco2_talk 5.8218178 4.5771264
S. Atlantic 2010-2020 1989-1999 full cstar_total 5.7454956 3.4593799
S. Atlantic 2010-2020 1989-1999 full phosphate 0.0105614 1.0037168
S. Atlantic 2010-2020 2000-2009 full cstar_phosphate 1.9934759 0.1835053
S. Atlantic 2010-2020 2000-2009 full cstar_talk 1.3803286 0.0115315
S. Atlantic 2010-2020 2000-2009 full cstar_tco2 1.4822194 0.6081081
S. Atlantic 2010-2020 2000-2009 full cstar_tco2_talk 1.1413353 0.5923754
S. Atlantic 2010-2020 2000-2009 full cstar_total 2.1756294 0.1192100
S. Atlantic 2010-2020 2000-2009 full phosphate 0.0083341 0.9992328
S. Atlantic 2010-2020 2010-2020 full cstar_phosphate 1.9223583 0.0348204
S. Atlantic 2010-2020 2010-2020 full cstar_talk 0.7182158 -0.1272320
S. Atlantic 2010-2020 2010-2020 full cstar_tco2 0.8406877 -0.1814046
S. Atlantic 2010-2020 2010-2020 full cstar_tco2_talk 1.2494336 -0.3086366
S. Atlantic 2010-2020 2010-2020 full cstar_total 2.1585380 -0.4428466
S. Atlantic 2010-2020 2010-2020 full phosphate 0.0080742 0.9998886
S. Pacific 1989-1999 1989-1999 full cstar_phosphate 4.1582519 0.7920472
S. Pacific 1989-1999 1989-1999 full cstar_talk 2.7658889 1.4486098
S. Pacific 1989-1999 1989-1999 full cstar_tco2 6.3673715 -0.1635956
S. Pacific 1989-1999 1989-1999 full cstar_tco2_talk 5.1318721 1.2850141
S. Pacific 1989-1999 1989-1999 full cstar_total 4.6394862 2.0770613
S. Pacific 1989-1999 1989-1999 full phosphate 0.0138831 0.9973662
S. Pacific 1989-1999 2000-2009 full cstar_phosphate 1.9420170 0.5674330
S. Pacific 1989-1999 2000-2009 full cstar_talk 1.7730696 -1.5479623
S. Pacific 1989-1999 2000-2009 full cstar_tco2 1.4835990 -0.8184435
S. Pacific 1989-1999 2000-2009 full cstar_tco2_talk 2.1583655 -2.3664058
S. Pacific 1989-1999 2000-2009 full cstar_total 2.8186849 -1.7299117
S. Pacific 1989-1999 2000-2009 full phosphate 0.0065153 0.9981938
S. Pacific 1989-1999 2010-2020 full cstar_phosphate 2.1211612 -2.0288647
S. Pacific 1989-1999 2010-2020 full cstar_talk 1.5462129 -1.8777213
S. Pacific 1989-1999 2010-2020 full cstar_tco2 2.4227098 -0.8670115
S. Pacific 1989-1999 2010-2020 full cstar_tco2_talk 2.4713188 -2.8215740
S. Pacific 1989-1999 2010-2020 full cstar_total 4.6502488 -5.3178726
S. Pacific 1989-1999 2010-2020 full phosphate 0.0072208 1.0069120
S. Pacific 2000-2009 1989-1999 full cstar_phosphate 2.3684822 -0.7504913
S. Pacific 2000-2009 1989-1999 full cstar_talk 1.6815418 1.5855362
S. Pacific 2000-2009 1989-1999 full cstar_tco2 1.3979418 0.7348857
S. Pacific 2000-2009 1989-1999 full cstar_tco2_talk 2.2623636 2.3204219
S. Pacific 2000-2009 1989-1999 full cstar_total 3.3417172 1.5530038
S. Pacific 2000-2009 1989-1999 full phosphate 0.0079519 1.0025197
S. Pacific 2000-2009 2000-2009 full cstar_phosphate 2.2375600 0.0439794
S. Pacific 2000-2009 2000-2009 full cstar_talk 1.2215948 0.2757532
S. Pacific 2000-2009 2000-2009 full cstar_tco2 0.9536733 0.1713150
S. Pacific 2000-2009 2000-2009 full cstar_tco2_talk 1.3685486 0.4470682
S. Pacific 2000-2009 2000-2009 full cstar_total 2.5610377 0.4910475
S. Pacific 2000-2009 2000-2009 full phosphate 0.0074940 0.9998962
S. Pacific 2000-2009 2010-2020 full cstar_phosphate 1.7509078 -2.5949941
S. Pacific 2000-2009 2010-2020 full cstar_talk 1.3340678 -0.0871107
S. Pacific 2000-2009 2010-2020 full cstar_tco2 1.6975147 -0.1675842
S. Pacific 2000-2009 2010-2020 full cstar_tco2_talk 2.1307431 -0.2546949
S. Pacific 2000-2009 2010-2020 full cstar_total 2.6914748 -2.7956901
S. Pacific 2000-2009 2010-2020 full phosphate 0.0059244 1.0088555
S. Pacific 2010-2020 1989-1999 full cstar_phosphate 2.6418701 1.1726029
S. Pacific 2010-2020 1989-1999 full cstar_talk 1.0183265 2.3136041
S. Pacific 2010-2020 1989-1999 full cstar_tco2 1.6994755 1.1889559
S. Pacific 2010-2020 1989-1999 full cstar_tco2_talk 2.4287326 3.7274536
S. Pacific 2010-2020 1989-1999 full cstar_total 3.6135539 4.8656204
S. Pacific 2010-2020 1989-1999 full phosphate 0.0088698 0.9960631
S. Pacific 2010-2020 2000-2009 full cstar_phosphate 2.9870181 2.0749873
S. Pacific 2010-2020 2000-2009 full cstar_talk 1.1451987 0.0705806
S. Pacific 2010-2020 2000-2009 full cstar_tco2 3.0541102 0.4398590
S. Pacific 2010-2020 2000-2009 full cstar_tco2_talk 2.7395312 0.5104396
S. Pacific 2010-2020 2000-2009 full cstar_total 4.5422088 2.5728304
S. Pacific 2010-2020 2000-2009 full phosphate 0.0100286 0.9930335
S. Pacific 2010-2020 2010-2020 full cstar_phosphate 1.5895703 0.4640673
S. Pacific 2010-2020 2010-2020 full cstar_talk 0.7488920 -0.1388110
S. Pacific 2010-2020 2010-2020 full cstar_tco2 1.4520040 0.2659588
S. Pacific 2010-2020 2010-2020 full cstar_tco2_talk 1.4547771 0.1271478
S. Pacific 2010-2020 2010-2020 full cstar_total 2.0109284 0.5202557
S. Pacific 2010-2020 2010-2020 full phosphate 0.0053542 0.9984722

8 RV activity

GLODAP_counts <- GLODAP %>%
  mutate(decade = m_grid_decade(year),
         .after = year) %>% 
  filter(!is.na(decade))

GLODAP_counts <- GLODAP_counts %>% 
  mutate(RV = str_sub(cruise_expocode, 1, 4))

RV_activity <- GLODAP_counts %>% 
  count(decade, basin_AIP, RV) %>% 
  group_by(decade, basin_AIP) %>% 
  mutate(n_total = sum(n)) %>% 
  ungroup() %>% 
  mutate(n_prop = 100* n / n_total)

RV_activity <-RV_activity %>% 
  group_by(decade, basin_AIP) %>% 
  mutate(rank = rank(-n_prop)) %>% 
  ungroup()

RV_activity %>% 
  ggplot(aes(rank, n_prop)) +
  geom_line() +
  geom_point() +
  geom_text(data = RV_activity %>% filter(n_prop > 20),
             aes(rank, n_prop, label = RV),
             nudge_x = 5) +
  labs(y = "proportion of tco2 samples (%)") +
  facet_grid(decade ~ basin_AIP)

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
daa43b9 jens-daniel-mueller 2021-12-06
rm(RV_activity)

9 Largest cruises

large_cruises <- GLODAP_counts %>% 
  count(decade, basin_AIP, cruise_expocode) %>% 
  group_by(decade, basin_AIP) %>% 
  mutate(n_total = sum(n)) %>% 
  ungroup() %>% 
  mutate(n_prop = 100* n / n_total)

large_cruises <- large_cruises %>% 
  group_by(decade, basin_AIP) %>% 
  mutate(rank = rank(-n_prop)) %>% 
  ungroup()


large_cruises %>%
  group_split(decade, basin_AIP) %>%
  head(1) %>%
  map(
    ~
      ggplot(data = .x,
             aes(rank, n_prop)) +
      geom_line() +
      geom_point(
        data = .x %>% filter(rank <= 5),
        aes(rank, n_prop, fill = cruise_expocode), shape = 21) +
      scale_fill_brewer(palette = "Set1") +
      xlim(0, max(large_cruises$rank)) +
      labs(y = "proportion of tco2 samples (%)") +
      facet_grid(decade ~ basin_AIP)
  )
[[1]]

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9075296 jens-daniel-mueller 2022-01-12
large_cruises %>%
  filter(rank <= 5) %>% 
  select(decade, basin_AIP, rank, n_prop, cruise_expocode) %>% 
  mutate(n_prop = round(n_prop, 1)) %>% 
  arrange(decade, basin_AIP, rank) %>% 
  kable() %>% 
  kable_styling() %>% 
  scroll_box(height = "300px")
decade basin_AIP rank n_prop cruise_expocode
1989-1999 Atlantic 1 5.0 323019940104
1989-1999 Atlantic 2 4.9 316N19871123
1989-1999 Atlantic 3 3.5 33RO19980123
1989-1999 Atlantic 4 3.5 06AQ19980328
1989-1999 Atlantic 5 3.3 316N19970530
1989-1999 Indian 1 7.8 316N19951202
1989-1999 Indian 2 7.8 316N19950124
1989-1999 Indian 3 7.5 316N19950310
1989-1999 Indian 4 7.1 316N19950829
1989-1999 Indian 5 6.8 316N19941201
1989-1999 Pacific 1 5.7 316N19920502
1989-1999 Pacific 2 5.6 31DS19960105
1989-1999 Pacific 3 5.6 31DS19940126
1989-1999 Pacific 4 5.5 318M19940327
1989-1999 Pacific 5 4.2 31DS19920907
2000-2009 Atlantic 1 4.6 33RO20050111
2000-2009 Atlantic 2 4.5 33RO20030604
2000-2009 Atlantic 3 4.1 06AQ20050122
2000-2009 Atlantic 4 3.5 06AQ20080210
2000-2009 Atlantic 5 2.7 35MF20080207
2000-2009 Indian 1 19.4 33RR20090320
2000-2009 Indian 2 10.4 33RR20070322
2000-2009 Indian 3 9.1 33RR20070204
2000-2009 Indian 4 9.0 33RR20080204
2000-2009 Indian 5 8.2 49NZ20031209
2000-2009 Pacific 1 7.0 33RO20071215
2000-2009 Pacific 2 6.0 318M20040615
2000-2009 Pacific 3 4.9 49NZ20030803
2000-2009 Pacific 4 4.6 49NZ20090410
2000-2009 Pacific 5 4.6 49NZ20051031
2010-2020 Atlantic 1 6.8 33RO20100308
2010-2020 Atlantic 2 6.3 33RO20130803
2010-2020 Atlantic 3 5.7 33RO20110926
2010-2020 Atlantic 4 5.5 740H20180228
2010-2020 Atlantic 5 5.1 33RO20131223
2010-2020 Indian 1 17.7 33RO20180423
2010-2020 Indian 2 16.8 33RR20160321
2010-2020 Indian 3 11.4 33RR20160208
2010-2020 Indian 4 9.6 096U20180111
2010-2020 Indian 5 8.8 325020190403
2010-2020 Pacific 1 5.9 33RO20161119
2010-2020 Pacific 2 4.1 318M20130321
2010-2020 Pacific 3 4.1 320620180309
2010-2020 Pacific 4 4.0 320620170703
2010-2020 Pacific 5 3.6 49RY20110515
rm(GLODAP_count, large_cruises)

10 Indian Ocean 1990 CRM

CRM_IO_meas_talk <- CRM_IO_meas_talk %>%
  fill(cruise:batch) %>% 
  select(-starts_with(c("ph", "tco2"))) %>% 
  rename(talk_meas = talk_ave)
  
CRM_ref_values <- CRM_ref_values %>% 
  select(-c(date, comment, sal)) %>% 
  rename(talk_ref = talk,
         tco2_ref = tco2)

IO_CRM_offset_talk <-
  left_join(CRM_IO_meas_talk,
            CRM_ref_values %>% select(-tco2_ref)) %>% 
  mutate(batch = as.factor(batch))

IO_CRM_offset_talk <- IO_CRM_offset_talk %>% 
  mutate(offset = talk_meas - talk_ref)

IO_CRM_offset_talk <- IO_CRM_offset_talk %>% 
  filter(cell != "All") %>% 
  select(-c(talk_meas:talk_ref)) %>% 
  mutate(start_date = mdy(start_date))

IO_CRM_offset_talk_mean <- IO_CRM_offset_talk %>%
  summarise(offset_mean = mean(offset),
            offset_sd = sd(offset))

IO_CRM_offset_talk %>%
  ggplot() +
  scale_fill_brewer(palette = "Set1",
                    name = "CRM batch") +
  geom_hline(data = IO_CRM_offset_talk_mean,
             aes(yintercept = offset_mean)) +
  geom_hline(
    data = IO_CRM_offset_talk_mean,
    aes(yintercept = offset_mean - offset_sd),
    linetype = 2
  ) +
  geom_hline(
    data = IO_CRM_offset_talk_mean,
    aes(yintercept = offset_mean + offset_sd),
    linetype = 2
  ) +
  geom_point(aes(start_date, offset, fill = batch, size=n),
             shape = 21) +
  scale_size(name = "Nr of\nmeasurements") +
  labs(x = "Cruise start date",
       y = "TA offset meas-CRM (µmol/kg)",
       title = "RV Knorr IO 1990 - TA reference measurements",
       subtitle = "Data source: Tables 1 and 2 from Millero et al. (1998)")

Version Author Date
ebfaa81 jens-daniel-mueller 2022-04-08
d454df1 jens-daniel-mueller 2021-12-15
IO_CRM_offset_talk <- IO_CRM_offset_talk %>% 
  group_by(cruise, start_date) %>%
  summarise(
    offset_mean = mean(offset, na.rm = TRUE),
    offset_sd = sd(offset, na.rm = TRUE)
  ) %>%
  ungroup()

IO_CRM_offset_tco2 <- CRM_IO_meas_tco2 %>% 
  group_by(cruise) %>%
  summarise(
    offset_mean = mean(-`Const-vp`, na.rm = TRUE),
    offset_sd = sd(`Const-vp`, na.rm = TRUE)
  ) %>%
  ungroup()

IO_CRM_offset_tco2 <- left_join(
  IO_CRM_offset_tco2,
  IO_CRM_offset_talk %>% select(cruise, start_date)
)


IO_CRM_offset <- bind_rows(IO_CRM_offset_tco2 %>% mutate(parameter = "tco2"),
                           IO_CRM_offset_talk %>% mutate(parameter = "talk"))

10.1 Xover comparison

xover_IO_1990_decade %>% 
  filter(parameter %in% c("tco2", "talk"),
         decade == "2000-2009") %>% 
  ggplot(aes(date_A, offset)) +
  geom_hline(yintercept = 0) +
  geom_point() +
  facet_grid(parameter~., scales = "free_y")

Version Author Date
481712d jens-daniel-mueller 2022-04-08
xover_IO <- xover_cruise_decade_all %>%
  filter(
    parameter_coverage == "full",
    basin == "Indian",
    decade == "2000-2009",
    date_A > ymd("1993-01-01"),
    date_A < ymd("1997-01-01"),
    parameter %in% c("cstar_talk", "cstar_tco2"),
    str_sub(cruise_A, 1, 4) == "316N"
  )

xover_IO <- xover_IO %>% 
  mutate(parameter = str_remove(parameter, "cstar_")) %>% 
  select(start_date = date_A,
         parameter,
         offset_mean = offset_adj_mean_weighted,
         offset_sd = offset_adj_sd) %>% 
  mutate(offset_mean = if_else(parameter == "talk",
                               offset_mean * -2,
                               offset_mean),
         offset_sd = if_else(parameter == "talk",
                               offset_sd * 2,
                               offset_sd))

IO_CRM_xover <- bind_rows(
  xover_IO %>% mutate(type = "xover"),
  IO_CRM_offset %>% mutate(type = "crm")
)


IO_CRM_xover %>%
  ggplot(aes(start_date, offset_mean, col = type)) +
  geom_hline(yintercept = 0) +
  geom_linerange(aes(ymin = offset_mean - offset_sd,
                     ymax = offset_mean + offset_sd)) +
  geom_point() +
  facet_grid(parameter ~., scales = "free_y") +
  scale_color_brewer(palette = "Set1")

Version Author Date
481712d jens-daniel-mueller 2022-04-08

11 Write files

GLODAP  %>%
  select(-cruise_expocode) %>% 
  write_csv(paste(path_preprocessing,
                  "GLODAPv2.2021_preprocessed.csv",
                  sep = ""))

GLODAP_tracer  %>%
  write_csv(paste(
    path_preprocessing,
    "GLODAPv2.2021_preprocessed_tracer.csv",
    sep = ""
  ))

GLODAP_adjustments  %>%
  write_csv(paste(path_preprocessing,
                  "GLODAPv2.2021_adustments.csv",
                  sep = ""))

expocodes_xover_NP  %>%
  write_csv(paste(path_preprocessing,
                  "expocodes_xover_NP.csv",
                  sep = ""))

expocodes_xover_IO  %>%
  write_csv(paste(path_preprocessing,
                  "expocodes_xover_IO.csv",
                  sep = ""))

xover_cruise_decade_all  %>%
  write_csv(paste(path_preprocessing,
                  "xover_cruise_decade_all.csv",
                  sep = ""))

# GLODAP_adjustments_NA_cruises  %>%
#   select(cruise_expocode, cruise) %>%
#   write_csv(paste(
#     path_preprocessing,
#     "GLODAPv2.2021_adustments_NA_cruises.csv",
#     sep = ""
#   ))
# 
# GLODAP_adjustments_duplicated_cruises  %>%
#   drop_na() %>%
#   write_csv(
#     paste(
#       path_preprocessing,
#       "GLODAPv2.2021_adustments_duplicated_cruises.csv",
#       sep = ""
#     )
#   )

12 Overview plots

12.1 Assign coarse spatial grid

For the following plots, the cleaned data set was re-opened and observations were gridded spatially to intervals of:

  • 5° x 5°
GLODAP <- m_grid_horizontal_coarse(GLODAP)

12.2 Histogram Zonal coverage

GLODAP_histogram_lat <- GLODAP %>%
  group_by(lat_grid) %>%
  tally() %>%
  ungroup()

GLODAP_histogram_lat %>%
  ggplot(aes(lat_grid, n)) +
  geom_col() +
  coord_flip() +
  theme(legend.title = element_blank())

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
98599d8 jens-daniel-mueller 2021-06-27
9d8353f jens-daniel-mueller 2021-05-31
rm(GLODAP_histogram_lat)

12.3 Histogram temporal coverage

GLODAP_histogram_year <- GLODAP %>%
  group_by(year) %>%
  tally() %>%
  ungroup()

GLODAP_histogram_year %>%
  ggplot() +
  geom_col(aes(year, n)) +
  theme(
    axis.title.x = element_blank()
  )

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
98599d8 jens-daniel-mueller 2021-06-27
9d8353f jens-daniel-mueller 2021-05-31
rm(GLODAP_histogram_year)

12.4 Zonal temporal coverage (Hovmoeller)

GLODAP_hovmoeller_year <- GLODAP %>%
  group_by(year, lat_grid) %>%
  tally() %>%
  ungroup()

GLODAP_hovmoeller_year %>%
  ggplot(aes(year, lat_grid, fill = log10(n))) +
  geom_tile() +
  geom_vline(xintercept = c(1999.5, 2012.5)) +
  scale_fill_viridis_c(option = "magma", direction = -1) +
  theme(legend.position = "top",
        axis.title.x = element_blank())

Version Author Date
8f9904b jens-daniel-mueller 2022-04-07
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
98599d8 jens-daniel-mueller 2021-06-27
9d8353f jens-daniel-mueller 2021-05-31
rm(GLODAP_hovmoeller_year)

12.5 Coverage map

map +
  geom_raster(data = GLODAP_obs_grid,
              aes(lon, lat, fill = log10(n))) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1)

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
98599d8 jens-daniel-mueller 2021-06-27
9d8353f jens-daniel-mueller 2021-05-31
GLODAP_obs_grid_all_vars <- GLODAP %>% 
  select(year, lat, lon, cruise, sal, temp, oxygen,
         phosphate, nitrate, silicate, tco2, talk) %>% 
  pivot_longer(cols = sal:talk,
               names_to = "parameter",
               values_to = "value") %>% 
  mutate(presence = if_else(is.na(value), "missing", "available")) %>% 
  count(year, lat, lon, parameter, presence)

GLODAP_obs_grid_all_vars_wide <- GLODAP_obs_grid_all_vars %>% 
  pivot_wider(names_from = "presence",
              values_from = n,
              values_fill = 0) %>% 
  mutate(ratio_available = available/(available+missing))

all_plots <- GLODAP_obs_grid_all_vars_wide %>%
  # mutate(cruise = as.factor(cruise)) %>%
  group_split(year) %>%
  # tail(3) %>%
  map(
    ~ map +
      geom_tile(
        data = .x,
        aes(
          x = lon,
          y = lat,
          width = 1,
          height = 1,
          fill = ratio_available
        )
      ) +
      scale_fill_scico(palette = "berlin",
                       limits = c(0,1)) +
      labs(title = unique(.x$year)) +
      facet_wrap(~ parameter)
  )


pdf(file = paste0(path_preprocessing, "GLODAPv2.2021_preprocessed_coverage_maps.pdf"),
    width = 10, 
    height = 5)
all_plots
dev.off()

13 CANYON-B

13.1 Prediction

source("/net/kryo/work/uptools/co2_calculation/CANYON-B/CANYONB.R")

GLODAP_CB <- GLODAP %>%
  mutate(lon = if_else(lon > 180, lon - 360, lon)) %>%
  arrange(year) %>% 
  select(row_number, year, date, lat, lon, depth, basin_AIP,
         temp, sal, oxygen,
         talk, tco2, nitrate, phosphate, silicate)

# filter rows with essential variables for Canyon-B
GLODAP_CB <- GLODAP_CB %>%
  filter(across(c(lat, lon, depth,
                  temp, sal, oxygen), ~ !is.na(.x)))

GLODAP_CB <- GLODAP_CB %>%
  mutate(as_tibble(
    CANYONB(
      date = paste0(as.character(date), " 12:00"),
      lat = lat,
      lon = lon,
      pres = depth,
      temp = temp,
      psal = sal,
      doxy = oxygen,
      param = c("AT", "CT", "NO3", "PO4", "SiOH4")
    )
  ))

GLODAP_CB <- GLODAP_CB %>%
  select(-ends_with(c("_cim", "_cin", "_cii")))


GLODAP_CB <- GLODAP_CB %>%
  rename(
    "talk_CANYONB" = "AT",
    "tco2_CANYONB" = "CT",
    "nitrate_CANYONB" = "NO3",
    "phosphate_CANYONB" = "PO4",
    "silicate_CANYONB" = "SiOH4"
  )

13.2 Comparison to observations

variables <- c("talk", "tco2", "nitrate", "phosphate", "silicate")

for (i_variable in variables) {
  # i_variable <- variables[1]
  
  # calculate equal axis limits and binwidth
  axis_lims <- GLODAP_CB %>%
    drop_na() %>% 
    summarise(max_value = max(c(max(
      !!sym(i_variable)
    ),
    max(!!sym(
      paste0(i_variable, "_CANYONB")
    )))),
    min_value = min(c(min(
      !!sym(i_variable)
    ),
    min(!!sym(
      paste0(i_variable, "_CANYONB")
    )))))
  
  binwidth_value <- (axis_lims$max_value - axis_lims$min_value) / 60
  axis_lims <- c(axis_lims$min_value, axis_lims$max_value)
  
  print(
    ggplot(GLODAP_CB, aes(
      x = !!sym(i_variable),
      y = !!sym(paste0(i_variable, "_CANYONB"))
    )) +
      geom_bin2d(binwidth = binwidth_value) +
      scale_fill_viridis_c(trans = "log10") +
      geom_abline(slope = 1, col = 'red') +
      coord_equal(xlim = axis_lims,
                  ylim = axis_lims) +
      facet_wrap( ~ basin_AIP) +
      labs(title = "All years")
  ) 
  
  
  # for (i_year in unique(GLODAP_CB$year)) {
  #   # i_year <- 2017
  #   
  #   print(
  #     ggplot(
  #       GLODAP_CB %>% filter(year == i_year),
  #       aes(x = !!sym(i_variable),
  #           y = !!sym(paste0(
  #             i_variable, "_CANYONB"
  #           )))
  #     ) +
  #       geom_bin2d(binwidth = binwidth_value) +
  #       scale_fill_viridis_c(trans = "log10") +
  #       geom_abline(slope = 1, col = 'red') +
  #       coord_equal(xlim = axis_lims,
  #                   ylim = axis_lims) +
  #       facet_wrap( ~ basin_AIP) +
  #       labs(title = paste("Year:", i_year))
  #   )
  # }
  
}

13.3 Write files

GLODAP_CB %>% 
  select(row_number,
         talk_CANYONB, tco2_CANYONB,
         nitrate_CANYONB, phosphate_CANYONB, silicate_CANYONB) %>% 
  write_csv(paste(path_preprocessing,
                             "GLODAPv2.2021_Canyon-B.csv",
                             sep = ""))

14 Crossover data

GLODAP_CB <-
  read_csv(paste(path_preprocessing,
                 "GLODAPv2.2021_Canyon-B.csv",
                 sep = ""))
cruises_phosphate_gap_fill <-
  c("33MW19930704",
    "33RO20030604",
    "33RO20050111",
    "33RO19980123")

cruises_talk_gap_fill <-
  c("06AQ19980328")

cruises_tco2_calc <-
  c("35TH20040604",
    "29AH20160617")

cruises_talk_calc <-
  c("06MT19900123",
    "316N19920502",
    "316N19921006")
xover_add_decade <- glodapv2_2021_xover_add %>%
  mutate(date_A = ymd(str_sub(cruise_A, 5, 12)),
         date_B = ymd(str_sub(cruise_B, 5, 12))) %>%
  mutate(decade = m_grid_decade(year(date_B))) %>%
  filter(!is.na(decade),
         !is.na(offset)) %>%
  arrange(date_B)

xover_add_decade %>%
  group_by(parameter, cruise_A) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "Long-term average per cruise and parameter") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
Long-term average per cruise and parameter
parameter cruise_A offset_mean
phosphate 06AQ19980328 1.0098973
phosphate 06MT19900123 0.9952731
phosphate 29AH20160617 0.9858769
phosphate 316N19920502 1.0081928
phosphate 316N19921006 1.0099657
phosphate 33MW19930704 0.9885767
phosphate 33RO19980123 0.9965710
phosphate 33RO20030604 0.9964464
phosphate 33RO20050111 1.0019318
phosphate 35TH20040604 0.9741076
talk 06AQ19980328 0.3560390
talk 06MT19900123 -3.5574819
talk 29AH20160617 1.4984801
talk 316N19920502 -4.3333542
talk 316N19921006 -1.0527798
talk 33MW19930704 -0.3729507
talk 33RO19980123 -0.8518579
talk 33RO20030604 -1.7537741
talk 33RO20050111 1.6308865
talk 35TH20040604 0.4044252
tco2 06AQ19980328 -0.0178595
tco2 06MT19900123 -2.6515513
tco2 29AH20160617 6.2652692
tco2 316N19920502 0.2705865
tco2 316N19921006 0.7551445
tco2 33MW19930704 -1.0446168
tco2 33RO19980123 0.5594899
tco2 33RO20030604 -0.4492114
tco2 33RO20050111 -0.3622474
tco2 35TH20040604 1.3619943
xover_add_decade %>%
  group_by(parameter, decade, cruise_A) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "Decadal average per cruise and parameter") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
Decadal average per cruise and parameter
parameter decade cruise_A offset_mean
phosphate 1989-1999 06AQ19980328 1.0125648
phosphate 1989-1999 06MT19900123 0.9925257
phosphate 1989-1999 29AH20160617 0.9820529
phosphate 1989-1999 316N19920502 1.0067578
phosphate 1989-1999 316N19921006 1.0017277
phosphate 1989-1999 33MW19930704 0.9874284
phosphate 1989-1999 33RO19980123 0.9952849
phosphate 1989-1999 33RO20030604 1.0005093
phosphate 1989-1999 33RO20050111 1.0009821
phosphate 1989-1999 35TH20040604 0.9716428
phosphate 2000-2009 06AQ19980328 1.0053414
phosphate 2000-2009 06MT19900123 1.0010033
phosphate 2000-2009 29AH20160617 0.9899738
phosphate 2000-2009 316N19920502 1.0075795
phosphate 2000-2009 316N19921006 1.0137857
phosphate 2000-2009 33MW19930704 0.9846140
phosphate 2000-2009 33RO19980123 1.0037495
phosphate 2000-2009 33RO20030604 0.9921003
phosphate 2000-2009 33RO20050111 1.0025604
phosphate 2000-2009 35TH20040604 0.9765408
phosphate 2010-2020 06AQ19980328 1.0092836
phosphate 2010-2020 06MT19900123 0.9922316
phosphate 2010-2020 29AH20160617 0.9904749
phosphate 2010-2020 316N19920502 1.0127004
phosphate 2010-2020 316N19921006 1.0143839
phosphate 2010-2020 33MW19930704 0.9964602
phosphate 2010-2020 33RO19980123 0.9950980
phosphate 2010-2020 33RO20030604 0.9944871
phosphate 2010-2020 33RO20050111 1.0032793
phosphate 2010-2020 35TH20040604 0.9766304
talk 1989-1999 06AQ19980328 1.5260164
talk 1989-1999 06MT19900123 -1.7866112
talk 1989-1999 29AH20160617 1.4400768
talk 1989-1999 316N19920502 -0.0551690
talk 1989-1999 316N19921006 0.4878711
talk 1989-1999 33MW19930704 -0.0863005
talk 1989-1999 33RO19980123 0.1289735
talk 1989-1999 33RO20030604 -2.4099030
talk 1989-1999 33RO20050111 1.2382129
talk 1989-1999 35TH20040604 0.4187151
talk 2000-2009 06AQ19980328 -0.2162355
talk 2000-2009 06MT19900123 -4.0659303
talk 2000-2009 29AH20160617 2.3884257
talk 2000-2009 316N19920502 -4.0265274
talk 2000-2009 316N19921006 -0.9215473
talk 2000-2009 33MW19930704 -0.3195600
talk 2000-2009 33RO19980123 -5.2032065
talk 2000-2009 33RO20030604 -0.9500663
talk 2000-2009 33RO20050111 1.2662351
talk 2000-2009 35TH20040604 1.1230941
talk 2010-2020 06AQ19980328 0.7206032
talk 2010-2020 06MT19900123 -3.9344689
talk 2010-2020 29AH20160617 -0.1395747
talk 2010-2020 316N19920502 -6.9326869
talk 2010-2020 316N19921006 -2.7246632
talk 2010-2020 33MW19930704 -0.9855887
talk 2010-2020 33RO19980123 0.3001826
talk 2010-2020 33RO20030604 -1.7612909
talk 2010-2020 33RO20050111 1.8786579
talk 2010-2020 35TH20040604 -1.0676170
tco2 1989-1999 06AQ19980328 2.3474558
tco2 1989-1999 06MT19900123 -0.2131875
tco2 1989-1999 29AH20160617 7.8369106
tco2 1989-1999 316N19920502 0.1582007
tco2 1989-1999 316N19921006 0.2100602
tco2 1989-1999 33MW19930704 0.3093986
tco2 1989-1999 33RO19980123 0.4187870
tco2 1989-1999 33RO20030604 1.3040708
tco2 1989-1999 33RO20050111 1.4562572
tco2 1989-1999 35TH20040604 2.7638627
tco2 2000-2009 06AQ19980328 -1.3551591
tco2 2000-2009 06MT19900123 -3.4099140
tco2 2000-2009 29AH20160617 6.1180167
tco2 2000-2009 316N19920502 0.5997351
tco2 2000-2009 316N19921006 0.8386702
tco2 2000-2009 33MW19930704 -1.6191444
tco2 2000-2009 33RO19980123 1.0463619
tco2 2000-2009 33RO20030604 -1.2259491
tco2 2000-2009 33RO20050111 1.0973981
tco2 2000-2009 35TH20040604 1.2641341
tco2 2010-2020 06AQ19980328 -1.1823577
tco2 2010-2020 06MT19900123 -3.9523709
tco2 2010-2020 29AH20160617 1.1923250
tco2 2010-2020 316N19920502 -0.1669434
tco2 2010-2020 316N19921006 1.2167030
tco2 2010-2020 33MW19930704 -3.8756236
tco2 2010-2020 33RO19980123 0.4491628
tco2 2010-2020 33RO20030604 -2.5484791
tco2 2010-2020 33RO20050111 -2.0013224
tco2 2010-2020 35TH20040604 -3.0344442
xover_add_decade %>%
  filter(cruise_A %in% cruises_talk_calc,
         parameter == "talk") %>% 
  group_by(parameter, decade, cruise_A) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "Decadal talk average per cruise") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
Decadal talk average per cruise
parameter decade cruise_A offset_mean
talk 1989-1999 06MT19900123 -1.7866112
talk 1989-1999 316N19920502 -0.0551690
talk 1989-1999 316N19921006 0.4878711
talk 2000-2009 06MT19900123 -4.0659303
talk 2000-2009 316N19920502 -4.0265274
talk 2000-2009 316N19921006 -0.9215473
talk 2010-2020 06MT19900123 -3.9344689
talk 2010-2020 316N19920502 -6.9326869
talk 2010-2020 316N19921006 -2.7246632
xover_add_decade %>%
  filter(cruise_A %in% cruises_talk_calc,
         parameter == "talk") %>% 
  group_by(parameter, decade) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "Decadal talk average") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
Decadal talk average
parameter decade offset_mean
talk 1989-1999 -0.7851301
talk 2000-2009 -3.6581063
talk 2010-2020 -4.6182733
xover_add_decade %>%
  filter(cruise_A %in% cruises_talk_calc,
         parameter == "talk") %>% 
  group_by(parameter) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "talk average") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
talk average
parameter offset_mean
talk -3.407015
xover_add_decade %>%
  filter(cruise_A %in% cruises_talk_calc,
         parameter == "talk") %>% 
  group_by(parameter, cruise_A) %>%
  summarise(offset_mean = mean(offset, na.rm = TRUE)) %>%
  ungroup() %>%
  kable(caption = "talk average per cruise") %>%
  kable_styling() %>%
  scroll_box(height = "250px")
talk average per cruise
parameter cruise_A offset_mean
talk 06MT19900123 -3.557482
talk 316N19920502 -4.333354
talk 316N19921006 -1.052780
hline_intercept <-
  tibble(parameter = unique(xover_add_decade$parameter)) %>%
  mutate(intercept = if_else(parameter %in% c("phosphate"),
                             1,
                             0))

p_crossover_ts <- xover_add_decade %>%
  ggplot(aes(date_B, offset)) +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_point(shape = 21) +
  scale_color_brewer(palette = "Set1") +
  facet_grid(parameter ~ ., scales = "free_y") +
  theme(
    legend.position = "bottom",
    legend.direction = "vertical",
    axis.title.x = element_blank()
  )

p_crossover_decadal <-
  ggplot() +
  geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
  geom_violin(data = xover_add_decade,
               aes(x = decade, y = offset), fill="gold") +
  geom_boxplot(data = xover_add_decade,
               aes(x = decade, y = offset),
               width = 0.2) +
  facet_grid(parameter ~ ., scales = "free_y") +
  labs(title = "Decadal offsets") +
  theme(axis.title.x = element_blank(),
        axis.text.x = element_text(angle = 90))


p_crossover_ts + p_crossover_decadal +
  plot_layout(widths = c(2, 1))

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
ecc669f jens-daniel-mueller 2022-01-04
494beda jens-daniel-mueller 2022-01-03

14.1 Gap filling

GLODAP <- left_join(GLODAP,
                    GLODAP_CB %>% 
                      select(row_number, ends_with("_CANYONB")))

# fill missing phosphate with CANYON-B estimate

GLODAP_phosphate_fill <- GLODAP %>%
  filter(cruise_expocode %in% cruises_phosphate_gap_fill,
         is.na(phosphate),
         oxygenqc == 1)

GLODAP_phosphate_fill <- GLODAP_phosphate_fill %>% 
  mutate(phosphate = phosphate_CANYONB) %>% 
  filter(!is.na(phosphate))

map +
  geom_tile(data = GLODAP_phosphate_fill %>%
              distinct(lon, lat, cruise_expocode),
            aes(lon, lat, fill = cruise_expocode)) +
  scale_fill_brewer(palette = "Set1")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
494beda jens-daniel-mueller 2022-01-03
for (i_cruise in cruises_phosphate_gap_fill) {
  # i_cruise <- cruises_phosphate_gap_fill[1]
  
  p_crossover_ts <- xover_add_decade %>%
    filter(cruise_A %in% i_cruise) %>%
    ggplot(aes(date_B, offset)) +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_point(shape = 21) +
    scale_color_brewer(palette = "Set1") +
    facet_grid(parameter ~ ., scales = "free_y") +
    labs(title = i_cruise) +
    theme(
      legend.position = "bottom",
      legend.direction = "vertical",
      axis.title.x = element_blank()
    )
  
  p_crossover_decadal <-
    ggplot() +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_violin(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      fill = "gold"
    ) +
    geom_boxplot(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      width = 0.2
    ) +
    facet_grid(parameter ~ ., scales = "free_y") +
    theme(axis.title.x = element_blank(),
          axis.text.x = element_text(angle = 90))
  
  print(
  p_crossover_ts + p_crossover_decadal +
    plot_layout(widths = c(2, 1))
  )
  
}

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03
# fill missing talk with CANYON-B estimate

GLODAP_talk_fill <- GLODAP %>%
  filter(cruise_expocode %in% cruises_talk_gap_fill,
         is.na(talk),
         oxygenqc == 1)

GLODAP_talk_fill <- GLODAP_talk_fill %>% 
  mutate(talk = talk_CANYONB) %>% 
  filter(!is.na(talk))


map +
  geom_tile(data = GLODAP_talk_fill %>%
              distinct(lon, lat, cruise_expocode),
            aes(lon, lat, fill = cruise_expocode)) +
  scale_fill_brewer(palette = "Set1")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
494beda jens-daniel-mueller 2022-01-03
for (i_cruise in cruises_talk_gap_fill) {
  # i_cruise <- cruises_phosphate_gap_fill[1]
  
  p_crossover_ts <- xover_add_decade %>%
    filter(cruise_A %in% i_cruise) %>%
    ggplot(aes(date_B, offset)) +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_point(shape = 21) +
    scale_color_brewer(palette = "Set1") +
    facet_grid(parameter ~ ., scales = "free_y") +
    labs(title = i_cruise) +
    theme(
      legend.position = "bottom",
      legend.direction = "vertical",
      axis.title.x = element_blank()
    )
  
  p_crossover_decadal <-
    ggplot() +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_violin(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      fill = "gold"
    ) +
    geom_boxplot(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      width = 0.2
    ) +
    facet_grid(parameter ~ ., scales = "free_y") +
    theme(axis.title.x = element_blank(),
          axis.text.x = element_text(angle = 90))
  
  print(p_crossover_ts + p_crossover_decadal +
          plot_layout(widths = c(2, 1)))
  
}

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03
GLODAP_gap_fill <- bind_rows(
  GLODAP_phosphate_fill,
  GLODAP_talk_fill
)

14.2 Flagging

GLODAP_tco2_calc <- GLODAP %>% 
  filter(cruise_expocode %in% cruises_tco2_calc,
         tco2f == 0)


map +
  geom_tile(data = GLODAP_tco2_calc %>%
              distinct(lon, lat, cruise_expocode),
            aes(lon, lat, fill = cruise_expocode)) +
  scale_fill_brewer(palette = "Set1")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
494beda jens-daniel-mueller 2022-01-03
for (i_cruise in cruises_tco2_calc) {
  # i_cruise <- cruises_phosphate_gap_fill[1]
  
  p_crossover_ts <- xover_add_decade %>%
    filter(cruise_A %in% i_cruise) %>%
    ggplot(aes(date_B, offset)) +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_point(shape = 21) +
    scale_color_brewer(palette = "Set1") +
    facet_grid(parameter ~ ., scales = "free_y") +
    labs(title = i_cruise) +
    theme(
      legend.position = "bottom",
      legend.direction = "vertical",
      axis.title.x = element_blank()
    )
  
  p_crossover_decadal <-
    ggplot() +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_violin(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      fill = "gold"
    ) +
    geom_boxplot(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      width = 0.2
    ) +
    facet_grid(parameter ~ ., scales = "free_y") +
    theme(axis.title.x = element_blank(),
          axis.text.x = element_text(angle = 90))
  
  print(p_crossover_ts + p_crossover_decadal +
          plot_layout(widths = c(2, 1)))
  
}

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03
GLODAP_talk_calc <- GLODAP %>% 
  filter(cruise_expocode %in% cruises_talk_calc,
         talkf == 0)


map +
  geom_tile(data = GLODAP_talk_calc %>%
              distinct(lon, lat, cruise_expocode),
            aes(lon, lat, fill = cruise_expocode)) +
  scale_fill_brewer(palette = "Set1")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
dde77eb jens-daniel-mueller 2022-04-01
e3d1a2b jens-daniel-mueller 2022-03-10
9db485e jens-daniel-mueller 2022-02-25
494beda jens-daniel-mueller 2022-01-03
for (i_cruise in cruises_talk_calc) {
  # i_cruise <- cruises_phosphate_gap_fill[1]
  
  p_crossover_ts <- xover_add_decade %>%
    filter(cruise_A %in% i_cruise) %>%
    ggplot(aes(date_B, offset)) +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_point(shape = 21) +
    scale_color_brewer(palette = "Set1") +
    facet_grid(parameter ~ ., scales = "free_y") +
    labs(title = i_cruise) +
    theme(
      legend.position = "bottom",
      legend.direction = "vertical",
      axis.title.x = element_blank()
    )
  
  p_crossover_decadal <-
    ggplot() +
    geom_hline(data = hline_intercept, aes(yintercept = intercept)) +
    geom_violin(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      fill = "gold"
    ) +
    geom_boxplot(
      data = xover_add_decade %>%
        filter(cruise_A %in% i_cruise),
      aes(x = decade, y = offset),
      width = 0.2
    ) +
    facet_grid(parameter ~ ., scales = "free_y") +
    theme(axis.title.x = element_blank(),
          axis.text.x = element_text(angle = 90))
  
  print(
  p_crossover_ts + p_crossover_decadal +
    plot_layout(widths = c(2, 1))
  )
    
}

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03

Version Author Date
f088f55 jens-daniel-mueller 2022-04-01
1a9c797 jens-daniel-mueller 2022-01-03
494beda jens-daniel-mueller 2022-01-03
GLODAP_calc <- bind_rows(
  GLODAP_tco2_calc,
  GLODAP_talk_calc
)

14.3 Write files

GLODAP_crossover <- bind_rows(
  GLODAP_gap_fill,
  GLODAP_calc
) 

GLODAP_crossover_write <- GLODAP_crossover %>% 
  select(
    EXPOCODE = cruise_expocode,
    STNNBR = station,
    CASTNO = cast,
    BTLNBR = bottle,
    DATE = date,
    LATITUDE = lat,
    LONGITUDE = lon,
    CTDPRS = pressure,
    CTDTMP = temp,
    CTDSAL = sal,
    CTDSAL_FLAG_W = salinityf,
    PHSPHT = phosphate,
    PHSPHT_FLAG_W = phosphatef,
    TCARBN = tco2,
    TCARBN_FLAG_W = tco2f,
    ALKALI = talk,
    ALKALI_FLAG_W = talkf)

GLODAP_crossover_write <- GLODAP_crossover_write %>% 
  mutate(DATE = format(DATE,  "%Y%m%d"))


last_line <- "END_DATA"

for (i_EXPOCODE in unique(GLODAP_crossover_write$EXPOCODE)) {
  # i_EXPOCODE <- unique(GLODAP_crossover_write$EXPOCODE)[1]
  
  temp <- GLODAP_crossover_write %>%
    filter(EXPOCODE == i_EXPOCODE) %>%
    add_row(.before = 1)
  
  cat("Bottle",
      "\n",
      file = paste0(
        path_preprocessing,
        "crossover_cruises/",
        i_EXPOCODE,
        ".exc.csv"
      )
    )
  
  temp %>%
    write_csv(
      file = paste0(
        path_preprocessing,
        "crossover_cruises/",
        i_EXPOCODE,
        ".exc.csv"
      ),
      na = "",
      append = TRUE,
      col_names = TRUE
    )
  
  write(
    last_line,
    file = paste0(
      path_preprocessing,
      "crossover_cruises/",
      i_EXPOCODE,
      ".exc.csv"
    ),
    append = TRUE
  )
  
  
}

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.3

Matrix products: default
BLAS:   /usr/local/R-4.1.2/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.1.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] kableExtra_1.3.4 ggrepel_0.9.1    lubridate_1.8.0  colorspace_2.0-2
 [5] marelac_2.1.10   shape_1.4.6      ggforce_0.3.3    metR_0.11.0     
 [9] scico_1.3.0      patchwork_1.1.1  collapse_1.7.0   forcats_0.5.1   
[13] stringr_1.4.0    dplyr_1.0.7      purrr_0.3.4      readr_2.1.1     
[17] tidyr_1.1.4      tibble_3.1.6     ggplot2_3.3.5    tidyverse_1.3.1 
[21] workflowr_1.7.0 

loaded via a namespace (and not attached):
 [1] nlme_3.1-155       fs_1.5.2           bit64_4.0.5        gsw_1.0-6         
 [5] RColorBrewer_1.1-2 webshot_0.5.2      httr_1.4.2         rprojroot_2.0.2   
 [9] tools_4.1.2        backports_1.4.1    bslib_0.3.1        utf8_1.2.2        
[13] R6_2.5.1           mgcv_1.8-38        DBI_1.1.2          withr_2.4.3       
[17] tidyselect_1.1.1   processx_3.5.2     bit_4.0.4          compiler_4.1.2    
[21] git2r_0.29.0       cli_3.1.1          rvest_1.0.2        xml2_1.3.3        
[25] labeling_0.4.2     sass_0.4.0         scales_1.1.1       checkmate_2.0.0   
[29] SolveSAPHE_2.1.0   callr_3.7.0        systemfonts_1.0.3  digest_0.6.29     
[33] svglite_2.0.0      rmarkdown_2.11     oce_1.5-0          pkgconfig_2.0.3   
[37] htmltools_0.5.2    highr_0.9          dbplyr_2.1.1       fastmap_1.1.0     
[41] rlang_0.4.12       readxl_1.3.1       rstudioapi_0.13    jquerylib_0.1.4   
[45] generics_0.1.1     farver_2.1.0       jsonlite_1.7.3     vroom_1.5.7       
[49] magrittr_2.0.1     Matrix_1.4-0       Rcpp_1.0.8         munsell_0.5.0     
[53] fansi_1.0.2        lifecycle_1.0.1    stringi_1.7.6      whisker_0.4       
[57] yaml_2.2.1         MASS_7.3-55        grid_4.1.2         parallel_4.1.2    
[61] promises_1.2.0.1   crayon_1.4.2       lattice_0.20-45    splines_4.1.2     
[65] haven_2.4.3        hms_1.1.1          seacarb_3.3.0      knitr_1.37        
[69] ps_1.6.0           pillar_1.6.4       reprex_2.0.1       glue_1.6.0        
[73] evaluate_0.14      getPass_0.2-2      data.table_1.14.2  modelr_0.1.8      
[77] vctrs_0.3.8        tzdb_0.2.0         tweenr_1.0.2       httpuv_1.6.5      
[81] cellranger_1.1.0   gtable_0.3.0       polyclip_1.10-0    assertthat_0.2.1  
[85] xfun_0.29          broom_0.7.11       later_1.3.0        viridisLite_0.4.0 
[89] ellipsis_0.3.2