Last updated: 2021-03-08

Checks: 7 0

Knit directory: emlr_mod_v_XXX/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(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 958381f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Unstaged changes:
    Deleted:    a.png
    Modified:   data/auxillary/params_local.rds

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/eMLR_GLODAPv2_2020_subsetting.Rmd) and HTML (docs/eMLR_GLODAPv2_2020_subsetting.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html 1843412 Donghe-Zhu 2021-03-08 Build site.
html 65b0cef Donghe-Zhu 2021-03-07 Build site.
html 4083a6c Donghe-Zhu 2021-03-07 Build site.
html 3fbbfa4 Donghe-Zhu 2021-03-07 Build site.
html 627c8fb Donghe-Zhu 2021-03-07 Build site.
html 3607f4d Donghe-Zhu 2021-03-07 Build site.
html 9ef3222 Donghe-Zhu 2021-03-05 Build site.
html 8c1e978 Donghe-Zhu 2021-03-05 Build site.
html 865f68c Donghe-Zhu 2021-03-05 Build site.
html ee69bc1 Donghe-Zhu 2021-03-05 Build site.
html a79291f Donghe-Zhu 2021-03-05 Build site.
html e8c6f30 Donghe-Zhu 2021-03-04 Build site.
html 59288fe Donghe-Zhu 2021-03-04 Build site.
html 731abc8 Donghe-Zhu 2021-03-04 Build site.
html e2a5a33 Donghe-Zhu 2021-03-04 Build site.
html c7892c1 Donghe-Zhu 2021-03-04 Build site.
html 924430b Donghe-Zhu 2021-03-03 Build site.
html 0d0bca1 Donghe-Zhu 2021-03-03 Build site.
html cb63c16 Donghe-Zhu 2021-03-03 Build site.
html ffda45a Donghe-Zhu 2021-03-03 Build site.
html 691ba81 Donghe-Zhu 2021-03-03 Build site.
html c5e45a2 Donghe-Zhu 2021-03-03 Build site.
html 89c3e58 Donghe-Zhu 2021-03-03 Build site.
html c407a50 Donghe-Zhu 2021-03-03 Build site.
html c911669 Donghe-Zhu 2021-03-03 Build site.
html b71c719 Donghe-Zhu 2021-03-01 Build site.
html 13666ca Donghe-Zhu 2021-03-01 Build site.
html c6e60fe Donghe-Zhu 2021-03-01 Build site.
html 7a388f7 Donghe-Zhu 2021-03-01 Build site.
html 799e913 Donghe-Zhu 2021-03-01 Build site.
html 66ff99f Donghe-Zhu 2021-03-01 Build site.
html ac9bb7a Donghe-Zhu 2021-02-28 Build site.
html efdc047 Donghe-Zhu 2021-02-28 Build site.
html e9a7418 Donghe-Zhu 2021-02-28 Build site.
html e152917 Donghe-Zhu 2021-02-28 Build site.
html feb991c Donghe-Zhu 2021-02-27 Build site.
html 287123c Donghe-Zhu 2021-02-27 Build site.
html 54d5b5b Donghe-Zhu 2021-02-27 Build site.
html 330f064 Donghe-Zhu 2021-02-27 Build site.
html adbc9bc Donghe-Zhu 2021-02-27 Build site.
html 5937141 Donghe-Zhu 2021-02-27 Build site.
html 4414bbf Donghe-Zhu 2021-02-27 Build site.
html a265efb Donghe-Zhu 2021-02-27 Build site.
html 19edd1e Donghe-Zhu 2021-02-27 Build site.
html f20483f Donghe-Zhu 2021-02-26 Build site.
html 6a2c7b3 Donghe-Zhu 2021-02-25 Build site.
html 02b976d Donghe-Zhu 2021-02-24 Build site.
html 354c224 Donghe-Zhu 2021-02-24 Build site.
html 1a0a88a Donghe-Zhu 2021-02-24 Build site.
html 57f701e Donghe-Zhu 2021-02-24 Build site.
html 06f3149 Donghe-Zhu 2021-02-16 Build site.
html 401eab3 Donghe-Zhu 2021-02-15 Build site.
html e3bba84 Donghe-Zhu 2021-02-15 Build site.
html 5dce4b1 Donghe-Zhu 2021-02-15 Build site.
html 4469a0c Donghe-Zhu 2021-02-13 Build site.
html 5ae6a69 Donghe-Zhu 2021-02-10 Build site.
html 05385dc Donghe-Zhu 2021-02-10 Build site.
html f791ae4 Donghe-Zhu 2021-02-09 Build site.
html f71ae34 Donghe-Zhu 2021-02-09 Build site.
html c011832 Donghe-Zhu 2021-02-09 Build site.
html a145fa7 Donghe-Zhu 2021-02-09 Build site.
html c344e42 Donghe-Zhu 2021-02-08 Build site.
Rmd 8f5fa79 Donghe-Zhu 2021-02-08 local rebuild
html 2f095d7 Donghe-Zhu 2021-02-07 Build site.
html 2305044 Donghe-Zhu 2021-02-07 Build site.
html 1fad5f1 Donghe-Zhu 2021-02-07 Build site.
html ca03c39 Donghe-Zhu 2021-02-07 Build site.
Rmd b8981f0 Donghe-Zhu 2021-02-07 local rebuild
html e2ffc14 Donghe-Zhu 2021-02-05 Build site.
html cd7c52c Donghe-Zhu 2021-02-04 Build site.
html bcf84f4 Donghe-Zhu 2021-02-02 Build site.
html a518739 Donghe-Zhu 2021-02-01 Build site.
html 61666de Donghe-Zhu 2021-01-31 Build site.
html 865b582 Donghe-Zhu 2021-01-31 Build site.
html 3e68089 Donghe-Zhu 2021-01-31 Build site.
html ecf335c Donghe-Zhu 2021-01-31 Build site.
html a618965 Donghe-Zhu 2021-01-31 Build site.
html 59e006e Donghe-Zhu 2021-01-31 Build site.
html a1c8f87 Donghe-Zhu 2021-01-31 Build site.
html ae5c18f Donghe-Zhu 2021-01-31 Build site.
html b50fe52 Donghe-Zhu 2021-01-31 Build site.
html ac99ae5 jens-daniel-mueller 2021-01-29 code review
html b5bdcaf Donghe-Zhu 2021-01-29 Build site.
html 442010d Donghe-Zhu 2021-01-29 Build site.
html 372adf5 Donghe-Zhu 2021-01-29 Build site.
html af8788e Donghe-Zhu 2021-01-29 Build site.
html 21c91c9 Donghe-Zhu 2021-01-29 Build site.
html eded038 Donghe-Zhu 2021-01-29 Build site.
html 541d4dd Donghe-Zhu 2021-01-29 Build site.
html 6a75576 Donghe-Zhu 2021-01-28 Build site.
html 16fba40 Donghe-Zhu 2021-01-28 Build site.
html 12bc567 Donghe-Zhu 2021-01-27 Build site.
html ceed31b Donghe-Zhu 2021-01-27 Build site.
html 342402d Donghe-Zhu 2021-01-27 Build site.
html 5bad5c2 Donghe-Zhu 2021-01-27 Build site.
Rmd c2c9529 Donghe-Zhu 2021-01-27 random subsetting based on lat
html 61efb56 Donghe-Zhu 2021-01-25 Build site.
html 48f638e Donghe-Zhu 2021-01-25 Build site.
html c1cec47 Donghe-Zhu 2021-01-25 Build site.
html 05ffb0c Donghe-Zhu 2021-01-25 Build site.
html 8b97165 Donghe-Zhu 2021-01-25 Build site.
html c569946 Donghe-Zhu 2021-01-24 Build site.
html a2f0d56 Donghe-Zhu 2021-01-23 Build site.
html 28509fc Donghe-Zhu 2021-01-23 Build site.
html 4c28e4a Donghe-Zhu 2021-01-22 Build site.
html 24cc264 jens-daniel-mueller 2021-01-22 cleaned /docs before creating copies
html 88eb28f Donghe-Zhu 2021-01-21 Build site.
html 2679490 Donghe-Zhu 2021-01-21 Build site.
html 7891955 Donghe-Zhu 2021-01-21 Build site.
html d4cf1cb Donghe-Zhu 2021-01-21 Build site.
html 1f3e5b6 jens-daniel-mueller 2021-01-20 Build site.
html 0e7bdf1 jens-daniel-mueller 2021-01-15 cleaning template repository
html 73cbef3 jens-daniel-mueller 2021-01-15 Build site.
html 4571843 jens-daniel-mueller 2021-01-14 revision and html deleted for template copying
html 23151cd jens-daniel-mueller 2021-01-14 Build site.
html b3564aa jens-daniel-mueller 2021-01-14 Build site.
html 8d032c3 jens-daniel-mueller 2021-01-14 Build site.
html 022871c Donghe-Zhu 2021-01-13 Build site.
Rmd d44f36f Donghe-Zhu 2021-01-13 reorder analysis final
html 17dee1d jens-daniel-mueller 2021-01-13 Build site.
html a076226 Donghe-Zhu 2021-01-11 Build site.
Rmd ac37e34 Donghe-Zhu 2021-01-11 add climate and subsetting condition
Rmd 52eff18 Donghe-Zhu 2021-01-09 Implemet model_run and subsetting
html 7cdea0c jens-daniel-mueller 2021-01-06 Build site.
Rmd b5934dd jens-daniel-mueller 2021-01-06 local rebuild after revision
html fa85b93 jens-daniel-mueller 2021-01-06 Build site.
Rmd 1d55c11 jens-daniel-mueller 2021-01-06 local rebuild after pulling
html e5cb81a Donghe-Zhu 2021-01-05 Build site.
Rmd 608cc45 Donghe-Zhu 2021-01-05 modification of analysis
html a499f10 Donghe-Zhu 2021-01-05 Build site.
Rmd 715bdb4 Donghe-Zhu 2021-01-02 model modification
html fb8a752 Donghe-Zhu 2020-12-23 Build site.
Rmd 82e3c9c Donghe-Zhu 2020-12-23 first build after creating model template
html 8fae0b2 Donghe-Zhu 2020-12-21 Build site.
Rmd d73ae35 Donghe-Zhu 2020-12-21 first version with lm error
html c8b76b3 jens-daniel-mueller 2020-12-19 Build site.
Rmd b5fedce jens-daniel-mueller 2020-12-19 first build after creating model template
Rmd 8e8abf5 Jens Müller 2020-12-18 Initial commit

1 Read files

Main data source for this project is the synthetic cmorized model subset based on preprocessed version of the GLODAPv2.2020_Merged_Master_File.csv downloaded from glodap.info in June 2020.

CAVEAT: This file still contains neutral densities gamma calculated with a preliminary method. However, this is consistent with the way gamma is currently calculated in this script and should therefore be maintained until changed on all levels.

if (params_local$model_runs == "AD") {
  GLODAP <-
    read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runA_final.csv",
        sep = ""
      )
    )
  
  if (params_local$random == "grid") {
    random <- read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runA_random_subset_grid.csv",
        sep = ""
      )
    )
  }
  
  if (params_local$random == "lat") {
    random <- read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runA_random_subset_lat.csv",
        sep = ""
      )
    )
  }
  
}

if (params_local$model_runs == "CB") {
  GLODAP <-
    read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runC_final.csv",
        sep = ""
      )
    )
  if (params_local$random == "grid") {
    random <- read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runC_random_subset_grid.csv",
        sep = ""
      )
    )
  }
  
  if (params_local$random == "lat") {
    random <- read_csv(
      paste(
        path_preprocessing,
        "GLODAPv2.2020_preprocessed_model_runC_random_subset_lat.csv",
        sep = ""
      )
    )
  }
  
}

2 Data preparation

2.1 Reference eras

Samples were assigned to following eras:

# create labels for era
labels_GLODAP <- bind_cols(
  start = params_local$era_breaks_GLODAP+1,
  end = lead(params_local$era_breaks_GLODAP))

labels_GLODAP <- labels_GLODAP %>% 
  filter(!is.na(end)) %>% 
  mutate(end = if_else(end == Inf, max(GLODAP$year), end),
         label = paste(start, end, sep = "-")) %>% 
  select(label) %>% 
  pull()

labels_random <- bind_cols(
  start = params_local$era_breaks_random+1,
  end = lead(params_local$era_breaks_random))

labels_random <- labels_random %>% 
  filter(!is.na(end)) %>% 
  mutate(end = if_else(end == Inf, max(random$year), end),
         label = paste(start, end, sep = "-")) %>% 
  select(label) %>% 
  pull()

# cut observation years into era applying the labels
GLODAP <- GLODAP %>%
  filter(year > params_local$era_breaks_GLODAP[1]) %>% 
  mutate(era = cut(year,
                   params_local$era_breaks_GLODAP,
                   labels = labels_GLODAP))

random <- random %>%
  filter(year > params_local$era_breaks_random[1]) %>% 
  mutate(era = cut(year,
                   params_local$era_breaks_random,
                   labels = labels_random))

levels(GLODAP$era)
[1] "1982-1999" "2000-2012" "2013-2019"
levels(random$era)
[1] "1982-1999" "2000-2012" "2013-2019"
rm(labels_GLODAP, labels_random)

2.2 Spatial boundaries

2.2.1 Basin mask

The basin mask from the World Ocean Atlas was used. For details consult the data base subsection for WOA18 data.

Please note that some GLODAP-based subsetting model data were outside the WOA18 basin mask (i.e. in marginal seas) and will be removed for further analysis.

# use only data inside basinmask
GLODAP <- inner_join(GLODAP, basinmask)
random <- inner_join(random, basinmask)

2.2.2 Depth

GLODAP-based subsetting model data with depth shallower than:

  • minimum sampling depth: 150m

were excluded from the analysis to avoid seasonal bias.

GLODAP <- GLODAP %>% 
  filter(depth >= params_local$depth_min)

random <- random %>% 
  filter(depth >= params_local$depth_min)

2.2.3 Bottomdepth

GLODAP-based subsetting model data in an area with a:

  • minimum bottom depth: 0m

were excluded from the analysis to avoid coastal impacts. Please note that minimum bottom depth criterion of 0m means that no filtering was applied here.

GLODAP <- GLODAP %>% 
  filter(bottomdepth >= params_local$bottomdepth_min)

2.3 Flags and missing data

Only rows (samples) for which all relevant parameters are available were selected, ie NA’s were removed.

According to Olsen et al (2020), flags within the merged master file identify:

  • f:

    • 2: Acceptable
    • 0: Interpolated (nutrients/oxygen) or calculated (CO[2] variables)
    • 9: Data not used (so, only NA data should have this flag)
  • qc:

    • 1: Adjusted or unadjusted data
    • 0: Data appear of good quality but have not been subjected to full secondary QC
    • data with poor or uncertain quality are excluded.

Following flagging criteria were taken into account:

  • flag_f: 2
  • flag_qc: 1

The cleaning process was performed successively and the maps below represent the data coverage at various cleaning levels.

Summary statistics were calculated during cleaning process.

2.3.1 tco2

2.3.1.1 NA

Rows with missing tco2 in GLODAP-based subsetting model data were already removed in the preprocessing. The map below shows the coverage of preprocessed GLODAP-based subsetting model data.

GLODAP_stats <- GLODAP %>% 
  summarise(tco2_values = n())

GLODAP_obs_grid <- GLODAP %>% 
  count(lat, lon, era) %>% 
  mutate(cleaning_level = "tco2_values")
GLODAP_obs <- GLODAP %>% 
  group_by(lat, lon) %>% 
  summarise(n = n()) %>% 
  ungroup()

map +
  geom_raster(data = basinmask, aes(lon, lat, fill = basin)) +
  geom_raster(data = GLODAP_obs, aes(lon, lat)) +
  scale_fill_brewer(palette = "Dark2") +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
a145fa7 Donghe-Zhu 2021-02-09
1fad5f1 Donghe-Zhu 2021-02-07
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
16fba40 Donghe-Zhu 2021-01-28
ceed31b Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
rm(GLODAP_obs)

2.3.1.2 f flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, tco2f)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ tco2f) +
  theme(legend.position = "top")

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(GLODAP_obs_grid_temp)

GLODAP <- GLODAP %>%
  filter(tco2f %in% params_local$flag_f)

2.3.1.3 qc flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, tco2qc)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ tco2qc) +
  theme(legend.position = "top")

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
##

GLODAP <- GLODAP %>%
  filter(tco2qc %in% params_local$flag_qc)

GLODAP_stats_temp <- GLODAP %>%
  summarise(tco2_flag = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)
rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era) %>%
  mutate(cleaning_level = "tco2_flag")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)

2.3.2 talk

2.3.2.1 NA

GLODAP <- GLODAP %>% 
  mutate(talkna = if_else(is.na(talk), "NA", "Value"))

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, talkna)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ talkna) +
  theme(legend.position = "top")

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
GLODAP <- GLODAP %>% 
  select(-talkna) %>% 
  filter(!is.na(talk))

##

GLODAP_stats_temp <- GLODAP %>% 
  summarise(talk_values = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)
rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>% 
  count(lat, lon, era) %>% 
  mutate(cleaning_level = "talk_values")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)

2.3.2.2 f flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, talkf)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ talkf) +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
# ###

GLODAP <- GLODAP %>%
  filter(talkf %in% params_local$flag_f)

2.3.2.3 qc flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, talkqc)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ talkqc) +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
###

GLODAP <- GLODAP %>%
  filter(talkqc %in% params_local$flag_qc)

##

GLODAP_stats_temp <- GLODAP %>%
  summarise(talk_flag = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)
rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era) %>%
  mutate(cleaning_level = "talk_flag")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)

2.3.3 Phosphate

2.3.3.1 NA

GLODAP <- GLODAP %>% 
  mutate(phosphatena = if_else(is.na(phosphate), "NA", "Value"))

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, phosphatena)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
  scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era ~ phosphatena) +
  theme(legend.position = "top")

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
GLODAP <- GLODAP %>% 
  select(-phosphatena) %>% 
  filter(!is.na(phosphate))

##

GLODAP_stats_temp <- GLODAP %>% 
  summarise(phosphate_values = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)
rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>% 
  count(lat, lon, era) %>% 
  mutate(cleaning_level = "phosphate_values")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)

2.3.3.2 f flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, phosphatef)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
    scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era~phosphatef) +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
###

GLODAP <- GLODAP %>%
  filter(phosphatef %in% params_local$flag_f)

2.3.3.3 qc flag

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era, phosphateqc)

map +
  geom_raster(data = GLODAP_obs_grid_temp, aes(lon, lat, fill = n)) +
    scale_fill_viridis_c(option = "magma",
                       direction = -1,
                       trans = "log10") +
  facet_grid(era~phosphateqc) +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
###

GLODAP <- GLODAP %>%
  filter(phosphateqc %in% params_local$flag_qc)

##

GLODAP_stats_temp <- GLODAP %>%
  summarise(phosphate_flag = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)
rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era) %>%
  mutate(cleaning_level = "phosphate_flag")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)

2.3.4 eMLR variables

Variables required as predictors for the MLR fits, are subsetted for NAs and flags.

if ("temp" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(temp))
}

##

if ("sal" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(sal))
  
  GLODAP <- GLODAP %>%
    filter(salinityf %in% params_local$flag_f)
  
  GLODAP <- GLODAP %>%
    filter(salinityqc %in% params_local$flag_qc)
}

##

if ("silicate" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(silicate))
  
  GLODAP <- GLODAP %>%
    filter(silicatef %in% params_local$flag_f)
  
  GLODAP <- GLODAP %>%
    filter(silicateqc %in% params_local$flag_qc)
}

##

if ("oxygen" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(oxygen))
  
  GLODAP <- GLODAP %>%
    filter(oxygenf %in% params_local$flag_f)
  
  GLODAP <- GLODAP %>%
    filter(oxygenqc %in% params_local$flag_qc)
}

##

if ("aou" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(aou))
  
  GLODAP <- GLODAP %>%
    filter(aouf %in% params_local$flag_f)
}

##

if ("nitrate" %in% params_local$MLR_predictors) {
  GLODAP <- GLODAP %>%
    filter(!is.na(nitrate))
  
  GLODAP <- GLODAP %>%
    filter(nitratef %in% params_local$flag_f)
  
  GLODAP <- GLODAP %>%
    filter(nitrateqc %in% params_local$flag_qc)
}

##

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

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

##

GLODAP_stats_temp <- GLODAP %>%
  summarise(eMLR_variables = n())

GLODAP_stats <- cbind(GLODAP_stats, GLODAP_stats_temp)

rm(GLODAP_stats_temp)

##

GLODAP_obs_grid_temp <- GLODAP %>%
  count(lat, lon, era) %>%
  mutate(cleaning_level = "eMLR_variables")

GLODAP_obs_grid <-
  bind_rows(GLODAP_obs_grid, GLODAP_obs_grid_temp)

rm(GLODAP_obs_grid_temp)
GLODAP <- GLODAP %>% 
  select(-ends_with(c("f", "qc")))

2.4 Manual adjustment A16 cruise

For harmonization with Gruber et al. (2019), cruises 1041 (A16N) and 1042 (A16S) were grouped into the 2000-2012 era despite taking place in 2013/14.

GLODAP_cruises <- GLODAP %>% 
  filter(basin_AIP == "Atlantic",
         year %in% c(2013, 2014)) %>% 
  count(lat, lon, cruise)

map +
  geom_raster(data = GLODAP_cruises, aes(lon, lat, fill = as.factor(cruise))) +
  scale_fill_brewer(palette = "Dark2") +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
c8b76b3 jens-daniel-mueller 2020-12-19
rm(GLODAP_cruises)
if (params_local$A16_GO_SHIP == "y") {

GLODAP <- GLODAP %>%
   mutate(era = if_else(cruise %in% c(1041, 1042),
                        sort(unique(GLODAP$era))[2], era))

}

2.5 Create clean observations grid

Grid containing all grid cells where at least one synthetic subsetting remains available after cleaning.

GLODAP_obs_grid_clean <- GLODAP %>% 
  count(lat, lon) %>% 
  select(-n)

random_obs_grid_clean <- random %>% 
  count(lat, lon) %>% 
  select(-n)

2.6 Write summary file

GLODAP_obs_grid_clean  %>%  write_csv(paste(
  path_version_data,
  "GLODAPv2.2020_clean_GLODAP_obs_grid.csv",
  sep = ""
))

# select relevant columns for further analysis
GLODAP <- GLODAP %>%
  select(
    year,
    date,
    era,
    basin,
    basin_AIP,
    lat,
    lon,
    cruise,
    bottomdepth,
    depth,
    temp,
    sal,
    gamma,
    tco2,
    talk,
    phosphate,
    oxygen,
    aou,
    nitrate,
    silicate
  )

GLODAP  %>%  write_csv(paste(path_version_data,
                             "GLODAPv2.2020_clean_GLODAP.csv",
                             sep = ""))

random_obs_grid_clean  %>%  write_csv(paste(
  path_version_data,
  "GLODAPv2.2020_clean_random_obs_grid.csv",
  sep = ""
))

random  %>%  write_csv(paste(path_version_data,
                             "GLODAPv2.2020_clean_random.csv",
                             sep = ""))

3 Overview plots

3.1 Cleaning stats

Number of GLODAP-based subsetting model data at various steps of data cleaning.

GLODAP_stats_long <- GLODAP_stats %>%
  pivot_longer(1:length(GLODAP_stats),
               names_to = "parameter",
               values_to = "n")

GLODAP_stats_long <- GLODAP_stats_long %>%
  mutate(parameter = fct_reorder(parameter, n))

GLODAP_stats_long %>% 
  ggplot(aes(parameter, n/1000)) +
  geom_col() +
  coord_flip() +
  theme(axis.title.y = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
354c224 Donghe-Zhu 2021-02-24
5dce4b1 Donghe-Zhu 2021-02-15
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
fb8a752 Donghe-Zhu 2020-12-23
rm(GLODAP_stats_long)

3.2 Assign coarse spatial grid

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

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

3.3 Histogram Zonal coverage

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

GLODAP_histogram_lat %>%
  ggplot(aes(lat_grid, n, fill = era)) +
  geom_col() +
  scale_fill_brewer(palette = "Dark2") +
  facet_wrap( ~ basin) +
  coord_flip() +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
3607f4d Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
a145fa7 Donghe-Zhu 2021-02-09
1fad5f1 Donghe-Zhu 2021-02-07
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
ceed31b Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(GLODAP_histogram_lat)

random_histogram_lat <- random %>%
  group_by(era, lat_grid, basin) %>%
  tally() %>%
  ungroup()

random_histogram_lat %>%
  ggplot(aes(lat_grid, n, fill = era)) +
  geom_col() +
  scale_fill_brewer(palette = "Dark2") +
  facet_wrap( ~ basin) +
  coord_flip() +
  theme(legend.position = "top",
        legend.title = element_blank())

Version Author Date
65b0cef Donghe-Zhu 2021-03-07
4083a6c Donghe-Zhu 2021-03-07
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
a076226 Donghe-Zhu 2021-01-11
rm(random_histogram_lat)

3.4 Median years (tref)

Median years of each era (tref) were determined as:

era_median_year_GLODAP <- GLODAP %>%
  group_by(era) %>%
  summarise(t_ref = median(year)) %>%
  ungroup()

era_median_year_GLODAP
# A tibble: 3 x 2
  era       t_ref
  <fct>     <dbl>
1 1982-1999  1995
2 2000-2012  2007
3 2013-2019  2015
era_median_year_random <- random %>%
  group_by(era) %>%
  summarise(t_ref = median(year)) %>%
  ungroup()

era_median_year_random
# A tibble: 3 x 2
  era       t_ref
  <fct>     <dbl>
1 1982-1999  1991
2 2000-2012  2006
3 2013-2019  2016

3.5 Histogram temporal coverage

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

GLODAP_histogram_year %>%
  ggplot() +
  geom_vline(xintercept = c(
    params_local$era_breaks + 0.5
  )) +
  geom_col(aes(year, n, fill = basin)) +
  geom_point(
    data = era_median_year_GLODAP,
    aes(t_ref, 0, shape = "Median year"),
    size = 2,
    fill = "white"
  ) +
  scale_fill_brewer(palette = "Dark2") +
  scale_shape_manual(values = 24, name = "") +
  scale_y_continuous() +
  coord_cartesian() +
  theme(
    legend.position = "top",
    legend.direction = "vertical",
    legend.title = element_blank(),
    axis.title.x = element_blank()
  )

Version Author Date
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
1fad5f1 Donghe-Zhu 2021-02-07
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
ceed31b Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(GLODAP_histogram_year,
   era_median_year_GLODAP)

random_histogram_year <- random %>%
  group_by(year, basin) %>%
  tally() %>%
  ungroup()

random_histogram_year %>%
  ggplot() +
  geom_vline(xintercept = c(
    params_local$era_breaks + 0.5
  )) +
  geom_col(aes(year, n, fill = basin)) +
  geom_point(
    data = era_median_year_random,
    aes(t_ref, 0, shape = "Median year"),
    size = 2,
    fill = "white"
  ) +
  scale_fill_brewer(palette = "Dark2") +
  scale_shape_manual(values = 24, name = "") +
  scale_y_continuous() +
  coord_cartesian() +
  theme(
    legend.position = "top",
    legend.direction = "vertical",
    legend.title = element_blank(),
    axis.title.x = element_blank()
  )

Version Author Date
65b0cef Donghe-Zhu 2021-03-07
4083a6c Donghe-Zhu 2021-03-07
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
a076226 Donghe-Zhu 2021-01-11
rm(random_histogram_year,
   era_median_year_random)

3.6 Zonal temporal coverage (Hovmoeller)

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

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

Version Author Date
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
354c224 Donghe-Zhu 2021-02-24
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
5dce4b1 Donghe-Zhu 2021-02-15
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
a145fa7 Donghe-Zhu 2021-02-09
1fad5f1 Donghe-Zhu 2021-02-07
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
16fba40 Donghe-Zhu 2021-01-28
ceed31b Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(GLODAP_hovmoeller_year)

random_hovmoeller_year <- random %>%
  group_by(year, lat_grid, basin) %>%
  tally() %>%
  ungroup()

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

Version Author Date
65b0cef Donghe-Zhu 2021-03-07
4083a6c Donghe-Zhu 2021-03-07
3fbbfa4 Donghe-Zhu 2021-03-07
627c8fb Donghe-Zhu 2021-03-07
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
57f701e Donghe-Zhu 2021-02-24
06f3149 Donghe-Zhu 2021-02-16
4469a0c Donghe-Zhu 2021-02-13
5ae6a69 Donghe-Zhu 2021-02-10
05385dc Donghe-Zhu 2021-02-10
f791ae4 Donghe-Zhu 2021-02-09
f71ae34 Donghe-Zhu 2021-02-09
a145fa7 Donghe-Zhu 2021-02-09
c344e42 Donghe-Zhu 2021-02-08
1fad5f1 Donghe-Zhu 2021-02-07
ca03c39 Donghe-Zhu 2021-02-07
cd7c52c Donghe-Zhu 2021-02-04
bcf84f4 Donghe-Zhu 2021-02-02
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
59e006e Donghe-Zhu 2021-01-31
a1c8f87 Donghe-Zhu 2021-01-31
ae5c18f Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
16fba40 Donghe-Zhu 2021-01-28
12bc567 Donghe-Zhu 2021-01-27
ceed31b Donghe-Zhu 2021-01-27
342402d Donghe-Zhu 2021-01-27
5bad5c2 Donghe-Zhu 2021-01-27
61efb56 Donghe-Zhu 2021-01-25
48f638e Donghe-Zhu 2021-01-25
a2f0d56 Donghe-Zhu 2021-01-23
28509fc Donghe-Zhu 2021-01-23
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
d4cf1cb Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
b3564aa jens-daniel-mueller 2021-01-14
8d032c3 jens-daniel-mueller 2021-01-14
a076226 Donghe-Zhu 2021-01-11
rm(random_hovmoeller_year)

3.7 Coverage maps by era

3.7.1 Subsetting process

The following plots show the remaining data after individual cleaning steps, separately for each era.

GLODAP_obs_grid <- GLODAP_obs_grid %>%
  mutate(cleaning_level = factor(
           cleaning_level,
           unique(GLODAP_obs_grid$cleaning_level)
         ))

map +
  geom_raster(data = GLODAP_obs_grid %>%
                filter(cleaning_level == "tco2_values") %>%
                select(-cleaning_level),
              aes(lon, lat, fill = "tco2_values")) +
  geom_raster(data = GLODAP_obs_grid %>%
                filter(cleaning_level != "tco2_values"),
              aes(lon, lat, fill = "subset")) +
  scale_fill_brewer(palette = "Set1", name = "") +
  facet_grid(cleaning_level ~ era) +
  theme(legend.position = "top",
        axis.title = element_blank())

Version Author Date
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
5dce4b1 Donghe-Zhu 2021-02-15
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

3.7.2 Final input data

The following plots show the remaining data density in each grid cell after all cleaning steps, separately for each era.

GLODAP_tco2_grid <- GLODAP %>%
  count(lat, lon)

map +
  # geom_raster(data = GLODAP_tco2_grid, aes(lon, lat), fill = "grey80") +
  geom_bin2d(data = GLODAP,
             aes(lon, lat),
             binwidth = c(1,1)) +
  scale_fill_viridis_c(option = "magma", direction = -1, trans = "log10") +
  facet_wrap(~era, ncol = 1) +
  labs(title = "Cleaned GLODAP-based model subsetting",
       subtitle = paste("Version:", params_local$Version_ID)) +
  theme(axis.title = element_blank())

Version Author Date
627c8fb Donghe-Zhu 2021-03-07
3607f4d Donghe-Zhu 2021-03-07
8c1e978 Donghe-Zhu 2021-03-05
865f68c Donghe-Zhu 2021-03-05
59288fe Donghe-Zhu 2021-03-04
731abc8 Donghe-Zhu 2021-03-04
e2a5a33 Donghe-Zhu 2021-03-04
c7892c1 Donghe-Zhu 2021-03-04
924430b Donghe-Zhu 2021-03-03
0d0bca1 Donghe-Zhu 2021-03-03
cb63c16 Donghe-Zhu 2021-03-03
ffda45a Donghe-Zhu 2021-03-03
89c3e58 Donghe-Zhu 2021-03-03
13666ca Donghe-Zhu 2021-03-01
7a388f7 Donghe-Zhu 2021-03-01
66ff99f Donghe-Zhu 2021-03-01
ac9bb7a Donghe-Zhu 2021-02-28
efdc047 Donghe-Zhu 2021-02-28
19edd1e Donghe-Zhu 2021-02-27
f20483f Donghe-Zhu 2021-02-26
6a2c7b3 Donghe-Zhu 2021-02-25
354c224 Donghe-Zhu 2021-02-24
5dce4b1 Donghe-Zhu 2021-02-15
865b582 Donghe-Zhu 2021-01-31
3e68089 Donghe-Zhu 2021-01-31
ecf335c Donghe-Zhu 2021-01-31
a618965 Donghe-Zhu 2021-01-31
b50fe52 Donghe-Zhu 2021-01-31
ac99ae5 jens-daniel-mueller 2021-01-29
b5bdcaf Donghe-Zhu 2021-01-29
372adf5 Donghe-Zhu 2021-01-29
af8788e Donghe-Zhu 2021-01-29
21c91c9 Donghe-Zhu 2021-01-29
eded038 Donghe-Zhu 2021-01-29
541d4dd Donghe-Zhu 2021-01-29
6a75576 Donghe-Zhu 2021-01-28
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
c569946 Donghe-Zhu 2021-01-24
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
1f3e5b6 jens-daniel-mueller 2021-01-20
0e7bdf1 jens-daniel-mueller 2021-01-15
4571843 jens-daniel-mueller 2021-01-14
e5cb81a Donghe-Zhu 2021-01-05
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
ggsave(path = path_version_figures,
       filename = "data_distribution_era.png",
       height = 8,
       width = 5)

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.2

Matrix products: default
BLAS:   /usr/local/R-4.0.3/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.0.3/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] lubridate_1.7.9 metR_0.9.0      scico_1.2.0     patchwork_1.1.1
 [5] collapse_1.5.0  forcats_0.5.0   stringr_1.4.0   dplyr_1.0.2    
 [9] purrr_0.3.4     readr_1.4.0     tidyr_1.1.2     tibble_3.0.4   
[13] ggplot2_3.3.3   tidyverse_1.3.0 workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] httr_1.4.2               jsonlite_1.7.2           viridisLite_0.3.0       
 [4] here_1.0.1               modelr_0.1.8             assertthat_0.2.1        
 [7] blob_1.2.1               cellranger_1.1.0         yaml_2.2.1              
[10] pillar_1.4.7             backports_1.1.10         lattice_0.20-41         
[13] glue_1.4.2               RcppEigen_0.3.3.9.1      digest_0.6.27           
[16] RColorBrewer_1.1-2       promises_1.1.1           checkmate_2.0.0         
[19] rvest_0.3.6              colorspace_2.0-0         htmltools_0.5.0         
[22] httpuv_1.5.4             Matrix_1.2-18            pkgconfig_2.0.3         
[25] broom_0.7.5              haven_2.3.1              scales_1.1.1            
[28] whisker_0.4              later_1.1.0.1            git2r_0.27.1            
[31] generics_0.1.0           farver_2.0.3             ellipsis_0.3.1          
[34] withr_2.3.0              cli_2.2.0                magrittr_2.0.1          
[37] crayon_1.3.4             readxl_1.3.1             evaluate_0.14           
[40] fs_1.5.0                 fansi_0.4.1              xml2_1.3.2              
[43] RcppArmadillo_0.10.1.2.2 tools_4.0.3              data.table_1.13.6       
[46] hms_0.5.3                lifecycle_0.2.0          munsell_0.5.0           
[49] reprex_0.3.0             compiler_4.0.3           rlang_0.4.10            
[52] grid_4.0.3               rstudioapi_0.13          labeling_0.4.2          
[55] rmarkdown_2.5            gtable_0.3.0             DBI_1.1.0               
[58] R6_2.5.0                 knitr_1.30               utf8_1.1.4              
[61] rprojroot_2.0.2          stringi_1.5.3            parallel_4.0.3          
[64] Rcpp_1.0.5               vctrs_0.3.6              dbplyr_1.4.4            
[67] tidyselect_1.1.0         xfun_0.20