Last updated: 2022-10-23

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 221ee12. 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:    data/
    Ignored:    output/

Untracked files:
    Untracked:  code/read_GLODAPv2_2022.Rmd

Unstaged changes:
    Modified:   code/Workflowr_project_managment.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/read_OceanSODA.Rmd) and HTML (docs/read_OceanSODA.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
html e949567 jens-daniel-mueller 2022-04-13 Build site.
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 f088f55 jens-daniel-mueller 2022-04-01 Build site.
html 569e06b jens-daniel-mueller 2022-04-01 Build site.
Rmd fdb43d3 jens-daniel-mueller 2022-04-01 rerun all including arctic and North Atlantic biome
html 6e65117 jens-daniel-mueller 2022-02-16 Build site.
Rmd fc1cf80 jens-daniel-mueller 2022-02-15 rerun with flux products
html a36645f jens-daniel-mueller 2021-12-23 Build site.
Rmd 513243c jens-daniel-mueller 2021-12-23 plot regional time series and moving average
html 8cc98a8 jens-daniel-mueller 2021-12-13 Build site.
Rmd bab6472 jens-daniel-mueller 2021-12-13 decadal climatology offset added
html b6d0770 jens-daniel-mueller 2021-12-13 Build site.
Rmd cb88dbc jens-daniel-mueller 2021-12-13 decadal climatology added
html d6c2d11 jens-daniel-mueller 2021-11-22 Build site.
Rmd 5d9ebb2 jens-daniel-mueller 2021-11-22 calculate revelle factor historical
html f2871b9 jens-daniel-mueller 2021-11-20 Build site.
html 0908ee5 jens-daniel-mueller 2021-11-15 Build site.
html 002b89c jens-daniel-mueller 2021-10-06 Build site.
Rmd 2f78646 jens-daniel-mueller 2021-10-06 OceanSODA read-in updated
html 767aa26 jens-daniel-mueller 2021-10-06 Build site.
Rmd 5ed301b jens-daniel-mueller 2021-10-06 OceanSODA read-in updated
html 3a99e0b jens-daniel-mueller 2021-10-05 Build site.
Rmd f36c707 jens-daniel-mueller 2021-10-05 OceanSODA read-in updated
html 5db29f4 jens-daniel-mueller 2021-10-05 Build site.
Rmd caf8c9a jens-daniel-mueller 2021-10-05 OceanSODA read-in updated
html e49875a jens-daniel-mueller 2021-07-07 Build site.
html 6312bd4 jens-daniel-mueller 2021-07-07 Build site.
html 58bc706 jens-daniel-mueller 2021-07-06 Build site.
html f600971 jens-daniel-mueller 2021-07-02 Build site.
html ad81465 jens-daniel-mueller 2021-06-17 Build site.
Rmd 3bc04be jens-daniel-mueller 2021-06-17 derive air sea disequilibrium
html 240c1f4 jens-daniel-mueller 2021-06-07 Build site.
Rmd 2730067 jens-daniel-mueller 2021-06-07 write preprocessed file
html 4df00b5 jens-daniel-mueller 2021-06-07 Build site.
Rmd f16f718 jens-daniel-mueller 2021-06-07 added multi parameter analysis global trends
html 8186273 jens-daniel-mueller 2021-06-07 Build site.
Rmd 663eb4d jens-daniel-mueller 2021-06-07 added multi parameter analysis
html efc80ab jens-daniel-mueller 2021-06-07 Build site.
Rmd 0f42222 jens-daniel-mueller 2021-06-07 improved revelle factor analysis
html 265c4ef jens-daniel-mueller 2021-06-04 Build site.
Rmd 00065c8 jens-daniel-mueller 2021-06-04 included OceanSODA

1 Read source files

basinmask_5 <- basinmask %>% 
  filter(MLR_basins == "5") %>% 
  select(lat, lon, basin)

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

1.1 OceanSODA

OceanSODA <-
  tidync(paste(
    path_updata,
    "pco2_oceansoda-ethz/OS-ETHZ-GRaCER-v2021a_1982-2020.nc",
    sep = ""
  ))

OceanSODA <- OceanSODA %>%
  hyper_tibble()

OceanSODA <- OceanSODA %>%
  mutate(date = as.Date(time, origin = '1982-01-15'),
         year = year(date))

OceanSODA <- OceanSODA %>%
  select(year, date, lat, lon,
         sal = salinity, temp = temperature,
         tco2 = dic, talk, 
         rev_fac = revelle_factor,
         pCO2 = spco2,
         fgco2)

1.2 SeaFlux

path_SeaFlux <- 
paste0(path_updata,"pco2_seaflux/")

ice <-
  tidync(paste0(path_SeaFlux,
                "SeaFlux_v2021.04_ice_1982-2020.nc")) %>% 
  hyper_tibble()

ice <- ice %>%
  mutate(date = as.Date(time, origin = '1982-01-15'),
         year = year(date))

kw <-
  tidync(paste0(path_SeaFlux,
                "SeaFlux_v2021.04_kw_quadratic_scaled_1982-2020.nc"))

kw <- kw %>% 
  hyper_filter(wind = wind == "ERA5") %>% 
  hyper_tibble() %>% 
  select(-wind)


pCO2atm <-
  tidync(paste0(path_SeaFlux,
                "SeaFlux_v2021.04_pco2atm_1982-2020.nc")) %>% 
  hyper_tibble()

sol <-
  tidync(paste0(path_SeaFlux,
                "SeaFlux_v2021.04_solWeis74_1982-2020.nc")) %>% 
  hyper_tibble()

1.3 Join data

all_variables <- full_join(ice, kw)
all_variables <- full_join(all_variables, pCO2atm)
all_variables <- full_join(all_variables, sol)

OceanSODA <- inner_join(all_variables,
                        OceanSODA)

OceanSODA <- OceanSODA %>%
  mutate(lon = if_else(lon < 20, lon + 360, lon))

OceanSODA <- inner_join(OceanSODA, basinmask)

OceanSODA <- OceanSODA %>% 
  select(-time)

1.4 Atm pCO2

# Note: this file is only created downstream in read_CO2_atm.Rmd
co2_atm_reccap2 <-
  read_csv(paste(path_preprocessing,
                 "co2_atm_reccap2.csv",
                 sep = ""))

2 Air-sea disequilibrium

all_variables <- OceanSODA %>%
  select(
    time_mon = date,
    lon,
    lat,
    spco2 = pCO2,
    pco2atm = pco2atm,
    fice = ice,
    alpha = sol,
    Kw = kw
  ) %>%
  drop_na()

all_variables <- all_variables %>%
  mutate(area = earth_surf(lat = lat))

mol_to_g <- 12.011
P <- 1e-15
cm_to_m <- 100
hr_to_yr <- 24 * 365

unit_conversion_to_PgCyr <- mol_to_g * P * hr_to_yr / cm_to_m

all_variables <- all_variables %>%
  mutate(
    delta_pco2 = spco2 - pco2atm,
    scale = area * Kw * alpha * (1 - fice),
    fgco2 = delta_pco2 * scale
  )

delta_pco2_monthly <- all_variables %>%
  group_by(time_mon) %>%
  summarise(
    scaling_glob = sum(scale),
    fgco2_glob = sum(fgco2),
    delta_pco2_glob = fgco2_glob / scaling_glob
  ) %>%
  ungroup() %>%
  mutate(fgco2_glob = fgco2_glob * unit_conversion_to_PgCyr)

delta_pco2_annual <- delta_pco2_monthly %>%
  mutate(year = year(time_mon)) %>%
  group_by(year) %>%
  summarise(
    scaling_glob = mean(scaling_glob),
    fgco2_glob = mean(fgco2_glob),
    delta_pco2_glob = mean(delta_pco2_glob)
  ) %>%
  ungroup()

delta_pco2_annual <- delta_pco2_annual %>%
  mutate(fgco2_glob_roll = zoo::rollmean(fgco2_glob, 10, fill = NA))


ggplot() +
  geom_path(data = delta_pco2_monthly,
            aes(decimal_date(time_mon), delta_pco2_glob, col = "monthly")) +
  geom_path(data = delta_pco2_annual,
            aes(year, delta_pco2_glob, col = "annual")) +
  scale_color_brewer(palette = "Set1", name = "Average") +
  labs(x = "year")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
d6c2d11 jens-daniel-mueller 2021-11-22
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
ggplot() +
  geom_path(data = delta_pco2_monthly,
            aes(decimal_date(time_mon), fgco2_glob, col = "monthly")) +
  geom_path(data = delta_pco2_annual,
            aes(year, fgco2_glob, col = "annual")) +
  geom_path(data = delta_pco2_annual,
            aes(year, fgco2_glob_roll, col = "5yr roll ave")) +
  scale_color_brewer(palette = "Set1", name = "Average") +
  labs(x = "year")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23
d6c2d11 jens-daniel-mueller 2021-11-22
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
ggplot() +
  geom_path(data = delta_pco2_annual,
            aes(year,
                scaling_glob * unit_conversion_to_PgCyr))

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
d6c2d11 jens-daniel-mueller 2021-11-22
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
ggplot() +
  geom_path(
    data = delta_pco2_annual,
    aes(
      year,
      scaling_glob * delta_pco2_glob * unit_conversion_to_PgCyr,
      col = "scaled"
    )
  ) +
  geom_path(data = delta_pco2_annual,
            aes(year, fgco2_glob, col = "integrated")) +
  scale_color_brewer(palette = "Set1", name = "Estimate") +
  scale_y_continuous(name = "Air-sea flux [PgC yr-1]") +
  labs(x = "year")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
d6c2d11 jens-daniel-mueller 2021-11-22
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17

3 Compute climatologies

# calculate annual averaged fields
OceanSODA_annual_all <- OceanSODA %>%
  mutate(tco2_over_pCO2 = tco2 / pCO2) %>%
  group_by(year, lat, lon) %>%
  summarise_if(is.numeric, mean, na.rm = TRUE) %>%
  ungroup() %>%
  mutate(grid_area = earth_surf(lat = lat))

# grid data in space and time, remove data outside grid
OceanSODA_annual <- OceanSODA_annual_all %>%
  mutate(
    grid_area = earth_surf(lat = lat),
    lat_bands = cut(lat, seq(-80, 80, 20)),
    decade = cut(year,
                 seq(1990, 2020, 10),
                 right = FALSE,
                 labels = c("1990-1999", "2000-2009", "2010-2019"))
  ) %>%
  drop_na()


# calculate climatological fields
OceanSODA_clim <- OceanSODA_annual %>%
  select(-c(grid_area)) %>% 
  group_by(lat, lon) %>%
  summarise_if(is.numeric, mean, na.rm = TRUE) %>% 
  ungroup()

# calculate decadal climatological fields
OceanSODA_clim_decadal <- OceanSODA_annual %>%
  select(-c(grid_area)) %>% 
  group_by(lat, lon, decade) %>%
  summarise_if(is.numeric, mean, na.rm = TRUE) %>% 
  ungroup()


# calculate area-weighted annual mean within latitude band 
OceanSODA_annual_lat <- OceanSODA_annual %>%
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>%
  mutate(value_area = value * grid_area) %>% 
  group_by(year, lat_bands, decade, parameter) %>%
  summarise(
    area_total = sum(grid_area),
    value_area_total = sum(value_area),
    value_area_ave = value_area_total / area_total
  ) %>%
  ungroup() %>% 
  select(-c(area_total,value_area_total))


# fit decadel linear trends per latitude band
OceanSODA_annual_lat_trend <- OceanSODA_annual_lat %>% 
  nest(data = -c(decade, lat_bands, parameter)) %>% 
  mutate(tidy = map(data,
                    ~tidy(lm(value_area_ave ~ year, data = .x)))) %>% 
  select(-data) %>% 
  unnest(tidy)


# calculate area-weighted annual mean globally
OceanSODA_annual_glob <- OceanSODA_annual %>%
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>%
  mutate(value_area = value * grid_area) %>% 
  group_by(year, decade, parameter) %>%
  summarise(
    area_total = sum(grid_area),
    value_area_total = sum(value_area),
    value_area_ave = value_area_total / area_total
  ) %>%
  ungroup() %>% 
  select(-c(area_total,value_area_total))


# fit decadel linear trends globally
OceanSODA_annual_glob_trend <- OceanSODA_annual_glob %>% 
  nest(data = -c(decade, parameter)) %>% 
  mutate(tidy = map(data,
                    ~tidy(lm(value_area_ave ~ year, data = .x)))) %>% 
  select(-data) %>% 
  unnest(tidy)


#regionall integrated air sea fluxes

OceanSODA_annual_5 <- left_join(basinmask_5,
                                OceanSODA_annual_all)

# calculate area-weighted annual mean globally
OceanSODA_annual_5 <- OceanSODA_annual_5 %>%
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>%
  mutate(value_area = value * grid_area) %>% 
  group_by(year, parameter, basin) %>%
  summarise(
    area_total = sum(grid_area, na.rm = TRUE),
    value_area_total = sum(value_area, na.rm = TRUE),
    value_area_ave = value_area_total / area_total
  ) %>%
  ungroup() %>% 
  select(-c(area_total,value_area_total))
map + 
  geom_tile(data = OceanSODA_clim,
            aes(lon, lat, fill = as.factor(year)))

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
d6c2d11 jens-daniel-mueller 2021-11-22
pco2_atm_2004 <- co2_atm_reccap2 %>% 
  filter(year == 2004) %>% 
  pull(pCO2)

co2_atm_reccap2 <- co2_atm_reccap2 %>% 
  mutate(delta_pCO2_hist = pCO2 - pco2_atm_2004)

co2_atm_reccap2_decade <- co2_atm_reccap2 %>% 
  filter(year > 1900) %>% 
  mutate(year = ymd(paste(year, "-06-01"))) %>% 
  mutate(decade = floor_date(year, years(10))) %>% 
  group_by(decade) %>% 
  summarise(delta_pCO2_hist = mean(delta_pCO2_hist)) %>% 
  ungroup()

co2_atm_reccap2_decade %>% 
  ggplot(aes(decade, delta_pCO2_hist)) +
  geom_point() +
  geom_path()

Version Author Date
d6c2d11 jens-daniel-mueller 2021-11-22
OceanSODA_revelle_hist <- expand_grid(
  co2_atm_reccap2_decade,
  OceanSODA_clim
)

OceanSODA_revelle_hist <- OceanSODA_revelle_hist %>% 
  mutate(pCO2 = pCO2 + delta_pCO2_hist)

map + 
  geom_tile(data = OceanSODA_revelle_hist,
            aes(lon, lat, fill = pCO2)) +
  facet_wrap(~ decade) +
  scale_fill_viridis_c()

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
d6c2d11 jens-daniel-mueller 2021-11-22
OceanSODA_revelle_hist <- OceanSODA_revelle_hist %>% 
  mutate(
    rev_fac = buffer(
      flag = 24,
      var1 = pCO2,
      var2 = talk * 1e-6,
      S = sal,
      T = temp,
      P = 0,
      k1k2 = "l"
    )$BetaD
  )

map + 
  geom_tile(data = OceanSODA_revelle_hist,
            aes(lon, lat, fill = rev_fac)) +
  facet_wrap(~ decade) +
  scale_fill_viridis_c()

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
6e65117 jens-daniel-mueller 2022-02-16
b6d0770 jens-daniel-mueller 2021-12-13
d6c2d11 jens-daniel-mueller 2021-11-22
OceanSODA_revelle_hist_time_series <- OceanSODA_revelle_hist %>% 
  mutate(area = earth_surf(lat, lon),
         rev_fac_scaled = rev_fac * area) %>% 
  group_by(decade) %>% 
  summarise(rev_fac = sum(rev_fac_scaled) / sum(area)) %>% 
  ungroup()

OceanSODA_revelle_hist_time_series %>% 
  ggplot(aes(decade, rev_fac))+
  geom_point() + 
  geom_path()

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
6e65117 jens-daniel-mueller 2022-02-16
b6d0770 jens-daniel-mueller 2021-12-13
d6c2d11 jens-daniel-mueller 2021-11-22

4 Write files

OceanSODA_annual_all %>%
  write_csv(paste0(path_preprocessing,
                   "OceanSODA.csv"))

OceanSODA_clim %>%
  write_csv(paste0(path_preprocessing,
                   "OceanSODA_climatology.csv"))

OceanSODA_revelle_hist_time_series %>%
  write_csv(paste0(path_preprocessing,
                   "OceanSODA_revelle_hist_time_series.csv"))

delta_pco2_annual %>%
  select(-c(scaling_glob, fgco2_glob)) %>%
  write_csv(paste0(path_preprocessing,
                   "OceanSODA_disequilibrium_annual.csv"))

5 Control plots

map +
  geom_raster(data = OceanSODA_annual %>%
                filter(year == 2010), aes(lon, lat, fill = lat_bands)) +
  scale_fill_brewer(palette = "Spectral") +
  labs(title = "Year: 2010")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
4df00b5 jens-daniel-mueller 2021-06-07
8186273 jens-daniel-mueller 2021-06-07
map +
  geom_raster(data = OceanSODA_annual %>%
                filter(year == 2010), aes(lon, lat, fill = grid_area)) +
  scale_fill_viridis_c() +
  labs(title = "Year: 2010")

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
4df00b5 jens-daniel-mueller 2021-06-07
8186273 jens-daniel-mueller 2021-06-07

6 Maps

6.1 Climatology

unique(OceanSODA_clim$year)
[1] 2004.500 2004.310 2004.345 2004.276 2004.143 2004.552 2004.379 2004.000
[9] 2001.842
OceanSODA_clim %>%
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>%
  group_split(parameter) %>%
  # head(1) %>%
  map( ~ map +
         geom_raster(data = .x,
                     aes(lon, lat, fill = value)) +
         scale_fill_viridis_c(name = unique(.x$parameter)))
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

6.2 Decadal climatology

OceanSODA_clim_decadal %>%
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>%
  group_split(parameter) %>%
  # head(1) %>%
  map( ~ map +
         geom_raster(data = .x,
                     aes(lon, lat, fill = value)) +
         scale_fill_viridis_c(name = unique(.x$parameter)) +
         facet_grid(decade ~ .))
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13

6.3 Decadal offset climatology

OceanSODA_clim_decadal_offset <- bind_rows(
  OceanSODA_clim_decadal,
  OceanSODA_clim %>% 
    mutate(decade = "value_clim")
)

OceanSODA_clim_decadal_offset <- OceanSODA_clim_decadal_offset %>% 
  pivot_longer(sal:tco2_over_pCO2,
               names_to = "parameter",
               values_to = "value") %>% 
  select(lat, lon, decade, parameter, value) %>% 
  pivot_wider(names_from = decade,
              values_from = value) %>% 
  pivot_longer(4:6,
               names_to = "decade",
               values_to = "value_decade") %>% 
  mutate(offset = value_decade - value_clim)

OceanSODA_clim_decadal_offset %>%
  group_split(parameter) %>%
  # head(1) %>%
  map( ~ map +
         geom_raster(data = .x,
                     aes(lon, lat, fill = offset)) +
         scale_fill_divergent(name = unique(.x$parameter)) +
         facet_grid(decade ~ .))
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
8cc98a8 jens-daniel-mueller 2021-12-13

7 Time series

7.1 5 regions

OceanSODA_annual_5 %>%
  group_split(parameter) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(year, value_area_ave, col = basin)) +
      scale_color_brewer(palette = "Set1") +
      geom_path() +
      geom_point() +
      labs(y = .x$parameter)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
f088f55 jens-daniel-mueller 2022-04-01
569e06b jens-daniel-mueller 2022-04-01
a36645f jens-daniel-mueller 2021-12-23

7.2 Lat bands

OceanSODA_annual_lat %>%
  group_split(parameter) %>%
  # head(1) %>%
  map(
    ~ ggplot(data = .x,
             aes(year, value_area_ave, col = lat_bands)) +
      scale_color_brewer(palette = "Spectral") +
      geom_path() +
      geom_point() +
      labs(y = .x$parameter)
  )
[[1]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[2]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[3]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[4]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[5]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[6]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[7]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13
002b89c jens-daniel-mueller 2021-10-06
767aa26 jens-daniel-mueller 2021-10-06
3a99e0b jens-daniel-mueller 2021-10-05
5db29f4 jens-daniel-mueller 2021-10-05
ad81465 jens-daniel-mueller 2021-06-17
8186273 jens-daniel-mueller 2021-06-07

[[8]]

Version Author Date
aea9afe jens-daniel-mueller 2022-04-07
569e06b jens-daniel-mueller 2022-04-01
b6d0770 jens-daniel-mueller 2021-12-13