Last updated: 2021-01-27

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 9655866. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

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


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

Unstaged changes:
    Modified:   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/mapping_predictor_preparation.Rmd) and HTML (docs/mapping_predictor_preparation.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 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.
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.
Rmd 560dcf7 Donghe-Zhu 2021-01-25 no temp
html 05ffb0c Donghe-Zhu 2021-01-25 Build site.
html 8b97165 Donghe-Zhu 2021-01-25 Build site.
Rmd c41c01f Donghe-Zhu 2021-01-25 OXYGEN REPLACE AOU
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.
Rmd 30afcd9 jens-daniel-mueller 2021-01-20 local rebuild after revision
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 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.
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 00a1322 Donghe-Zhu 2020-12-21 first build after creating model template
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 Required data

Currently, following data sets are used for mapping:

  • Cmorized model runA climatologies in 2007, with variables
    • Phosphate (-> phosphate_star)
    • Silicate
    • Oxygen
    • AOU (already calculated)
    • TAlk (surface only)
    • TCO2 (surface only)
if (params_local$model_runs == "AD") {
  
  climatology <- read_csv(paste(path_preprocessing, "climatology_runA_2007.csv", sep = ""))
  
}

if (params_local$model_runs == "CB") {
  
  climatology <- read_csv(paste(path_preprocessing, "climatology_runC_2007.csv", sep = ""))
  
}

climatology <- climatology %>%
  rename(aou = AOU, TCO2 = tco2, TAlk = talk)

predictors <- climatology %>%
  select(lon, lat, depth, basin_AIP, gamma, 
         phosphate, oxygen, temp,
         any_of(params_local$MLR_predictors))
predictors_surface <- climatology %>%
  select(lon, lat, depth, basin_AIP, gamma, sal, temp, TCO2, TAlk, phosphate, silicate)

1.1 Apply density threshold

The predictor field was split into two parts:

  1. Deep water: neutral densities >= 26 and depth >= 150m
  2. Shallow water: rest
# predictors for deep waters
predictors <- predictors %>%
  filter(depth >= params_local$depth_min | gamma >= params_local$gamma_min)

# predictors for surface waters
predictors_surface <- predictors_surface %>%
  filter(depth < params_local$depth_min,
         gamma < params_local$gamma_min)

1.2 Apply basin mask

Data outside the WOA18 basin mask were removed for further analysis.

predictors <- inner_join(predictors, basinmask)
predictors_surface <- inner_join(predictors_surface, basinmask)

1.3 Control plots

Plots below are generated to control successful merging of data sets.

1.3.1 Maps interior

p_map_climatology(
  df = predictors, 
  var = "phosphate")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
p_map_climatology(
  df = predictors, 
  var = "temp")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

1.3.2 Maps surface

p_map_climatology(
  df = predictors_surface, 
  var = "TAlk")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
p_map_climatology(
  df = predictors_surface, 
  var = "TCO2")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
p_map_climatology(
  df = predictors_surface, 
  var = "sal")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
p_map_climatology(
  df = predictors_surface, 
  var = "temp")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

1.3.3 Predictor profiles

Likewise, predictor profiles for the North Atlantic (40.5 / 335.5) are plotted to control successful merging of the data sets.

# subset data
N_Atl <- predictors %>% 
  filter(lat == params_global$lat_Atl_profile,
         lon == params_global$lon_Atl_section)

# pivot table to long format
N_Atl <- N_Atl %>%
  select(-c(basin, basin_AIP)) %>%
  pivot_longer(c(any_of(params_local$MLR_predictors), gamma), 
               names_to = "parameter", values_to = "value")

# plot profiles
N_Atl %>% 
  ggplot(aes(value, depth)) +
  geom_path() +
  geom_point() +
  scale_y_reverse() +
  facet_wrap(~parameter,
             scales = "free_x",
             ncol = 2)

Version Author Date
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
4c28e4a Donghe-Zhu 2021-01-22
24cc264 jens-daniel-mueller 2021-01-22
7891955 Donghe-Zhu 2021-01-21
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
rm(N_Atl)

2 Prepare predictor fields

Additional predictor fields need to calculated from available climatologies

2.1 PO4* calculation

The predictor PO4* was be calculated according to Clement and Gruber (2018), ie based on oxygen. Please note that an erroneous equations for PO4* calculation is given in the supplement of Gruber et al (2019), based on nitrate.

predictors <- predictors %>% 
  mutate(phosphate_star = b_phosphate_star(phosphate, oxygen))

2.1.1 Maps

p_map_climatology(
  df = predictors,
  var = "phosphate_star",
  col = "divergent")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

2.1.2 Global section

p_section_global(
  df = predictors,
  var = "phosphate_star",
  col = "divergent")

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

2.2 AOU

AOU was calculated as the difference between saturation concentration and observed concentration. CAVEAT: Algorithms used to calculate oxygen saturation concentration are not yet identical in GLODAP data set (fitting) and predictor climatologies (mapping).

2.2.1 Maps

if ("aou" %in% params_local$MLR_predictors){
p_map_climatology(
  df = predictors,
  var = "aou",
  col = "divergent")
}

Version Author Date
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

2.2.2 Global section

if ("aou" %in% params_local$MLR_predictors){
p_section_global(
  df = predictors,
  var = "aou",
  col = "divergent")
}

Version Author Date
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

2.3 Isoneutral slabs

The following boundaries for isoneutral slabs were defined:

  • Atlantic: -, 26, 26.5, 26.75, 27, 27.25, 27.5, 27.75, 27.85, 27.95, 28.05, 28.1, 28.15, 28.2,
  • Indo-Pacific: -, 26, 26.5, 26.75, 27, 27.25, 27.5, 27.75, 27.85, 27.95, 28.05, 28.1,

Continuous neutral density (gamma) values based on WOA18 are grouped into isoneutral slabs.

predictors <- m_cut_gamma(predictors, "gamma")

3 Plot all predictor sections

3.1 Deep waters

Predictor sections along with lines are shown below for each (potential) predictor variable.

map +
  geom_bin2d(data = predictors,
             aes(lon, lat),
             binwidth = c(1, 1)) +
  geom_vline(xintercept = params_global$longitude_sections_regular,
             col = "white") +
  scale_fill_viridis_c(direction = -1,
                       name = "Number of depth levels") +
  theme(legend.position = "bottom")

Version Author Date
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
7cdea0c jens-daniel-mueller 2021-01-06
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
for (i_var in append(params_local$MLR_predictors, "gamma")) {
  print(
    p_section_climatology_regular(
      df = predictors,
      var = i_var)
    )
}

Version Author Date
c1cec47 Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
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
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

Version Author Date
48f638e Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
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
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

Version Author Date
48f638e Donghe-Zhu 2021-01-25
05ffb0c Donghe-Zhu 2021-01-25
8b97165 Donghe-Zhu 2021-01-25
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
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

Version Author Date
48f638e 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
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
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

Version Author Date
48f638e 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
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
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

Version Author Date
48f638e 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
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
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

Version Author Date
48f638e 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
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
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

Version Author Date
48f638e 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
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
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.2 Surface waters

Predictor sections along with lines are shown below for each (potential) predictor variable.

map +
  geom_bin2d(data = predictors_surface,
             aes(lon, lat),
             binwidth = c(1, 1)) +
  geom_vline(xintercept = params_global$longitude_sections_regular,
             col = "white") +
  scale_fill_viridis_c(direction = -1, name = "Number of depth levels") +
  theme(legend.position = "bottom")

Version Author Date
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
7cdea0c jens-daniel-mueller 2021-01-06
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19
vars <-
  c(
    "gamma",
    "sal",
    "temp",
    "TCO2",
    "TAlk"
  )

# i_var <- vars[1]

for (i_var in vars) {
  print(
    p_section_climatology_regular(
      df = predictors_surface,
      var = i_var,
      surface = "y")
    )
}

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

Version Author Date
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
a499f10 Donghe-Zhu 2021-01-05
8fae0b2 Donghe-Zhu 2020-12-21
c8b76b3 jens-daniel-mueller 2020-12-19

4 Write csv

predictors %>%
  write_csv(paste(path_version_data,
                  "predictors_M2007.csv",
                  sep = ""))

predictors_surface %>%
  write_csv(paste(path_version_data,
                  "predictors_surface_M2007.csv",
                  sep = ""))

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] gsw_1.0-5       testthat_3.0.1  marelac_2.1.10  shape_1.4.5    
 [5] metR_0.9.0      scico_1.2.0     patchwork_1.1.1 collapse_1.5.0 
 [9] forcats_0.5.0   stringr_1.4.0   dplyr_1.0.2     purrr_0.3.4    
[13] readr_1.4.0     tidyr_1.1.2     tibble_3.0.4    ggplot2_3.3.3  
[17] tidyverse_1.3.0 workflowr_1.6.2

loaded via a namespace (and not attached):
 [1] httr_1.4.2               viridisLite_0.3.0        jsonlite_1.7.2          
 [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] promises_1.1.1           checkmate_2.0.0          rvest_0.3.6             
[19] colorspace_2.0-0         htmltools_0.5.0          httpuv_1.5.4            
[22] Matrix_1.2-18            pkgconfig_2.0.3          broom_0.7.3             
[25] seacarb_3.2.15           haven_2.3.1              scales_1.1.1            
[28] whisker_0.4              later_1.1.0.1            git2r_0.27.1            
[31] farver_2.0.3             generics_0.1.0           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 oce_1.2-0                tools_4.0.3             
[46] data.table_1.13.6        hms_0.5.3                lifecycle_0.2.0         
[49] munsell_0.5.0            reprex_0.3.0             isoband_0.2.3           
[52] compiler_4.0.3           rlang_0.4.10             grid_4.0.3              
[55] rstudioapi_0.13          labeling_0.4.2           rmarkdown_2.5           
[58] gtable_0.3.0             DBI_1.1.0                R6_2.5.0                
[61] lubridate_1.7.9          knitr_1.30               rprojroot_2.0.2         
[64] stringi_1.5.3            parallel_4.0.3           Rcpp_1.0.5              
[67] vctrs_0.3.6              dbplyr_1.4.4             tidyselect_1.1.0        
[70] xfun_0.20