Last updated: 2022-11-15
Checks: 7 0
Knit directory:
emlr_obs_analysis/analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20210412)
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 751a519. 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/other/
Ignored: output/presentation/
Ignored: output/publication/
Untracked files:
Untracked: code/results_publication_backup_incl_ensemble_uncertainty_20221111.Rmd
Unstaged changes:
Deleted: analysis/MLR_target_budgets.Rmd
Deleted: analysis/MLR_target_column_inventories.Rmd
Deleted: analysis/MLR_target_zonal_sections.Rmd
Modified: analysis/_site.yml
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/results_publication.Rmd
)
and HTML (docs/results_publication.html
) files. If you’ve
configured a remote Git repository (see ?wflow_git_remote
),
click on the hyperlinks in the table below to view the files as they
were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | 751a519 | jens-daniel-mueller | 2022-11-15 | units expressed per decade |
html | 1dad51a | jens-daniel-mueller | 2022-11-15 | Build site. |
Rmd | ab89db3 | jens-daniel-mueller | 2022-11-15 | surface emlr extrapolated without surface obs |
html | 375300e | jens-daniel-mueller | 2022-11-14 | Build site. |
Rmd | 40f357d | jens-daniel-mueller | 2022-11-14 | included C* and DIC target cases |
html | ebc85e2 | jens-daniel-mueller | 2022-11-14 | Build site. |
Rmd | beb709c | jens-daniel-mueller | 2022-11-14 | included C* and DIC target cases |
html | cc337dd | jens-daniel-mueller | 2022-11-11 | Build site. |
Rmd | c53fea0 | jens-daniel-mueller | 2022-11-11 | rebuild website with woa18 clim |
html | 6edad9b | jens-daniel-mueller | 2022-11-11 | Build site. |
Rmd | 9937e55 | jens-daniel-mueller | 2022-11-11 | with additive uncertainty estimates |
html | 16beb51 | jens-daniel-mueller | 2022-11-08 | Build site. |
Rmd | 6276ead | jens-daniel-mueller | 2022-11-08 | run with all contribution, but exclude AT and reoccupation in inventories |
html | b92657d | jens-daniel-mueller | 2022-11-08 | Build site. |
Rmd | 3f9fad2 | jens-daniel-mueller | 2022-11-08 | run without C*(P only) and SD factor 2 |
html | 0b939ca | jens-daniel-mueller | 2022-11-08 | Build site. |
Rmd | 5c705d7 | jens-daniel-mueller | 2022-11-08 | run with C*(P only) |
html | ec60f68 | jens-daniel-mueller | 2022-11-07 | Build site. |
html | 7275091 | jens-daniel-mueller | 2022-11-05 | Build site. |
Rmd | ba55b15 | jens-daniel-mueller | 2022-11-05 | include run with C*(P only) |
html | 99610ed | jens-daniel-mueller | 2022-11-01 | Build site. |
Rmd | c972beb | jens-daniel-mueller | 2022-11-01 | updated reoccupation run |
html | 7060801 | jens-daniel-mueller | 2022-10-31 | Build site. |
html | ecb84c1 | jens-daniel-mueller | 2022-10-30 | Build site. |
html | 2345935 | jens-daniel-mueller | 2022-10-29 | Build site. |
html | 0b40366 | jens-daniel-mueller | 2022-10-26 | Build site. |
Rmd | 0465788 | jens-daniel-mueller | 2022-10-26 | implemented additive uncertainty assesment |
html | 91052ae | jens-daniel-mueller | 2022-10-20 | Build site. |
Rmd | 33486a1 | jens-daniel-mueller | 2022-10-20 | updated plots |
html | 084a41c | jens-daniel-mueller | 2022-10-13 | Build site. |
Rmd | ffef558 | jens-daniel-mueller | 2022-10-13 | land sink assesment |
html | 46c163a | jens-daniel-mueller | 2022-10-10 | Build site. |
Rmd | 78161f9 | jens-daniel-mueller | 2022-10-10 | revised figures |
html | 8105380 | jens-daniel-mueller | 2022-10-07 | Build site. |
Rmd | d663118 | jens-daniel-mueller | 2022-10-07 | penetration depth analysis |
html | e93fdfd | jens-daniel-mueller | 2022-09-23 | Build site. |
Rmd | f01db23 | jens-daniel-mueller | 2022-09-23 | added uncertainty to dcant maps and section |
html | 8dc5a3b | jens-daniel-mueller | 2022-09-09 | Build site. |
Rmd | 25bff3d | jens-daniel-mueller | 2022-09-09 | added global section location to maps |
html | 77e6a80 | jens-daniel-mueller | 2022-09-08 | Build site. |
Rmd | 188dc63 | jens-daniel-mueller | 2022-09-08 | added uncertainty to global section |
html | 7cf954e | jens-daniel-mueller | 2022-09-08 | Build site. |
Rmd | 6f53c28 | jens-daniel-mueller | 2022-09-08 | column inventory uncertainty stippling added |
html | 051b911 | jens-daniel-mueller | 2022-09-07 | Build site. |
Rmd | c87415f | jens-daniel-mueller | 2022-09-07 | testrun integration 3000 |
html | 75bd58c | jens-daniel-mueller | 2022-09-07 | Build site. |
Rmd | 1024099 | jens-daniel-mueller | 2022-09-07 | testrun integration 1000 |
html | 1c6de0d | jens-daniel-mueller | 2022-09-07 | Build site. |
Rmd | 4106aa4 | jens-daniel-mueller | 2022-09-07 | testrun integration 10000 |
html | 5ca8778 | jens-daniel-mueller | 2022-09-07 | Build site. |
Rmd | 784849d | jens-daniel-mueller | 2022-09-07 | included uncertainty assesment for column inventories |
html | 4eb9ed2 | jens-daniel-mueller | 2022-08-29 | Build site. |
html | 392f3d7 | jens-daniel-mueller | 2022-08-29 | Build site. |
Rmd | 282421f | jens-daniel-mueller | 2022-08-29 | added contour line to global section |
html | c975141 | jens-daniel-mueller | 2022-08-29 | Build site. |
Rmd | 8f5c3c2 | jens-daniel-mueller | 2022-08-29 | finalized global section |
html | cf69673 | jens-daniel-mueller | 2022-08-29 | Build site. |
html | 4810db6 | jens-daniel-mueller | 2022-08-26 | Build site. |
Rmd | 88ce2d9 | jens-daniel-mueller | 2022-08-26 | added global section |
html | 74dca9d | jens-daniel-mueller | 2022-08-17 | Build site. |
Rmd | 37ab61f | jens-daniel-mueller | 2022-08-17 | added adjustment delta map |
html | ec4f1d0 | jens-daniel-mueller | 2022-08-11 | Build site. |
Rmd | d1cd39a | jens-daniel-mueller | 2022-08-11 | revised figure aspect ratio |
html | 78dbb27 | jens-daniel-mueller | 2022-08-11 | Build site. |
Rmd | 2155209 | jens-daniel-mueller | 2022-08-11 | rebuild with 3 basin separation as standard case |
html | 302d289 | jens-daniel-mueller | 2022-08-11 | Build site. |
Rmd | 77719db | jens-daniel-mueller | 2022-08-11 | rebuild with 5 basin separation as standard case |
html | 318fefe | jens-daniel-mueller | 2022-08-11 | Build site. |
Rmd | 60dae4b | jens-daniel-mueller | 2022-08-11 | delta dcant budget analysis |
html | 5b77c4f | jens-daniel-mueller | 2022-08-10 | Build site. |
Rmd | c25333a | jens-daniel-mueller | 2022-08-10 | bias sections and maps added |
html | 9c3be27 | jens-daniel-mueller | 2022-08-09 | Build site. |
Rmd | a940880 | jens-daniel-mueller | 2022-08-09 | improve delta dcant bias assesment |
html | a691b29 | jens-daniel-mueller | 2022-08-09 | Build site. |
Rmd | d136a86 | jens-daniel-mueller | 2022-08-09 | include delta dcant bias assesment |
html | 910f96e | jens-daniel-mueller | 2022-08-08 | Build site. |
Rmd | e064958 | jens-daniel-mueller | 2022-08-08 | include bias assesment |
html | e99640e | jens-daniel-mueller | 2022-07-29 | Build site. |
html | f68fcfa | jens-daniel-mueller | 2022-07-26 | Build site. |
Rmd | abec0de | jens-daniel-mueller | 2022-07-26 | changed color scale back |
html | f2615fb | jens-daniel-mueller | 2022-07-26 | Build site. |
Rmd | 8da318e | jens-daniel-mueller | 2022-07-26 | changed color scale |
html | 99a82db | jens-daniel-mueller | 2022-07-25 | Build site. |
Rmd | 1d6985d | jens-daniel-mueller | 2022-07-25 | stat analysis of layer budgets and CIs |
html | 4af29f9 | jens-daniel-mueller | 2022-07-24 | Build site. |
Rmd | b2c4ff6 | jens-daniel-mueller | 2022-07-24 | revised GCB plot |
html | e2adac6 | jens-daniel-mueller | 2022-07-22 | Build site. |
Rmd | a9c8af4 | jens-daniel-mueller | 2022-07-22 | revised section plots and tables |
html | 9bbc6a4 | jens-daniel-mueller | 2022-07-20 | Build site. |
Rmd | f937de2 | jens-daniel-mueller | 2022-07-20 | revised plots |
html | 0c6db30 | jens-daniel-mueller | 2022-07-20 | Build site. |
Rmd | a42e52d | jens-daniel-mueller | 2022-07-20 | revised plots |
html | b18b250 | jens-daniel-mueller | 2022-07-20 | Build site. |
Rmd | 36691bf | jens-daniel-mueller | 2022-07-20 | revised plots |
html | a80b59b | jens-daniel-mueller | 2022-07-20 | Build site. |
Rmd | f9c0545 | jens-daniel-mueller | 2022-07-20 | revised budget stats |
html | fea41c1 | jens-daniel-mueller | 2022-07-20 | Build site. |
Rmd | b27e42f | jens-daniel-mueller | 2022-07-20 | rerun with corrected Canyon-B talk gap-filling in standard case |
html | 9ce772d | jens-daniel-mueller | 2022-07-19 | Build site. |
Rmd | aaf37cf | jens-daniel-mueller | 2022-07-19 | coverage maps with gap filling |
html | d803308 | jens-daniel-mueller | 2022-07-19 | Build site. |
Rmd | 933285c | jens-daniel-mueller | 2022-07-19 | revised plots |
html | b1f7ab3 | jens-daniel-mueller | 2022-07-18 | Build site. |
Rmd | ab5220b | jens-daniel-mueller | 2022-07-18 | revised budget over atm pCO2 plot |
html | d2ae54c | jens-daniel-mueller | 2022-07-18 | Build site. |
Rmd | 85f482c | jens-daniel-mueller | 2022-07-18 | include scaled Sabine data for budgets |
html | 2695085 | jens-daniel-mueller | 2022-07-17 | Build site. |
Rmd | 8624c93 | jens-daniel-mueller | 2022-07-17 | use global output from MLR basins |
html | 535196a | jens-daniel-mueller | 2022-07-17 | Build site. |
html | d20faeb | jens-daniel-mueller | 2022-07-17 | Build site. |
Rmd | b6ef86b | jens-daniel-mueller | 2022-07-17 | revised budget plots |
html | 0160c40 | jens-daniel-mueller | 2022-07-16 | Build site. |
Rmd | d2b1090 | jens-daniel-mueller | 2022-07-16 | cleaned code |
html | efa414b | jens-daniel-mueller | 2022-07-16 | Build site. |
Rmd | e84b169 | jens-daniel-mueller | 2022-07-16 | added bias global analysis |
html | 7267b08 | jens-daniel-mueller | 2022-07-16 | Build site. |
Rmd | b91f619 | jens-daniel-mueller | 2022-07-16 | analysed dcant budget stats |
html | 08c00b4 | jens-daniel-mueller | 2022-07-16 | Build site. |
html | 692c937 | jens-daniel-mueller | 2022-07-16 | Build site. |
html | afb27ad | jens-daniel-mueller | 2022-07-15 | Build site. |
Rmd | 53e63d5 | jens-daniel-mueller | 2022-07-15 | plot no surface data equi |
html | b492b46 | jens-daniel-mueller | 2022-07-15 | Build site. |
Rmd | 31f29fe | jens-daniel-mueller | 2022-07-15 | plot decadal sink trends as boxplots |
html | bd24a0f | jens-daniel-mueller | 2022-07-15 | Build site. |
Rmd | efbb1dc | jens-daniel-mueller | 2022-07-15 | include no surface equi cases |
html | 022fd60 | jens-daniel-mueller | 2022-07-14 | Build site. |
Rmd | 5a9e419 | jens-daniel-mueller | 2022-07-14 | implemented beta budget analysis |
Rmd | d2092c1 | jens-daniel-mueller | 2022-07-14 | implemented beta budget analysis |
html | f1d7f80 | jens-daniel-mueller | 2022-07-13 | Build site. |
Rmd | 6811ae4 | jens-daniel-mueller | 2022-07-13 | refined profil plots |
html | ea46812 | jens-daniel-mueller | 2022-07-13 | Build site. |
Rmd | defdcfe | jens-daniel-mueller | 2022-07-13 | additional analyis |
html | 17cd1d1 | jens-daniel-mueller | 2022-07-13 | Build site. |
Rmd | 1bf1708 | jens-daniel-mueller | 2022-07-13 | rerun reoccupation |
html | 26e9496 | jens-daniel-mueller | 2022-07-12 | Build site. |
Rmd | 5d121f0 | jens-daniel-mueller | 2022-07-12 | applied dcant scaling and improved ensemble member analysis |
html | 8fb595c | jens-daniel-mueller | 2022-07-12 | Build site. |
Rmd | e2d97ef | jens-daniel-mueller | 2022-07-12 | excluded no adjustment from ensemble |
html | 003b161 | jens-daniel-mueller | 2022-07-12 | Build site. |
Rmd | 54a0d14 | jens-daniel-mueller | 2022-07-12 | added cruise based adjustment |
html | b44c72a | jens-daniel-mueller | 2022-07-03 | Build site. |
html | 37f56b3 | jens-daniel-mueller | 2022-07-01 | Build site. |
Rmd | 8c4a9f8 | jens-daniel-mueller | 2022-07-01 | added basin separation analysis |
html | 232909e | jens-daniel-mueller | 2022-07-01 | Build site. |
Rmd | 7f85db3 | jens-daniel-mueller | 2022-07-01 | added basin separation analysis |
html | df21d31 | jens-daniel-mueller | 2022-07-01 | Build site. |
Rmd | 2bbfba0 | jens-daniel-mueller | 2022-07-01 | rebuild |
html | 6be73e0 | jens-daniel-mueller | 2022-06-30 | Build site. |
Rmd | 6e173bf | jens-daniel-mueller | 2022-06-30 | updated regional budget plots |
html | 6e173bf | jens-daniel-mueller | 2022-06-30 | updated regional budget plots |
html | 8ab4a87 | jens-daniel-mueller | 2022-06-29 | Build site. |
Rmd | d8c7cb9 | jens-daniel-mueller | 2022-06-29 | ensemble with unadjusted data |
html | 7629c78 | jens-daniel-mueller | 2022-06-29 | Build site. |
Rmd | 4758911 | jens-daniel-mueller | 2022-06-29 | ensemble without unadjusted data |
html | f6786c8 | jens-daniel-mueller | 2022-06-29 | Build site. |
Rmd | 6f694a1 | jens-daniel-mueller | 2022-06-29 | included Cstar N in ensemble |
html | f09080e | jens-daniel-mueller | 2022-06-28 | Build site. |
Rmd | d457610 | jens-daniel-mueller | 2022-06-28 | save figures for publication |
html | ee30748 | jens-daniel-mueller | 2022-06-28 | Build site. |
Rmd | fe42644 | jens-daniel-mueller | 2022-06-28 | GCB emissions ratio included |
html | 9393c07 | jens-daniel-mueller | 2022-06-28 | Build site. |
Rmd | 2a3cf97 | jens-daniel-mueller | 2022-06-28 | included basin-hemisphere bias, and bias contributions |
html | 0825298 | jens-daniel-mueller | 2022-06-28 | Build site. |
Rmd | d35ddb1 | jens-daniel-mueller | 2022-06-28 | included GCB ocean sink data as boxplot |
html | a13a7cf | jens-daniel-mueller | 2022-06-28 | Build site. |
html | fb59a6f | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | 7ff568c | jens-daniel-mueller | 2022-06-27 | included GCB ocean sink data |
html | a26a21d | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | 9425709 | jens-daniel-mueller | 2022-06-27 | scaled sabine 2004 to full area |
html | 748aa43 | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | 82d5793 | jens-daniel-mueller | 2022-06-27 | ensemble scatter plot |
html | 457e640 | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | 426c5bf | jens-daniel-mueller | 2022-06-27 | cleaned read-in section |
html | 16dc3af | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | dd2063a | jens-daniel-mueller | 2022-06-27 | ensemble member analysis added |
html | 87e9eb8 | jens-daniel-mueller | 2022-06-27 | Build site. |
Rmd | 09a3348 | jens-daniel-mueller | 2022-06-27 | 1 as standard case and new ensemble members |
html | b52b159 | jens-daniel-mueller | 2022-06-27 | Build site. |
html | 09b0780 | jens-daniel-mueller | 2022-05-24 | Build site. |
html | 25da2fb | jens-daniel-mueller | 2022-05-24 | Build site. |
html | 1d73ec9 | jens-daniel-mueller | 2022-05-16 | Build site. |
Rmd | e117b7b | jens-daniel-mueller | 2022-05-16 | rerun w/o data adjustments |
html | 2ffbdda | jens-daniel-mueller | 2022-05-16 | Build site. |
Rmd | 6fc8438 | jens-daniel-mueller | 2022-05-16 | plot individual zonal sections |
html | c71227f | jens-daniel-mueller | 2022-05-16 | Build site. |
Rmd | 55e9ac6 | jens-daniel-mueller | 2022-05-16 | plot individual zonal sections |
html | 3c1100c | jens-daniel-mueller | 2022-05-16 | Build site. |
Rmd | fdb111d | jens-daniel-mueller | 2022-05-16 | plot individual zonal sections |
html | 2ca0109 | jens-daniel-mueller | 2022-05-02 | Build site. |
Rmd | 63d51bd | jens-daniel-mueller | 2022-05-02 | rerun with adjusted data |
html | dcf2eaf | jens-daniel-mueller | 2022-05-02 | Build site. |
Rmd | a3a2cf9 | jens-daniel-mueller | 2022-05-02 | IO sections seperate |
html | eff4fd7 | jens-daniel-mueller | 2022-05-02 | Build site. |
Rmd | 39e920a | jens-daniel-mueller | 2022-05-02 | IO sections seperate |
html | 08607eb | jens-daniel-mueller | 2022-05-02 | Build site. |
Rmd | 0791c1b | jens-daniel-mueller | 2022-05-02 | modified plots |
html | b018a9a | jens-daniel-mueller | 2022-04-29 | Build site. |
Rmd | 02ede93 | jens-daniel-mueller | 2022-04-29 | standard case uncorrected data |
html | e09320d | jens-daniel-mueller | 2022-04-12 | Build site. |
Rmd | 0dec180 | jens-daniel-mueller | 2022-04-12 | 3 data adjustment procedures implemented |
html | 8dca96a | jens-daniel-mueller | 2022-04-12 | Build site. |
Rmd | e5e9288 | jens-daniel-mueller | 2022-04-12 | 3 data adjustment procedures implemented |
html | 2f20ea6 | jens-daniel-mueller | 2022-04-11 | Build site. |
html | 209c9b6 | jens-daniel-mueller | 2022-04-10 | Build site. |
Rmd | 537aff7 | jens-daniel-mueller | 2022-04-10 | no data adjustment implemented |
html | acad2e2 | jens-daniel-mueller | 2022-04-09 | Build site. |
html | 3d81135 | jens-daniel-mueller | 2022-04-07 | Build site. |
html | 0f5d372 | jens-daniel-mueller | 2022-04-04 | Build site. |
Rmd | ac5121f | jens-daniel-mueller | 2022-04-04 | added zonal mean beta distribution new figure |
html | 1b5a309 | jens-daniel-mueller | 2022-04-04 | Build site. |
Rmd | 8b96a9d | jens-daniel-mueller | 2022-04-04 | added zonal mean beta distribution new figure |
html | a74e341 | jens-daniel-mueller | 2022-04-04 | Build site. |
Rmd | c0432be | jens-daniel-mueller | 2022-04-04 | added zonal mean beta distribution ensemble sd |
html | b599680 | jens-daniel-mueller | 2022-04-04 | Build site. |
Rmd | e406c39 | jens-daniel-mueller | 2022-04-04 | added zonal mean beta distribution |
html | ca7e590 | jens-daniel-mueller | 2022-03-22 | Build site. |
Rmd | 8cb4b78 | jens-daniel-mueller | 2022-03-22 | use 1800 as tref for sabine estimates |
html | 5a6be34 | jens-daniel-mueller | 2022-03-22 | Build site. |
Rmd | cee203c | jens-daniel-mueller | 2022-03-22 | rerun with NP 2021 talk correction |
html | bd9e11d | jens-daniel-mueller | 2022-03-22 | Build site. |
html | 2501978 | jens-daniel-mueller | 2022-03-21 | Build site. |
Rmd | 9e12898 | jens-daniel-mueller | 2022-03-21 | use 1800 as tref for sabine estimates |
html | c3a6238 | jens-daniel-mueller | 2022-03-08 | Build site. |
Rmd | 775eb4f | jens-daniel-mueller | 2022-03-08 | moving eras analysis implemented |
html | 094bfa0 | jens-daniel-mueller | 2022-02-18 | Build site. |
Rmd | fa258cc | jens-daniel-mueller | 2022-02-18 | updated plots |
html | ba2d62e | jens-daniel-mueller | 2022-02-17 | Build site. |
Rmd | 5420131 | jens-daniel-mueller | 2022-02-17 | added Seaflux data |
html | 192504c | jens-daniel-mueller | 2022-02-17 | Build site. |
Rmd | 2394302 | jens-daniel-mueller | 2022-02-17 | added Seaflux data |
html | 251c7cf | jens-daniel-mueller | 2022-02-17 | Build site. |
Rmd | 9ea0d8c | jens-daniel-mueller | 2022-02-17 | adapted beta factor |
html | 565224d | jens-daniel-mueller | 2022-02-17 | Build site. |
Rmd | 33422e3 | jens-daniel-mueller | 2022-02-17 | scaled budgets to global coverage |
html | 2116dd3 | jens-daniel-mueller | 2022-02-09 | Build site. |
Rmd | e281bf3 | jens-daniel-mueller | 2022-02-09 | updated plots |
html | 6fe70a1 | jens-daniel-mueller | 2022-02-05 | Build site. |
Rmd | 8955c85 | jens-daniel-mueller | 2022-02-05 | cleaned plots |
html | a6b33aa | jens-daniel-mueller | 2022-02-04 | Build site. |
Rmd | 73efef8 | jens-daniel-mueller | 2022-02-04 | atm co2 time series plotted, uncertainties revised |
html | 4b48475 | jens-daniel-mueller | 2022-02-04 | Build site. |
Rmd | 6afd7b1 | jens-daniel-mueller | 2022-02-04 | calculated uncertainty of basin budget changes |
html | fec5a1e | jens-daniel-mueller | 2022-02-04 | Build site. |
Rmd | 325da3a | jens-daniel-mueller | 2022-02-04 | calculated uncertainty of basin budget changes |
html | d2191ad | jens-daniel-mueller | 2022-02-04 | Build site. |
Rmd | 79a54fe | jens-daniel-mueller | 2022-02-04 | new coaverage map |
html | 4c5b079 | jens-daniel-mueller | 2022-02-03 | Build site. |
Rmd | 66d89a9 | jens-daniel-mueller | 2022-02-03 | added surface flux model products |
html | 4077397 | jens-daniel-mueller | 2022-02-03 | Build site. |
Rmd | c0c3be1 | jens-daniel-mueller | 2022-02-03 | added surface flux products |
html | 0d0f790 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 049346f | jens-daniel-mueller | 2022-02-02 | shifted year labels |
html | 4673df5 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 1185397 | jens-daniel-mueller | 2022-02-02 | rearranged plots |
html | 60727e6 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | db5308b | jens-daniel-mueller | 2022-02-02 | rearranged plots |
html | c7b4984 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | a3d8469 | jens-daniel-mueller | 2022-02-02 | ensemble uncertainties in global buget |
html | 7fb28a2 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | a332fe6 | jens-daniel-mueller | 2022-02-02 | ensemble uncertainties in time series |
html | 49097e8 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | f98c33b | jens-daniel-mueller | 2022-02-02 | incl ensemble uncertainties in plot |
html | fe11bfd | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | d3f7f05 | jens-daniel-mueller | 2022-02-02 | incl ensemble uncertainties |
html | fa46251 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 33feacf | jens-daniel-mueller | 2022-02-02 | incl sabine budgets |
html | 7655085 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 09dd555 | jens-daniel-mueller | 2022-02-02 | incl sabine budgets |
html | 226d67d | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | ed056e2 | jens-daniel-mueller | 2022-02-02 | incl sabine budgets |
html | ed903f7 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 9d11695 | jens-daniel-mueller | 2022-02-02 | scaled budget to atm pco2 increase |
html | 32e9682 | jens-daniel-mueller | 2022-02-02 | Build site. |
Rmd | 5cc5572 | jens-daniel-mueller | 2022-02-02 | included Sabine column inventory as reference |
html | 913e42f | jens-daniel-mueller | 2022-02-01 | Build site. |
Rmd | c4b2de9 | jens-daniel-mueller | 2022-02-01 | updated profile plots |
html | 189de95 | jens-daniel-mueller | 2022-02-01 | Build site. |
Rmd | b0c17bc | jens-daniel-mueller | 2022-02-01 | updated profile plots |
html | ab001eb | jens-daniel-mueller | 2022-01-31 | Build site. |
Rmd | ccf6723 | jens-daniel-mueller | 2022-01-31 | filled step plot for layer budgets |
html | d2ae5fe | jens-daniel-mueller | 2022-01-31 | Build site. |
Rmd | 278523c | jens-daniel-mueller | 2022-01-31 | step plot for layer budgets |
html | b62308d | jens-daniel-mueller | 2022-01-31 | Build site. |
Rmd | 714c5cc | jens-daniel-mueller | 2022-01-31 | step plot for layer budgets |
html | ec7fe7e | jens-daniel-mueller | 2022-01-31 | Build site. |
Rmd | 5c948ae | jens-daniel-mueller | 2022-01-31 | added time series vs atm pco2 |
html | de557de | jens-daniel-mueller | 2022-01-28 | Build site. |
html | 5f2aed0 | jens-daniel-mueller | 2022-01-27 | Build site. |
Rmd | 54c9e26 | jens-daniel-mueller | 2022-01-27 | added layer budget profiles |
html | eccd82b | jens-daniel-mueller | 2022-01-26 | Build site. |
Rmd | c5577d3 | jens-daniel-mueller | 2022-01-26 | added meand sd to offset mean concentrations profiles |
html | c6fe495 | jens-daniel-mueller | 2022-01-26 | Build site. |
Rmd | e0e7974 | jens-daniel-mueller | 2022-01-26 | added offset mean concentrations profiles |
html | 9753eb8 | jens-daniel-mueller | 2022-01-26 | Build site. |
html | b1d7720 | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 0210ed5 | jens-daniel-mueller | 2022-01-21 | added mean concentrations profiles per 5 basins |
html | d6b399a | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | da17a07 | jens-daniel-mueller | 2022-01-21 | added mean concentrations profiles |
html | c499be8 | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | d941871 | jens-daniel-mueller | 2022-01-21 | run color map test |
html | e572075 | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 99b6c92 | jens-daniel-mueller | 2022-01-21 | run color map test |
html | 4fe7150 | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 0379e99 | jens-daniel-mueller | 2022-01-21 | script cleaning |
html | 49b41cf | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 2c82651 | jens-daniel-mueller | 2022-01-21 | added map of scaled absolute change |
html | c0807e8 | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 5dd3d7a | jens-daniel-mueller | 2022-01-21 | added map of scaled relative change |
html | 22b421f | jens-daniel-mueller | 2022-01-21 | Build site. |
Rmd | 2c3fa75 | jens-daniel-mueller | 2022-01-21 | cleaned alluvial plots |
html | 1a35f1f | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | e58f510 | jens-daniel-mueller | 2022-01-20 | added relative changes to alluvial plots |
html | b503ae1 | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | 2eb2567 | jens-daniel-mueller | 2022-01-20 | added relative changes to alluvial plots |
html | cc31f4b | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | 416e107 | jens-daniel-mueller | 2022-01-20 | added delta dcant map |
html | 11a800b | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | 81a40d5 | jens-daniel-mueller | 2022-01-20 | updated alluvial plots |
html | 3087804 | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | 2ae5966 | jens-daniel-mueller | 2022-01-20 | updated alluvial plots |
html | 6d566d5 | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | 4901b0f | jens-daniel-mueller | 2022-01-20 | updated alluvial plots |
html | 44796b1 | jens-daniel-mueller | 2022-01-20 | Build site. |
Rmd | cdbd92c | jens-daniel-mueller | 2022-01-20 | created alluvial plots |
html | 48ec4c6 | jens-daniel-mueller | 2022-01-19 | Build site. |
Rmd | 0fb2ae5 | jens-daniel-mueller | 2022-01-19 | printed column inv from AIP standard runs |
html | f347cd7 | jens-daniel-mueller | 2022-01-18 | Build site. |
Rmd | 86b711c | jens-daniel-mueller | 2022-01-18 | plot hemisphere budgets and publication results |
params_global$inventory_depth_standard <- 1000
### cases included in uncertainty budget
# standard case
version_id_pattern <- "1"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_s <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# cruise-by-cruise adjustments
version_id_pattern <- "c"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_c <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# gap-filling uncertainty
version_id_pattern <- "g"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_g <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# C* from N and TA
version_id_pattern <- "n"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_n <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# Surface with eMLR(C*)
version_id_pattern <- "f"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_e <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# Surface with eMLR(C*)
version_id_pattern <- "w"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_w <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# BGC predictor choice
### cases considered as sensitivity tests but not in uncertainty budget
# no data adjustments
version_id_pattern <- "d"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_d <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# reoccupation filter
version_id_pattern <- "o"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_o <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# C* from TA
version_id_pattern <- "a"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_a <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# C*
version_id_pattern <- "x"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_x <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
# TCO2 target
version_id_pattern <- "t"
Version_IDs_1 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_1", version_id_pattern))
Version_IDs_2 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_2", version_id_pattern))
Version_IDs_3 <- list.files(path = "/nfs/kryo/work/jenmueller/emlr_cant/observations",
pattern = paste0("v_3", version_id_pattern))
Version_IDs_t <- c(Version_IDs_1, Version_IDs_2, Version_IDs_3)
rm(Version_IDs_1, Version_IDs_2, Version_IDs_3)
Version_IDs_ensemble <- c(
Version_IDs_s, Version_IDs_c, Version_IDs_g, Version_IDs_n, Version_IDs_e, Version_IDs_w,
Version_IDs_d, Version_IDs_o, Version_IDs_a, Version_IDs_x, Version_IDs_t
)
Version_IDs_ensemble_uncertainty <- c(
Version_IDs_s, Version_IDs_c, Version_IDs_g, Version_IDs_n, Version_IDs_e, Version_IDs_w
)
Version_IDs_ensemble_sensitivity <- c(
Version_IDs_s, Version_IDs_d, Version_IDs_o, Version_IDs_a, Version_IDs_x, Version_IDs_t
)
rm(
Version_IDs_s,
Version_IDs_c,
Version_IDs_g,
Version_IDs_n,
Version_IDs_e,
Version_IDs_w,
Version_IDs_d,
Version_IDs_o,
Version_IDs_a,
Version_IDs_x,
Version_IDs_t
)
# subset Standard case
Version_IDs <- Version_IDs_ensemble[str_detect(Version_IDs_ensemble, "103")]
for (i_Version_IDs in Version_IDs_ensemble) {
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
params_local <-
read_rds(paste(path_version_data,
"params_local.rds",
sep = ""))
params_local <- bind_cols(
Version_ID = i_Version_IDs,
tref1 = params_local$tref1,
tref2 = params_local$tref2,
MLR_basins = params_local$MLR_basins
)
tref <- read_csv(paste(path_version_data,
"tref.csv",
sep = ""))
params_local <- params_local %>%
mutate(
median_year_1 = sort(tref$median_year)[1],
median_year_2 = sort(tref$median_year)[2],
duration = median_year_2 - median_year_1,
period = paste(median_year_1, "-", median_year_2)
)
if (exists("params_local_all_ensemble")) {
params_local_all_ensemble <- bind_rows(params_local_all_ensemble, params_local)
}
if (!exists("params_local_all_ensemble")) {
params_local_all_ensemble <- params_local
}
}
rm(params_local,
tref)
params_local_all_ensemble <- params_local_all_ensemble %>%
select(Version_ID, period, MLR_basins, tref1, tref2)
params_local_all_ensemble <-
params_local_all_ensemble %>%
mutate(
Version_ID_group = str_sub(Version_ID, 4, 4),
Version_ID_group = case_when(
Version_ID_group == "1" ~ "Standard case",
Version_ID_group == "c" ~ "Cruise adjustment",
Version_ID_group == "g" ~ "Gap filling",
Version_ID_group == "n" ~ "C* with NO3,TA",
Version_ID_group == "f" ~ "Surface eMLR(C*)",
Version_ID_group == "w" ~ "WOA18 predictors",
Version_ID_group == "d" ~ "No data adjustments",
Version_ID_group == "o" ~ "Reoccupation filter",
Version_ID_group == "a" ~ "C* with PO4 only",
Version_ID_group == "t" ~ "DIC target",
Version_ID_group == "x" ~ "No tref adjustment",
TRUE ~ Version_ID_group
)
)
params_local_all_ensemble <-
params_local_all_ensemble %>%
mutate(
MLR_basins = case_when(
MLR_basins == "AIP" ~ "3",
MLR_basins == "SO_AIP" ~ "3+SO",
MLR_basins == "SO_5" ~ "5+SO",
TRUE ~ MLR_basins
)
)
params_local_all <- params_local_all_ensemble %>%
filter(Version_ID %in% Version_IDs)
path_version_data <-
paste(path_observations,
Version_IDs[1],
"/data/",
sep = "")
params_local <-
read_rds(paste(path_version_data,
"params_local.rds",
sep = ""))
for (i_Version_IDs in Version_IDs) {
# i_Version_IDs <- Version_IDs[1]
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
# load and join data files
# Model performance: RMSE, n_predictors, VIF
GLODAP_glanced <-
read_csv(paste(path_version_data,
"lm_model_metrics.csv",
sep = ""))
GLODAP_glanced <- GLODAP_glanced %>%
mutate(Version_ID = i_Version_IDs)
if (exists("GLODAP_glanced_all")) {
GLODAP_glanced_all <-
bind_rows(GLODAP_glanced_all, GLODAP_glanced)
}
if (!exists("GLODAP_glanced_all")) {
GLODAP_glanced_all <- GLODAP_glanced
}
# The chosen models
lm_best_target <-
read_csv(paste(path_version_data,
"lm_best_target.csv",
sep = ""))
lm_best_target <- lm_best_target %>%
mutate(Version_ID = i_Version_IDs)
if (exists("lm_best_target_all")) {
lm_best_target_all <-
bind_rows(lm_best_target_all, lm_best_target)
}
if (!exists("lm_best_target_all")) {
lm_best_target_all <- lm_best_target
}
lm_best_predictor_counts <-
read_csv(paste(path_version_data,
"lm_best_predictor_counts.csv",
sep = ""))
lm_best_predictor_counts <- lm_best_predictor_counts %>%
mutate(Version_ID = i_Version_IDs)
if (exists("lm_best_predictor_counts_all")) {
lm_best_predictor_counts_all <-
bind_rows(lm_best_predictor_counts_all, lm_best_predictor_counts)
}
if (!exists("lm_best_predictor_counts_all")) {
lm_best_predictor_counts_all <- lm_best_predictor_counts
}
lat_residual <-
read_csv(paste(path_version_data,
"lm_lat_residual.csv",
sep = ""))
lat_residual <- lat_residual %>%
mutate(Version_ID = i_Version_IDs)
if (exists("lat_residual_all")) {
lat_residual_all <-
bind_rows(lat_residual_all, lat_residual)
}
if (!exists("lat_residual_all")) {
lat_residual_all <- lat_residual
}
lat_residual_offset <-
read_csv(paste(path_version_data,
"lm_lat_residual_offset.csv",
sep = ""))
lat_residual_offset <- lat_residual_offset %>%
mutate(Version_ID = i_Version_IDs)
if (exists("lat_residual_offset_all")) {
lat_residual_offset_all <-
bind_rows(lat_residual_offset_all, lat_residual_offset)
}
if (!exists("lat_residual_offset_all")) {
lat_residual_offset_all <- lat_residual_offset
}
spatial_residual <-
read_csv(paste(path_version_data,
"lm_spatial_residual.csv",
sep = ""))
spatial_residual <- spatial_residual %>%
mutate(Version_ID = i_Version_IDs)
if (exists("spatial_residual_all")) {
spatial_residual_all <-
bind_rows(spatial_residual_all, spatial_residual)
}
if (!exists("spatial_residual_all")) {
spatial_residual_all <- spatial_residual
}
spatial_residual_offset <-
read_csv(paste(path_version_data,
"lm_spatial_residual_offset.csv",
sep = ""))
spatial_residual_offset <- spatial_residual_offset %>%
mutate(Version_ID = i_Version_IDs)
if (exists("spatial_residual_offset_all")) {
spatial_residual_offset_all <-
bind_rows(spatial_residual_offset_all, spatial_residual_offset)
}
if (!exists("spatial_residual_offset_all")) {
spatial_residual_offset_all <- spatial_residual_offset
}
}
rm(GLODAP_glanced,
lat_residual,
lat_residual_offset,
spatial_residual,
spatial_residual_offset,
lm_best_predictor_counts,
lm_best_target)
for (i_Version_IDs in Version_IDs_ensemble) {
# i_Version_IDs <- Version_IDs[1]
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
# load and join data files
dcant_budget_basin_MLR <-
read_csv(paste(path_version_data,
"dcant_budget_basin_MLR.csv",
sep = ""))
dcant_budget_basin_MLR_mod_truth <-
read_csv(paste(
path_version_data,
"dcant_budget_basin_MLR_mod_truth.csv",
sep = ""
))
dcant_budget_basin_MLR <- bind_rows(dcant_budget_basin_MLR,
dcant_budget_basin_MLR_mod_truth)
dcant_budget_basin_MLR <- dcant_budget_basin_MLR %>%
mutate(Version_ID = i_Version_IDs)
if (exists("dcant_budget_basin_MLR_all")) {
dcant_budget_basin_MLR_all <-
bind_rows(dcant_budget_basin_MLR_all, dcant_budget_basin_MLR)
}
if (!exists("dcant_budget_basin_MLR_all")) {
dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR
}
dcant_budget_basin_MLR_bias_decomposition <-
read_csv(
paste(
path_version_data,
"dcant_budget_basin_MLR_bias_decomposition.csv",
sep = ""
)
)
dcant_budget_basin_MLR_bias_decomposition <-
dcant_budget_basin_MLR_bias_decomposition %>%
mutate(Version_ID = i_Version_IDs)
if (exists("dcant_budget_basin_MLR_bias_all_decomposition")) {
dcant_budget_basin_MLR_bias_all_decomposition <-
bind_rows(
dcant_budget_basin_MLR_bias_all_decomposition,
dcant_budget_basin_MLR_bias_decomposition
)
}
if (!exists("dcant_budget_basin_MLR_bias_all_decomposition")) {
dcant_budget_basin_MLR_bias_all_decomposition <-
dcant_budget_basin_MLR_bias_decomposition
}
}
rm(
dcant_budget_basin_MLR,
dcant_budget_basin_MLR_mod_truth,
dcant_budget_basin_MLR_bias_decomposition
)
dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR_all %>%
filter(estimate == "dcant",
method == "total") %>%
select(-c(estimate, method)) %>%
rename(dcant = value)
dcant_budget_basin_MLR_all_10000 <- dcant_budget_basin_MLR_all %>%
filter(inv_depth == 10000)
dcant_budget_basin_MLR_all_1000 <- dcant_budget_basin_MLR_all %>%
filter(inv_depth == 1000)
dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR_all %>%
filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_basin_MLR_bias_all_decomposition <-
dcant_budget_basin_MLR_bias_all_decomposition %>%
filter(inv_depth == params_global$inventory_depth_standard)
for (i_Version_IDs in Version_IDs_ensemble) {
# i_Version_IDs <- Version_IDs_ensemble[19]
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
# load and join data files
dcant_inv <-
read_csv(paste(path_version_data,
"dcant_inv.csv",
sep = ""))
p_map_cant_inv(dcant_inv %>% filter(data_source == "obs"))
dcant_inv_mod_truth <-
read_csv(paste(path_version_data,
"dcant_inv_mod_truth.csv",
sep = "")) %>%
filter(method == "total") %>%
select(-method)
dcant_inv_bias <-
read_csv(paste(path_version_data,
"dcant_inv_bias.csv",
sep = "")) %>%
mutate(Version_ID = i_Version_IDs)
dcant_inv <- bind_rows(dcant_inv,
dcant_inv_mod_truth) %>%
mutate(Version_ID = i_Version_IDs)
dcant_budget_lat_grid <-
read_csv(paste(path_version_data,
"dcant_budget_lat_grid.csv",
sep = "")) %>%
mutate(Version_ID = i_Version_IDs)
dcant_budget_lon_grid <-
read_csv(paste(path_version_data,
"dcant_budget_lon_grid.csv",
sep = "")) %>%
mutate(Version_ID = i_Version_IDs)
if (exists("dcant_inv_all")) {
dcant_inv_all <- bind_rows(dcant_inv_all, dcant_inv)
}
if (!exists("dcant_inv_all")) {
dcant_inv_all <- dcant_inv
}
if (exists("dcant_inv_bias_all")) {
dcant_inv_bias_all <- bind_rows(dcant_inv_bias_all, dcant_inv_bias)
}
if (!exists("dcant_inv_bias_all")) {
dcant_inv_bias_all <- dcant_inv_bias
}
if (exists("dcant_budget_lat_grid_all")) {
dcant_budget_lat_grid_all <- bind_rows(dcant_budget_lat_grid_all, dcant_budget_lat_grid)
}
if (!exists("dcant_budget_lat_grid_all")) {
dcant_budget_lat_grid_all <- dcant_budget_lat_grid
}
if (exists("dcant_budget_lon_grid_all")) {
dcant_budget_lon_grid_all <- bind_rows(dcant_budget_lon_grid_all, dcant_budget_lon_grid)
}
if (!exists("dcant_budget_lon_grid_all")) {
dcant_budget_lon_grid_all <- dcant_budget_lon_grid
}
}
rm(dcant_inv,
dcant_inv_bias,
dcant_inv_mod_truth,
dcant_budget_lat_grid,
dcant_budget_lon_grid)
dcant_inv_all_10000 <- dcant_inv_all %>%
filter(inv_depth == 10000)
dcant_inv_all <- dcant_inv_all %>%
filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_lat_grid_all <- dcant_budget_lat_grid_all %>%
filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_lon_grid_all <- dcant_budget_lon_grid_all %>%
filter(inv_depth == params_global$inventory_depth_standard)
dcant_budget_lat_grid_all <- dcant_budget_lat_grid_all %>%
pivot_wider(names_from = estimate,
values_from = value) %>%
filter(period != "1994 - 2014",
method == "total")
dcant_budget_lon_grid_all <- dcant_budget_lon_grid_all %>%
pivot_wider(names_from = estimate,
values_from = value) %>%
filter(period != "1994 - 2014",
method == "total")
dcant_inv_all %>%
filter(Version_ID == "v_1103",
data_source == "obs") %>%
select(lon, lat, dcant) %>%
write_csv(here::here("output/dcant_column_inventor_example.csv"))
for (i_Version_IDs in Version_IDs_ensemble) {
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
# load and join data files
dcant_zonal <-
read_csv(paste(path_version_data,
"dcant_zonal.csv",
sep = ""))
dcant_zonal_mod_truth <-
read_csv(paste(path_version_data,
"dcant_zonal_mod_truth.csv",
sep = ""))
dcant_zonal <- bind_rows(dcant_zonal,
dcant_zonal_mod_truth)
dcant_global_section <-
read_csv(paste(path_version_data,
"dcant_global_section.csv",
sep = ""))
# dcant_profile <-
# read_csv(paste(path_version_data,
# "dcant_profile.csv",
# sep = ""))
#
# dcant_profile_mod_truth <-
# read_csv(paste(path_version_data,
# "dcant_profile_mod_truth.csv",
# sep = ""))
#
# dcant_profile <- bind_rows(dcant_profile,
# dcant_profile_mod_truth)
dcant_profile_basin_MLR <-
read_csv(paste(path_version_data,
"dcant_profile_basin_MLR.csv",
sep = ""))
dcant_profile_basin_MLR_mod_truth <-
read_csv(paste(
path_version_data,
"dcant_profile_basin_MLR_mod_truth.csv",
sep = ""
))
dcant_profile_basin_MLR <- bind_rows(dcant_profile_basin_MLR,
dcant_profile_basin_MLR_mod_truth)
# dcant_budget_basin_AIP_layer <-
# read_csv(paste(path_version_data,
# "dcant_budget_basin_AIP_layer.csv",
# sep = ""))
dcant_budget_basin_MLR_layer <-
read_csv(paste(path_version_data,
"dcant_budget_basin_MLR_layer.csv",
sep = ""))
dcant_budget_basin_MLR_layer_mod_truth <-
read_csv(paste(
path_version_data,
"dcant_budget_basin_MLR_layer_mod_truth.csv",
sep = ""
))
dcant_budget_basin_MLR_layer <-
bind_rows(dcant_budget_basin_MLR_layer,
dcant_budget_basin_MLR_layer_mod_truth)
dcant_zonal_bias <-
read_csv(paste(path_version_data,
"dcant_zonal_bias.csv",
sep = ""))
dcant_penetration_depth_all_lat_mean <-
read_csv(paste0(path_version_data,
"dcant_penetration_depth_all_lat_mean.csv"))
dcant_zonal <- dcant_zonal %>%
mutate(Version_ID = i_Version_IDs)
dcant_global_section <- dcant_global_section %>%
mutate(Version_ID = i_Version_IDs)
# dcant_profile <- dcant_profile %>%
# mutate(Version_ID = i_Version_IDs)
dcant_profile_basin_MLR <- dcant_profile_basin_MLR %>%
mutate(Version_ID = i_Version_IDs)
# dcant_budget_basin_AIP_layer <- dcant_budget_basin_AIP_layer %>%
# mutate(Version_ID = i_Version_IDs)
dcant_budget_basin_MLR_layer <- dcant_budget_basin_MLR_layer %>%
mutate(Version_ID = i_Version_IDs)
dcant_zonal_bias <- dcant_zonal_bias %>%
mutate(Version_ID = i_Version_IDs)
dcant_penetration_depth_all_lat_mean <-
dcant_penetration_depth_all_lat_mean %>%
mutate(Version_ID = i_Version_IDs)
if (exists("dcant_zonal_all")) {
dcant_zonal_all <- bind_rows(dcant_zonal_all, dcant_zonal)
}
if (!exists("dcant_zonal_all")) {
dcant_zonal_all <- dcant_zonal
}
if (exists("dcant_global_section_all")) {
dcant_global_section_all <- bind_rows(dcant_global_section_all, dcant_global_section)
}
if (!exists("dcant_global_section_all")) {
dcant_global_section_all <- dcant_global_section
}
# if (exists("dcant_profile_all")) {
# dcant_profile_all <- bind_rows(dcant_profile_all, dcant_profile)
# }
#
# if (!exists("dcant_profile_all")) {
# dcant_profile_all <- dcant_profile
# }
if (exists("dcant_profile_basin_MLR_all")) {
dcant_profile_basin_MLR_all <- bind_rows(dcant_profile_basin_MLR_all, dcant_profile_basin_MLR)
}
if (!exists("dcant_profile_basin_MLR_all")) {
dcant_profile_basin_MLR_all <- dcant_profile_basin_MLR
}
# if (exists("dcant_budget_basin_AIP_layer_all")) {
# dcant_budget_basin_AIP_layer_all <-
# bind_rows(dcant_budget_basin_AIP_layer_all,
# dcant_budget_basin_AIP_layer)
# }
#
# if (!exists("dcant_budget_basin_AIP_layer_all")) {
# dcant_budget_basin_AIP_layer_all <- dcant_budget_basin_AIP_layer
# }
if (exists("dcant_budget_basin_MLR_layer_all")) {
dcant_budget_basin_MLR_layer_all <-
bind_rows(dcant_budget_basin_MLR_layer_all,
dcant_budget_basin_MLR_layer)
}
if (!exists("dcant_budget_basin_MLR_layer_all")) {
dcant_budget_basin_MLR_layer_all <- dcant_budget_basin_MLR_layer
}
if (exists("dcant_zonal_bias_all")) {
dcant_zonal_bias_all <- bind_rows(dcant_zonal_bias_all, dcant_zonal_bias)
}
if (!exists("dcant_zonal_bias_all")) {
dcant_zonal_bias_all <- dcant_zonal_bias
}
if (exists("dcant_penetration_depth_all_lat_mean_all")) {
dcant_penetration_depth_all_lat_mean_all <-
bind_rows(
dcant_penetration_depth_all_lat_mean_all,
dcant_penetration_depth_all_lat_mean
)
}
if (!exists("dcant_penetration_depth_all_lat_mean_all")) {
dcant_penetration_depth_all_lat_mean_all <-
dcant_penetration_depth_all_lat_mean
}
}
rm(dcant_zonal, dcant_global_section, dcant_zonal_bias, dcant_zonal_mod_truth,
dcant_budget_basin_MLR_layer,
dcant_profile_basin_MLR, dcant_penetration_depth_all_lat_mean)
for (i_Version_IDs in Version_IDs) {
path_version_data <-
paste(path_observations,
i_Version_IDs,
"/data/",
sep = "")
# load and join data files
GLODAP_grid_era <-
read_csv(paste(
path_version_data,
"GLODAPv2.2020_clean_obs_grid_era.csv",
sep = ""
))
GLODAP_grid_era <- GLODAP_grid_era %>%
mutate(Version_ID = i_Version_IDs)
if (exists("GLODAP_grid_era_all")) {
GLODAP_grid_era_all <-
bind_rows(GLODAP_grid_era_all, GLODAP_grid_era)
}
if (!exists("GLODAP_grid_era_all")) {
GLODAP_grid_era_all <- GLODAP_grid_era
}
GLODAP <- read_csv(paste(
path_version_data,
"GLODAPv2.2020_clean.csv",
sep = ""
))
GLODAP <- GLODAP %>%
mutate(Version_ID = i_Version_IDs)
if (exists("GLODAP_all")) {
GLODAP_all <-
bind_rows(GLODAP_all, GLODAP)
}
if (!exists("GLODAP_all")) {
GLODAP_all <- GLODAP
}
}
rm(GLODAP_grid_era, GLODAP)
GLODAP_grid_era_all <- full_join(GLODAP_grid_era_all,
params_local_all)
GLODAP_all <- full_join(GLODAP_all,
params_local_all)
GLODAP_expocodes <-
read_tsv(
paste(
"/nfs/kryo/work/updata/glodapv2_2021/",
"EXPOCODES.txt",
sep = ""
),
col_names = c("cruise", "cruise_expocode")
)
GLODAP_all <-
left_join(GLODAP_all, GLODAP_expocodes)
co2_atm <-
read_csv(paste(path_preprocessing,
"co2_atm.csv",
sep = ""))
co2_atm_reccap2 <-
read_csv(paste(path_preprocessing,
"co2_atm_reccap2.csv",
sep = ""))
tcant_inv <-
read_csv(paste(path_preprocessing,
"S04_tcant_inv.csv", sep = ""))
tcant_inv <- tcant_inv %>%
filter(inv_depth == 3000) %>%
rename(dcant = tcant,
dcant_pos = tcant_pos) %>%
mutate(tref1 = 1800,
tref2 = 1994)
Ocean_Sink <-
read_csv(paste(path_preprocessing,
"Ocean_Sink.csv",
sep = ""))
Global_Carbon_Budget <-
read_csv(paste(path_preprocessing,
"GCB_Global_Carbon_Budget.csv",
sep = ""))
two_decades <- unique(params_local_all_ensemble$period)[1:2]
dcant_pgc_label <- expression(Delta * C["ant"]~inventory~(PgC~dec^{-1}))
dcant_bias_pgc_label <- expression(Delta * C["ant"]~inventory~ bias ~(PgC~dec^{-1}))
delta_dcant_bias_pgc_label <- expression(Delta * Delta * C["ant"]~bias~(PgC~dec^{-1}))
dcant_pgc_scaled_label <- expression(beta~(mol~m^{-2}~µatm^{-1}~dec^{-1}))
dcant_umol_label <- expression(Delta * C[ant]~(mu * mol ~ kg ^ {-1}~dec^{-1}))
ddcant_umol_label <- expression(Delta * Delta * C[ant]~(mu * mol ~ kg ^ {-1}~dec^{-1}))
dcant_layer_budget_label <-
expression(Delta ~ C[ant] ~ "inventory per 500m depth layer"~(PgC~dec^{-1}))
dcant_CI_label <- expression(Delta * C[ant]~(mol ~ m ^ {-2}~dec^{-1}))
delta_dcant_CI_label <- expression(Delta * Delta * C[ant]~(mol ~ m ^ {-2}~dec^{-1}))
beta_CI_label <- expression(atop(beta,
(mol ~ m ^ {-2} ~ µatm ^ {-1})))
MLR_basins_reference <- unique(params_local_all$MLR_basins)
MLR_basins_sensitivity <- unique(params_local_all_ensemble$MLR_basins)
MLR_basins_sensitivity <- MLR_basins_sensitivity[!MLR_basins_sensitivity %in% MLR_basins_reference]
additive_uncertainty <- function(df){
df_regional <-
df %>%
pivot_wider(names_from = MLR_basins,
values_from = dcant) %>%
pivot_longer(all_of(MLR_basins_sensitivity),
names_to = "MLR_basins",
values_to = "dcant") %>%
mutate(delta_dcant = dcant - !!sym(MLR_basins_reference)) %>%
select(-c(all_of(MLR_basins_reference), MLR_basins, dcant))
df_regional_stat <-
df_regional %>%
group_by(across(-delta_dcant)) %>%
summarise(sd = mean(abs(delta_dcant))) %>%
ungroup() %>%
filter(Version_ID_group == unique(params_local_all$Version_ID_group)) %>%
select(-Version_ID_group)
Version_ID_group_uncertainty <-
df %>% distinct(Version_ID_group) %>% pull
Version_ID_group_uncertainty <-
Version_ID_group_uncertainty[Version_ID_group_uncertainty != unique(params_local_all$Version_ID_group)]
df_configuration <-
df %>%
pivot_wider(names_from = Version_ID_group,
values_from = dcant) %>%
pivot_longer(
all_of(Version_ID_group_uncertainty),
names_to = "Version_ID_group",
values_to = "dcant"
) %>%
mutate(delta_dcant = !!sym(unique(params_local_all$Version_ID_group)) - dcant)
df_configuration <-
df_configuration %>%
filter(MLR_basins == unique(params_local_all$MLR_basins)) %>%
rename(sd = delta_dcant) %>%
select(-c(MLR_basins, dcant, unique(params_local_all$Version_ID_group)))
df_factorial <-
bind_rows(
df_regional_stat %>%
mutate(Version_ID_group = "Regional clustering"),
df_configuration
)
df_factorial_stat <-
df_factorial %>%
select(-Version_ID_group) %>%
group_by(across(-sd)) %>%
summarise(sd = sqrt(sum(sd^2))) %>%
ungroup()
df_stat <-
full_join(
df_factorial_stat,
df %>%
filter(
Version_ID_group %in% unique(params_local_all$Version_ID_group),
MLR_basins == MLR_basins_reference
) %>%
rename(std_case = dcant) %>%
select(-c(MLR_basins, Version_ID_group))
)
df_stat <- df_stat %>%
mutate(signif = if_else(abs(std_case) >= sd * sd_factor,
1,
0))
df_stat_delta <-
df_stat %>%
select(-signif) %>%
arrange(period) %>%
group_by(across(-c(period, sd, std_case))) %>%
mutate(delta_dcant = std_case - lag(std_case),
sd = sd_factor * sd,
RSS = sqrt(sd^ 2 + lag(sd ^ 2)),
signif = if_else(abs(delta_dcant) >= RSS,
1,
0)) %>%
ungroup() %>%
drop_na()
df_out <- list(df_stat, df_factorial, df_stat_delta)
return(df_out)
}
cruises_phosphate_gap_fill <-
c("33MW19930704",
"33RO20030604",
"33RO20050111",
"33RO19980123")
cruises_talk_gap_fill <-
c("06AQ19980328")
cruises_talk_calc <-
c("06MT19900123",
"316N19920502",
"316N19921006")
GLODAP_all_coverage <- GLODAP_all %>%
distinct(lat, lon, era, cruise_expocode) %>%
mutate(gap_filling = case_when(
cruise_expocode %in% cruises_phosphate_gap_fill ~ "Phosphate from CANYON-B",
cruise_expocode %in% cruises_talk_gap_fill ~ "TA from CANYON-B",
cruise_expocode %in% cruises_talk_calc ~ "TA calculated from other variables",
cruise_expocode %in% "31DS19940126" ~ "Nitrate qc-flag not met",
TRUE ~ "All quality criteria fulfilled"
)) %>%
distinct(lat, lon, era, gap_filling)
colour("bright")(7)
blue red green yellow cyan purple grey
"#4477AA" "#EE6677" "#228833" "#CCBB44" "#66CCEE" "#AA3377" "#BBBBBB"
attr(,"missing")
[1] NA
coverage_map <- map +
geom_tile(data = GLODAP_all_coverage,
aes(lon, lat)) +
facet_wrap( ~ era, ncol = 1) +
scale_color_okabeito() +
scale_fill_okabeito() +
theme(axis.text = element_blank(),
axis.ticks = element_blank(),
legend.position = c(0.7,0.3),
legend.title = element_blank())
coverage_map
ggsave(plot = coverage_map,
path = here::here("output/presentation"),
filename = "Fig_observations_coverage_map.png",
height = 6,
width = 4)
GLODAP_all_coverage <- GLODAP_all %>%
filter(between(depth, 250, 750)) %>%
group_by(lat, lon, era) %>%
summarise(tco2 = mean(tco2, na.rm = TRUE)) %>%
ungroup()
coverage_map <- map +
geom_tile(data = GLODAP_all_coverage,
aes(lon, lat, fill = tco2, col = tco2,
height = 2, width = 2)) +
facet_wrap( ~ era, ncol = 1) +
scale_fill_viridis_c(name = expression(
atop(DIC~at~"500m",(µmol~kg^{-1})))) +
scale_color_viridis_c(guide = "none") +
labs(title = "Observations",
subtitle = "Decadal coverage") +
theme(axis.text = element_blank(),
axis.ticks = element_blank(),
legend.position = "bottom")
coverage_map
ggsave(plot = coverage_map,
path = here::here("output/presentation"),
filename = "Fig_observations_coverage_map_dic.png",
height = 7,
width = 4)
rm(coverage_map,
GLODAP_all, GLODAP_all_coverage, GLODAP_expocodes,
GLODAP_grid_era_all)
rm(cruises_phosphate_gap_fill,
cruises_talk_gap_fill,
cruises_talk_calc)
co2_atm_roll <- co2_atm %>%
mutate(pCO2_roll = zoo::rollmean(pCO2, 10, fill = NA))
p_pco2_atm <- co2_atm_roll %>%
ggplot() +
geom_point(aes(year, pCO2, col="annual")) +
geom_path(aes(year, pCO2, col="annual")) +
geom_point(aes(year, pCO2_roll, col="10yr roll")) +
geom_path(aes(year, pCO2_roll, col="10yr roll"))
co2_atm_roll <- co2_atm_roll %>%
mutate(delta_pCO2_roll = pCO2_roll - lag(pCO2_roll,10),
delta_pCO2 = pCO2 - lag(pCO2,10))
p_delta_pCO2_atm <- co2_atm_roll %>%
ggplot() +
geom_point(aes(year, delta_pCO2, col="annual")) +
geom_path(aes(year, delta_pCO2, col="annual")) +
geom_point(aes(year, delta_pCO2_roll, col="10yr roll")) +
geom_path(aes(year, delta_pCO2_roll, col="10yr roll"))
p_pco2_atm / p_delta_pCO2_atm
rm(p_pco2_atm, p_delta_pCO2_atm)
delta_pCO2_atm <-
left_join(
params_local_all %>%
distinct(period, tref1, tref2),
co2_atm_roll %>%
select(
tref1 = year,
pCO2_1 = pCO2,
pCO2_roll_1 = pCO2_roll
)
)
delta_pCO2_atm <-
left_join(
delta_pCO2_atm,
co2_atm_roll %>%
select(
tref2 = year,
pCO2_2 = pCO2,
pCO2_roll_2 = pCO2_roll
)
)
delta_pCO2_atm <- delta_pCO2_atm %>%
mutate(delta_pCO2 = pCO2_2 - pCO2_1,
delta_pCO2_roll = pCO2_roll_2 - pCO2_roll_1) %>%
select(period, delta_pCO2, delta_pCO2_roll)
delta_pCO2_atm <- delta_pCO2_atm %>%
select(period, delta_pCO2)
delta_pCO2_atm <-
bind_rows(
delta_pCO2_atm,
tibble(period = "1800 - 1994",
delta_pCO2 = co2_atm %>% filter(year==1994) %>% pull(pCO2) - 280)
)
rm(co2_atm_roll)
dcant_scaling <- 1.02*(1+0.02+0.015+0.01+0.003)
dcant_scaling_uncertainty <- 0.5
sd_factor <- 2
lm_best_predictor_counts_all %>%
filter(period %in% two_decades,
data_source == "obs") %>%
pivot_longer(aou:temp,
names_to = "predictor",
values_to = "count") %>%
# mutate(count = as.factor(count)) %>%
group_by(predictor, count, period, Version_ID_group) %>%
summarise(n = n()) %>%
ungroup() %>%
ggplot(aes(x = count, y = n)) +
scale_color_manual(values = c("#EE7733", "#009988"), name = "Decade") +
scale_fill_manual(values = c("#EE7733", "#009988"), name = "Decade") +
geom_path(aes(col = period)) +
geom_point(aes(fill = period), shape = 21) +
coord_flip() +
scale_x_continuous(breaks = seq(0,10,2),
limits = c(0,10),
name = "Presence among 10 best models") +
labs(y = "Counts across density slabs, regional clusters and basins") +
facet_wrap(~predictor)
spatial_residual_all %>%
filter(gamma_slab %in% params_local$plot_slabs[2],
data_source == "obs",
period %in% two_decades) %>%
p_map_dcant_slab(
var = ".resid_mean",
col = "divergent",
title_text = "Residual distribution"
) +
facet_grid(era ~ period) +
theme_dark()
spatial_residual_offset_all %>%
filter(
gamma_slab %in% params_local$plot_slabs[1],
data_source == "obs",
period %in% two_decades
) %>%
p_map_dcant_slab(var = ".resid_mean_offset",
col = "divergent",
title_text = "Residual offset distribution (era 2 - era 1)") +
facet_grid(. ~ period) +
theme_dark()
lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
ggplot(aes(
.resid_mean,
lat_grid,
col = era,
group = interaction(basin, era, gamma_slab, Version_ID)
)) +
geom_vline(xintercept = 0) +
# geom_point() +
geom_path(alpha = 0.5) +
facet_grid(. ~ period)
lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
select(-c(Version_ID, tref1, tref2)) %>%
mutate(sampling_period = if_else(period == "2004 - 2014" &
era == "2000-2009",
"first",
"second"),
sampling_period = if_else(period == "1994 - 2004" &
era == "1989-1999",
"first",
sampling_period)) %>%
select(-era) %>%
pivot_wider(names_from = sampling_period,
values_from = .resid_mean) %>%
ggplot(aes(first, second)) +
geom_vline(xintercept = 0) +
geom_hline(yintercept = 0) +
geom_bin2d(binwidth = 1) +
geom_abline(slope = 1, col = "red") +
geom_smooth(method = "lm") +
scale_fill_viridis_c(trans = "log10") +
coord_fixed(ylim = c(-15, 15),
xlim = c(-15, 15)) +
labs(
y = "First sampling period\nmean MLR residual in 5° latitude bin (µmol/kg)",
x = "Second sampling period\nmean MLR residual in 5° latitude bin (µmol/kg)"
) +
facet_wrap(~period)
lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
select(-c(Version_ID, tref1, tref2)) %>%
mutate(sampling_period = if_else(period == "2004 - 2014" &
era == "2000-2009",
"first",
"second"),
sampling_period = if_else(period == "1994 - 2004" &
era == "1989-1999",
"first",
sampling_period)) %>%
select(-era) %>%
pivot_wider(names_from = sampling_period,
values_from = .resid_mean) %>%
nest_by(period) %>%
mutate(mod = list(lm(second ~ first, data = data))) %>%
summarize(broom::tidy(mod))
# A tibble: 4 × 6
# Groups: period [2]
period term estimate std.error statistic p.value
<chr> <chr> <dbl> <dbl> <dbl> <dbl>
1 1994 - 2004 (Intercept) -0.140 0.0842 -1.66 9.75e- 2
2 1994 - 2004 first 0.647 0.0465 13.9 2.23e-36
3 2004 - 2014 (Intercept) 0.142 0.0899 1.58 1.15e- 1
4 2004 - 2014 first 0.604 0.0415 14.6 3.76e-39
lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
select(-c(Version_ID, tref1, tref2)) %>%
mutate(sampling_period = if_else(period == "2004 - 2014" &
era == "2000-2009",
"first",
"second"),
sampling_period = if_else(period == "1994 - 2004" &
era == "1989-1999",
"first",
sampling_period)) %>%
select(-era) %>%
pivot_wider(names_from = sampling_period,
values_from = .resid_mean) %>%
drop_na() %>%
group_by(period) %>%
summarize(correlation = cor(first, second))
# A tibble: 2 × 2
period correlation
<chr> <dbl>
1 1994 - 2004 0.566
2 2004 - 2014 0.580
lat_residual_all_mean <- lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
group_by(period, era, lat_grid) %>%
summarise(residual_mean = mean(abs(.resid_mean)),
residual_sd = sd(.resid_mean),
residual_iqr = IQR(.resid_mean)) %>%
ungroup()
lat_residual_offset_all_mean <- lat_residual_offset_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
group_by(period, lat_grid) %>%
summarise(residual_mean = mean(abs(.resid_mean_offset)),
residual_sd = sd(.resid_mean_offset),
residual_iqr = IQR(.resid_mean)) %>%
ungroup()
p_residual_lat <-
ggplot() +
geom_vline(xintercept = 0) +
geom_ribbon(
data = lat_residual_all_mean,
aes(
xmin = residual_mean - residual_iqr,
xmax = residual_mean + residual_iqr,
y = lat_grid,
fill = era
),
alpha = 0.3
) +
geom_path(data = lat_residual_all_mean,
aes(residual_mean,
lat_grid,
col = era)) +
scale_fill_highcontrast() +
scale_color_highcontrast() +
coord_cartesian(xlim = c(-3,7)) +
facet_grid(. ~ period)
p_residual_lat_offset <-
ggplot() +
geom_vline(xintercept = 0) +
geom_ribbon(
data = lat_residual_offset_all_mean,
aes(
xmin = residual_mean - residual_iqr,
xmax = residual_mean + residual_iqr,
y = lat_grid
),
alpha = 0.3
) +
geom_path(data = lat_residual_offset_all_mean,
aes(residual_mean,
lat_grid)) +
coord_cartesian(xlim = c(-3,7)) +
facet_grid(. ~ period)
p_residual_lat / p_residual_lat_offset
rm(p_residual_lat, p_residual_lat_offset)
p_residual_lat <-
ggplot() +
geom_vline(xintercept = 0) +
geom_path(data = lat_residual_all %>%
filter(data_source == "obs",
period %in% two_decades,
gamma_slab %in% params_local$plot_slabs[2]),
aes(.resid_mean,
lat_grid,
col = era)) +
scale_fill_highcontrast() +
scale_color_highcontrast() +
coord_cartesian(xlim = c(-3,7)) +
facet_grid(basin ~ period)
p_residual_lat_offset <-
ggplot() +
geom_vline(xintercept = 0) +
geom_path(data = lat_residual_offset_all %>%
filter(data_source == "obs",
period %in% two_decades,
gamma_slab %in% params_local$plot_slabs[2]),
aes(.resid_mean_offset,
lat_grid)) +
scale_fill_highcontrast() +
scale_color_highcontrast() +
coord_cartesian(xlim = c(-3,7)) +
facet_grid(basin ~ period)
p_residual_lat / p_residual_lat_offset
rm(p_residual_lat, p_residual_lat_offset)
lat_residual_offset_all %>%
ggplot(aes(.resid_mean, .resid_mean_offset)) +
geom_bin_2d() +
scale_fill_viridis_c(trans = "log10")
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
lat_residual_offset_all %>%
pivot_longer(starts_with(".resid"),
names_to = "type",
values_to = "residual") %>%
ggplot(aes(residual, fill = type, col = type)) +
coord_cartesian(xlim = c(-5,5)) +
geom_density(alpha = 0.5)
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
left_join(lm_best_target_all,
GLODAP_glanced_all) %>%
summarise(mean_rmse = mean(rmse, na.rm = TRUE),
sd_rmse = sd(rmse, na.rm = TRUE))
# A tibble: 1 × 2
mean_rmse sd_rmse
<dbl> <dbl>
1 3.10 1.63
dcant_inv_all <- bind_rows(
dcant_inv_all,
tcant_inv %>% mutate(period = paste(tref1, tref2, sep = " - "),
data_source = "obs")
)
dcant_inv_all <- left_join(dcant_inv_all,
delta_pCO2_atm)
dcant_inv_all <- dcant_inv_all %>%
mutate(beta = dcant / delta_pCO2,
beta_pos = dcant_pos / delta_pCO2) %>%
select(-starts_with("pCO2"))
dcant_inv_all_ensemble <- dcant_inv_all %>%
filter(Version_ID %in% Version_IDs_ensemble_uncertainty)
dcant_inv_all_sensitivity <- dcant_inv_all %>%
filter(Version_ID %in% Version_IDs_ensemble_sensitivity)
dcant_inv_all <- dcant_inv_all %>%
filter(Version_ID %in% Version_IDs | is.na(Version_ID))
dcant_inv_all_ensemble_sensitivity <-
dcant_inv_all_sensitivity %>%
filter(period %in% two_decades,
data_source != "mod_truth") %>%
select(lon, lat, period, data_source, MLR_basins, Version_ID_group, dcant)
dcant_inv_sensitivity <- additive_uncertainty(dcant_inv_all_ensemble_sensitivity)
delta_dcant_inv_sensitivity <- dcant_inv_sensitivity[[3]]
dcant_inv_sensitivity_contributions <- dcant_inv_sensitivity[[2]]
dcant_inv_sensitivity <- dcant_inv_sensitivity[[1]]
dcant_inv_sensitivity %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
)
) %>%
p_map_cant_inv(var = "sd",
breaks = c(seq(0, 16, 2), Inf),
title_text = NULL) +
facet_grid(period ~ data_source) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
dcant_inv_sensitivity_contributions %>%
filter(data_source == "obs",
Version_ID_group != "Regional clustering") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
)
) %>%
rename(dcant_diff = sd) %>%
p_map_cant_inv(var = "dcant_diff",
col = "bias",
breaks = c(-Inf, seq(-2,2,1), Inf),
title_text = NULL) +
facet_grid(Version_ID_group ~ period) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_column_inventory_uncertainty_sensitivity_cases.png",
height = 8,
width = 8)
dcant_inv_all_ensemble_uncertainty <-
dcant_inv_all_ensemble %>%
filter(period %in% two_decades,
data_source != "mod_truth") %>%
select(lon, lat, period, data_source, MLR_basins, Version_ID_group, dcant)
dcant_inv_uncertainty <- additive_uncertainty(dcant_inv_all_ensemble_uncertainty)
delta_dcant_inv_uncertainty <- dcant_inv_uncertainty[[3]]
dcant_inv_uncertainty_contributions <- dcant_inv_uncertainty[[2]]
dcant_inv_uncertainty <- dcant_inv_uncertainty[[1]]
dcant_inv_uncertainty %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
),
sd = sd*sd_factor
) %>%
p_map_cant_inv(var = "sd",
breaks = c(seq(0, 16, 2), Inf),
title_text = NULL) +
facet_grid(period ~ data_source) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_column_inventory_uncertainty.png",
height = 4,
width = 8)
dcant_inv_uncertainty_contributions %>%
filter(data_source == "obs") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
)
) %>%
rename(dcant_diff_uncertainty = sd) %>%
p_map_cant_inv(var = "dcant_diff_uncertainty",
col = "bias",
breaks = c(-Inf, seq(-2,2,1), Inf),
title_text = NULL) +
facet_grid(Version_ID_group ~ period) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_column_inventory_uncertainty_contributions.png",
height = 9,
width = 8)
dcant_inv_all_ensemble_uncertainty <-
dcant_inv_all_ensemble %>%
filter(period %in% two_decades,
data_source != "mod_truth") %>%
select(lon, lat, period, data_source, MLR_basins, Version_ID_group, dcant)
dcant_inv_all_ensemble_uncertainty <-
m_grid_horizontal_coarse(dcant_inv_all_ensemble_uncertainty)
dcant_inv_all_ensemble_uncertainty <-
dcant_inv_all_ensemble_uncertainty %>%
group_by(lat_grid, lon_grid, data_source, period, MLR_basins, Version_ID_group) %>%
summarise(dcant = mean(dcant),
n = n()) %>%
ungroup() %>%
filter(n == 25) %>%
rename(lon = lon_grid,
lat = lat_grid)
dcant_inv_uncertainty <- additive_uncertainty(dcant_inv_all_ensemble_uncertainty)
delta_dcant_inv_uncertainty <- dcant_inv_uncertainty[[3]]
dcant_inv_uncertainty_contributions <- dcant_inv_uncertainty[[2]]
dcant_inv_uncertainty <- dcant_inv_uncertainty[[1]]
dcant_inv_uncertainty %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
)
) %>%
p_map_cant_inv(var = "sd",
breaks = c(seq(0, 8, 1), Inf),
title_text = NULL) +
facet_grid(period ~ data_source) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
delta_dcant_inv_uncertainty %>%
p_map_cant_inv(var = "delta_dcant",
col = "bias",
title_text = NULL) +
facet_grid(data_source ~ .) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
Version | Author | Date |
---|---|---|
cc337dd | jens-daniel-mueller | 2022-11-11 |
delta_dcant_inv_uncertainty %>%
p_map_cant_inv(var = "RSS",
breaks = c(seq(0, 8, 1), Inf),
title_text = NULL) +
facet_grid(data_source ~ .) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
delta_dcant_inv_uncertainty %>%
filter(signif == 1) %>%
p_map_cant_inv(var = "delta_dcant",
col = "bias",
title_text = NULL) +
facet_grid(data_source ~ .) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_CI_absolute <- dcant_inv_all %>%
filter(period %in% two_decades,
data_source %in% c("obs")) %>%
p_map_cant_inv(var = "dcant",
title_text = NULL) +
facet_wrap(~ period, ncol = 1) +
theme(axis.text.x = element_blank()) +
geom_point(
data = dcant_inv_uncertainty %>%
filter(signif == 0,
data_source == "obs"),
aes(lon, lat),
shape = 20,
size = 0.1,
col = "grey"
)
p_CI_absolute +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_column_inventory.png",
height = 5,
width = 6)
p_CI_absolute_10000 <- dcant_inv_all_10000 %>%
filter(period %in% two_decades,
data_source %in% c("obs")) %>%
p_map_cant_inv(var = "dcant",
title_text = NULL) +
facet_wrap(~ period, ncol = 1) +
theme(axis.text.x = element_blank())
p_CI_absolute_10000 +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ggsave(path = here::here("output/presentation"),
filename = "FigS_dcant_column_inventory_10000.png",
height = 5,
width = 6)
dcant_inv_stat_mean <-
full_join(basinmask,
dcant_inv_all) %>%
mutate(surf_area = earth_surf(lat, lon)) %>%
group_by(basin, period, data_source) %>%
summarise(dcant = weighted.mean(dcant, surf_area)) %>%
ungroup() %>%
filter(!is.na(dcant))
dcant_inv_stat_ensemble <-
full_join(basinmask,
dcant_inv_all_ensemble) %>%
mutate(surf_area = earth_surf(lat, lon)) %>%
group_by(basin, data_source, period, MLR_basins, Version_ID_group) %>%
summarise(dcant = weighted.mean(dcant, surf_area)) %>%
ungroup() %>%
filter(!is.na(dcant)) %>%
group_by(basin, data_source, period) %>%
summarise(dcant_sd = sd(dcant) * 2) %>%
ungroup()
dcant_inv_stat <-
full_join(dcant_inv_stat_mean,
dcant_inv_stat_ensemble)
rm(dcant_inv_stat_mean,
dcant_inv_stat_ensemble)
dcant_inv_stat %>%
filter(period %in% two_decades) %>%
group_by(data_source, basin) %>%
mutate(delta_dcant = dcant - lag(dcant),
RSS = sqrt(dcant_sd ^ 2 + lag(dcant_sd ^ 2))) %>%
ungroup() %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
basin | period | data_source | dcant | dcant_sd | delta_dcant | RSS |
---|---|---|---|---|---|---|
N. Pacific | 1994 - 2004 | mod | 3.363703 | 0.4529314 | NA | NA |
N. Pacific | 1994 - 2004 | mod_truth | 2.915800 | 0.0000000 | NA | NA |
N. Pacific | 1994 - 2004 | obs | 3.076873 | 1.9422237 | NA | NA |
N. Pacific | 2004 - 2014 | mod | 3.614817 | 0.4842637 | 0.2511143 | 0.6630672 |
N. Pacific | 2004 - 2014 | mod_truth | 3.352012 | 0.0000000 | 0.4362120 | 0.0000000 |
N. Pacific | 2004 - 2014 | obs | 3.415398 | 1.5054907 | 0.3385254 | 2.4573838 |
S. Pacific | 1994 - 2004 | mod | 4.826130 | 1.3134693 | NA | NA |
S. Pacific | 1994 - 2004 | mod_truth | 4.931744 | 0.0000000 | NA | NA |
S. Pacific | 1994 - 2004 | obs | 7.482479 | 1.3201868 | NA | NA |
S. Pacific | 2004 - 2014 | mod | 6.476528 | 0.8421390 | 1.6503976 | 1.5602563 |
S. Pacific | 2004 - 2014 | mod_truth | 6.060215 | 0.0000000 | 1.1284704 | 0.0000000 |
S. Pacific | 2004 - 2014 | obs | 6.402648 | 1.5330509 | -1.0798310 | 2.0231506 |
N. Atlantic | 1994 - 2004 | mod | 4.616514 | 0.9936760 | NA | NA |
N. Atlantic | 1994 - 2004 | mod_truth | 4.057536 | 0.0000000 | NA | NA |
N. Atlantic | 1994 - 2004 | obs | 9.867769 | 0.6103370 | NA | NA |
N. Atlantic | 2004 - 2014 | mod | 5.075378 | 0.7626767 | 0.4588643 | 1.2526244 |
N. Atlantic | 2004 - 2014 | mod_truth | 4.878549 | 0.0000000 | 0.8210126 | 0.0000000 |
N. Atlantic | 2004 - 2014 | obs | 8.025765 | 1.6045228 | -1.8420048 | 1.7166841 |
S. Atlantic | 1994 - 2004 | mod | 5.064488 | 1.0060015 | NA | NA |
S. Atlantic | 1994 - 2004 | mod_truth | 4.706655 | 0.0000000 | NA | NA |
S. Atlantic | 1994 - 2004 | obs | 7.252470 | 1.6387430 | NA | NA |
S. Atlantic | 2004 - 2014 | mod | 6.393315 | 0.9477905 | 1.3288264 | 1.3821526 |
S. Atlantic | 2004 - 2014 | mod_truth | 5.251166 | 0.0000000 | 0.5445113 | 0.0000000 |
S. Atlantic | 2004 - 2014 | obs | 9.960798 | 2.0334892 | 2.7083280 | 2.6116196 |
Indian | 1994 - 2004 | mod | 5.899824 | 2.1918824 | NA | NA |
Indian | 1994 - 2004 | mod_truth | 5.570926 | 0.0000000 | NA | NA |
Indian | 1994 - 2004 | obs | 8.154922 | 1.6123138 | NA | NA |
Indian | 2004 - 2014 | mod | 7.583920 | 1.2034671 | 1.6840960 | 2.5005362 |
Indian | 2004 - 2014 | mod_truth | 6.501337 | 0.0000000 | 0.9304108 | 0.0000000 |
Indian | 2004 - 2014 | obs | 6.519972 | 0.7327277 | -1.6349503 | 1.7710013 |
dcant_inv_stat_mean <-
full_join(basinmask,
dcant_inv_all) %>%
mutate(surf_area = earth_surf(lat, lon),
lat_grid = cut(lat, c(-50, -20, 20, 50))) %>%
group_by(basin, period, data_source, lat_grid) %>%
summarise(dcant = weighted.mean(dcant, surf_area)) %>%
ungroup() %>%
filter(!is.na(dcant),
!is.na(lat_grid),
lat_grid != "(-20,20]")
dcant_inv_stat_ensemble <-
full_join(basinmask,
dcant_inv_all_ensemble) %>%
mutate(surf_area = earth_surf(lat, lon),
lat_grid = cut(lat, c(-50, -20, 20, 50))) %>%
group_by(basin, data_source, period, MLR_basins, Version_ID_group, lat_grid) %>%
summarise(dcant = weighted.mean(dcant, surf_area)) %>%
ungroup() %>%
filter(!is.na(dcant),
!is.na(lat_grid),
lat_grid != "(-20,20]") %>%
group_by(basin, data_source, period, lat_grid) %>%
summarise(dcant_sd = sd(dcant) * 2) %>%
ungroup()
dcant_inv_stat <-
full_join(dcant_inv_stat_mean,
dcant_inv_stat_ensemble)
dcant_inv_stat %>%
filter(period %in% two_decades) %>%
group_by(data_source, basin, lat_grid) %>%
mutate(delta_dcant = dcant - lag(dcant),
RSS = sqrt(dcant_sd ^ 2 + lag(dcant_sd ^ 2))) %>%
ungroup() %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
basin | period | data_source | lat_grid | dcant | dcant_sd | delta_dcant | RSS |
---|---|---|---|---|---|---|---|
N. Pacific | 1994 - 2004 | mod | (20,50] | 3.9084642 | 0.3635033 | NA | NA |
N. Pacific | 1994 - 2004 | mod_truth | (20,50] | 3.4984361 | 0.0000000 | NA | NA |
N. Pacific | 1994 - 2004 | obs | (20,50] | 3.9829040 | 1.6900305 | NA | NA |
N. Pacific | 2004 - 2014 | mod | (20,50] | 3.9223699 | 0.8476074 | 0.0139057 | 0.9222651 |
N. Pacific | 2004 - 2014 | mod_truth | (20,50] | 3.9043518 | 0.0000000 | 0.4059158 | 0.0000000 |
N. Pacific | 2004 - 2014 | obs | (20,50] | 3.3833004 | 2.0478137 | -0.5996036 | 2.6551354 |
S. Pacific | 1994 - 2004 | mod | (-50,-20] | 6.5209038 | 1.4549861 | NA | NA |
S. Pacific | 1994 - 2004 | mod_truth | (-50,-20] | 6.4761945 | 0.0000000 | NA | NA |
S. Pacific | 1994 - 2004 | obs | (-50,-20] | 9.8048932 | 2.2634410 | NA | NA |
S. Pacific | 2004 - 2014 | mod | (-50,-20] | 8.3203549 | 0.9296043 | 1.7994510 | 1.7266003 |
S. Pacific | 2004 - 2014 | mod_truth | (-50,-20] | 7.9621161 | 0.0000000 | 1.4859216 | 0.0000000 |
S. Pacific | 2004 - 2014 | obs | (-50,-20] | 8.5667582 | 2.3684392 | -1.2381350 | 3.2760753 |
N. Atlantic | 1994 - 2004 | mod | (20,50] | 5.6510208 | 1.0533237 | NA | NA |
N. Atlantic | 1994 - 2004 | mod_truth | (20,50] | 4.6144491 | 0.0000000 | NA | NA |
N. Atlantic | 1994 - 2004 | obs | (20,50] | 12.1361324 | 0.9970267 | NA | NA |
N. Atlantic | 2004 - 2014 | mod | (20,50] | 5.6292473 | 0.8409715 | -0.0217735 | 1.3478590 |
N. Atlantic | 2004 - 2014 | mod_truth | (20,50] | 6.1398829 | 0.0000000 | 1.5254338 | 0.0000000 |
N. Atlantic | 2004 - 2014 | obs | (20,50] | 8.4461849 | 1.7253646 | -3.6899474 | 1.9927231 |
S. Atlantic | 1994 - 2004 | mod | (-50,-20] | 7.7366367 | 1.2977590 | NA | NA |
S. Atlantic | 1994 - 2004 | mod_truth | (-50,-20] | 6.3774635 | 0.0000000 | NA | NA |
S. Atlantic | 1994 - 2004 | obs | (-50,-20] | 8.4912458 | 1.3753561 | NA | NA |
S. Atlantic | 2004 - 2014 | mod | (-50,-20] | 8.3424057 | 1.9447820 | 0.6057690 | 2.3380238 |
S. Atlantic | 2004 - 2014 | mod_truth | (-50,-20] | 7.2252841 | 0.0000000 | 0.8478205 | 0.0000000 |
S. Atlantic | 2004 - 2014 | obs | (-50,-20] | 13.1557314 | 3.2458158 | 4.6644856 | 3.5251843 |
Indian | 1994 - 2004 | mod | (-50,-20] | 8.8067366 | 2.0360803 | NA | NA |
Indian | 1994 - 2004 | mod | (20,50] | 6.3172021 | 6.0692080 | NA | NA |
Indian | 1994 - 2004 | mod_truth | (-50,-20] | 8.1443384 | 0.0000000 | NA | NA |
Indian | 1994 - 2004 | mod_truth | (20,50] | 2.6253949 | 0.0000000 | NA | NA |
Indian | 1994 - 2004 | obs | (-50,-20] | 10.7970711 | 0.7000972 | NA | NA |
Indian | 1994 - 2004 | obs | (20,50] | -0.3174586 | 5.1455596 | NA | NA |
Indian | 2004 - 2014 | mod | (-50,-20] | 10.2876458 | 1.7754131 | 1.4809092 | 2.7014282 |
Indian | 2004 - 2014 | mod | (20,50] | 1.3781176 | 2.4759730 | -4.9390844 | 6.5548247 |
Indian | 2004 - 2014 | mod_truth | (-50,-20] | 9.4334367 | 0.0000000 | 1.2890983 | 0.0000000 |
Indian | 2004 - 2014 | mod_truth | (20,50] | 3.5697855 | 0.0000000 | 0.9443906 | 0.0000000 |
Indian | 2004 - 2014 | obs | (-50,-20] | 8.2468486 | 1.6813742 | -2.5502226 | 1.8213059 |
Indian | 2004 - 2014 | obs | (20,50] | 7.0876343 | 3.2202425 | 7.4050929 | 6.0701520 |
rm(dcant_inv_stat, dcant_inv_stat_mean, dcant_inv_stat_ensemble)
p_CI_absolute_mod_delta <- dcant_inv_all %>%
filter(period %in% two_decades,
data_source != "obs") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)
) %>%
p_map_cant_inv(var = "dcant",
title_text = NULL) +
facet_grid(period ~ data_source) +
theme(axis.text.x = element_blank()) +
geom_point(
data = dcant_inv_uncertainty %>%
filter(signif == 0,
data_source == "mod") %>%
mutate(data_source = case_when(data_source == "mod" ~ "Reconstruction")),
aes(lon, lat),
shape = 20,
size = 0.1,
col = "grey"
)
p_CI_bias_delta <-
dcant_inv_all %>%
filter(period %in% two_decades,
data_source != "obs") %>%
select(data_source, lon, lat, basin_AIP, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(dcant_offset = `2004 - 2014` - `1994 - 2004`,
period = "Decadal offset") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)
) %>%
p_map_cant_inv(
var = "dcant_offset",
title_text = NULL,
subtitle_text = NULL,
col = "bias"
) +
facet_grid(period ~ data_source) +
geom_point(
data = delta_dcant_inv_uncertainty %>%
filter(signif == 0,
data_source == "mod") %>%
mutate(
data_source = case_when(data_source == "mod" ~ "Reconstruction"),
period = "Decadal offset"
),
aes(lon, lat),
shape = 20,
size = 0.1,
col = "black"
)
p_CI_absolute_mod_delta / p_CI_bias_delta +
plot_annotation(tag_levels = 'A')
ggsave(path = here::here("output/publication"),
filename = "FigS_delta_dcant_column_inventory_synthetic_data.png",
height = 7,
width = 8)
rm(p_CI_absolute_mod_delta, p_CI_bias_delta)
delta_dcant_inv_all <-
dcant_inv_all %>%
filter(data_source %in% c("obs", "mod"),
period %in% two_decades) %>%
select(data_source, lon, lat, basin_AIP, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(dcant_offset = `2004 - 2014` - `1994 - 2004`,
period = "(2004 - 2014) - (1994 - 2004)")
p_CI_delta <-
delta_dcant_inv_all %>%
filter(data_source == "obs") %>%
p_map_cant_inv(
var = "dcant_offset",
title_text = NULL,
subtitle_text = NULL,
col = "bias"
) +
geom_point(
data = delta_dcant_inv_uncertainty %>%
filter(signif == 0,
data_source == "obs") %>%
mutate(period = "(2004 - 2014) - (1994 - 2004)"),
aes(lon, lat),
shape = 20,
size = 0.1,
col = "black"
) +
facet_wrap(~ period)
p_CI_absolute / p_CI_delta +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
e2adac6 | jens-daniel-mueller | 2022-07-22 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
f09080e | jens-daniel-mueller | 2022-06-28 |
16dc3af | jens-daniel-mueller | 2022-06-27 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
094bfa0 | jens-daniel-mueller | 2022-02-18 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
9753eb8 | jens-daniel-mueller | 2022-01-26 |
b1d7720 | jens-daniel-mueller | 2022-01-21 |
d6b399a | jens-daniel-mueller | 2022-01-21 |
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_column_inventory.png",
height = 10,
width = 8)
p_CI_delta +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
e2adac6 | jens-daniel-mueller | 2022-07-22 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
f09080e | jens-daniel-mueller | 2022-06-28 |
16dc3af | jens-daniel-mueller | 2022-06-27 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
094bfa0 | jens-daniel-mueller | 2022-02-18 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
9753eb8 | jens-daniel-mueller | 2022-01-26 |
b1d7720 | jens-daniel-mueller | 2022-01-21 |
d6b399a | jens-daniel-mueller | 2022-01-21 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_column_inventory_delta.png",
height = 3.2,
width = 6)
rm(p_CI_absolute, p_CI_delta)
p_CI_absolute_mod <- dcant_inv_all %>%
filter(period %in% two_decades,
data_source != "obs") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)
) %>%
p_map_cant_inv(var = "dcant",
title_text = NULL) +
facet_grid(data_source ~ period) +
theme(axis.text.x = element_blank()) +
geom_point(
data = dcant_inv_uncertainty %>%
filter(signif == 0,
data_source == "mod") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction"
)
),
aes(lon, lat),
shape = 20,
size = 0.1,
col = "grey"
)
p_CI_absolute_mod
p_CI_bias <-
dcant_inv_all %>%
filter(period %in% two_decades,
data_source != "obs") %>%
select(data_source, lon, lat, basin_AIP, period, dcant) %>%
pivot_wider(names_from = data_source,
values_from = dcant) %>%
mutate(dcant_bias = mod - mod_truth,
data_source = "Reconstruction bias") %>%
p_map_cant_inv(
var = "dcant_bias",
title_text = NULL,
subtitle_text = NULL,
col = "bias"
) +
facet_grid(data_source ~ period) +
theme(strip.text.x = element_blank(),
strip.background.x = element_blank())
p_CI_absolute_mod / p_CI_bias +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_column_inventory_synthetic_data.png",
height = 7,
width = 8)
rm(p_CI_absolute_mod, p_CI_bias)
p_CI_bias_decade <-
dcant_inv_all %>%
filter(period %in% two_decades,
data_source != "obs") %>%
select(data_source, lon, lat, basin_AIP, period, dcant) %>%
pivot_wider(names_from = data_source,
values_from = dcant) %>%
mutate(dcant_bias = mod - mod_truth,
data_source = "Reconstruction bias") %>%
arrange(period) %>%
group_by(lon, lat) %>%
summarise(delta_dcant_bias = dcant_bias - lag(dcant_bias)) %>%
ungroup() %>%
drop_na() %>%
p_map_cant_inv(
var = "delta_dcant_bias",
title_text = NULL,
subtitle_text = NULL,
col = "bias"
) +
theme(strip.text.x = element_blank(),
strip.background.x = element_blank())
p_CI_bias_decade
ggsave(path = here::here("output/publication"),
filename = "FigS_delta_dcant_column_inventory_synthetic_data_bias.png",
height = 3.5,
width = 5)
rm(p_CI_bias_decade)
bind_rows(
dcant_inv_all %>%
filter(period %in% two_decades) %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "obs" ~ "Observations",
data_source == "mod_truth" ~ "Model truth"
)
) %>%
select(data_source, dcant, period),
dcant_inv_bias_all %>%
filter(period %in% two_decades) %>%
mutate(data_source = "Reconstruction bias") %>%
select(data_source, dcant = dcant_pos_bias, period)
) %>%
ggplot(aes(dcant, col = data_source)) +
scale_color_brewer(palette = "Dark2") +
scale_fill_brewer(palette = "Dark2") +
geom_vline(xintercept = 0) +
geom_density(alpha = 0.3) +
coord_cartesian(xlim = c(-2, 18)) +
facet_grid(period ~ .) +
labs(x = dcant_CI_label) +
theme(legend.title = element_blank())
# ggsave(path = here::here("output/publication"),
# filename = "FigS_dcant_column_inventory_density_distribution.png",
# height = 4,
# width = 7)
bind_rows(
dcant_inv_all %>%
filter(period %in% two_decades) %>%
select(data_source, lon, lat, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(dcant_offset = `2004 - 2014` - `1994 - 2004`,
period = "(2004 - 2014) - (1994 - 2004)") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "obs" ~ "Observations",
data_source == "mod_truth" ~ "Model truth"
)
) %>%
select(data_source, dcant_offset, period),
dcant_inv_bias_all %>%
filter(period %in% two_decades) %>%
select(lon, lat, period, dcant_bias) %>%
pivot_wider(names_from = period,
values_from = dcant_bias) %>%
mutate(dcant_offset = `2004 - 2014` - `1994 - 2004`,
period = "(2004 - 2014) - (1994 - 2004)") %>%
mutate(data_source = "Reconstruction bias") %>%
select(data_source, dcant_offset, period)
) %>%
ggplot(aes(dcant_offset, col = data_source)) +
scale_color_brewer(palette = "Dark2") +
scale_fill_brewer(palette = "Dark2") +
geom_vline(xintercept = 0) +
geom_density(alpha = 0.3) +
coord_cartesian(xlim = c(-10, 10)) +
labs(x = delta_dcant_CI_label) +
theme(legend.title = element_blank())
# ggsave(
# path = here::here("output/publication"),
# filename = "FigS_delta_dcant_column_inventory_density_distribution.png",
# height = 3,
# width = 7
# )
dcant_inv_all %>%
filter(data_source %in% c("obs")) %>%
p_map_cant_inv(var = "beta",
breaks = c(-Inf, seq(0, 1, 0.1), Inf),
title_text = NULL,
legend_title = beta_CI_label) +
facet_grid(period ~ .)
Version | Author | Date |
---|---|---|
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
f68fcfa | jens-daniel-mueller | 2022-07-26 |
f2615fb | jens-daniel-mueller | 2022-07-26 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
efa414b | jens-daniel-mueller | 2022-07-16 |
ggsave(path = here::here("output/publication"),
filename = "FigS_beta_column_inventory.png",
height = 8,
width = 6)
dcant_inv_all <- m_grid_horizontal_coarse(dcant_inv_all)
dcant_inv_all_lat_mean <- dcant_inv_all %>%
group_by(basin_AIP, period, lat_grid, data_source) %>%
summarise(beta = mean(beta, na.rm = TRUE),
dcant = mean(dcant, na.rm = TRUE)) %>%
ungroup()
dcant_inv_all_ensemble <- m_grid_horizontal_coarse(dcant_inv_all_ensemble)
dcant_inv_all_ensemble_lat_mean <- dcant_inv_all_ensemble %>%
group_by(basin_AIP, period, lat_grid, Version_ID, data_source) %>%
summarise(beta_mean = mean(beta, na.rm = TRUE),
dcant_mean = mean(dcant, na.rm = TRUE)) %>%
ungroup()
dcant_inv_all_ensemble_lat_mean_average <- dcant_inv_all_ensemble_lat_mean %>%
group_by(basin_AIP, period, lat_grid, data_source) %>%
summarise(beta_sd = sd(beta_mean, na.rm = TRUE),
beta_mean = mean(beta_mean, na.rm = TRUE),
dcant_sd = sd(dcant_mean, na.rm = TRUE),
dcant_mean = mean(dcant_mean, na.rm = TRUE)) %>%
ungroup()
dcant_inv_all_lat_mean <- full_join(dcant_inv_all_lat_mean,
dcant_inv_all_ensemble_lat_mean_average)
dcant_inv_all_lat_mean %>%
filter(period != "1800 - 1994") %>%
ggplot(aes(lat_grid, dcant, fill = period)) +
geom_hline(yintercept = c(0,10)) +
geom_vline(xintercept = c(-10,10)) +
geom_vline(xintercept = c(-40,-30,30,40)) +
geom_ribbon(aes(ymin = dcant - dcant_sd,
ymax = dcant + dcant_sd),
alpha = 0.3) +
geom_path(aes(col = period)) +
geom_point(shape = 21) +
scale_color_brewer(palette = "Dark2", name = "Mean ± SD") +
scale_fill_brewer(palette = "Dark2", name = "Mean ± SD") +
coord_flip() +
facet_grid(data_source ~ basin_AIP) +
labs(x = "Latitude (°N)",
y = dcant_CI_label) +
scale_x_continuous(breaks = seq(-75,75, 15))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
dcant_inv_all_lat_mean %>%
filter(period != "1800 - 1994") %>%
mutate(lat_grid = cut(lat_grid, c(-40,-30,-10,10,30,40))) %>%
group_by(lat_grid, data_source) %>%
summarise(dcant_mean = mean(dcant_mean, na_rm = TRUE)) %>%
ungroup()
# A tibble: 18 × 3
lat_grid data_source dcant_mean
<fct> <chr> <dbl>
1 (-40,-30] mod 11.7
2 (-40,-30] mod_truth 10.9
3 (-40,-30] obs 14.0
4 (-30,-10] mod 8.64
5 (-30,-10] mod_truth 7.73
6 (-30,-10] obs 11.1
7 (-10,10] mod 4.59
8 (-10,10] mod_truth 4.09
9 (-10,10] obs 6.86
10 (10,30] mod 5.29
11 (10,30] mod_truth 5.03
12 (10,30] obs 6.77
13 (30,40] mod 6.19
14 (30,40] mod_truth 6.46
15 (30,40] obs 10.6
16 <NA> mod 5.58
17 <NA> mod_truth 5.59
18 <NA> obs 7.10
dcant_inv_all_lat_mean %>%
filter(period != "1800 - 1994") %>%
mutate(lat_grid = cut(lat_grid, c(-40,-30,-10,10,30,40))) %>%
group_by(lat_grid, basin_AIP, data_source) %>%
summarise(dcant_mean = mean(dcant_mean, na_rm = TRUE)) %>%
ungroup()
# A tibble: 51 × 4
lat_grid basin_AIP data_source dcant_mean
<fct> <chr> <chr> <dbl>
1 (-40,-30] Atlantic mod 11.4
2 (-40,-30] Atlantic mod_truth 10.1
3 (-40,-30] Atlantic obs 15.2
4 (-40,-30] Indian mod 13.3
5 (-40,-30] Indian mod_truth 12.6
6 (-40,-30] Indian obs 13.8
7 (-40,-30] Pacific mod 10.5
8 (-40,-30] Pacific mod_truth 9.97
9 (-40,-30] Pacific obs 12.9
10 (-30,-10] Atlantic mod 7.51
# … with 41 more rows
dcant_inv_all_lat_mean %>%
filter(period != "1800 - 1994") %>%
mutate(lat_grid = cut(lat_grid, c(-90,0,90))) %>%
group_by(lat_grid, basin_AIP, period, data_source) %>%
summarise(dcant_mean = mean(dcant_mean, na_rm = TRUE)) %>%
ungroup()
# A tibble: 54 × 5
lat_grid basin_AIP period data_source dcant_mean
<fct> <chr> <chr> <chr> <dbl>
1 (-90,0] Atlantic 1994 - 2004 mod 4.18
2 (-90,0] Atlantic 1994 - 2004 mod_truth 4.06
3 (-90,0] Atlantic 1994 - 2004 obs 6.73
4 (-90,0] Atlantic 1994 - 2014 mod 9.47
5 (-90,0] Atlantic 1994 - 2014 mod_truth 8.72
6 (-90,0] Atlantic 1994 - 2014 obs 14.4
7 (-90,0] Atlantic 2004 - 2014 mod 5.37
8 (-90,0] Atlantic 2004 - 2014 mod_truth 4.66
9 (-90,0] Atlantic 2004 - 2014 obs 7.78
10 (-90,0] Indian 1994 - 2004 mod 5.76
# … with 44 more rows
dcant_inv_all_lat_mean %>%
filter(period != "1800 - 1994") %>%
mutate(lat_grid = cut(lat_grid, c(-50,-20,20,50))) %>%
group_by(lat_grid, basin_AIP, period, data_source) %>%
summarise(dcant_mean = mean(dcant_mean, na_rm = TRUE)) %>%
ungroup() %>%
filter(data_source == "obs") %>%
arrange(basin_AIP)
# A tibble: 36 × 5
lat_grid basin_AIP period data_source dcant_mean
<fct> <chr> <chr> <chr> <dbl>
1 (-50,-20] Atlantic 1994 - 2004 obs 8.59
2 (-50,-20] Atlantic 1994 - 2014 obs 20.0
3 (-50,-20] Atlantic 2004 - 2014 obs 11.5
4 (-20,20] Atlantic 1994 - 2004 obs 5.25
5 (-20,20] Atlantic 1994 - 2014 obs 13.8
6 (-20,20] Atlantic 2004 - 2014 obs 8.50
7 (20,50] Atlantic 1994 - 2004 obs 12.0
8 (20,50] Atlantic 1994 - 2014 obs 20.1
9 (20,50] Atlantic 2004 - 2014 obs 8.12
10 <NA> Atlantic 1994 - 2004 obs 7.44
# … with 26 more rows
dcant_inv_all_ensemble_lat_mean %>%
ggplot(aes(lat_grid, dcant_mean, fill=period, group=Version_ID)) +
geom_hline(yintercept = 0) +
geom_path(aes(col=period), alpha = 0.3) +
scale_color_brewer(palette = "Dark2") +
scale_fill_brewer(palette = "Dark2") +
coord_flip() +
facet_grid(data_source ~ basin_AIP) +
labs(x = "Latitude (°N)",
y = dcant_CI_label)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
0160c40 | jens-daniel-mueller | 2022-07-16 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
dcant_inv_all_lat_mean %>%
ggplot(aes(lat_grid, beta, fill = period)) +
geom_hline(yintercept = 0) +
geom_ribbon(aes(ymin = beta - beta_sd,
ymax = beta + beta_sd),
alpha = 0.3) +
geom_path(aes(col = period)) +
geom_point(shape = 21) +
scale_color_brewer(palette = "Dark2", name = "Mean ± SD") +
scale_fill_brewer(palette = "Dark2", name = "Mean ± SD") +
coord_flip() +
facet_grid(data_source ~ basin_AIP) +
labs(x = "Latitude (°N)",
y = beta_CI_label) +
scale_x_continuous(breaks = seq(-75,75, 15))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
dcant_inv_all_ensemble_lat_mean %>%
ggplot(aes(lat_grid, beta_mean, fill=period, group=Version_ID)) +
geom_hline(yintercept = 0) +
geom_path(aes(col=period), alpha = 0.3) +
scale_color_brewer(palette = "Dark2") +
scale_fill_brewer(palette = "Dark2") +
coord_flip() +
facet_grid(data_source ~ basin_AIP) +
labs(x = "Latitude (°N)",
y = beta_CI_label)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
0160c40 | jens-daniel-mueller | 2022-07-16 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
delta_dcant_global_section_all <-
dcant_global_section_all %>%
filter(data_source %in% c("obs", "mod"),
period %in% two_decades) %>%
select(data_source, dist, depth, period, dcant) %>%
drop_na() %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(dcant_offset = `2004 - 2014` - `1994 - 2004`,
period = "(2004 - 2014) - (1994 - 2004)")
dcant_global_section_all_uncertainty <-
dcant_global_section_all_ensemble %>%
filter(data_source %in% c("obs", "mod"),
period %in% two_decades) %>%
select(dist,
depth,
period,
data_source,
MLR_basins,
Version_ID_group,
dcant) %>%
mutate(dist_grid = as.numeric(as.character(cut(
dist, seq(0, 50, 2), seq(1, 49, 2)
))),
depth_grid = as.numeric(as.character(cut(
depth,
c(seq(0, 500, 100), seq(1000, 10000, 500)),
c(seq(50, 450, 100), seq(750, 10000, 500)),
right = FALSE
)))) %>%
group_by(dist_grid,
depth_grid,
data_source,
period,
MLR_basins,
Version_ID_group) %>%
summarise(dcant = mean(dcant),
n = n()) %>%
ungroup() %>%
rename(dist = dist_grid,
depth = depth_grid)
dcant_global_section_all_uncertainty <-
additive_uncertainty(dcant_global_section_all_uncertainty)
delta_dcant_global_section_all_uncertainty <- dcant_global_section_all_uncertainty[[3]]
dcant_global_section_all_uncertainty_contributions <- dcant_global_section_all_uncertainty[[2]]
dcant_global_section_all_uncertainty <- dcant_global_section_all_uncertainty[[1]]
dcant_global_section_all_uncertainty <-
dcant_global_section_all_uncertainty %>%
mutate(band = "dummy")
dcant_global_section_all_uncertainty %>%
filter(data_source == "obs",
period == "1994 - 2004") %>%
p_section_global(
var = "std_case",
plot_slabs = "n",
title_text = NULL,
subtitle_text = NULL,
col = "div"
)
Version | Author | Date |
---|---|---|
6edad9b | jens-daniel-mueller | 2022-11-11 |
dcant_global_section_all_uncertainty %>%
filter(data_source == "obs",
period == "1994 - 2004") %>%
p_section_global(
var = "sd",
plot_slabs = "n",
title_text = NULL,
subtitle_text = NULL,
col = "div"
)
ggplot() +
geom_point(
data = dcant_global_section_all_uncertainty %>%
filter(signif == 0),
aes(dist, depth),
shape = 4
) +
facet_grid(data_source~period) +
scale_y_reverse()
delta_dcant_global_section_all_uncertainty <-
delta_dcant_global_section_all_uncertainty %>%
mutate(band = "dummy")
delta_dcant_global_section_all_uncertainty %>%
filter(data_source == "obs") %>%
p_section_global(
var = "delta_dcant",
plot_slabs = "n",
title_text = NULL,
subtitle_text = NULL,
col = "div"
)
Version | Author | Date |
---|---|---|
6edad9b | jens-daniel-mueller | 2022-11-11 |
delta_dcant_global_section_all_uncertainty %>%
filter(data_source == "obs") %>%
select(-delta_dcant) %>%
rename(delta_dcant = RSS) %>%
p_section_global(
var = "delta_dcant",
plot_slabs = "n",
title_text = NULL,
subtitle_text = NULL,
col = "div"
)
ggplot() +
geom_point(
data = delta_dcant_global_section_all_uncertainty %>%
filter(signif == 0),
aes(dist, depth),
shape = 4
) +
scale_y_reverse() +
facet_grid(data_source~.)
p_dcant_global_section_dec1 <-
dcant_global_section_all %>%
filter(data_source == "obs",
period %in% "1994 - 2004") %>%
p_section_global(var = "dcant",
title_text = "1994 - 2004",
df_uncertainty = dcant_global_section_all_uncertainty %>%
filter(period %in% "1994 - 2004",
data_source == "obs",
signif == 0),
col_uncertainty = "grey",
subtitle_text = NULL,
plot_slabs = "n",
contour_level = 5) +
theme(
axis.title.x = element_blank(),
axis.text.x.bottom = element_blank()
)
p_dcant_global_section_dec2 <-
dcant_global_section_all %>%
filter(data_source == "obs",
period %in% "2004 - 2014") %>%
p_section_global(
var = "dcant",
title_text = NULL,
subtitle_text = NULL,
plot_slabs = "n",
contour_level = 5,
df_uncertainty = dcant_global_section_all_uncertainty %>%
filter(period %in% "2004 - 2014",
data_source == "obs",
signif == 0),
col_uncertainty = "grey"
) &
theme(legend.position = "none")
p_dcant_global_section_offset <-
dcant_global_section_all %>%
filter(data_source == "obs",
period %in% two_decades) %>%
arrange(depth, dist) %>%
select(depth, dist, dcant, period, gamma_mean) %>%
drop_na() %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(delta_dcant = `2004 - 2014` - `1994 - 2004`) %>%
p_section_global(
var = "delta_dcant",
df_uncertainty = delta_dcant_global_section_all_uncertainty %>%
filter(data_source == "obs",
signif == 0),
plot_slabs = "y",
col = "div",
title_text = NULL,
subtitle_text = NULL
)
wrap_plots(
p_dcant_global_section_dec1,
p_dcant_global_section_dec2 &
theme(axis.title.x = element_blank(),
axis.text.x = element_blank()),
p_dcant_global_section_offset &
theme(axis.title.x.top = element_blank(),
axis.text.x.top = element_blank()),
ncol = 1
)
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_global_section.png",
height = 10,
width = 8)
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_global_section.png",
height = 9,
width = 10)
rm(p_dcant_global_section_dec1, p_dcant_global_section_dec2,
p_dcant_global_section_offset)
p_dcant_global_section_dec1 <-
dcant_global_section_all %>%
filter(data_source == "mod",
period %in% "1994 - 2004") %>%
p_section_global(var = "dcant",
title_text = "1994 - 2004",
df_uncertainty = dcant_global_section_all_uncertainty %>%
filter(period %in% "1994 - 2004",
data_source == "mod",
signif == 0),
col_uncertainty = "grey",
subtitle_text = NULL,
plot_slabs = "n",
contour_level = 5) +
theme(
axis.title.x = element_blank(),
axis.text.x.bottom = element_blank()
)
p_dcant_global_section_dec2 <-
dcant_global_section_all %>%
filter(data_source == "mod",
period %in% "2004 - 2014") %>%
p_section_global(
var = "dcant",
title_text = NULL,
subtitle_text = NULL,
plot_slabs = "n",
contour_level = 5,
df_uncertainty = dcant_global_section_all_uncertainty %>%
filter(period %in% "2004 - 2014",
data_source == "mod",
signif == 0),
col_uncertainty = "grey"
) &
theme(
legend.position = "none"
)
p_dcant_global_section_offset <-
dcant_global_section_all %>%
filter(data_source == "mod",
period %in% two_decades) %>%
arrange(depth, dist) %>%
select(depth, dist, dcant, period, gamma_mean) %>%
drop_na() %>%
group_by(depth, dist) %>%
mutate(gamma_mean = mean(gamma_mean)) %>%
ungroup() %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(delta_dcant = `2004 - 2014` - `1994 - 2004`) %>%
p_section_global(
var = "delta_dcant",
df_uncertainty = delta_dcant_global_section_all_uncertainty %>%
filter(data_source == "mod",
signif == 0),
col = "div",
plot_slabs = "y",
title_text = NULL,
subtitle_text = NULL
)
wrap_plots(
p_dcant_global_section_dec1,
p_dcant_global_section_dec2 &
theme(axis.title.x = element_blank(),
axis.text.x = element_blank()),
p_dcant_global_section_offset &
theme(axis.title.x.top = element_blank(),
axis.text.x.top = element_blank()),
ncol = 1
)
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_global_section_synthetic_data.png",
height = 10,
width = 8)
rm(p_dcant_global_section_dec1, p_dcant_global_section_dec2,
p_dcant_global_section_offset)
p_dcant_zonal_absolute <-
dcant_zonal_all %>%
filter(
data_source == "obs",
period %in% two_decades,
depth <= params_global$inventory_depth_standard
) %>%
p_section_zonal_continous_depth(var = "dcant",
plot_slabs = "n",
title_text = NULL) +
geom_contour(aes(lat, depth, z = dcant),
breaks = 5,
col = "white") +
# geom_text_contour(
# aes(lat, depth, z = dcant),
# breaks = 5,
# stroke = 0.2,
# stroke.colour = "white",
# rotate = FALSE,
# label.placer = label_placer_n(n = 1)
# ) +
facet_grid(period ~ basin_AIP) +
theme(
axis.text.x = element_blank(),
axis.title.x = element_blank(),
legend.position = "top"
) +
guides(fill = guide_colorsteps(
barheight = unit(0.5, "cm"),
barwidth = unit(7, "cm"),
show.limits = FALSE
))
p_dcant_zonal_absolute
Version | Author | Date |
---|---|---|
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
f68fcfa | jens-daniel-mueller | 2022-07-26 |
f2615fb | jens-daniel-mueller | 2022-07-26 |
e2adac6 | jens-daniel-mueller | 2022-07-22 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
ea46812 | jens-daniel-mueller | 2022-07-13 |
16dc3af | jens-daniel-mueller | 2022-06-27 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
09b0780 | jens-daniel-mueller | 2022-05-24 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
094bfa0 | jens-daniel-mueller | 2022-02-18 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
9753eb8 | jens-daniel-mueller | 2022-01-26 |
b1d7720 | jens-daniel-mueller | 2022-01-21 |
e572075 | jens-daniel-mueller | 2022-01-21 |
dcant_zonal_all %>%
filter(data_source %in% c("mod", "obs"),
period != "1994 - 2014") %>%
select(data_source, lat, depth, basin_AIP, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(delta_dcant = `2004 - 2014` - `1994 - 2004`) %>%
group_by(data_source) %>%
group_split() %>%
# head(1) %>%
map(
~ p_section_zonal_continous_depth(
df = .x,
var = "delta_dcant",
plot_slabs = "n",
subtitle_text = unique(.x$data_source),
col = "bias"
) +
facet_grid(basin_AIP ~ .)
)
[[1]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
[[2]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
p_dcant_zonal_delta <-
dcant_zonal_all %>%
filter(data_source %in% c("obs"),
period != "1994 - 2014") %>%
select(data_source, lat, depth, basin_AIP, period, gamma_mean, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(delta_dcant = `2004 - 2014` - `1994 - 2004`) %>%
group_by(data_source) %>%
group_split() %>%
# head(1) %>%
map(
~ p_section_zonal_continous_depth(
df = .x,
var = "delta_dcant",
plot_slabs = "y",
drop_slabs = 1,
subtitle_text = NULL,
title_text = NULL,
col = "bias"
) +
facet_grid("Dec. diff." ~ basin_AIP) +
theme(
strip.text.x = element_blank(),
strip.background.x = element_blank(),
legend.position = "bottom"
) +
guides(fill = guide_colorsteps(
barheight = unit(0.5, "cm"),
barwidth = unit(10, "cm"),
show.limits = FALSE
))
)
p_dcant_zonal_absolute / p_dcant_zonal_delta +
plot_layout(heights = c(2,1)) +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_zonal_mean_section.png",
height = 6,
width = 8)
rm(p_dcant_zonal_absolute, p_dcant_zonal_delta)
p_dcant_zonal_absolute_mod <-
dcant_zonal_all %>%
filter(
data_source != "obs",
period %in% two_decades,
depth <= params_global$inventory_depth_standard
) %>%
mutate(data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)) %>%
p_section_zonal_continous_depth(var = "dcant",
plot_slabs = "n",
title_text = NULL) +
geom_contour(aes(lat, depth, z = dcant),
breaks = 5,
col = "white") +
facet_nested(data_source+period ~ basin_AIP) +
theme(
axis.text.x = element_blank(),
axis.title.x = element_blank(),
legend.position = "top"
) +
guides(fill = guide_colorsteps(
barheight = unit(0.5, "cm"),
barwidth = unit(7, "cm"),
show.limits = FALSE
))
p_dcant_zonal_absolute_mod
p_dcant_zonal_bias <-
dcant_zonal_all %>%
filter(data_source != "obs",
period %in% two_decades) %>%
select(data_source, lat, depth, basin_AIP, period, dcant) %>%
pivot_wider(names_from = data_source,
values_from = dcant) %>%
mutate(dcant_bias = mod - mod_truth) %>%
p_section_zonal_continous_depth(
var = "dcant_bias",
plot_slabs = "n",
drop_slabs = 1,
subtitle_text = NULL,
title_text = NULL,
col = "bias"
) +
facet_grid(period ~ basin_AIP) +
theme(
strip.text.x = element_blank(),
strip.background.x = element_blank(),
legend.position = "bottom"
) +
guides(fill = guide_colorsteps(
barheight = unit(0.5, "cm"),
barwidth = unit(10, "cm"),
show.limits = FALSE
))
p_dcant_zonal_absolute_mod / p_dcant_zonal_bias +
plot_layout(heights = c(2,1)) +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
ggsave(
path = here::here("output/publication"),
filename = "FigS_dcant_zonal_mean_section_synthetic_data.png",
height = 9,
width = 8
)
rm(p_dcant_zonal_absolute_mod,
p_dcant_zonal_bias)
dcant_penetration_depth_all_lat_mean_all_ensemble %>%
filter(dcant_lim == 5,
period %in% two_decades,
data_source != "obs") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction\nensemble",
data_source == "mod_truth" ~ "Model truth"
),
data_source = fct_reorder(data_source, desc(data_source))
) %>%
ggplot(aes(
lat,
depth_mean,
group = interaction(MLR_basins, Version_ID_group, data_source)
)) +
geom_path(aes(col = data_source)) +
geom_path(
data = dcant_penetration_depth_all_lat_mean_all %>%
filter(dcant_lim == 5,
period %in% two_decades,
data_source == "mod") %>%
mutate(
data_source = case_when(data_source == "mod" ~ "Standard case"),
data_source = fct_reorder(data_source, desc(data_source))
),
aes(lat,
depth_mean,
col = data_source)
) +
scale_colour_manual(values = c("red", "grey", "black")) +
labs(y = "Depth (m)",
x = "Latitude (°N)") +
theme(legend.title = element_blank()) +
scale_y_reverse() +
facet_grid(basin_AIP ~ period, scales = "free_x") +
coord_cartesian(ylim = c(1500,0))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
8105380 | jens-daniel-mueller | 2022-10-07 |
# ggsave(
# path = here::here("output/publication"),
# filename = "FigS_dcant_penetration_depth_synthetic_data.png",
# height = 9,
# width = 8
# )
dcant_penetration_depth_all_lat_mean_all_ensemble %>%
filter(dcant_lim == 5,
period %in% two_decades,
data_source == "mod") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Reconstruction\nensemble",
data_source == "mod_truth" ~ "Model truth"
),
data_source = fct_reorder(data_source, desc(data_source))
) %>%
ggplot(aes(
lat,
depth_mean,
group = interaction(MLR_basins, Version_ID_group, data_source)
)) +
geom_path(aes(col = MLR_basins)) +
geom_path(
data = dcant_penetration_depth_all_lat_mean_all_ensemble %>%
filter(
dcant_lim == 5,
period %in% two_decades,
data_source == "mod_truth"
),
aes(
lat,
depth_mean,
group = interaction(MLR_basins, Version_ID_group, data_source)
),
col = "black"
) +
scale_color_vibrant() +
labs(y = "Depth (m)",
x = "Latitude (°N)") +
theme(legend.title = element_blank()) +
scale_y_reverse() +
facet_grid(basin_AIP ~ period, scales = "free_x") +
coord_cartesian(ylim = c(1500, 0))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
8105380 | jens-daniel-mueller | 2022-10-07 |
# ggsave(
# path = here::here("output/publication"),
# filename = "FigS_dcant_penetration_depth_synthetic_data_MLR_basins.png",
# height = 9,
# width = 8
# )
dcant_penetration_depth_all_lat_mean_all_ensemble %>%
filter(dcant_lim == 5,
period %in% two_decades,
data_source != "mod_truth") %>%
mutate(
data_source = case_when(
data_source == "mod" ~ "Synthetic data",
data_source == "obs" ~ "Observations"
),
data_source = fct_reorder(data_source, desc(data_source))
) %>%
ggplot(aes(
lat,
depth_mean,
group = interaction(MLR_basins, Version_ID_group, data_source)
)) +
geom_path(aes(col = data_source)) +
scale_colour_highcontrast() +
labs(y = "Depth (m)",
x = "Latitude (°N)") +
theme(legend.title = element_blank()) +
scale_y_reverse() +
facet_grid(basin_AIP ~ period, scales = "free_x") +
coord_cartesian(ylim = c(1500,0))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
# ggsave(
# path = here::here("output/publication"),
# filename = "FigS_dcant_penetration_depth_synthetic_data_vs_observations.png",
# height = 9,
# width = 8
# )
dcant_penetration_depth_all_lat_mean_all_ensemble %>%
filter(dcant_lim == 5,
period %in% two_decades,
data_source == "obs") %>%
mutate(
data_source = case_when(
data_source == "obs" ~ "Observations"
),
data_source = fct_reorder(data_source, desc(data_source))
) %>%
ggplot(aes(
lat,
depth_mean,
group = interaction(MLR_basins, Version_ID_group, data_source)
)) +
geom_path(aes(col = MLR_basins)) +
scale_color_vibrant() +
labs(y = "Depth (m)",
x = "Latitude (°N)") +
theme(legend.title = element_blank()) +
scale_y_reverse() +
facet_grid(basin_AIP ~ period, scales = "free_x") +
coord_cartesian(ylim = c(1500,0))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
46c163a | jens-daniel-mueller | 2022-10-10 |
dcant_profile_basin_MLR_all %>%
arrange(depth) %>%
filter(period != "1994 - 2014",
depth <= params_global$inventory_depth_standard) %>%
group_split(data_source) %>%
# head(1) %>%
map(
~ ggplot(data = .x,
aes(dcant,
depth)) +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_ribbon(
aes(
xmin = dcant - dcant_sd,
xmax = dcant + dcant_sd,
fill = period
),
alpha = 0.3
) +
geom_path(aes(col = period)) +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = 0) +
scale_color_brewer(
palette = "Set1",
name = "mean \u00B1 regional SD",
direction = -1
) +
scale_fill_brewer(
palette = "Set1",
name = "mean \u00B1 regional SD",
direction = -1
) +
labs(
title = paste("data_source", unique(.x$data_source)),
y = "Depth (m)",
x = dcant_umol_label
) +
facet_wrap( ~ basin, ncol = 3, dir = "v") +
theme(legend.position = c(0.8, 0.2))
)
[[1]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
4673df5 | jens-daniel-mueller | 2022-02-02 |
60727e6 | jens-daniel-mueller | 2022-02-02 |
913e42f | jens-daniel-mueller | 2022-02-01 |
189de95 | jens-daniel-mueller | 2022-02-01 |
b62308d | jens-daniel-mueller | 2022-01-31 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
c6fe495 | jens-daniel-mueller | 2022-01-26 |
9753eb8 | jens-daniel-mueller | 2022-01-26 |
b1d7720 | jens-daniel-mueller | 2022-01-21 |
[[2]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
318fefe | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
748aa43 | jens-daniel-mueller | 2022-06-27 |
16dc3af | jens-daniel-mueller | 2022-06-27 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
4673df5 | jens-daniel-mueller | 2022-02-02 |
60727e6 | jens-daniel-mueller | 2022-02-02 |
913e42f | jens-daniel-mueller | 2022-02-01 |
189de95 | jens-daniel-mueller | 2022-02-01 |
b62308d | jens-daniel-mueller | 2022-01-31 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
c6fe495 | jens-daniel-mueller | 2022-01-26 |
9753eb8 | jens-daniel-mueller | 2022-01-26 |
b1d7720 | jens-daniel-mueller | 2022-01-21 |
[[3]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
318fefe | jens-daniel-mueller | 2022-08-11 |
dcant_profile_basin_MLR_all_ensemble %>%
arrange(depth) %>%
filter(
period != "1994 - 2014",
depth <= params_global$inventory_depth_standard,
data_source == "obs"
) %>%
group_split(data_source) %>%
map(
~ ggplot() +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_path(
data = .x,
aes(
dcant,
depth,
col = period,
group = Version_ID,
linetype = "Ensemble member",
size = "Ensemble member",
alpha = "Ensemble member"
)
) +
geom_path(
data = .x %>% filter(Version_ID %in% Version_IDs),
aes(
dcant,
depth,
col = period,
group = Version_ID,
linetype = "Standard case",
alpha = "Standard case",
size = "Standard case"
)
) +
geom_path(
data = .x %>% filter(Version_ID %in% Version_IDs),
aes(
dcant,
depth,
group = Version_ID
)
) +
scale_size_manual(values = c(0.7, 1.5), name=" ") +
scale_linetype_manual(values = c(1, 1), name=" ") +
scale_alpha_manual(values = c(0.4, 1), name=" ") +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = 0) +
scale_color_brewer(
palette = "Set1",
direction = -1
) +
scale_fill_brewer(
palette = "Set1",
direction = -1
) +
labs(
# title = paste("data_source", unique(.x$data_source)),
y = "Depth (m)",
x = dcant_umol_label
) +
facet_wrap( ~ basin, ncol = 3, dir = "v") +
theme(legend.position = "top")
)
[[1]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
f1d7f80 | jens-daniel-mueller | 2022-07-13 |
mean_surface_dcant <- dcant_profile_basin_MLR_all %>%
arrange(depth) %>%
filter(depth <= 50) %>%
group_by(basin, period, data_source) %>%
summarise(mean_surface_dcant = mean(dcant)) %>%
ungroup()
full_join(dcant_profile_basin_MLR_all_ensemble %>%
filter(depth <= 50),
mean_surface_dcant) %>%
group_by(basin, period, data_source) %>%
summarise(
mean_surface_dcant = mean(mean_surface_dcant, na.rm = TRUE),
sd_surface_dcant = sd(dcant) * sd_factor
) %>%
ungroup() %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
basin | period | data_source | mean_surface_dcant | sd_surface_dcant |
---|---|---|---|---|
Global | 1994 - 2004 | mod | 10.233057 | 1.7347144 |
Global | 1994 - 2004 | mod_truth | 9.119623 | 0.0942101 |
Global | 1994 - 2004 | obs | 10.514606 | 2.8400224 |
Global | 1994 - 2014 | mod | 20.680491 | 3.2110303 |
Global | 1994 - 2014 | mod_truth | 19.512012 | 0.1485833 |
Global | 1994 - 2014 | obs | 21.476974 | 3.6475735 |
Global | 2004 - 2014 | mod | 10.499135 | 2.2435897 |
Global | 2004 - 2014 | mod_truth | 10.392390 | 0.0545695 |
Global | 2004 - 2014 | obs | 11.062672 | 0.8781308 |
Indian | 1994 - 2004 | mod | 10.013093 | 2.3870587 |
Indian | 1994 - 2004 | mod_truth | 9.186885 | 0.0580122 |
Indian | 1994 - 2004 | obs | 9.538497 | 6.2454478 |
Indian | 1994 - 2014 | mod | 20.628019 | 3.2979724 |
Indian | 1994 - 2014 | mod_truth | 19.386323 | 0.1379031 |
Indian | 1994 - 2014 | obs | 20.779644 | 3.9049264 |
Indian | 2004 - 2014 | mod | 10.844700 | 1.9240077 |
Indian | 2004 - 2014 | mod_truth | 10.199438 | 0.0805878 |
Indian | 2004 - 2014 | obs | 11.363610 | 3.5803242 |
N. Pacific | 1994 - 2004 | mod | 10.276179 | 2.7544451 |
N. Pacific | 1994 - 2004 | mod_truth | 9.221239 | 0.1727115 |
N. Pacific | 1994 - 2004 | obs | 10.753290 | 4.5942099 |
N. Pacific | 1994 - 2014 | mod | 21.011574 | 4.4065777 |
N. Pacific | 1994 - 2014 | mod_truth | 19.988747 | 0.2795669 |
N. Pacific | 1994 - 2014 | obs | 21.697415 | 6.3926515 |
N. Pacific | 2004 - 2014 | mod | 10.713098 | 2.2316294 |
N. Pacific | 2004 - 2014 | mod_truth | 10.767508 | 0.1072571 |
N. Pacific | 2004 - 2014 | obs | 11.101775 | 1.8052331 |
S. Pacific | 1994 - 2004 | mod | 9.818618 | 3.2016168 |
S. Pacific | 1994 - 2004 | mod_truth | 8.898910 | 0.0712817 |
S. Pacific | 1994 - 2004 | obs | 10.303636 | 1.6775042 |
S. Pacific | 1994 - 2014 | mod | 20.051396 | 4.3478396 |
S. Pacific | 1994 - 2014 | mod_truth | 19.346396 | 0.0775971 |
S. Pacific | 1994 - 2014 | obs | 20.689650 | 2.7706049 |
S. Pacific | 2004 - 2014 | mod | 10.186799 | 3.2387943 |
S. Pacific | 2004 - 2014 | mod_truth | 10.447486 | 0.0106044 |
S. Pacific | 2004 - 2014 | obs | 10.478757 | 1.3546080 |
N. Atlantic | 1994 - 2004 | mod | 11.385040 | 4.2821039 |
N. Atlantic | 1994 - 2004 | mod_truth | 9.693375 | 0.0623285 |
N. Atlantic | 1994 - 2004 | obs | 11.600352 | 1.7074340 |
N. Atlantic | 1994 - 2014 | mod | 21.747759 | 2.2070775 |
N. Atlantic | 1994 - 2014 | mod_truth | 20.378481 | 0.0628299 |
N. Atlantic | 1994 - 2014 | obs | 23.286845 | 3.0142939 |
N. Atlantic | 2004 - 2014 | mod | 10.449947 | 5.7488519 |
N. Atlantic | 2004 - 2014 | mod_truth | 10.685107 | 0.0125663 |
N. Atlantic | 2004 - 2014 | obs | 11.721643 | 3.1147423 |
S. Atlantic | 1994 - 2004 | mod | 10.372162 | 1.0423000 |
S. Atlantic | 1994 - 2004 | mod_truth | 8.791151 | 0.0908767 |
S. Atlantic | 1994 - 2004 | obs | 11.168167 | 1.1946288 |
S. Atlantic | 1994 - 2014 | mod | 20.581578 | 3.9019613 |
S. Atlantic | 1994 - 2014 | mod_truth | 18.459719 | 0.1557427 |
S. Atlantic | 1994 - 2014 | obs | 22.288130 | 2.5894662 |
S. Atlantic | 2004 - 2014 | mod | 10.278645 | 12.4271671 |
S. Atlantic | 2004 - 2014 | mod_truth | 9.668568 | 0.0651916 |
S. Atlantic | 2004 - 2014 | obs | 11.158470 | 1.6471859 |
full_join(dcant_profile_basin_MLR_all_ensemble,
mean_surface_dcant) %>%
arrange(depth) %>%
filter(dcant >= mean_surface_dcant / 2) %>%
group_by(period, basin, Version_ID, data_source) %>%
summarise(max_depth = max(depth)) %>%
ungroup() %>%
group_by(basin, period, data_source) %>%
summarise(sd_max_depth = sd(max_depth) * 2,
mean_max_depth = mean(max_depth)) %>%
ungroup() %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
basin | period | data_source | sd_max_depth | mean_max_depth |
---|---|---|---|---|
Global | 1994 - 2004 | mod | 57.79965 | 323.0000 |
Global | 1994 - 2004 | mod_truth | 0.00000 | 351.0000 |
Global | 1994 - 2004 | obs | 46.46214 | 305.5556 |
Global | 1994 - 2014 | mod | 33.97478 | 333.3333 |
Global | 1994 - 2014 | mod_truth | 0.00000 | 351.0000 |
Global | 1994 - 2014 | obs | 0.00000 | 300.0000 |
Global | 2004 - 2014 | mod | 35.08683 | 335.3333 |
Global | 2004 - 2014 | mod_truth | 0.00000 | 351.0000 |
Global | 2004 - 2014 | obs | 0.00000 | 300.0000 |
Indian | 1994 - 2004 | mod | 118.86650 | 409.5556 |
Indian | 1994 - 2004 | mod_truth | 0.00000 | 483.0000 |
Indian | 1994 - 2004 | obs | 110.84094 | 458.3333 |
Indian | 1994 - 2014 | mod | 85.19490 | 407.8333 |
Indian | 1994 - 2014 | mod_truth | 0.00000 | 443.0000 |
Indian | 1994 - 2014 | obs | 75.59289 | 383.3333 |
Indian | 2004 - 2014 | mod | 85.08013 | 379.6667 |
Indian | 2004 - 2014 | mod_truth | 0.00000 | 443.0000 |
Indian | 2004 - 2014 | obs | 76.63560 | 280.5556 |
N. Pacific | 1994 - 2004 | mod | 66.90310 | 255.2778 |
N. Pacific | 1994 - 2004 | mod_truth | 0.00000 | 268.0000 |
N. Pacific | 1994 - 2004 | obs | 86.69413 | 243.0556 |
N. Pacific | 1994 - 2014 | mod | 38.59665 | 257.4444 |
N. Pacific | 1994 - 2014 | mod_truth | 0.00000 | 251.0000 |
N. Pacific | 1994 - 2014 | obs | 50.00000 | 220.8333 |
N. Pacific | 2004 - 2014 | mod | 23.53053 | 257.4167 |
N. Pacific | 2004 - 2014 | mod_truth | 0.00000 | 251.0000 |
N. Pacific | 2004 - 2014 | obs | 53.15446 | 202.7778 |
S. Pacific | 1994 - 2004 | mod | 68.76902 | 372.8611 |
S. Pacific | 1994 - 2004 | mod_truth | 0.00000 | 409.0000 |
S. Pacific | 1994 - 2004 | obs | 149.81470 | 369.4444 |
S. Pacific | 1994 - 2014 | mod | 62.56758 | 380.3056 |
S. Pacific | 1994 - 2014 | mod_truth | 0.00000 | 409.0000 |
S. Pacific | 1994 - 2014 | obs | 98.88265 | 361.1111 |
S. Pacific | 2004 - 2014 | mod | 83.77709 | 402.4167 |
S. Pacific | 2004 - 2014 | mod_truth | 0.00000 | 378.0000 |
S. Pacific | 2004 - 2014 | obs | 80.27730 | 319.4444 |
N. Atlantic | 1994 - 2004 | mod | 30.64492 | 295.2778 |
N. Atlantic | 1994 - 2004 | mod_truth | 0.00000 | 327.0000 |
N. Atlantic | 1994 - 2004 | obs | 0.00000 | 400.0000 |
N. Atlantic | 1994 - 2014 | mod | 24.71835 | 314.2222 |
N. Atlantic | 1994 - 2014 | mod_truth | 0.00000 | 351.0000 |
N. Atlantic | 1994 - 2014 | obs | 63.74553 | 411.1111 |
N. Atlantic | 2004 - 2014 | mod | 39.78450 | 334.8889 |
N. Atlantic | 2004 - 2014 | mod_truth | 0.00000 | 351.0000 |
N. Atlantic | 2004 - 2014 | obs | 70.14724 | 486.1111 |
S. Atlantic | 1994 - 2004 | mod | 73.89935 | 310.7500 |
S. Atlantic | 1994 - 2004 | mod_truth | 0.00000 | 351.0000 |
S. Atlantic | 1994 - 2004 | obs | 47.80914 | 283.3333 |
S. Atlantic | 1994 - 2014 | mod | 54.52581 | 325.6389 |
S. Atlantic | 1994 - 2014 | mod_truth | 0.00000 | 378.0000 |
S. Atlantic | 1994 - 2014 | obs | 98.88265 | 338.8889 |
S. Atlantic | 2004 - 2014 | mod | 40.54341 | 339.5278 |
S. Atlantic | 2004 - 2014 | mod_truth | 0.00000 | 378.0000 |
S. Atlantic | 2004 - 2014 | obs | 190.15449 | 480.5556 |
rm(mean_surface_dcant)
# dcant_profile_basin_MLR_all_ensemble %>% distinct(data_source)
dcant_profile_basin_MLR_all_uncertainty <- dcant_profile_basin_MLR_all_ensemble %>%
select(-c(dcant_sd, Version_ID, tref1, tref2)) %>%
filter(period %in% two_decades)
dcant_profile_basin_MLR_all_uncertainty <- additive_uncertainty(dcant_profile_basin_MLR_all_uncertainty)
delta_dcant_profile_basin_MLR_all_uncertainty <- dcant_profile_basin_MLR_all_uncertainty[[3]]
dcant_profile_basin_MLR_all_uncertainty_contributions <- dcant_profile_basin_MLR_all_uncertainty[[2]]
dcant_profile_basin_MLR_all_uncertainty <- dcant_profile_basin_MLR_all_uncertainty[[1]]
p_dcant_profiles <-
dcant_profile_basin_MLR_all_uncertainty %>%
arrange(depth) %>%
filter(
depth <= params_global$inventory_depth_standard,
data_source == "obs"
) %>%
ggplot() +
geom_vline(xintercept = 0, size = 0.1) +
geom_ribbon(
aes(
xmin = std_case - sd*sd_factor,
xmax = std_case + sd*sd_factor,
y = depth,
fill = period
),
alpha = 0.5
) +
geom_path(
aes(std_case,
depth,
col = period)
) +
scale_y_reverse(breaks = seq(0,3000,500))+
# scale_y_continuous(
# trans = trans_reverser("sqrt"),
# breaks = c(0, 100, 500, seq(1000, 5000, 1000)))+
coord_cartesian(expand = 0, xlim = c(-2,14)) +
scale_color_manual(values = c("#EE7733", "#009988"), name = "Mean \u00B1 2σ") +
scale_fill_manual(values = c("#EE7733", "#009988"), name = "Mean \u00B1 2σ") +
labs(y = "Depth (m)",
x = dcant_umol_label) +
facet_wrap(~ basin, ncol = 3, dir = "v") +
theme(legend.position = c(0.9, 0.1))
p_dcant_profiles
p_dcant_profiles_mod <-
dcant_profile_basin_MLR_all_uncertainty %>%
arrange(depth) %>%
filter(
depth <= params_global$inventory_depth_standard,
data_source != "obs"
) %>%
mutate(data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)) %>%
ggplot() +
geom_vline(xintercept = 0, size = 0.1) +
# geom_hline(yintercept = 1000, size = 0.1) +
geom_ribbon(
aes(
xmin = std_case - sd*sd_factor,
xmax = std_case + sd*sd_factor,
y = depth,
fill = data_source
),
alpha = 0.5
) +
geom_path(
aes(std_case,
depth,
col = data_source)
) +
scale_y_reverse(breaks = seq(0,3000,500)) +
# scale_y_continuous(trans = trans_reverser("sqrt"),
# breaks = c(0, 100, 500, seq(1000, 5000, 1000))) +
coord_cartesian(expand = 0, xlim = c(-2,14)) +
scale_color_manual(values = c("#009988", "#EE7733"), name = "Mean \u00B1 2σ") +
scale_fill_manual(values = c("#009988", "#EE7733"), name = "Mean \u00B1 2σ") +
labs(y = "Depth (m)",
x = dcant_umol_label) +
facet_grid(period ~ basin) +
theme(legend.position = "top")
p_dcant_profiles_mod
dcant_profile_basin_MLR_all_ensemble %>%
arrange(depth) %>%
filter(
period != "1994 - 2014",
depth <= params_global$inventory_depth_standard,
data_source == "obs"
) %>%
group_split(data_source) %>%
map(
~ ggplot() +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_path(
data = .x,
aes(dcant,
depth,
col = MLR_basins,
group = Version_ID)
) +
scale_size_manual(values = c(0.5, 2), name = "x") +
scale_linetype_manual(values = c(2, 1), name = "x") +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = 0) +
scale_color_brewer(palette = "Dark2", name = "regional\nclustering") +
labs(y = "Depth (m)",
x = dcant_umol_label) +
facet_grid(basin ~ period)
)
[[1]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
232909e | jens-daniel-mueller | 2022-07-01 |
dcant_profile_basin_MLR_all_ensemble %>%
arrange(depth) %>%
filter(
period != "1994 - 2014",
depth <= params_global$inventory_depth_standard,
data_source != "mod_truth"
) %>%
group_split(data_source) %>%
# head(1) %>%
map(
~ ggplot() +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_path(
data = .x,
aes(
dcant,
depth,
col = Version_ID_group,
group = Version_ID
)) +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = 0) +
scale_color_muted(
name = "configuration"
) +
labs(
y = "Depth (m)",
x = dcant_umol_label,
title = paste("data_source", unique(.x$data_source))
) +
facet_grid(basin ~ period)
)
[[1]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
6be73e0 | jens-daniel-mueller | 2022-06-30 |
[[2]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
318fefe | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
6be73e0 | jens-daniel-mueller | 2022-06-30 |
bind_rows(
dcant_profile_basin_MLR_all_ensemble %>%
filter(
period %in% two_decades,
depth <= params_global$inventory_depth_standard,
data_source == "obs",
Version_ID_group == "Standard case"
),
dcant_profile_basin_MLR_all_sensitivity %>%
filter(
period %in% two_decades,
depth <= params_global$inventory_depth_standard,
data_source == "obs",
Version_ID_group == "No data adjustments"
)
) %>%
group_by(depth,
period,
basin,
Version_ID_group) %>%
summarise(dcant_sd = sd(dcant),
dcant = mean(dcant)) %>%
ungroup() %>%
filter(basin == "N. Pacific" & period == "2004 - 2014" |
basin == "Indian" & period == "1994 - 2004") %>%
ggplot() +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_ribbon(
aes(
xmin = dcant - dcant_sd,
xmax = dcant + dcant_sd,
y = depth,
fill = Version_ID_group
),
alpha = 0.5
)+
geom_path(aes(dcant,
depth,
col = Version_ID_group,
group = Version_ID_group)) +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = FALSE, xlim = c(-1,13)) +
scale_color_manual(values = colour("high contrast", names = FALSE)(3)[c(1,3)],
name = "Mean \u00B1 1σ") +
scale_fill_manual(values = colour("high contrast", names = FALSE)(3)[c(1,3)],
name = "Mean \u00B1 1σ") +
labs(y = "Depth (m)",
x = dcant_umol_label) +
facet_nested_wrap(~ basin + period) +
theme(legend.position = c(0.85,0.15))
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_profiles_data_adjustments.png",
height = 6,
width = 8)
delta_dcant_profile_basin_MLR_all_uncertainty %>%
group_split(data_source) %>%
# head(3) %>%
map(
~ ggplot(data = .x,
aes(delta_dcant,
depth)) +
geom_hline(yintercept = params_global$inventory_depth_standard) +
geom_vline(xintercept = 0) +
geom_ribbon(
aes(
xmin = delta_dcant - RSS,
xmax = delta_dcant + RSS
),
alpha = 0.3
) +
geom_path() +
scale_y_continuous(trans = trans_reverser("sqrt"),
breaks = c(0, 100, 500, seq(1500, 5000, 1000))) +
coord_cartesian(expand = 0) +
scale_color_brewer(palette = "Set1", name = "mean \u00B1 sd") +
scale_fill_brewer(palette = "Set1", name = "mean \u00B1 sd") +
labs(
title = paste("data_source", unique(.x$data_source)),
y = "Depth (m)",
x = ddcant_umol_label
) +
facet_wrap(~ basin, ncol = 3)
)
[[1]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
913e42f | jens-daniel-mueller | 2022-02-01 |
189de95 | jens-daniel-mueller | 2022-02-01 |
b62308d | jens-daniel-mueller | 2022-01-31 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
eccd82b | jens-daniel-mueller | 2022-01-26 |
c6fe495 | jens-daniel-mueller | 2022-01-26 |
[[2]]
Version | Author | Date |
---|---|---|
7275091 | jens-daniel-mueller | 2022-11-05 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
318fefe | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
913e42f | jens-daniel-mueller | 2022-02-01 |
189de95 | jens-daniel-mueller | 2022-02-01 |
b62308d | jens-daniel-mueller | 2022-01-31 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
eccd82b | jens-daniel-mueller | 2022-01-26 |
c6fe495 | jens-daniel-mueller | 2022-01-26 |
[[3]]
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
318fefe | jens-daniel-mueller | 2022-08-11 |
dcant_budget_basin_MLR_all_uncertainty_sensitivity <-
dcant_budget_basin_MLR_all_sensitivity %>%
filter(data_source != "mod_truth",
period != "1994 - 2014") %>%
select(-c(inv_depth, Version_ID, tref1, tref2))
dcant_budget_basin_MLR_all_uncertainty_sensitivity <- additive_uncertainty(dcant_budget_basin_MLR_all_uncertainty_sensitivity)
delta_dcant_budget_basin_MLR_all_uncertainty_sensitivity <- dcant_budget_basin_MLR_all_uncertainty_sensitivity[[3]]
dcant_budget_basin_MLR_all_uncertainty_contributions_sensitivity <- dcant_budget_basin_MLR_all_uncertainty_sensitivity[[2]]
dcant_budget_basin_MLR_all_uncertainty_sensitivity <- dcant_budget_basin_MLR_all_uncertainty_sensitivity[[1]]
dcant_budget_basin_MLR_all_uncertainty <-
dcant_budget_basin_MLR_all_ensemble %>%
filter(data_source != "mod_truth",
period != "1994 - 2014") %>%
select(-c(inv_depth, Version_ID, tref1, tref2))
dcant_budget_basin_MLR_all_uncertainty <- additive_uncertainty(dcant_budget_basin_MLR_all_uncertainty)
delta_dcant_budget_basin_MLR_all_uncertainty <- dcant_budget_basin_MLR_all_uncertainty[[3]]
dcant_budget_basin_MLR_all_uncertainty_contributions <- dcant_budget_basin_MLR_all_uncertainty[[2]]
dcant_budget_basin_MLR_all_uncertainty <- dcant_budget_basin_MLR_all_uncertainty[[1]]
dcant_budget_basin_MLR_all_ensemble_10000 <-
bind_rows(
dcant_budget_basin_MLR_all_ensemble,
dcant_budget_basin_MLR_all_ensemble_10000)
dcant_budget_basin_MLR_all_ensemble_10000 %>%
ggplot(aes(period,dcant, fill = as.factor(inv_depth))) +
geom_jitter(shape = 21, alpha = 0.8) +
facet_grid(basin ~ data_source, scales = "free_y") +
scale_fill_highcontrast(name = "Integration\ndepth (m)") +
scale_y_continuous(limits = c(0,NA))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
dcant_budget_basin_MLR_all_ensemble_10000 %>%
arrange(inv_depth) %>%
group_by(basin, period, data_source, MLR_basins, Version_ID_group) %>%
summarise(deep_dcant = 100*((dcant / lag(dcant))-1)) %>%
ungroup() %>%
ggplot(aes(period,deep_dcant, fill = Version_ID_group)) +
geom_hline(yintercept = 0) +
geom_jitter(shape = 21, alpha = 0.8) +
scale_fill_muted() +
facet_grid(basin ~ data_source)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
dcant_budget_basin_MLR_all_ensemble_10000 %>%
arrange(inv_depth) %>%
group_by(basin, period, data_source, MLR_basins, Version_ID_group) %>%
summarise(deep_dcant = 100*((dcant / lag(dcant))-1)) %>%
ungroup() %>%
ggplot(aes(period,deep_dcant, fill = MLR_basins)) +
geom_hline(yintercept = 0) +
geom_jitter(shape = 21, alpha = 0.8) +
scale_fill_bright() +
facet_grid(basin ~ data_source)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
# inventory scaling
dcant_budget_basin_MLR_all_ensemble <-
dcant_budget_basin_MLR_all_ensemble %>%
mutate(dcant = if_else(basin == "Global",
dcant * dcant_scaling,
dcant))
dcant_budget_basin_MLR_all <- dcant_budget_basin_MLR_all %>%
mutate(dcant = if_else(basin == "Global",
dcant * dcant_scaling,
dcant))
dcant_budget_basin_MLR_all_sensitivity <-
dcant_budget_basin_MLR_all_sensitivity %>%
mutate(dcant = if_else(basin == "Global",
dcant * dcant_scaling,
dcant))
# uncertainty scaling
scaling_uncertainty <-
dcant_budget_basin_MLR_all_uncertainty %>%
select(-c(sd, signif)) %>%
filter(basin == "Global") %>%
mutate(
sd = std_case * (dcant_scaling - 1) * dcant_scaling_uncertainty,
Version_ID_group = "scaling uncertainty"
) %>%
select(-std_case)
dcant_budget_basin_MLR_all_uncertainty <-
dcant_budget_basin_MLR_all_uncertainty %>%
mutate(
sd = if_else(basin == "Global",
sqrt(
sd ^ 2 +
(std_case * (dcant_scaling - 1) * dcant_scaling_uncertainty) ^
2
),
sd),
std_case = if_else(basin == "Global",
std_case * dcant_scaling,
std_case)
)
dcant_budget_basin_MLR_all_uncertainty_contributions <-
bind_rows(dcant_budget_basin_MLR_all_uncertainty_contributions,
scaling_uncertainty)
dcant_budget_basin_MLR_all_uncertainty_sensitivity <-
dcant_budget_basin_MLR_all_uncertainty_sensitivity %>%
mutate(
sd = if_else(basin == "Global",
sqrt(
sd ^ 2 +
(std_case * (dcant_scaling - 1) * dcant_scaling_uncertainty) ^
2
),
sd),
std_case = if_else(basin == "Global",
std_case * dcant_scaling,
std_case)
)
delta_dcant_budget_basin_MLR_all_uncertainty <-
delta_dcant_budget_basin_MLR_all_uncertainty %>%
mutate(
RSS = if_else(basin == "Global",
RSS * dcant_scaling,
RSS),
delta_dcant = if_else(basin == "Global",
delta_dcant * dcant_scaling,
delta_dcant),
)
dcant_budget_basin_MLR_all_uncertainty_contributions %>%
filter(data_source == "obs") %>%
mutate(
basin = fct_relevel(
basin,
"Global",
"N. Pacific",
"N. Atlantic",
"Indian",
"S. Pacific",
"S. Atlantic"
)
) %>%
ggplot(aes("x", abs(sd), fill = Version_ID_group)) +
geom_hline(yintercept = 0, col = "grey10") +
geom_col(position = position_dodge(preserve = "single"),
col = "grey10") +
scale_fill_bright(name = "eMLR(C*)\nconfiguration\ncomponent") +
labs(y = expression(Delta*Cant~inventory~offset~from~standard~case~(PgC))) +
theme(
axis.title.x = element_blank(),
axis.text.x = element_blank(),
axis.ticks.x = element_blank()
) +
guides(pattern = guide_legend(override.aes = list(fill = "white")),
fill = guide_legend(override.aes = list(pattern = "none"))) +
# expand_limits(y = c(0,2.2)) +
# scale_y_continuous(expand = c(0,0)) +
facet_nested_wrap( ~ basin + period, ncol = 6)
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_inventory_uncertainty_contributions.png",
height = 6,
width = 8)
dcant_budget_basin_MLR_all_uncertainty_contributions_sensitivity %>%
filter(data_source == "obs",
Version_ID_group != "Regional clustering") %>%
mutate(
basin = fct_relevel(
basin,
"Global",
"N. Pacific",
"N. Atlantic",
"Indian",
"S. Pacific",
"S. Atlantic"
)
) %>%
ggplot(aes("x", abs(sd), fill = Version_ID_group)) +
geom_hline(yintercept = 0, col = "grey10") +
geom_col(position = position_dodge(preserve = "single"),
col = "grey10") +
scale_fill_bright(name = "eMLR(C*)\nconfiguration\ncomponent") +
labs(y = expression(Delta*Cant~inventory~offset~from~standard~case~(PgC))) +
theme(
axis.title.x = element_blank(),
axis.text.x = element_blank(),
axis.ticks.x = element_blank()
) +
guides(pattern = guide_legend(override.aes = list(fill = "white")),
fill = guide_legend(override.aes = list(pattern = "none"))) +
# expand_limits(y = c(0,2.2)) +
# scale_y_continuous(expand = c(0,0)) +
facet_nested_wrap( ~ basin + period, ncol = 6)
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_inventory_uncertainty_contributions_sensitivity.png",
height = 6,
width = 8)
# estimate area scaling factor to achieve identical coverage
tcant_inv <-
inner_join(tcant_inv, basinmask)
dcant_inv_all <-
inner_join(dcant_inv_all, basinmask)
area_scaling <-
bind_rows(
tcant_inv %>% distinct(lat, lon, basin) %>%
mutate(source = "SO4"),
dcant_inv_all %>% distinct(lat, lon, basin) %>%
mutate(source = "M22")
)
map +
geom_tile(data = area_scaling,
aes(lon, lat, fill = basin)) +
facet_wrap( ~ source)
area_scaling <- area_scaling %>%
mutate(area = earth_surf(lat, lon)) %>%
group_by(basin, source) %>%
summarise(area_total = sum(area)) %>%
ungroup() %>%
pivot_wider(values_from = area_total,
names_from = source) %>%
mutate(scaling_factor = M22 / SO4)
tcant_budget_basin_MLR <-
tcant_inv %>%
mutate(method = "layer",
data_source = "obs") %>%
group_by(basin) %>%
nest() %>%
mutate(budget = map(.x = data, ~m_dcant_budget(.x))) %>%
select(-data) %>%
unnest(budget)
tcant_budget_basin_MLR <-
full_join(tcant_budget_basin_MLR,
area_scaling %>% select(basin, scaling_factor)) %>%
mutate(value = value * scaling_factor) %>%
select(-scaling_factor)
tcant_budget_basin_MLR <-
left_join(tcant_budget_basin_MLR %>%
mutate(period = "1800 - 1994"),
delta_pCO2_atm)
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
filter(estimate == "dcant") %>%
select(-estimate) %>%
rename(dcant = value)
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
mutate(beta_1994 = dcant / delta_pCO2) %>%
select(basin, beta_1994)
tcant_budget_basin_MLR <-
bind_rows(tcant_budget_basin_MLR,
tibble(basin = "Global", beta_1994 = 118 / 78.3))
dcant_budget_basin_MLR_all_ensemble %>%
ggplot(aes(period, dcant, col = Version_ID_group)) +
geom_jitter(alpha = 0.5) +
scale_color_brewer(palette = "Dark2") +
facet_grid(basin ~ data_source, scales = "free_y")
tcant_budget_basin_MLR <- expand_grid(
tcant_budget_basin_MLR,
delta_pCO2_atm %>% filter(period %in% two_decades)
)
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
mutate(dcant = beta_1994 * delta_pCO2)
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
mutate(
basin = fct_relevel(
basin,
"Global",
"Indian",
"N. Pacific",
"S. Pacific",
"N. Atlantic",
"S. Atlantic"
)
)
dcant_budget_basin_MLR_all_ensemble %>%
filter(data_source == "obs",
period != "1994 - 2014") %>%
mutate(ensemble_role = "Uncertainty cases") %>%
ggplot(aes(period, dcant)) +
# scale_fill_muted(name = "ensemble group") +
scale_color_manual(values = c("grey", "black", "red"),
name = "Ensemble member") +
geom_boxplot(
width = .1,
outlier.shape = NA,
fill = "grey",
alpha = 0.7,
position = position_nudge(x = 0.3)
) +
geom_point(
data = dcant_budget_basin_MLR_all_sensitivity %>%
mutate(ensemble_role = "Sensitivity cases") %>%
filter(data_source == "obs",
period != "1994 - 2014"),
aes(fill = Version_ID_group,
col = ensemble_role),
size = 1.3,
alpha = .7,
shape = 21,
position = position_dodge2(width = 0.3)
) +
geom_point(
aes(fill = Version_ID_group,
col = ensemble_role),
size = 1.3,
alpha = .7,
shape = 21,
position = position_dodge2(width = 0.3)
) +
scale_y_continuous(name = dcant_pgc_label) +
facet_wrap(~ basin, ncol = 3, scales = "free_y")
dcant_budget_basin_MLR_all_ensemble %>%
filter(data_source == "obs",
period != "1994 - 2014",
!(Version_ID %in% Version_IDs),
MLR_basins == unique(params_local_all$MLR_basins)) %>%
ggplot(aes(period, dcant)) +
geom_errorbar(
data = tcant_budget_basin_MLR,
aes(x = period,
ymax = dcant, ymin = dcant,
col = "Scaled 1994\nestimate"),
width = 0.8,
size = 1,
linetype = 1,
position = position_nudge(x = 0.05)
) +
geom_jitter(
data = dcant_budget_basin_MLR_all_ensemble %>%
filter(data_source == "obs",
period != "1994 - 2014",
Version_ID_group == unique(params_local_all$Version_ID_group)),
aes(fill = "Regional clustering",
alpha = "Regional clustering"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_point(
aes(fill = "Configuration changes",
alpha = "Configuration changes"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_crossbar(
data = dcant_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(
x = period,
y = std_case,
ymin = std_case - 2*sd,
ymax = std_case + 2*sd,
linetype = "Combined uncertainty"
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.2,
position = position_nudge(x = 0.2)
) +
geom_crossbar(
data = dcant_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(
x = period,
y = std_case,
ymin = std_case - sd,
ymax = std_case + sd,
alpha = "Combined uncertainty",
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.4,
position = position_nudge(x = 0.2)
) +
geom_point(
data = dcant_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(x = period,
y = std_case,
fill = "Standard case",
alpha = "Standard case"),
size = 2,
shape = 21,
position = position_nudge(x = 0.2)
) +
scale_fill_manual(name = "group", values = c("#BB5566", "#004488", "white")) +
scale_color_manual(values = c("grey50"), label = expression(Scaled~C[ant]~1994)) +
scale_linetype(name = "X") +
scale_alpha_manual(name = "group", values = c(0.7,0.7,1)) +
scale_shape_manual(values = 95) +
scale_y_continuous(name = dcant_pgc_label) +
guides(
fill = guide_legend(order = 1),
linetype = guide_legend(order = 2),
alpha = guide_legend(order = 1)
) +
facet_wrap(~ basin, ncol = 3, dir = "v", scales = "free_y") +
theme(legend.title = element_blank(),
axis.title.x = element_blank())
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_inventory.png",
height = 6,
width = 8)
# determine scaling factor from dcant -> beta inventories
# including scaling for: delta pCO2 atm, basin area, PgC -> molC
beta_scaling <-
bind_rows(
area_scaling,
area_scaling %>%
summarise(M22 = sum(M22) * dcant_scaling) %>%
mutate(basin = "Global")
) %>%
select(basin, area = M22)
beta_scaling <-
full_join(delta_pCO2_atm,
beta_scaling,
by = character())
beta_scaling <- beta_scaling %>%
mutate(scaling_factor = 1e15 / 12 / delta_pCO2 / area) %>%
select(period, basin, scaling_factor, area)
beta_scaling <- beta_scaling %>%
mutate(
basin = fct_relevel(
basin,
"Global",
"Indian",
"N. Pacific",
"S. Pacific",
"N. Atlantic",
"S. Atlantic"
)
)
beta_budget_basin_MLR_all_sensitivity <-
left_join(dcant_budget_basin_MLR_all_sensitivity,
beta_scaling) %>%
mutate(beta = dcant * scaling_factor) %>%
select(-scaling_factor)
beta_budget_basin_MLR_all_ensemble <-
left_join(dcant_budget_basin_MLR_all_ensemble,
beta_scaling) %>%
mutate(beta = dcant * scaling_factor) %>%
select(-scaling_factor)
tcant_budget_basin_MLR <-
left_join(tcant_budget_basin_MLR,
beta_scaling) %>%
mutate(beta_1994 = beta_1994 * 1e15 / 12 / area) %>%
select(-c(area,scaling_factor))
beta_budget_basin_MLR_all_uncertainty <-
left_join(dcant_budget_basin_MLR_all_uncertainty,
beta_scaling) %>%
mutate(
sd = sd * scaling_factor,
std_case = std_case * scaling_factor
) %>%
select(-scaling_factor)
beta_budget_basin_MLR_all_uncertainty_contributions <-
left_join(dcant_budget_basin_MLR_all_uncertainty_contributions,
beta_scaling) %>%
mutate(
sd = sd * scaling_factor
) %>%
select(-scaling_factor)
dcant_beta_basin_MLR_all_uncertainty <-
bind_rows(
dcant_budget_basin_MLR_all_uncertainty %>% mutate(estimate = "dcant"),
beta_budget_basin_MLR_all_uncertainty %>% mutate(estimate = "beta")
) %>%
select(-c(area, signif))
dcant_beta_basin_MLR_all_uncertainty_significance <-
dcant_beta_basin_MLR_all_uncertainty %>%
arrange(period) %>%
group_by(estimate, basin, data_source) %>%
mutate(
delta = std_case - lag(std_case),
RSS = sqrt(sd_factor * sd ^ 2 + lag(sd_factor * sd ^ 2)),
RSS_delta_ratio = abs(delta) / RSS
) %>%
ungroup() %>%
filter(!is.na(delta))
dcant_beta_basin_MLR_all_uncertainty_significance <-
full_join(
dcant_beta_basin_MLR_all_uncertainty %>%
pivot_wider(
names_from = period,
values_from = c(sd, std_case),
names_sep = " "
),
dcant_beta_basin_MLR_all_uncertainty_significance %>%
select(-c(sd, std_case))
)
dcant_beta_basin_MLR_all_uncertainty_significance <-
dcant_beta_basin_MLR_all_uncertainty_significance %>%
mutate(across(where(is.numeric), signif, 2))
dcant_beta_basin_MLR_all_uncertainty_significance %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
basin | data_source | estimate | sd 1994 - 2004 | sd 2004 - 2014 | std_case 1994 - 2004 | std_case 2004 - 2014 | period | delta | RSS | RSS_delta_ratio |
---|---|---|---|---|---|---|---|---|---|---|
Global | mod | dcant | 1.800 | 1.800 | 20.00 | 25.00 | 2004 - 2014 | 4.8000 | 3.600 | 1.300 |
Global | obs | dcant | 2.600 | 2.400 | 29.00 | 27.00 | 2004 - 2014 | -1.9000 | 5.000 | 0.380 |
Indian | mod | dcant | 0.810 | 0.680 | 5.10 | 6.60 | 2004 - 2014 | 1.5000 | 1.500 | 0.970 |
Indian | obs | dcant | 1.100 | 0.670 | 7.20 | 5.70 | 2004 - 2014 | -1.4000 | 1.800 | 0.790 |
N. Pacific | mod | dcant | 0.410 | 0.390 | 3.10 | 3.40 | 2004 - 2014 | 0.2300 | 0.800 | 0.290 |
N. Pacific | obs | dcant | 0.810 | 1.700 | 2.90 | 3.20 | 2004 - 2014 | 0.3200 | 2.700 | 0.120 |
S. Pacific | mod | dcant | 0.910 | 0.560 | 5.50 | 7.40 | 2004 - 2014 | 1.9000 | 1.500 | 1.200 |
S. Pacific | obs | dcant | 1.100 | 0.940 | 8.60 | 7.40 | 2004 - 2014 | -1.2000 | 2.100 | 0.590 |
N. Atlantic | mod | dcant | 0.200 | 0.340 | 2.20 | 2.40 | 2004 - 2014 | 0.2200 | 0.560 | 0.400 |
N. Atlantic | obs | dcant | 0.180 | 0.350 | 4.80 | 3.90 | 2004 - 2014 | -0.9000 | 0.560 | 1.600 |
S. Atlantic | mod | dcant | 0.230 | 0.240 | 2.70 | 3.40 | 2004 - 2014 | 0.7100 | 0.470 | 1.500 |
S. Atlantic | obs | dcant | 0.510 | 0.610 | 3.90 | 5.40 | 2004 - 2014 | 1.5000 | 1.100 | 1.300 |
Global | mod | beta | 0.023 | 0.021 | 0.25 | 0.28 | 2004 - 2014 | 0.0340 | 0.043 | 0.770 |
Global | obs | beta | 0.033 | 0.027 | 0.37 | 0.31 | 2004 - 2014 | -0.0540 | 0.061 | 0.890 |
Indian | mod | beta | 0.049 | 0.038 | 0.31 | 0.37 | 2004 - 2014 | 0.0540 | 0.088 | 0.610 |
Indian | obs | beta | 0.068 | 0.037 | 0.44 | 0.32 | 2004 - 2014 | -0.1200 | 0.110 | 1.100 |
N. Pacific | mod | beta | 0.024 | 0.020 | 0.18 | 0.18 | 2004 - 2014 | -0.0033 | 0.044 | 0.076 |
N. Pacific | obs | beta | 0.046 | 0.091 | 0.17 | 0.17 | 2004 - 2014 | 0.0023 | 0.140 | 0.016 |
S. Pacific | mod | beta | 0.042 | 0.024 | 0.26 | 0.32 | 2004 - 2014 | 0.0580 | 0.069 | 0.840 |
S. Pacific | obs | beta | 0.053 | 0.040 | 0.40 | 0.31 | 2004 - 2014 | -0.0880 | 0.094 | 0.930 |
N. Atlantic | mod | beta | 0.022 | 0.034 | 0.24 | 0.25 | 2004 - 2014 | 0.0010 | 0.058 | 0.018 |
N. Atlantic | obs | beta | 0.020 | 0.035 | 0.53 | 0.39 | 2004 - 2014 | -0.1400 | 0.057 | 2.400 |
S. Atlantic | mod | beta | 0.023 | 0.022 | 0.27 | 0.31 | 2004 - 2014 | 0.0410 | 0.045 | 0.910 |
S. Atlantic | obs | beta | 0.051 | 0.056 | 0.39 | 0.49 | 2004 - 2014 | 0.0990 | 0.110 | 0.930 |
dcant_beta_basin_MLR_all_uncertainty_significance_table <-
dcant_beta_basin_MLR_all_uncertainty_significance %>%
filter(data_source == "obs") %>%
select(-data_source) %>%
mutate(
`1994 - 2004` = paste(`std_case 1994 - 2004`, `sd 1994 - 2004`, sep = " ± "),
`2004 - 2014` = paste(`std_case 2004 - 2014`, `sd 2004 - 2014`, sep = " ± "),
`Deacadal change` = paste0(delta, " ± ", RSS, if_else(abs(delta) > RSS, " *",""))
) %>%
select(Region = basin,
Estimate = estimate,
`1994 - 2004`,
`2004 - 2014`,
`Deacadal change`) %>%
arrange(Region)
dcant_beta_basin_MLR_all_uncertainty_significance_table %>%
write_csv(here::here("output/publication/Table_inventory_stats.csv"))
beta_budget_basin_MLR_all_ensemble %>%
filter(
data_source == "obs",
period != "1994 - 2014",
!(Version_ID %in% Version_IDs),
MLR_basins == unique(params_local_all$MLR_basins)
) %>%
ggplot(aes(period, beta)) +
geom_errorbar(
data = tcant_budget_basin_MLR %>%
rename(beta = beta_1994),
aes(x = period,
ymax = beta, ymin = beta,
col = "Scaled 1994\nestimate"),
width = 0.8,
size = 1,
linetype = 1,
position = position_nudge(x = 0.05)
) +
geom_jitter(
data = beta_budget_basin_MLR_all_ensemble %>%
filter(data_source == "obs",
period != "1994 - 2014",
Version_ID_group == unique(params_local_all$Version_ID_group)),
aes(fill = "Regional clustering",
alpha = "Regional clustering"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_point(
aes(fill = "Configuration changes",
alpha = "Configuration changes"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_crossbar(
data = beta_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(
x = period,
y = std_case,
ymin = std_case - 2*sd,
ymax = std_case + 2*sd,
linetype = "Combined uncertainty"
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.2,
position = position_nudge(x = 0.2)
) +
geom_crossbar(
data = beta_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(
x = period,
y = std_case,
ymin = std_case - sd,
ymax = std_case + sd,
alpha = "Combined uncertainty",
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.4,
position = position_nudge(x = 0.2)
) +
geom_point(
data = beta_budget_basin_MLR_all_uncertainty %>% filter(data_source == "obs"),
aes(x = period,
y = std_case,
fill = "Standard case",
alpha = "Standard case"),
size = 2,
shape = 21,
position = position_nudge(x = 0.2)
) +
scale_fill_manual(name = "group", values = c("#BB5566", "#004488", "white")) +
scale_color_manual(values = c("grey50"), label = expression(Scaled~C[ant]~1994)) +
scale_linetype(name = "X") +
scale_alpha_manual(name = "group", values = c(0.7,0.7,1)) +
scale_shape_manual(values = 95) +
scale_y_continuous(name = dcant_pgc_label) +
guides(
fill = guide_legend(order = 1),
linetype = guide_legend(order = 2),
alpha = guide_legend(order = 1)
) +
facet_wrap(~ basin, ncol = 3, dir = "v") +
theme(legend.title = element_blank(),
axis.title.x = element_blank())
ggsave(path = here::here("output/publication"),
filename = "FigS_beta_inventory.png",
height = 6,
width = 8)
dcant_budget_basin_MLR_all_bias <-
dcant_budget_basin_MLR_all_ensemble %>%
filter(data_source %in% c("mod", "mod_truth")) %>%
pivot_wider(names_from = data_source,
values_from = dcant) %>%
mutate(dcant_bias = mod - mod_truth,
dcant_bias_rel = 100 * dcant_bias / mod_truth) %>%
filter(period %in% two_decades)
dcant_budget_basin_MLR_all_bias <-
dcant_budget_basin_MLR_all_bias %>%
select(basin, period, MLR_basins, Version_ID_group, dcant = dcant_bias)
dcant_budget_basin_MLR_all_bias_uncertainty <-
additive_uncertainty(dcant_budget_basin_MLR_all_bias)
delta_dcant_budget_basin_MLR_all_bias_uncertainty <-
dcant_budget_basin_MLR_all_bias_uncertainty[[3]]
dcant_budget_basin_MLR_all_bias_uncertainty_contributions <-
dcant_budget_basin_MLR_all_bias_uncertainty[[2]]
dcant_budget_basin_MLR_all_bias_uncertainty <-
dcant_budget_basin_MLR_all_bias_uncertainty[[1]]
dcant_budget_basin_MLR_all_bias %>%
filter(period != "1994 - 2014",
MLR_basins == unique(params_local_all$MLR_basins)) %>%
ggplot(aes(period, dcant)) +
geom_hline(yintercept = 0) +
geom_jitter(
data = dcant_budget_basin_MLR_all_bias %>%
filter(period != "1994 - 2014",
Version_ID_group == unique(params_local_all$Version_ID_group)),
aes(fill = "Regional clustering",
alpha = "Regional clustering"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_point(
aes(fill = "Configuration changes",
alpha = "Configuration changes"),
shape = 21,
position = position_jitter(width = 0.1, height = 0)
) +
geom_crossbar(
data = dcant_budget_basin_MLR_all_bias_uncertainty,
aes(
x = period,
y = std_case,
ymin = std_case - 2*sd,
ymax = std_case + 2*sd,
linetype = "Combined uncertainty"
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.2,
position = position_nudge(x = 0.2)
) +
geom_crossbar(
data = dcant_budget_basin_MLR_all_bias_uncertainty,
aes(
x = period,
y = std_case,
ymin = std_case - sd,
ymax = std_case + sd,
alpha = "Combined uncertainty",
),
width = 0.1,
fill = "#BBBBBB",
alpha = 0.4,
position = position_nudge(x = 0.2)
) +
geom_point(
data = dcant_budget_basin_MLR_all_bias_uncertainty,
aes(x = period,
y = std_case,
fill = "Standard case",
alpha = "Standard case"),
size = 2,
shape = 21,
position = position_nudge(x = 0.2)
) +
scale_fill_manual(name = "group", values = c("#BB5566", "#004488", "white")) +
scale_color_manual(values = c("grey50"), label = expression(Scaled~C[ant]~1994)) +
scale_linetype(name = "X") +
scale_alpha_manual(name = "group", values = c(0.7,0.7,1)) +
scale_shape_manual(values = 95) +
scale_y_continuous(name = dcant_bias_pgc_label) +
guides(
fill = guide_legend(order = 1),
linetype = guide_legend(order = 2),
alpha = guide_legend(order = 1)
) +
facet_wrap(~ basin, ncol = 3, dir = "v", scales = "free_y") +
theme(legend.title = element_blank(),
axis.title.x = element_blank())
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_bias_inventory_synthetic_data.png",
height = 6,
width = 8)
dcant_budget_basin_MLR_all <-
dcant_budget_basin_MLR_all %>%
filter(basin != "Global")
dcant_budget_basin_MLR_all <- left_join(dcant_budget_basin_MLR_all,
co2_atm %>% rename(tref1 = year,
pCO21 = pCO2))
dcant_budget_basin_MLR_all <- left_join(dcant_budget_basin_MLR_all,
co2_atm %>% rename(tref2 = year,
pCO22 = pCO2))
dcant_budget_basin_MLR_all_plot <- dcant_budget_basin_MLR_all %>%
filter(period != "1994 - 2014",
data_source == "obs")
tcant_budget_basin_MLR <-
tcant_inv %>%
mutate(method = "layer",
data_source = "obs") %>%
group_by(basin) %>%
nest() %>%
mutate(budget = map(.x = data, ~m_dcant_budget(.x))) %>%
select(-data) %>%
unnest(budget)
tcant_budget_basin_MLR <-
full_join(tcant_budget_basin_MLR,
area_scaling %>% select(basin, scaling_factor)) %>%
mutate(value = value * scaling_factor) %>%
select(-scaling_factor)
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
mutate(pCO21 = 281,
tref1 = 1800,
tref2 = 1994)
tcant_budget_basin_MLR <- left_join(tcant_budget_basin_MLR,
co2_atm %>% rename(tref2 = year,
pCO22 = pCO2))
tcant_budget_basin_MLR <- tcant_budget_basin_MLR %>%
mutate(period = paste(tref1, tref2, sep = " - ")) %>%
filter(estimate == "dcant") %>%
select(-estimate) %>%
rename(dcant = value)
dcant_budget_basin_MLR_all_plot <- bind_rows(
dcant_budget_basin_MLR_all_plot,
tcant_budget_basin_MLR)
dcant_budget_basin_MLR_all_plot <-
left_join(dcant_budget_basin_MLR_all_plot,
dcant_budget_basin_MLR_all_ensemble_summary)
g1 <- dcant_budget_basin_MLR_all_plot %>%
filter(period != "1800 - 1994") %>%
ggplot(aes(
y = dcant,
x = period,
alluvium = basin,
fill = basin,
stratum = basin
)) +
stat_alluvium(decreasing = FALSE) +
stat_stratum(decreasing = FALSE) +
stat_stratum(geom = "text",
decreasing = FALSE,
aes(label = paste(
round(after_stat(max-min),1)
# 100*round(after_stat(prop), 2), "%"
))) +
ggrepel::geom_label_repel(
data = dcant_budget_basin_MLR_all_plot %>% filter(period == "2004 - 2014"),
stat = "stratum",
size = 4,
nudge_x = .5,
point.padding = 3,
aes(fill = basin, label = basin),
decreasing = FALSE
)+
scale_fill_brewer(palette = "Paired", guide = "none") +
scale_y_continuous(limits = c(0, 32), expand = c(0, 0)) +
labs(y = dcant_pgc_label) +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.x = element_blank()) +
theme_classic()
newdat <- tibble(layer_data(g1))
change <-
newdat %>%
select(x, alluvium, count) %>%
pivot_wider(names_from = x,
values_from = count) %>%
mutate(dcant_change = round(100*(`2` - `1`) / `1`)) %>%
select(alluvium, dcant_change)
coord <- newdat %>%
filter(x == 2) %>%
select(x, y, alluvium)
new_layer <- full_join(
change,
coord
)
new_layer <- new_layer %>%
mutate(dcant_change = as.character(dcant_change),
dcant_change = if_else(str_detect(dcant_change, "-"),
dcant_change,
paste0("+", dcant_change)),
dcant_change = paste(dcant_change, "%"))
g1 +
geom_text(data = new_layer,
aes(
x = x - 0.3,
y = y,
label = dcant_change
),
inherit.aes = FALSE)
g2 <- dcant_budget_basin_MLR_all_plot %>%
filter(period != "1800 - 1994") %>%
ggplot(aes(
y = dcant,
x = period,
alluvium = basin,
fill = basin,
stratum = basin,
label = basin
)) +
geom_alluvium() +
geom_stratum() +
stat_stratum(geom = "text",
aes(label = paste(
round(after_stat(count),1)
# 100*round(after_stat(prop), 2), "%"
))) +
ggrepel::geom_label_repel(
data = dcant_budget_basin_MLR_all_plot %>% filter(period == "2004 - 2014"),
stat = "stratum",
size = 4,
nudge_x = .5,
point.padding = 3,
aes(fill = basin)
)+
scale_fill_brewer(palette = "Paired", guide = "none") +
scale_color_brewer(palette = "Paired", guide = "none") +
scale_y_continuous(limits = c(0, 33), expand = c(0, 0)) +
guides(y = "none") +
labs(title = dcant_pgc_label) +
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
plot.title = element_text(hjust = 0.5))
newdat <- tibble(layer_data(g2))
change_basin <-
newdat %>%
select(x, alluvium, count) %>%
pivot_wider(names_from = x,
values_from = count) %>%
mutate(dcant_change = round(100*(`2` - `1`) / `1`)) %>%
select(alluvium, dcant_change)
coord_basin <- newdat %>%
filter(x == 2) %>%
select(x, y, alluvium)
new_layer_basin <- full_join(
change_basin,
coord_basin
)
new_layer_basin <- new_layer_basin %>%
mutate(dcant_change = as.character(dcant_change),
dcant_change = if_else(str_detect(dcant_change, "-"),
dcant_change,
paste0("+", dcant_change)),
dcant_change = paste(dcant_change, "%"))
new_layer_total <-
newdat %>%
select(x, alluvium, count) %>%
group_by(x) %>%
summarise(dcant_change = sum(count)) %>%
ungroup()
new_layer_total <- new_layer_total %>%
mutate(y = dcant_change,
dcant_change = as.character(round(dcant_change,1)),
dcant_change = paste("global:",dcant_change))
g2 +
geom_text(data = new_layer_basin,
aes(
x = x - 0.3,
y = y,
label = dcant_change
),
inherit.aes = FALSE) +
geom_label(data = new_layer_total,
aes(
x = x,
y = y + 1,
label = dcant_change
),
inherit.aes = FALSE)
dcant_budget_basin_MLR_all_plot <- left_join(dcant_budget_basin_MLR_all_plot,
co2_atm %>% rename(tref1 = year,
pCO21 = pCO2))
dcant_budget_basin_MLR_all_plot <- left_join(dcant_budget_basin_MLR_all_plot,
co2_atm %>% rename(tref2 = year,
pCO22 = pCO2))
dcant_budget_basin_MLR_all_plot <- dcant_budget_basin_MLR_all_plot %>%
mutate(delta_pCO2 = pCO22 - pCO21,
beta = dcant / delta_pCO2,
dcant_sd_scaled = dcant_sd / delta_pCO2) %>%
select(-starts_with("pCO2"))
dcant_budget_global_all_ensemble_summary <- left_join(dcant_budget_global_all_ensemble_summary,
co2_atm %>% rename(tref1 = year,
pCO21 = pCO2))
dcant_budget_global_all_ensemble_summary <- left_join(dcant_budget_global_all_ensemble_summary,
co2_atm %>% rename(tref2 = year,
pCO22 = pCO2))
dcant_budget_global_all_ensemble_summary <- dcant_budget_global_all_ensemble_summary %>%
mutate(delta_pCO2 = pCO22 - pCO21,
beta = dcant_mean / delta_pCO2,
dcant_sd_scaled = dcant_sd / delta_pCO2) %>%
select(-starts_with("pCO2"))
g2 <- dcant_budget_basin_MLR_all_plot %>%
filter(period != "1800 - 1994") %>%
ggplot(aes(
y = beta,
x = period,
alluvium = basin,
fill = basin,
stratum = basin,
label = basin
)) +
geom_alluvium() +
geom_stratum() +
stat_stratum(geom = "text",
aes(label = paste(
round(after_stat(count),2)
# 100*round(after_stat(prop), 2), "%"
))) +
ggrepel::geom_label_repel(
data = dcant_budget_basin_MLR_all_plot %>% filter(period == "2004 - 2014"),
stat = "stratum",
size = 4,
nudge_x = .5,
point.padding = 3,
aes(fill = basin)
)+
scale_fill_brewer(palette = "Paired", guide = "none") +
scale_color_brewer(palette = "Paired", guide = "none") +
# scale_y_continuous(limits = c(0, 33), expand = c(0, 0)) +
guides(y = "none") +
labs(title = dcant_pgc_scaled_label) +
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
plot.title = element_text(hjust = 0.5))
newdat <- tibble(layer_data(g2))
change_basin <-
newdat %>%
select(x, alluvium, count) %>%
pivot_wider(names_from = x,
values_from = count) %>%
mutate(dcant_change = round(100*(`2` - `1`) / `1`)) %>%
select(alluvium, dcant_change)
coord_basin <- newdat %>%
filter(x == 2) %>%
select(x, y, alluvium)
new_layer_basin <- full_join(
change_basin,
coord_basin
)
new_layer_basin <- new_layer_basin %>%
mutate(dcant_change = as.character(dcant_change),
dcant_change = if_else(str_detect(dcant_change, "-"),
dcant_change,
paste0("+", dcant_change)),
dcant_change = paste(dcant_change, "%"))
new_layer_total <-
newdat %>%
select(x, alluvium, count) %>%
group_by(x) %>%
summarise(dcant_change = sum(count)) %>%
ungroup()
new_layer_total <- new_layer_total %>%
mutate(y = dcant_change,
dcant_change = as.character(round(dcant_change,2)),
dcant_change = paste("global:",dcant_change))
g2 +
geom_text(data = new_layer_basin,
aes(
x = x - 0.3,
y = y,
label = dcant_change
),
inherit.aes = FALSE) +
geom_label(data = new_layer_total,
aes(
x = x,
y = y + 0.05,
label = dcant_change
),
inherit.aes = FALSE)
g2 <- dcant_budget_basin_MLR_all_plot %>%
ggplot(aes(
y = beta,
x = period,
alluvium = basin,
fill = basin,
stratum = basin,
label = basin
)) +
geom_alluvium() +
geom_stratum() +
stat_stratum(geom = "text",
aes(label = paste(
round(after_stat(count),2)
# 100*round(after_stat(prop), 2), "%"
))) +
ggrepel::geom_label_repel(
data = dcant_budget_basin_MLR_all_plot %>% filter(period == "2004 - 2014"),
stat = "stratum",
size = 4,
nudge_x = .5,
point.padding = 3,
aes(fill = basin)
)+
scale_fill_brewer(palette = "Paired", guide = "none") +
scale_color_brewer(palette = "Paired", guide = "none") +
scale_y_continuous(limits = c(0, 1.7), expand = c(0, 0)) +
guides(y = "none") +
labs(title = dcant_pgc_scaled_label) +
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
plot.title = element_text(hjust = 0.5))
newdat <- tibble(layer_data(g2))
change_basin <-
newdat %>%
select(x, alluvium, count) %>%
group_by(alluvium) %>%
arrange(x) %>%
mutate(dcant_change = round(100*(count - lag(count)) / lag(count))) %>%
ungroup()
coord_basin <- newdat %>%
select(x, y, alluvium)
new_layer_basin <- left_join(
change_basin %>% drop_na(),
coord_basin
)
new_layer_basin <- new_layer_basin %>%
mutate(dcant_change = as.character(dcant_change),
dcant_change = if_else(str_detect(dcant_change, "-"),
dcant_change,
paste0("+", dcant_change)),
dcant_change = paste(dcant_change, "%"))
new_layer_total <-
newdat %>%
select(x, alluvium, count) %>%
group_by(x) %>%
summarise(dcant_change = sum(count)) %>%
ungroup()
new_layer_total <- new_layer_total %>%
mutate(y = dcant_change,
dcant_change = as.character(round(dcant_change,2)),
dcant_change = paste("global:",dcant_change))
g2 +
geom_text(data = new_layer_basin,
aes(
x = x - 0.3,
y = y,
label = dcant_change
),
inherit.aes = FALSE) +
geom_label(data = new_layer_total,
aes(
x = x,
y = y + 0.1,
label = dcant_change
),
inherit.aes = FALSE)
g2 <- dcant_budget_basin_MLR_all_plot %>%
ggplot(aes(
y = beta,
x = period,
alluvium = basin,
fill = basin,
stratum = basin,
label = basin
)) +
geom_alluvium() +
geom_stratum() +
ggrepel::geom_label_repel(
data = dcant_budget_basin_MLR_all_plot %>% filter(period == "2004 - 2014"),
stat = "stratum",
size = 4,
nudge_x = .5,
point.padding = 3,
aes(fill = basin)
)+
scale_fill_brewer(palette = "Paired", guide = "none") +
scale_color_brewer(palette = "Paired", guide = "none") +
scale_y_continuous(limits = c(0, 1.6), expand = c(0, 0)) +
guides(y = "none") +
labs(title = dcant_pgc_scaled_label) +
theme_classic() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
axis.title.x = element_blank(),
axis.title.y = element_blank(),
plot.title = element_text(hjust = 0.5))
newdat <- tibble(layer_data(g2))
# construct budget labels
budget_basin <-
newdat %>%
select(x, y, alluvium, count)
budget_layer_basin <- budget_basin %>%
mutate(dcant = as.character(round(count,2)))
# construct uncertainty labels
uncertainty_basin <-
dcant_budget_basin_MLR_all_plot %>%
mutate(x = fct_recode(period,
"2" = "1994 - 2004",
"3" = "2004 - 2014")) %>%
select(x, alluvium = basin, dcant_sd_scaled) %>%
drop_na() %>%
arrange(x, alluvium)
coord_basin <- newdat %>%
select(x, y, alluvium) %>%
filter(x != 1)
uncertainty_layer_basin <- bind_cols(
coord_basin,
uncertainty_basin %>% select(dcant_sd_scaled),
)
# construct change labels
change_basin <-
newdat %>%
select(x, alluvium, count) %>%
group_by(alluvium) %>%
arrange(x) %>%
mutate(dcant_change_abs = count - lag(count),
dcant_change = round(100*(dcant_change_abs) / lag(count))) %>%
ungroup()
coord_basin <- newdat %>%
select(x, y, alluvium)
new_layer_basin <- left_join(
change_basin %>% drop_na(),
coord_basin
)
new_layer_basin <- new_layer_basin %>%
mutate(dcant_change = as.character(dcant_change),
dcant_change = if_else(str_detect(dcant_change, "-"),
dcant_change,
paste0("+", dcant_change)),
dcant_change = paste0(dcant_change, "%"))
# construct global budget labels
new_layer_total <-
newdat %>%
select(x, alluvium, count) %>%
group_by(x) %>%
summarise(dcant_change = sum(count)) %>%
ungroup()
dcant_sd_scaled <- round(c(
0.24,
dcant_budget_global_all_ensemble_summary %>%
pull(dcant_sd_scaled)
), 2)
new_layer_total <- bind_cols(new_layer_total, dcant_sd_scaled = dcant_sd_scaled)
new_layer_total <- new_layer_total %>%
mutate(y = dcant_change,
dcant_sd_scaled_rel = round(100 * dcant_sd_scaled/dcant_change),
dcant_change = as.character(round(dcant_change,2)),
dcant_sd_scaled = round(dcant_sd_scaled,1),
dcant_change = paste0(dcant_change, "\n(±", dcant_sd_scaled, ")"))
# basin change + uncertainty
budget_layer_basin <- full_join(budget_layer_basin,
uncertainty_layer_basin)
budget_layer_basin <-
budget_layer_basin %>%
mutate(dcant_sd_scaled_rel = 100*dcant_sd_scaled/count,
dcant_sd_scaled_rel = as.character(round(dcant_sd_scaled_rel)),
dcant_sd_scaled_numeric = dcant_sd_scaled,
dcant_sd_scaled = round(dcant_sd_scaled, 2),
dcant_sd_scaled = paste0("(±", dcant_sd_scaled, ")"),
dcant_label = if_else(dcant_sd_scaled != "(±NA)",
paste0(dcant, "\n", dcant_sd_scaled),
dcant))
# uncertainty changes
uncertainty_changes <- budget_layer_basin %>%
select(x, alluvium, dcant_sd_scaled = dcant_sd_scaled_numeric) %>%
group_by(alluvium) %>%
mutate(dcant_change_uncert = sqrt(dcant_sd_scaled^2 + lag(dcant_sd_scaled)^2)) %>%
ungroup()
new_layer_basin <- left_join(new_layer_basin, uncertainty_changes) %>%
mutate(dcant_change_uncert_rel = 100*dcant_change_uncert/abs((count + lag(count))/2),
dcant_change_label = if_else(!is.na(dcant_change_uncert),
paste0(dcant_change, "\n(±", round(dcant_change_uncert_rel), "%)"),
dcant_change))
g2 +
geom_text(data = budget_layer_basin,
aes(
x = x,
y = y,
label = dcant_label
),
size = 3,
inherit.aes = FALSE) +
geom_text(data = new_layer_basin,
aes(
x = x - 0.3,
y = y,
label = dcant_change_label
),
size = 4,
inherit.aes = FALSE)
# geom_label(data = new_layer_total,
# aes(
# x = x,
# y = y + 0.13,
# label = dcant_change
# ),
# size = 4,
# inherit.aes = FALSE)
# ggsave(path = here::here("output/publication"),
# filename = "Fig_budget_beta_basin_hemisphere.png",
# height = 6,
# width = 8)
dcant_budget_change <- dcant_budget_basin_MLR_layer_all %>%
filter(estimate == "dcant",
period != "1994 - 2014",
inv_depth <= 3000,
data_source == "obs") %>%
rename(dcant = value) %>%
select(-c(tref1, tref2, Version_ID)) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
mutate(sign = if_else(`2004 - 2014` - `1994 - 2004` > 0,
"increase",
"decrease"))
dcant_budget_layer <- dcant_budget_basin_MLR_layer_all %>%
filter(estimate == "dcant",
period != "1994 - 2014",
inv_depth <= 3400,
data_source == "obs") %>%
rename(dcant = value) %>%
group_by(basin, period, data_source) %>%
mutate(dcant = if_else(is.na(lead(dcant)), 888, dcant),
dcant = na_if(dcant, 888)) %>%
fill(dcant) %>%
ungroup()
dcant_budget_layer %>%
ggplot() +
geom_hline(yintercept = 0) +
geom_rect(
data = dcant_budget_change,
aes(
xmin = inv_depth - 250,
xmax = inv_depth + 250,
ymin = `1994 - 2004`,
ymax = `2004 - 2014`,
fill = sign
),
alpha = 0.4
) +
geom_step(aes(inv_depth - 250, dcant, col = period), direction = "vh",
size = 1) +
coord_flip() +
scale_x_reverse(breaks = seq(0, 3000, 500)) +
scale_color_brewer(palette = "Set1", direction = -1, name = "period") +
scale_fill_brewer(palette = "Set1", direction = -1, name = "") +
facet_wrap(~ basin, ncol = 3, dir = "v") +
labs(y = dcant_layer_budget_label,
x = "Depth (m)") +
theme(legend.position = c(0.8,0.2))
Version | Author | Date |
---|---|---|
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
26e9496 | jens-daniel-mueller | 2022-07-12 |
dcant_budget_basin_MLR_layer_all_uncertainty <-
dcant_budget_basin_MLR_layer_all_ensemble %>%
filter(estimate == "dcant",
period != "1994 - 2014",
inv_depth <= 3400) %>%
rename(dcant = value) %>%
select(-c(method, estimate, Version_ID, tref1, tref2)) %>%
group_by(basin, period, data_source, MLR_basins, Version_ID_group) %>%
mutate(dcant = if_else(is.na(lead(dcant)), 888, dcant),
dcant = na_if(dcant, 888)) %>%
fill(dcant) %>%
ungroup()
dcant_budget_basin_MLR_layer_all_uncertainty <- additive_uncertainty(dcant_budget_basin_MLR_layer_all_uncertainty)
delta_dcant_budget_basin_MLR_layer_all_uncertainty <- dcant_budget_basin_MLR_layer_all_uncertainty[[3]]
dcant_budget_basin_MLR_layer_all_uncertainty_contributions <- dcant_budget_basin_MLR_layer_all_uncertainty[[2]]
dcant_budget_basin_MLR_layer_all_uncertainty <- dcant_budget_basin_MLR_layer_all_uncertainty[[1]]
p_dcant_budget_depth_layer <-
dcant_budget_basin_MLR_layer_all_uncertainty %>%
filter(data_source == "obs") %>%
ggplot() +
geom_hline(yintercept = 0, size = 0.1) +
geom_rect(
aes(
xmin = inv_depth - 250,
xmax = inv_depth + 250,
ymin = std_case - sd*sd_factor,
ymax = std_case + sd*sd_factor,
fill = period
),
alpha = 0.5
) +
geom_step(aes(inv_depth - 250, std_case, col = period), direction = "vh",
size = 1) +
coord_flip() +
scale_x_reverse(breaks = seq(0, 3000, 500), limits = c(3000, 0), expand = c(0,0)) +
scale_color_manual(values = c("#EE7733", "#009988"), name = "Mean \u00B1 2σ") +
scale_fill_manual(values = c("#EE7733", "#009988"), name = "Mean \u00B1 2σ") +
labs(y = dcant_layer_budget_label,
x = "Depth (m)") +
facet_wrap(~ basin, ncol = 3, dir = "v", scales = "free_x") +
theme(legend.position = c(0.9, 0.1))
p_dcant_budget_depth_layer
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
26e9496 | jens-daniel-mueller | 2022-07-12 |
p_dcant_profiles + p_dcant_budget_depth_layer +
plot_layout(ncol = 1) +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_profiles_and_depth_layer_inventories.png",
height = 12,
width = 8)
p_dcant_budget_depth_layer_mod <-
dcant_budget_basin_MLR_layer_all_uncertainty %>%
filter(data_source != "obs") %>%
mutate(data_source = case_when(
data_source == "mod" ~ "Reconstruction",
data_source == "mod_truth" ~ "Model truth"
)) %>%
ggplot() +
geom_hline(yintercept = 0, size = 0.1) +
geom_rect(
aes(
xmin = inv_depth - 250,
xmax = inv_depth + 250,
ymin = std_case - sd*sd_factor,
ymax = std_case + sd*sd_factor,
fill = data_source
),
alpha = 0.5
) +
geom_step(aes(inv_depth - 250, std_case, col = data_source), direction = "vh",
size = 1) +
coord_flip() +
scale_x_reverse(breaks = seq(0, 3000, 500), limits = c(3000, 0), expand = c(0,0)) +
scale_color_manual(values = c("#009988", "#EE7733"), name = "Mean \u00B1 2σ") +
scale_fill_manual(values = c("#009988", "#EE7733"), name = "Mean \u00B1 2σ") +
labs(y = dcant_layer_budget_label,
x = "Depth (m)") +
facet_grid(period ~ basin, scales = "free_x") +
theme(legend.position = "none")
p_dcant_budget_depth_layer_mod
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
318fefe | jens-daniel-mueller | 2022-08-11 |
p_dcant_profiles_mod + p_dcant_budget_depth_layer_mod +
plot_layout(ncol = 1) +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
318fefe | jens-daniel-mueller | 2022-08-11 |
ggsave(path = here::here("output/publication"),
filename = "FigS_dcant_profiles_and_depth_layer_inventories_synthetic_data.png",
height = 10,
width = 7)
dcant_budget_change <- dcant_budget_basin_MLR_layer_all %>%
filter(estimate == "dcant",
period != "1994 - 2014",
inv_depth <= 3000,
data_source == "obs") %>%
rename(dcant = value) %>%
arrange(inv_depth) %>%
group_by(data_source, basin, period) %>%
mutate(dcant_cum = cumsum(dcant)) %>%
ungroup() %>%
select(-c(tref2, Version_ID, dcant)) %>%
pivot_wider(names_from = period,
values_from = dcant_cum) %>%
mutate(sign = if_else(`2004 - 2014` - `1994 - 2004` > 0,
"increase",
"decrease"))
dcant_budget_layer <- dcant_budget_basin_MLR_layer_all %>%
filter(estimate == "dcant",
period != "1994 - 2014",
inv_depth <= 3400,
data_source == "obs") %>%
rename(dcant = value) %>%
arrange(inv_depth) %>%
group_by(data_source, basin, period) %>%
mutate(dcant_cum = cumsum(dcant)) %>%
ungroup() %>%
group_by(basin, period, data_source) %>%
mutate(dcant_cum = if_else(is.na(lead(dcant_cum)), 888, dcant_cum),
dcant_cum = na_if(dcant_cum, 888)) %>%
fill(dcant_cum) %>%
ungroup()
dcant_budget_layer %>%
ggplot() +
geom_hline(yintercept = 0) +
geom_rect(
data = dcant_budget_change,
aes(
xmin = inv_depth - 250,
xmax = inv_depth + 250,
ymin = `1994 - 2004`,
ymax = `2004 - 2014`,
fill = sign
),
alpha = 0.3
) +
geom_step(aes(inv_depth - 250, dcant_cum, col = period), direction = "vh",
size = 1) +
coord_flip() +
scale_x_reverse(breaks = seq(0, 3000, 500)) +
scale_color_brewer(palette = "Set1",
direction = -1,
name = "Decade") +
scale_fill_brewer(palette = "Set1",
direction = -1,
name = "Decadal change") +
facet_wrap( ~ basin, ncol = 3, dir = "v") +
labs(y = dcant_layer_budget_label,
x = "Depth (m)",
title = "Cumulative layer inventory change") +
theme(legend.position = c(0.8,0.2))
Version | Author | Date |
---|---|---|
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
26e9496 | jens-daniel-mueller | 2022-07-12 |
37f56b3 | jens-daniel-mueller | 2022-07-01 |
df21d31 | jens-daniel-mueller | 2022-07-01 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
32e9682 | jens-daniel-mueller | 2022-02-02 |
913e42f | jens-daniel-mueller | 2022-02-01 |
189de95 | jens-daniel-mueller | 2022-02-01 |
ab001eb | jens-daniel-mueller | 2022-01-31 |
b62308d | jens-daniel-mueller | 2022-01-31 |
5f2aed0 | jens-daniel-mueller | 2022-01-27 |
dcant_budget_global_all_ensemble <-
dcant_budget_basin_MLR_all_ensemble %>%
filter(basin == "Global")
dcant_budget_global_all_ensemble %>%
filter(data_source == "obs",
period != "1994 - 2014") %>%
ggplot(aes(tref2, dcant, group = interaction(MLR_basins, Version_ID_group),
col=Version_ID_group)) +
geom_path() +
geom_point()
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
d20faeb | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
232909e | jens-daniel-mueller | 2022-07-01 |
dcant_budget_global_all_ensemble %>%
filter(data_source == "obs") %>%
select(MLR_basins, Version_ID_group, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
ggplot(aes(`1994 - 2004`, `2004 - 2014`,
col=MLR_basins)) +
coord_equal() +
geom_point() +
facet_wrap(~ Version_ID_group)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
d20faeb | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
232909e | jens-daniel-mueller | 2022-07-01 |
dcant_budget_global_all_ensemble %>%
filter(data_source == "obs") %>%
select(MLR_basins, Version_ID_group, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
ggplot(aes(`1994 - 2004`, `2004 - 2014`,
col=Version_ID_group)) +
coord_equal() +
geom_point() +
facet_wrap(~ MLR_basins)
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
d20faeb | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
232909e | jens-daniel-mueller | 2022-07-01 |
dcant_budget_global_all_ensemble %>%
filter(data_source == "obs") %>%
select(MLR_basins, Version_ID_group, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
ggplot(aes(`1994 - 2004`, `1994 - 2014`,
col=Version_ID_group)) +
coord_equal() +
geom_point()
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
d20faeb | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
232909e | jens-daniel-mueller | 2022-07-01 |
dcant_budget_global_all_ensemble %>%
filter(data_source == "obs") %>%
select(MLR_basins, Version_ID_group, period, dcant) %>%
pivot_wider(names_from = period,
values_from = dcant) %>%
ggplot(aes(`1994 - 2004` + `2004 - 2014`, `1994 - 2014`,
col=Version_ID_group)) +
geom_abline(intercept = 0, slope = 1) +
coord_equal() +
scale_x_continuous(breaks = seq(0,100,1)) +
scale_y_continuous(breaks = seq(0,100,1)) +
geom_point()
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
dcant_budget_global_ts <- dcant_budget_basin_MLR_all %>%
filter(basin == "Global",
data_source == "obs",
period %in% two_decades) %>%
select(year = tref2, dcant_mean = dcant)
dcant_budget_global_all_ensemble_summary <-
dcant_budget_basin_MLR_all_uncertainty %>%
filter(data_source == "obs",
basin == "Global") %>%
mutate(
tref2 = as.numeric(str_sub(period, 8, 11)),
dcant_sd = sqrt(sd ^ 2 + lag(sd, default = 0) ^ 2) * sd_factor,
dcant_sd_int = sd * sd_factor
) %>%
select(data_source, tref2, dcant_sd, dcant_sd_int)
# dcant_budget_global_all_ensemble_summary <-
# dcant_budget_basin_MLR_all_uncertainty_two_decades %>%
# filter(period %in% c("1994 - 2004", "1994 - 2014"),
# data_source == "obs",
# basin == "Global") %>%
# select(data_source, tref2, period, sd) %>%
# mutate(dcant_sd = sd*sd_factor)
# dcant_budget_global_all_ensemble_summary <-
# dcant_budget_basin_MLR_all_ensemble %>%
# filter(period %in% c("1994 - 2004", "1994 - 2014"),
# data_source == "obs",
# basin == "Global") %>%
# group_by(data_source, tref2, period) %>%
# summarise(#dcant_mean = mean(dcant),
# dcant_sd = sd(dcant)*sd_factor) %>%
# ungroup()
dcant_budget_global_ts <- left_join(dcant_budget_global_ts,
dcant_budget_global_all_ensemble_summary %>%
select(year = tref2, dcant_sd, dcant_sd_int))
tcant_S04 <- bind_cols(year = 1994, dcant_mean = 118, dcant_sd = 19)
tcant_ts <- full_join(dcant_budget_global_ts, tcant_S04)
tcant_ts <- left_join(tcant_ts, co2_atm)
co2_atm_pi <- bind_cols(pCO2 = 280, dcant_mean = 0, year = 1800, dcant_sd = NA)
tcant_ts <- full_join(tcant_ts, co2_atm_pi)
tcant_ts <- tcant_ts %>%
arrange(year) %>%
mutate(
tcant = cumsum(dcant_mean),
tcant_sd = sqrt(dcant_sd ^ 2 + nth(dcant_sd,2) ^ 2)
) %>%
mutate(
tcant_sd = case_when(
year == 1800 ~ 0,
year == 1994 ~ dcant_sd,
TRUE ~ tcant_sd
),
dcant_sd_int = case_when(
year == 1994 ~ dcant_sd,
TRUE ~ dcant_sd_int
),
dcant_sd = case_when(
year == 1994 ~ 0,
TRUE ~ dcant_sd
)
)
beta <- 1.57
co2_atm_pi_value <- 283
atm_co2_col <- "#CC3311"
tcant_col <- "#004488"
p_tcant_year <- tcant_ts %>%
ggplot(aes(year, tcant)) +
geom_line(data = co2_atm_reccap2 %>% filter(year > 1790),
aes(year, (pCO2 - co2_atm_pi_value) * beta),
col = atm_co2_col) +
geom_linerange(aes(
ymin = tcant - dcant_sd_int,
ymax = tcant + dcant_sd_int,
col = "Estimate\n±\ninterval\nuncertainty"
), size = 1) +
geom_point(fill = "white", shape = 21,
aes(col = "Estimate\n±\ninterval\nuncertainty")) +
scale_y_continuous(name = expression(Total ~ oceanic ~ C[ant] ~ (PgC)),
sec.axis = sec_axis( ~ (. / beta + co2_atm_pi_value),
name = expression(Atm. ~ pCO[2] ~ (µatm)))) +
scale_x_continuous(name = "Year", breaks = seq(1800, 2000, 50)) +
scale_color_manual(values = tcant_col) +
theme(
axis.title.y.right = element_text(color = atm_co2_col),
axis.text.y.right = element_text(color = atm_co2_col),
axis.ticks.y.right = element_line(color = atm_co2_col),
axis.title.y.left = element_text(color = tcant_col),
axis.text.y.left = element_text(color = tcant_col),
axis.ticks.y.left = element_line(color = tcant_col),
legend.background = element_rect(fill = "transparent"),
legend.position = c(0.85, 0.2),
legend.title = element_blank()
)
p_tcant_year
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
9bbc6a4 | jens-daniel-mueller | 2022-07-20 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
0825298 | jens-daniel-mueller | 2022-06-28 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
8dca96a | jens-daniel-mueller | 2022-04-12 |
209c9b6 | jens-daniel-mueller | 2022-04-10 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
5a6be34 | jens-daniel-mueller | 2022-03-22 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
251c7cf | jens-daniel-mueller | 2022-02-17 |
565224d | jens-daniel-mueller | 2022-02-17 |
2116dd3 | jens-daniel-mueller | 2022-02-09 |
6fe70a1 | jens-daniel-mueller | 2022-02-05 |
a6b33aa | jens-daniel-mueller | 2022-02-04 |
atm_co2_col <- "transparent"
p_tcant_year_trans <- tcant_ts %>%
ggplot(aes(year, tcant)) +
geom_line(data = co2_atm_reccap2 %>% filter(year > 1790),
aes(year, (pCO2 - co2_atm_pi_value) * beta),
col = atm_co2_col) +
geom_linerange(aes(
ymin = tcant - dcant_sd_int,
ymax = tcant + dcant_sd_int,
col = "Estimate\n±\ninterval\nuncertainty"
), size = 1) +
geom_point(fill = "white", shape = 21,
aes(col = "Estimate\n±\ninterval\nuncertainty")) +
scale_y_continuous(name = expression(Total ~ oceanic ~ C[ant] ~ (PgC)),
sec.axis = sec_axis( ~ (. / beta + co2_atm_pi_value),
name = expression(Atm. ~ pCO[2] ~ (µatm)))) +
scale_x_continuous(name = "Year", breaks = seq(1800, 2000, 50)) +
scale_color_manual(values = tcant_col) +
theme(
axis.title.y.right = element_text(color = atm_co2_col),
axis.text.y.right = element_text(color = atm_co2_col),
axis.ticks.y.right = element_line(color = atm_co2_col),
axis.title.y.left = element_text(color = tcant_col),
axis.text.y.left = element_text(color = tcant_col),
axis.ticks.y.left = element_line(color = tcant_col),
legend.background = element_rect(fill = "transparent"),
legend.position = c(0.85, 0.2),
legend.title = element_blank()
)
p_tcant_year_trans
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
0825298 | jens-daniel-mueller | 2022-06-28 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
8dca96a | jens-daniel-mueller | 2022-04-12 |
209c9b6 | jens-daniel-mueller | 2022-04-10 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
5a6be34 | jens-daniel-mueller | 2022-03-22 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
251c7cf | jens-daniel-mueller | 2022-02-17 |
565224d | jens-daniel-mueller | 2022-02-17 |
2116dd3 | jens-daniel-mueller | 2022-02-09 |
atm_co2_col <- "#CC3311"
p_tcant_atm_co2 <- tcant_ts %>%
ggplot(aes(pCO2, tcant)) +
geom_ribbon(aes(
ymin = tcant - tcant_sd,
ymax = tcant + tcant_sd,
fill = "1800 - 2014",
alpha = "1800 - 2014"
)) +
geom_ribbon(aes(
ymin = tcant - dcant_sd,
ymax = tcant + dcant_sd,
fill = "1994 - 2014",
alpha = "1994 - 2014"
)) +
geom_line(color = tcant_col) +
geom_point(shape = 21, fill = "white", color = tcant_col) +
scale_x_continuous(breaks = seq(280, 400, 30)) +
scale_fill_manual(values = c(tcant_col, tcant_col), name = "Cumulative\nuncertainty") +
scale_alpha_manual(values = c(0.2, 0.6), name = "Cumulative\nuncertainty") +
scale_color_manual(values = "black", name = "") +
geom_text(aes(label = year), nudge_x = -6, nudge_y = 6) +
labs(x = expression(Atmospheric ~ pCO[2] ~ (µatm)),
y = expression(Total ~ oceanic ~ C[ant] ~ (PgC))) +
theme(
axis.title.y.left = element_text(color = tcant_col),
axis.text.y.left = element_text(color = tcant_col),
axis.ticks.y.left = element_line(color = tcant_col),
legend.background = element_rect(fill = "transparent"),
legend.position = c(0.85, 0.25),
axis.title.x = element_text(color = atm_co2_col),
axis.text.x = element_text(color = atm_co2_col),
axis.ticks.x = element_line(color = atm_co2_col)
)
p_tcant_year / p_tcant_atm_co2 +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
9bbc6a4 | jens-daniel-mueller | 2022-07-20 |
a80b59b | jens-daniel-mueller | 2022-07-20 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
0825298 | jens-daniel-mueller | 2022-06-28 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
8dca96a | jens-daniel-mueller | 2022-04-12 |
209c9b6 | jens-daniel-mueller | 2022-04-10 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
5a6be34 | jens-daniel-mueller | 2022-03-22 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
251c7cf | jens-daniel-mueller | 2022-02-17 |
565224d | jens-daniel-mueller | 2022-02-17 |
2116dd3 | jens-daniel-mueller | 2022-02-09 |
6fe70a1 | jens-daniel-mueller | 2022-02-05 |
a6b33aa | jens-daniel-mueller | 2022-02-04 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
0d0f790 | jens-daniel-mueller | 2022-02-02 |
60727e6 | jens-daniel-mueller | 2022-02-02 |
c7b4984 | jens-daniel-mueller | 2022-02-02 |
7fb28a2 | jens-daniel-mueller | 2022-02-02 |
7655085 | jens-daniel-mueller | 2022-02-02 |
ec7fe7e | jens-daniel-mueller | 2022-01-31 |
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_inventory_global_vs_atm_pCO2.png",
height = 6,
width = 7)
p_tcant_year / p_tcant_atm_co2
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
0825298 | jens-daniel-mueller | 2022-06-28 |
87e9eb8 | jens-daniel-mueller | 2022-06-27 |
b52b159 | jens-daniel-mueller | 2022-06-27 |
1d73ec9 | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
8dca96a | jens-daniel-mueller | 2022-04-12 |
209c9b6 | jens-daniel-mueller | 2022-04-10 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
5a6be34 | jens-daniel-mueller | 2022-03-22 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
251c7cf | jens-daniel-mueller | 2022-02-17 |
565224d | jens-daniel-mueller | 2022-02-17 |
2116dd3 | jens-daniel-mueller | 2022-02-09 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_budget_global_vs_atm_pCO2.png",
height = 6,
width = 7)
p_tcant_year_trans / p_tcant_atm_co2
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_budget_global_vs_atm_pCO2_trans.png",
height = 6,
width = 7)
tcant_ts %>%
mutate(beta = dcant_mean / (pCO2-lag(pCO2)))
# A tibble: 4 × 8
year dcant_mean dcant_sd dcant_sd_int pCO2 tcant tcant_sd beta
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 1800 0 NA NA 280 0 0 NA
2 1994 118 0 19 358. 118 19 1.51
3 2004 29.3 5.26 5.26 377. 147. 19.7 1.57
4 2014 27.3 7.10 4.77 397. 175. 20.3 1.34
Ocean_Sink <- Ocean_Sink %>%
filter(product != "Watson")
Ocean_Sink_cum_1994 <-
Ocean_Sink %>%
filter(year >= 1994, year <= 2007) %>%
mutate(fgco2_glob = if_else(year == 1994, 0, GtC_yr),
fgco2_glob = fgco2_glob) %>%
arrange(year) %>%
group_by(product, type) %>%
mutate(fgco2_glob_cum = cumsum(fgco2_glob)) %>%
ungroup()
Ocean_Sink_cum_1994 <-
left_join(Ocean_Sink_cum_1994,
co2_atm)
Ocean_Sink_cum_1994 %>%
group_split(type) %>%
map(
~ ggplot(data = .x, aes(pCO2, fgco2_glob_cum, col = product)) +
geom_line() +
geom_point(shape = 21, fill = "white") +
theme(legend.position = "bottom") +
facet_grid(. ~ type)
)
[[1]]
[[2]]
Version | Author | Date |
---|---|---|
8105380 | jens-daniel-mueller | 2022-10-07 |
Ocean_Sink_cum_1994 <- Ocean_Sink_cum_1994 %>%
mutate(fgco2_glob_cum_total = fgco2_glob_cum + 118) %>%
select(year, pCO2, product, fgco2_glob_cum, fgco2_glob_cum_total, type)
Ocean_Sink_cum_1994 <- Ocean_Sink_cum_1994 %>%
mutate(type = case_when(
type == "data_products" ~ "Observation-based\nsurface flux\nproducts",
TRUE ~ "Global Ocean\nBiogeochemical Models\n(GOBM)"
))
Ocean_Sink_cum_1994 %>%
filter(year == 2007) %>%
group_by(type) %>%
summarise(dcant_sd = sd(fgco2_glob_cum)*sd_factor) %>%
ungroup()
# A tibble: 2 × 2
type dcant_sd
<chr> <dbl>
1 "Global Ocean\nBiogeochemical Models\n(GOBM)" 6.99
2 "Observation-based\nsurface flux\nproducts" 6.66
Ocean_Sink_cum_1994 <-
Ocean_Sink %>%
filter(year >= 1994, year <= 2014) %>%
mutate(fgco2_glob = if_else(year == 1994, 0, GtC_yr),
fgco2_glob = fgco2_glob) %>%
arrange(year) %>%
group_by(product, type) %>%
mutate(fgco2_glob_cum = cumsum(fgco2_glob)) %>%
ungroup()
Ocean_Sink_cum_1994 <-
left_join(Ocean_Sink_cum_1994,
co2_atm)
Ocean_Sink_cum_1994 %>%
group_split(type) %>%
map(
~ ggplot(data = .x, aes(pCO2, fgco2_glob_cum, col = product)) +
geom_line() +
geom_point(shape = 21, fill = "white") +
theme(legend.position = "bottom") +
facet_grid(. ~ type)
)
[[1]]
[[2]]
Version | Author | Date |
---|---|---|
8105380 | jens-daniel-mueller | 2022-10-07 |
Ocean_Sink_cum_1994 <- Ocean_Sink_cum_1994 %>%
mutate(fgco2_glob_cum_total = fgco2_glob_cum + 118) %>%
select(year, pCO2, product, fgco2_glob_cum, fgco2_glob_cum_total, type)
Ocean_Sink_cum_1994 <- Ocean_Sink_cum_1994 %>%
mutate(type = case_when(
type == "data_products" ~ "Observation-based\nsurface flux\nproducts",
TRUE ~ "Global Ocean\nBiogeochemical Models\n(GOBM)"
))
tcant_2004 <- tcant_ts %>%
filter(year == 2004) %>%
pull(tcant)
Ocean_Sink_cum_2004 <-
Ocean_Sink %>%
filter(year >= 2004, year <= 2014) %>%
mutate(fgco2_glob = if_else(year == 2004, 0, GtC_yr)) %>%
arrange(year) %>%
group_by(product, type) %>%
mutate(fgco2_glob_cum = cumsum(fgco2_glob)) %>%
ungroup()
Ocean_Sink_cum_2004 <-
left_join(Ocean_Sink_cum_2004,
co2_atm)
Ocean_Sink_cum_2004 %>%
group_split(type) %>%
map(
~ ggplot(data = .x, aes(pCO2, fgco2_glob_cum, col = product)) +
geom_line() +
geom_point(shape = 21, fill = "white") +
theme(legend.position = "bottom") +
facet_grid(. ~ type)
)
[[1]]
[[2]]
Version | Author | Date |
---|---|---|
8105380 | jens-daniel-mueller | 2022-10-07 |
Ocean_Sink_cum_2004 <- Ocean_Sink_cum_2004 %>%
mutate(fgco2_glob_cum_total = fgco2_glob_cum + tcant_2004) %>%
select(year, pCO2, product, fgco2_glob_cum, fgco2_glob_cum_total, type)
Ocean_Sink_cum_2004 <- Ocean_Sink_cum_2004 %>%
mutate(type = case_when(
type == "data_products" ~ "Observation-based\nsurface flux\nproducts",
TRUE ~ "Global Ocean\nBiogeochemical Models\n(GOBM)"
))
tcant_ts_zoom <- tcant_ts %>%
filter(year != 1800)
tcant_ts_zoom <-
tcant_ts_zoom %>%
mutate(tcant = tcant - 118)
tcant_min = tcant_ts_zoom %>% pull(tcant) %>% min()
tcant_max =
tcant_ts_zoom %>% pull(tcant) %>% max() +
tcant_ts_zoom %>% pull(dcant_sd) %>% max() + 1
Ocean_Sink_cum_1994 <-
Ocean_Sink_cum_1994 %>%
mutate(fgco2_glob_cum_total = fgco2_glob_cum_total - 118)
Ocean_Sink_cum_2004 <-
Ocean_Sink_cum_2004 %>%
mutate(fgco2_glob_cum_total = fgco2_glob_cum_total - 118)
p_tcant_ts_zoom <-
tcant_ts_zoom %>%
ggplot(aes(pCO2, tcant)) +
geom_ribbon(
aes(ymin = tcant - dcant_sd,
ymax = tcant + dcant_sd),
alpha = 0.2,
fill = tcant_col
) +
geom_ribbon(
aes(
ymin = tcant - dcant_sd / 2,
ymax = tcant + dcant_sd / 2
),
alpha = 0.3,
fill = tcant_col
) +
geom_line(data = Ocean_Sink_cum_1994,
aes(pCO2, fgco2_glob_cum_total, group = product, col = type)) +
geom_point(
data = Ocean_Sink_cum_1994,
aes(pCO2, fgco2_glob_cum_total, group = product, col = type),
size = 0.3
) +
geom_point(
data = Ocean_Sink_cum_1994 %>% filter(year %in% c(2004, 2014)),
aes(
pCO2,
fgco2_glob_cum_total,
col = type
),
fill = "white",
shape = 21
) +
geom_line(aes(col = "eMLR(C*)")) +
geom_point(aes(col = "eMLR(C*)"),
shape = 21,
fill = "white") +
geom_text(aes(label = year), nudge_x = -2, nudge_y = 3) +
scale_color_highcontrast(name = "Data source") +
scale_fill_highcontrast(name = "Data source") +
scale_y_continuous(limits = c(tcant_min, tcant_max)) +
labs(x = expression(Atmospheric ~ pCO[2] ~ (µatm)),
y = expression(Total ~ oceanic ~ carbon ~ storage ~ since ~ 1800 ~ (PgC))) +
guides(colour = guide_legend(order = 1),
fill = "none") +
theme_classic() +
theme(
legend.background = element_rect(fill = "transparent"),
legend.position = c(0.25, 0.83),
legend.title = element_blank(),
legend.box.just = "top",
legend.box = "horizontal",
legend.key.size = unit(2.5, 'lines'),
panel.grid.major.y = element_line(colour = "black",
size = 0.1)
)
p_tcant_ts_zoom
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
8105380 | jens-daniel-mueller | 2022-10-07 |
f68fcfa | jens-daniel-mueller | 2022-07-26 |
f2615fb | jens-daniel-mueller | 2022-07-26 |
4af29f9 | jens-daniel-mueller | 2022-07-24 |
b18b250 | jens-daniel-mueller | 2022-07-20 |
a80b59b | jens-daniel-mueller | 2022-07-20 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
9393c07 | jens-daniel-mueller | 2022-06-28 |
0825298 | jens-daniel-mueller | 2022-06-28 |
fb59a6f | jens-daniel-mueller | 2022-06-27 |
3c1100c | jens-daniel-mueller | 2022-05-16 |
2ca0109 | jens-daniel-mueller | 2022-05-02 |
b018a9a | jens-daniel-mueller | 2022-04-29 |
e09320d | jens-daniel-mueller | 2022-04-12 |
8dca96a | jens-daniel-mueller | 2022-04-12 |
209c9b6 | jens-daniel-mueller | 2022-04-10 |
acad2e2 | jens-daniel-mueller | 2022-04-09 |
3d81135 | jens-daniel-mueller | 2022-04-07 |
a74e341 | jens-daniel-mueller | 2022-04-04 |
bd9e11d | jens-daniel-mueller | 2022-03-22 |
2501978 | jens-daniel-mueller | 2022-03-21 |
c3a6238 | jens-daniel-mueller | 2022-03-08 |
094bfa0 | jens-daniel-mueller | 2022-02-18 |
ba2d62e | jens-daniel-mueller | 2022-02-17 |
192504c | jens-daniel-mueller | 2022-02-17 |
d2191ad | jens-daniel-mueller | 2022-02-04 |
4c5b079 | jens-daniel-mueller | 2022-02-03 |
4077397 | jens-daniel-mueller | 2022-02-03 |
dcant_type_box <-
bind_rows(
dcant_budget_basin_MLR_all_ensemble %>%
filter(
data_source == "obs",
basin == "Global",
!(Version_ID %in% Version_IDs),
MLR_basins == unique(params_local_all$MLR_basins) |
Version_ID_group == unique(params_local_all$Version_ID_group)
) %>%
select(period, dcant) %>%
mutate(type = "eMLR(C*)",
dcant = dcant,
dcant = if_else(period == "2004 - 2014",
dcant + tcant_2004 - 118,
dcant)),
Ocean_Sink_cum_1994 %>%
filter(year %in% c(2004, 2014)) %>%
mutate(period = if_else(year == 2004,
"1994 - 2004",
"1994 - 2014")) %>%
select(period, dcant = fgco2_glob_cum_total, type),
Ocean_Sink_cum_2004 %>%
filter(year %in% c(2014)) %>%
mutate(period = if_else(year == 2014,
"2004 - 2014",
"other")) %>%
select(period, dcant = fgco2_glob_cum_total, type)
)
dcant_type_box_stat <- dcant_type_box %>%
group_by(period, type) %>%
summarise(dcant_mean = mean(dcant),
dcant_sd = sd(dcant)) %>%
ungroup()
dcant_type_box_stat <-
left_join(
dcant_type_box_stat,
dcant_budget_basin_MLR_all_uncertainty %>%
filter(data_source == "obs",
basin == "Global") %>%
mutate(
std_case = if_else(period == "2004 - 2014",
std_case + tcant_2004 - 118,
std_case)
) %>%
select(period, std_case, sd)
)
dcant_type_box_stat <- dcant_type_box_stat %>%
mutate(dcant_mean = if_else(type == "eMLR(C*)",
std_case,
dcant_mean)) %>%
mutate(dcant_sd = if_else(type == "eMLR(C*)",
sd,
dcant_sd)) %>%
select(-c(std_case, sd))
p_tcant_box <-
dcant_type_box %>%
filter(period == "1994 - 2014") %>%
ggplot(aes(period, dcant)) +
geom_crossbar(
data = dcant_type_box_stat %>%
filter(period == "1994 - 2014"),
position = position_dodge(width = 1),
aes(
x = period,
y = dcant_mean,
ymin = dcant_mean - dcant_sd,
ymax = dcant_mean + dcant_sd,
col = type,
fill = type
), width = 0.7, alpha = 0.4
) +
geom_crossbar(
data = dcant_type_box_stat %>%
filter(period == "1994 - 2014"),
position = position_dodge(width = 1),
aes(
x = period,
y = dcant_mean,
ymin = dcant_mean - dcant_sd*2,
ymax = dcant_mean + dcant_sd*2,
col = type,
fill = type
), width = 0.7, alpha = 0.2
) +
geom_point(aes(fill = type),
position = position_jitterdodge(
dodge.width = 1,
jitter.width = 0.1),
shape = 21,
alpha = 0.5) +
scale_fill_highcontrast(
name = "Data source",
guide = "none"
) +
scale_color_highcontrast(
name = "Data source",
guide = "none"
) +
scale_y_continuous(limits = c(tcant_min, tcant_max)) +
labs(x = "20yr period") +
theme_classic() +
theme(
axis.line.y.left = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank(),
panel.grid.major.y = element_line(colour = "black",
size = 0.1)
)
p_tcant_box_10 <-
dcant_type_box %>%
filter(period != "1994 - 2014") %>%
ggplot(aes(period, dcant)) +
geom_crossbar(
data = dcant_type_box_stat %>%
filter(period != "1994 - 2014"),
position = position_dodge(width = 1),
aes(
x = period,
y = dcant_mean,
ymin = dcant_mean - dcant_sd,
ymax = dcant_mean + dcant_sd,
col = type,
fill = type
),
width = 0.7,
alpha = 0.4
) +
geom_crossbar(
data = dcant_type_box_stat %>%
filter(period != "1994 - 2014"),
position = position_dodge(width = 1),
aes(
x = period,
y = dcant_mean,
ymin = dcant_mean - dcant_sd * 2,
ymax = dcant_mean + dcant_sd * 2,
col = type,
fill = type
),
width = 0.7,
alpha = 0.2
) +
geom_point(
aes(fill = type),
position = position_jitterdodge(dodge.width = 1,
jitter.width = 0.1),
shape = 21,
alpha = 0.5
) +
geom_point(
data = dcant_type_box_stat %>%
filter(period != "1994 - 2014"),
position = position_dodge(width = 1),
aes(x = period,
y = dcant_mean,
col = type),
fill = "white",
shape = 21,
size = 2
) +
scale_fill_highcontrast(name = "Data source",
guide = "none") +
scale_color_highcontrast(name = "Data source",
guide = "none") +
scale_y_continuous(limits = c(tcant_min, tcant_max)) +
labs(x = "10yr periods") +
theme_classic() +
theme(
axis.line.y.left = element_blank(),
axis.text.y = element_blank(),
axis.ticks.y = element_blank(),
axis.title.y = element_blank(),
panel.grid.major.y = element_line(colour = "black",
size = 0.1)
)
p_tcant_ts_zoom + p_tcant_box + p_tcant_box_10 +
plot_layout(ncol = 3, widths = c(6,1,1.8)) +
plot_annotation(tag_levels = 'A')
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
0b40366 | jens-daniel-mueller | 2022-10-26 |
91052ae | jens-daniel-mueller | 2022-10-20 |
77e6a80 | jens-daniel-mueller | 2022-09-08 |
051b911 | jens-daniel-mueller | 2022-09-07 |
75bd58c | jens-daniel-mueller | 2022-09-07 |
1c6de0d | jens-daniel-mueller | 2022-09-07 |
78dbb27 | jens-daniel-mueller | 2022-08-11 |
302d289 | jens-daniel-mueller | 2022-08-11 |
318fefe | jens-daniel-mueller | 2022-08-11 |
5b77c4f | jens-daniel-mueller | 2022-08-10 |
9c3be27 | jens-daniel-mueller | 2022-08-09 |
a691b29 | jens-daniel-mueller | 2022-08-09 |
910f96e | jens-daniel-mueller | 2022-08-08 |
f68fcfa | jens-daniel-mueller | 2022-07-26 |
f2615fb | jens-daniel-mueller | 2022-07-26 |
4af29f9 | jens-daniel-mueller | 2022-07-24 |
b18b250 | jens-daniel-mueller | 2022-07-20 |
a80b59b | jens-daniel-mueller | 2022-07-20 |
fea41c1 | jens-daniel-mueller | 2022-07-20 |
d803308 | jens-daniel-mueller | 2022-07-19 |
b1f7ab3 | jens-daniel-mueller | 2022-07-18 |
d2ae54c | jens-daniel-mueller | 2022-07-18 |
2695085 | jens-daniel-mueller | 2022-07-17 |
535196a | jens-daniel-mueller | 2022-07-17 |
d20faeb | jens-daniel-mueller | 2022-07-17 |
afb27ad | jens-daniel-mueller | 2022-07-15 |
b492b46 | jens-daniel-mueller | 2022-07-15 |
bd24a0f | jens-daniel-mueller | 2022-07-15 |
17cd1d1 | jens-daniel-mueller | 2022-07-13 |
26e9496 | jens-daniel-mueller | 2022-07-12 |
8fb595c | jens-daniel-mueller | 2022-07-12 |
003b161 | jens-daniel-mueller | 2022-07-12 |
8ab4a87 | jens-daniel-mueller | 2022-06-29 |
7629c78 | jens-daniel-mueller | 2022-06-29 |
f6786c8 | jens-daniel-mueller | 2022-06-29 |
9393c07 | jens-daniel-mueller | 2022-06-28 |
0825298 | jens-daniel-mueller | 2022-06-28 |
# ggsave(path = here::here("output/publication"),
# filename = "Fig_dcant_inventory_global_vs_GCB_ocean_sink.png",
# height = 6,
# width = 9)
p_tcant_ts_zoom + p_tcant_box_10 +
plot_layout(ncol = 2, widths = c(6,1.8))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
0b40366 | jens-daniel-mueller | 2022-10-26 |
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_dcant_budget_global_vs_GCB_ocean_sink.png",
height = 6,
width = 9)
dcant_type_significance <- dcant_type_box_stat %>%
mutate(dcant_mean = dcant_mean,
dcant_mean = if_else(period == "2004 - 2014",
dcant_mean - (tcant_2004 - 118),
dcant_mean),
dcant_sd = dcant_sd * sd_factor) %>%
group_by(period) %>%
mutate(
dcant_diff = dcant_mean - first(dcant_mean),
dcant_diff_rel = 100 * dcant_diff / first(dcant_mean),
dcant_diff_sd = sqrt(dcant_sd ^ 2 + first(dcant_sd) ^ 2),
dcant_diff_sd_comparison = abs(dcant_diff_sd) - abs(dcant_diff)
) %>%
ungroup()
dcant_type_significance %>%
drop_na() %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
period | type | dcant_mean | dcant_sd | dcant_diff | dcant_diff_rel | dcant_diff_sd | dcant_diff_sd_comparison |
---|---|---|---|---|---|---|---|
1994 - 2004 | eMLR(C*) | 29.27668 | 5.258325 | 0.0000000 | 0.000000 | 7.436395 | 7.4363952 |
1994 - 2004 | Global Ocean Biogeochemical Models (GOBM) | 19.52578 | 5.403004 | -9.7508981 | -33.306028 | 7.539393 | -2.2115053 |
1994 - 2004 | Observation-based surface flux products | 21.41458 | 5.597734 | -7.8620944 | -26.854464 | 7.680144 | -0.1819503 |
2004 - 2014 | eMLR(C*) | 27.34720 | 4.770430 | 0.0000000 | 0.000000 | 6.746407 | 6.7464074 |
2004 - 2014 | Global Ocean Biogeochemical Models (GOBM) | 22.75899 | 5.576053 | -4.5882109 | -16.777624 | 7.338214 | 2.7500026 |
2004 - 2014 | Observation-based surface flux products | 26.48067 | 2.612751 | -0.8665297 | -3.168623 | 5.439069 | 4.5725398 |
Ocean_Sink_cum_1994_ensemble_mean <- Ocean_Sink_cum_1994 %>%
group_by(year, pCO2, type) %>%
summarise(fgco2_glob_cum_total_mean = mean(fgco2_glob_cum_total),
fgco2_glob_cum_total_sd = sd(fgco2_glob_cum_total)) %>%
ungroup()
p_tcant_ts_zoom <-
tcant_ts_zoom %>%
ggplot() +
geom_ribbon(aes(pCO2, tcant,
ymin = tcant - dcant_sd,
ymax = tcant + dcant_sd,
fill = "eMLR(C*)"),
alpha = 0.2) +
geom_ribbon(
aes(pCO2, tcant,
ymin = tcant - dcant_sd / 2,
ymax = tcant + dcant_sd / 2,
fill = "eMLR(C*)"),
alpha = 0.3
) +
geom_line(data = Ocean_Sink_cum_1994,
aes(pCO2, fgco2_glob_cum_total, group = product, col = type), size = 0.3) +
geom_line(data = Ocean_Sink_cum_1994_ensemble_mean,
aes(pCO2, fgco2_glob_cum_total_mean, col = type), size = 2) +
geom_point(
data = Ocean_Sink_cum_1994_ensemble_mean,
aes(pCO2, fgco2_glob_cum_total_mean, col = type), size = 1,
shape = 21,
fill = "white"
) +
geom_point(
data = Ocean_Sink_cum_1994_ensemble_mean %>% filter(year %in% c(2004, 2014)),
aes(pCO2, fgco2_glob_cum_total_mean, col = type), size = 2,
shape = 21,
fill = "white"
) +
geom_line(aes(pCO2, tcant, col = "eMLR(C*)"), size = 2) +
geom_point(aes(pCO2, tcant, col = "eMLR(C*)"), size = 2,
shape = 21,
fill = "white") +
geom_text(aes(pCO2, tcant, label = year), nudge_x = -2, nudge_y = 3) +
scale_color_highcontrast(name = "Data source") +
scale_fill_highcontrast(name = "Data source") +
scale_y_continuous(limits = c(tcant_min, tcant_max)) +
labs(
x = expression(Atmospheric ~ pCO[2] ~ (µatm)),
y = expression(Cumulative ~ ocean ~ carbon ~ storage ~ (PgC))
) +
guides(colour = guide_legend(order = 1),
fill = "none") +
theme_classic() +
theme(
legend.background = element_rect(fill = "transparent"),
legend.position = c(0.25, 0.83),
legend.title = element_blank(),
legend.box.just = "top",
legend.box = "horizontal",
legend.key.size = unit(2.5, 'lines'),
panel.grid.major.y = element_line(colour = "black",
size = 0.1)
)
p_tcant_ts_zoom
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
91052ae | jens-daniel-mueller | 2022-10-20 |
p_tcant_ts_zoom + p_tcant_box_10 +
plot_layout(ncol = 2, widths = c(6,1.8))
Version | Author | Date |
---|---|---|
1dad51a | jens-daniel-mueller | 2022-11-15 |
375300e | jens-daniel-mueller | 2022-11-14 |
ebc85e2 | jens-daniel-mueller | 2022-11-14 |
6edad9b | jens-daniel-mueller | 2022-11-11 |
16beb51 | jens-daniel-mueller | 2022-11-08 |
b92657d | jens-daniel-mueller | 2022-11-08 |
7275091 | jens-daniel-mueller | 2022-11-05 |
99610ed | jens-daniel-mueller | 2022-11-01 |
7060801 | jens-daniel-mueller | 2022-10-31 |
ecb84c1 | jens-daniel-mueller | 2022-10-30 |
2345935 | jens-daniel-mueller | 2022-10-29 |
0b40366 | jens-daniel-mueller | 2022-10-26 |
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/publication"),
filename = "Fig_dcant_inventory_global_vs_GCB_ocean_sink.png",
height = 6,
width = 9)
delta_revelle <- co2_atm %>%
mutate(revelle = seacarb::buffer(24,
pCO2,
2300 * 1e-6)$BetaD,
DIC = seacarb::carb(24,
pCO2,
2300 * 1e-6)$DIC,
delta_DIC = (1/pCO2) * DIC * (1/revelle) *1e6,
delta_DIC_rel = delta_DIC / mean(delta_DIC),
delta_DIC_rel_cum = delta_DIC_rel - first(delta_DIC_rel),
delta_year = year - first(year))
delta_revelle %>%
ggplot(aes(delta_year, pCO2)) +
geom_path() +
geom_point()
delta_revelle %>%
ggplot(aes(delta_year,1/revelle)) +
geom_smooth(method = "lm", aes(col="lm"), se = FALSE) +
geom_path() +
geom_point()
Version | Author | Date |
---|---|---|
084a41c | jens-daniel-mueller | 2022-10-13 |
delta_revelle %>%
ggplot(aes(delta_year,delta_DIC_rel)) +
geom_smooth(method = "lm", aes(col="lm"), se = FALSE) +
geom_path() +
geom_point()
Version | Author | Date |
---|---|---|
084a41c | jens-daniel-mueller | 2022-10-13 |
delta_revelle %>%
ggplot(aes(delta_year,delta_DIC_rel_cum)) +
geom_smooth(method = "lm", aes(col="lm"), se = FALSE) +
geom_path() +
geom_point()
Version | Author | Date |
---|---|---|
084a41c | jens-daniel-mueller | 2022-10-13 |
min(delta_revelle$delta_DIC_rel_cum / max(delta_revelle$delta_year))
[1] -0.006078176
flux_label <- expression(CO[2]~flux~(PgC~yr^{-1}))
flux_components <- Global_Carbon_Budget %>%
distinct(estimate) %>%
pull()
emission_components <- flux_components[c(1,2,6)]
sink_components <- flux_components[3:5]
estimates <- Global_Carbon_Budget %>%
select(-GtC) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr) %>%
mutate(`fossil emissions` =
`fossil emissions excluding carbonation` - `cement carbonation sink`) %>%
select(-c(`fossil emissions excluding carbonation`, `cement carbonation sink`)) %>%
pivot_longer(-year,
names_to = "estimate",
values_to = "GtC_yr")
estimates <- estimates %>%
filter(!(estimate %in% c("budget imbalance")),
year >= 1960) %>%
mutate(
sign = if_else(estimate %in% sink_components,
"sinks",
"emissions"),
GtC_yr = if_else(sign == "sinks",
-GtC_yr,
GtC_yr)
# GtC_yr = if_else(estimate == "cement carbonation sink",
# -GtC_yr,
# GtC_yr)
)
emissions_sinks <- estimates %>%
group_by(year, sign) %>%
summarise(GtC_yr = sum(GtC_yr)) %>%
ungroup()
estimates %>% distinct(estimate) %>% pull()
[1] "land-use change emissions" "atmospheric growth"
[3] "ocean sink" "land sink"
[5] "fossil emissions"
p_stacked_fluxes <- estimates %>%
mutate(
estimate = fct_relevel(
estimate,
"fossil emissions",
"land-use change emissions",
"atmospheric growth",
"land sink",
"ocean sink"
)
) %>%
ggplot() +
geom_area(aes(year, GtC_yr, fill = estimate),
col = "black",
alpha = 0.7,
size = 0.5) +
# geom_line(data = emissions_sinks %>% mutate(GtC_yr = if_else(sign == "emissions",
# -GtC_yr,
# GtC_yr)),
# aes(year, GtC_yr, linetype = sign)) +
scale_fill_manual(values = c("#BBBBBB", "#CCBB44", "#66CCEE", "#228833", "#4477AA"),
name = "flux component") +
geom_hline(yintercept = 0) +
scale_x_continuous(expand = c(0,0)) +
labs(y = flux_label,
title = "Carbon emissions and sinks",
subtitle = "Global Carbon Budget | Friedlingstein et al. (2021)") +
theme(axis.title.x = element_blank())
p_stacked_fluxes
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_GCB_emissions_sinks.png",
height = 4,
width = 7)
p_individual_fluxes <- estimates %>%
ggplot(aes(year, GtC_yr, col = estimate)) +
geom_hline(yintercept = 0) +
geom_path() +
geom_point(size = 0.5) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_bright(name = "flux component") +
labs(y = flux_label,
title = "Individual flux components from GCB") +
theme(axis.title.x = element_blank())
p_individual_fluxes
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
BIM <- emissions_sinks %>%
pivot_wider(names_from = sign,
values_from = GtC_yr) %>%
mutate(BIM = emissions + sinks)
p_BIM <- ggplot() +
geom_line(data = Global_Carbon_Budget %>%
filter(estimate == "budget imbalance",
year >= 1990),
aes(year, GtC_yr, col = "reported")) +
geom_line(data = BIM, aes(year, BIM, col = "recalculated")) +
geom_hline(yintercept = 0) +
scale_color_brewer(palette = "Set1") +
scale_x_continuous(expand = c(0, 0)) +
labs(y = flux_label,
title = "BIM from GCB") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_BIM
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
p_land_sink_gcb <- estimates %>%
select(year, estimate, GtC_yr) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr) %>%
mutate(`land sink residual` =
`fossil emissions` +
`land-use change emissions` +
`atmospheric growth` +
`ocean sink`) %>%
ggplot() +
geom_line(aes(year, -`land sink residual`, col = "residual")) +
geom_line(aes(year, `land sink`, col = "reported")) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1", name = "land sink\nestimate") +
labs(y = flux_label,
title = "Land sink estimates from GCB",
subtitle = "Note: The offset between reported and residual estimate equals BIM") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_land_sink_gcb
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
Ocean_Sink_annual_mean <- Ocean_Sink %>%
filter(year >= 1990) %>%
group_by(year, type) %>%
summarise(GtC_yr = -mean(GtC_yr)) %>%
ungroup()
Ocean_Sink_annual_mean <- Ocean_Sink_annual_mean %>%
pivot_wider(names_from = type,
values_from = GtC_yr,
names_prefix = "ocean_sink_")
estimates_wide <- estimates %>%
select(year, estimate, GtC_yr) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr)
estimates_wide <-
full_join(estimates_wide, Ocean_Sink_annual_mean)
dcant_interior <- tcant_ts_zoom %>%
filter(year > 2000) %>%
mutate(dcant_mean = dcant_mean/10) %>%
pull(dcant_mean)
cnat <-
dcant_type_significance %>%
filter(type == "Observation-based\nsurface flux\nproducts" ,
period %in% two_decades) %>%
mutate(dcant_diff = dcant_diff/10) %>%
pull(dcant_diff)
estimates_wide <- estimates_wide %>%
mutate(ocean_sink_interior_Cant = case_when(
between(year, 1994, 2003) ~ -dcant_interior[1],
between(year, 2004, 2013) ~ -dcant_interior[2],
TRUE ~ NaN
)) %>%
mutate(ocean_sink_interior_net = case_when(
between(year, 1994, 2003) ~ -dcant_interior[1]-cnat[1],
between(year, 2004, 2013) ~ -dcant_interior[2]-cnat[2],
TRUE ~ NaN
))
p_ocean_sinks <- estimates_wide %>%
select(year, starts_with("ocean")) %>%
rename(GCB_mean = `ocean sink`) %>%
pivot_longer(-year,
names_to = "estimate",
names_prefix = "ocean_sink_",
values_to = "GtC_yr") %>%
mutate(estimate = str_replace(estimate, "_", " ")) %>%
ggplot(aes(year, GtC_yr, col = estimate)) +
geom_path() +
geom_point(size = 0.5) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1", name = "ocean sink\nestimate") +
labs(y = flux_label,
title = "Ocean sink estimates",
subtitle = "Note: Watson et al. (2020) is included in data products and GCB mean") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_ocean_sinks
estimates_long <- estimates_wide %>%
select(year, starts_with("ocean")) %>%
rename(GCB_mean = `ocean sink`) %>%
pivot_longer(-year,
names_to = "estimate",
names_prefix = "ocean_sink_",
values_to = "GtC_yr") %>%
filter(estimate %in% c("data_products", "models"),
year >= 1990)
p_ocean_sinks_presentation <- estimates_long %>%
# mutate(estimate = str_replace(estimate, "_", " ")) %>%
ggplot() +
geom_path(data = Ocean_Sink %>% filter(year >= 1990),
aes(year, GtC_yr, group = product, col = type), size = 0.3) +
geom_path(aes(year, -GtC_yr, col = estimate), size = 2) +
geom_point(aes(year, -GtC_yr, col = estimate), size = 2, fill = "white", shape = 21) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_manual(values = c("#BB5566", "#DDAA33"),
name = "ocean sink\nestimate") +
labs(y = flux_label,
title = "Ocean Carbon sink",
subtitle = "Global Carbon Budget | Friedlingstein et al. (2021)") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_ocean_sinks_presentation
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_GCB_ocean_sinks.png",
height = 4,
width = 6)
p_ocean_sinks_presentation <-
estimates_long %>%
# mutate(estimate = str_replace(estimate, "_", " ")) %>%
ggplot() +
geom_path(
data = Ocean_Sink %>% filter(year >= 1990),
aes(year, GtC_yr, group = product, col = type),
size = 0.3
) +
geom_path(aes(year, -GtC_yr, col = estimate), size = 2) +
geom_point(
aes(year, -GtC_yr, col = estimate),
size = 2,
fill = "white",
shape = 21
) +
geom_path(
data = tibble(
year = c(1994, 2007),
estimate = "ocean_interior",
GtC_yr = -2.6
),
aes(year, -GtC_yr, col = estimate),
size = 2
)+
geom_rect(
data = tibble(
year_min = 1994,
year_max = 2007,
estimate = "ocean_interior",
GtC_yr_min = -2.6 - 0.3,
GtC_yr_max = -2.6 + 0.3,
),
aes(xmax = year_max, xmin = year_min, ymin = -GtC_yr_min, ymax = -GtC_yr_max, col = estimate),
fill = "transparent"
)+
scale_x_continuous(expand = c(0, 0)) +
scale_color_manual(values = c("#BB5566", "#DDAA33","#004488"),
name = "ocean sink\nestimate") +
labs(y = flux_label,
title = "Ocean Carbon sink",
subtitle = "Global Carbon Budget | Friedlingstein et al. (2021)") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_ocean_sinks_presentation
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
ggsave(path = here::here("output/presentation"),
filename = "Fig_GCB_ocean_sinks_eMLR.png",
height = 4,
width = 6)
land_sink <-
estimates_wide %>%
mutate(emissions_atmosphere = `fossil emissions` +
`land-use change emissions` +
`atmospheric growth`) %>%
rename(ocean_sink_gcb_mean = `ocean sink`) %>%
select(year, emissions_atmosphere, starts_with("ocean")) %>%
pivot_longer(
starts_with("ocean_sink"),
names_to = "ocean_sink_estimate",
values_to = "ocean_sink",
names_prefix = "ocean_sink_"
) %>%
mutate(land_sink = -emissions_atmosphere - ocean_sink)
p_land_sink_residual <- land_sink %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_line(aes(year, land_sink, col = ocean_sink_estimate, linetype = "residual")) +
geom_line(data = estimates_wide %>%
filter(year >= 1990),
aes(year, `land sink`, linetype = "reported")) +
scale_x_continuous(expand = c(0, 0)) +
scale_linetype_manual(values = c(2, 1), name = "land sink\nestimate") +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
guides(linetype = guide_legend(order = 1),
color = guide_legend(order = 2)) +
labs(y = flux_label,
title = "Land sink estimates",
subtitle = "Note: Residuals are determined for a range of ocean sink estimates") +
theme(axis.title.x = element_blank())
p_land_sink_residual
land_sink <-
full_join(
land_sink,
estimates_wide %>%
select(year, land_sink_reported = `land sink`)
)
p_land_sink_residual_delta <- land_sink %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_hline(yintercept = 0) +
geom_line(aes(year, land_sink - land_sink_reported, col = ocean_sink_estimate)) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
labs(y = flux_label,
title = "Land sink estimates (reported - residual)",
subtitle = "Note: Residuals are determined for a range of ocean sink estimates") +
theme(axis.title.x = element_blank())
p_land_sink_residual_delta
p_land_sink_residual_decade <- land_sink %>%
mutate(period = cut(year, c(1993, 2003, 2013),
c("1994 - 2004", "2004 - 2014"))) %>%
filter(!is.na(period)) %>%
group_by(ocean_sink_estimate, period) %>%
summarise(across(starts_with("land_sink"), list(mean = mean, sd = sd))) %>%
ungroup() %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_pointrange(
aes(
period,
land_sink_reported_mean,
ymin = land_sink_reported_mean - land_sink_reported_sd,
ymax = land_sink_reported_mean + land_sink_reported_sd,
shape = "reported"
),
position = position_dodge2(width = 0.6)
) +
geom_pointrange(
aes(
period,
land_sink_mean,
ymin = land_sink_mean - land_sink_sd,
ymax = land_sink_mean + land_sink_sd,
col = ocean_sink_estimate,
shape = "residual"
),
position = position_dodge2(width = 0.5)
) +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
scale_shape_manual(values = c(17, 16), name = "land sink\nestimate") +
guides(shape = guide_legend(order = 1),
color = guide_legend(order = 2)) +
theme(axis.title.x = element_blank()) +
labs(y = flux_label,
title = "Decadal mean land sink estimates",
subtitle = "Note: Errorbars indicate the StDev of the IAV") +
theme(axis.title.x = element_blank())
p_land_sink_residual_decade
pdf(
file = here::here("output/publication/GCB_land_sink_residual.pdf"),
height = 6,
width = 9
)
p_stacked_fluxes
p_individual_fluxes
p_BIM
p_land_sink_gcb
p_ocean_sinks
p_land_sink_residual
p_land_sink_residual_delta
p_land_sink_residual_decade
dev.off()
png
2
rm(
p_stacked_fluxes,
p_individual_fluxes,
p_BIM,
p_land_sink_gcb,
p_ocean_sinks,
p_land_sink_residual,
p_land_sink_residual_delta,
p_land_sink_residual_decade,
estimates,
estimates_wide,
land_sink,
Ocean_Sink_annual_mean,
flux_components,
flux_label,
emission_components,
sink_components
)
flux_label <- expression(flux~(PgC~yr^{-1}))
Global_Carbon_Budget_net_land_sink <- Global_Carbon_Budget %>%
select(year, estimate, GtC_yr) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr) %>%
mutate(`net land sink` = `land sink` - `land-use change emissions`) %>%
select(-c(`land sink`, `land-use change emissions`)) %>%
pivot_longer(-year,
names_to = "estimate",
values_to = "GtC_yr")
flux_components <- Global_Carbon_Budget_net_land_sink %>%
distinct(estimate) %>%
pull()
emission_components <- flux_components[c(1,4)]
sink_components <- flux_components[c(2,3,6)]
estimates <- Global_Carbon_Budget_net_land_sink %>%
filter(!(estimate %in% c("budget imbalance")),
year >= 1990) %>%
mutate(
sign = if_else(estimate %in% sink_components,
"sinks",
"emissions"),
GtC_yr = if_else(sign == "sinks",
-GtC_yr,
GtC_yr),
GtC_yr = if_else(estimate == "cement carbonation sink",
-GtC_yr,
GtC_yr)
)
emissions_sinks <- estimates %>%
group_by(year, sign) %>%
summarise(GtC_yr = sum(GtC_yr)) %>%
ungroup()
p_stacked_fluxes <- estimates %>%
ggplot() +
geom_area(aes(year, GtC_yr, fill = estimate),
col = "white",
alpha = 0.7,
size = 0.5) +
geom_line(data = emissions_sinks %>% mutate(GtC_yr = if_else(sign == "emissions",
-GtC_yr,
GtC_yr)),
aes(year, GtC_yr, linetype = sign)) +
scale_fill_bright(name = "flux component") +
geom_hline(yintercept = 0) +
scale_x_continuous(expand = c(0,0)) +
labs(y = flux_label,
title = "Stacked emission and sink components from GCB",
subtitle = "Note: The cement carbonation sink is accounted for in emissions") +
theme(axis.title.x = element_blank())
p_stacked_fluxes
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
p_individual_fluxes <- estimates %>%
ggplot(aes(year, GtC_yr, col = estimate)) +
geom_hline(yintercept = 0) +
geom_path() +
geom_point(size = 0.5) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_bright(name = "flux component") +
labs(y = flux_label,
title = "Individual flux components from GCB") +
theme(axis.title.x = element_blank())
p_individual_fluxes
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
BIM <- emissions_sinks %>%
pivot_wider(names_from = sign,
values_from = GtC_yr) %>%
mutate(BIM = emissions + sinks)
p_BIM <- ggplot() +
geom_line(data = Global_Carbon_Budget %>%
filter(estimate == "budget imbalance",
year >= 1990),
aes(year, GtC_yr, col = "reported")) +
geom_line(data = BIM, aes(year, BIM, col = "recalculated")) +
geom_hline(yintercept = 0) +
scale_color_brewer(palette = "Set1") +
scale_x_continuous(expand = c(0, 0)) +
labs(y = flux_label,
title = "BIM from GCB") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_BIM
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
p_land_sink_gcb <- estimates %>%
select(year, estimate, GtC_yr) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr) %>%
mutate(`net land sink residual` =
`fossil emissions excluding carbonation` +
`cement carbonation sink` +
`atmospheric growth` +
`ocean sink`) %>%
ggplot() +
geom_line(aes(year, -`net land sink residual`, col = "residual")) +
geom_line(aes(year, `net land sink`, col = "reported")) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1", name = "land sink\nestimate") +
labs(y = flux_label,
title = "Land sink estimates from GCB",
subtitle = "Note: The offset between reported and residual estimate equals BIM") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_land_sink_gcb
Version | Author | Date |
---|---|---|
91052ae | jens-daniel-mueller | 2022-10-20 |
Ocean_Sink_annual_mean <- Ocean_Sink %>%
filter(year >= 1990) %>%
group_by(year, type) %>%
summarise(GtC_yr = -mean(GtC_yr)) %>%
ungroup()
Ocean_Sink_annual_mean <- Ocean_Sink_annual_mean %>%
pivot_wider(names_from = type,
values_from = GtC_yr,
names_prefix = "ocean_sink_")
estimates_wide <- estimates %>%
select(year, estimate, GtC_yr) %>%
pivot_wider(names_from = estimate,
values_from = GtC_yr)
estimates_wide <-
full_join(estimates_wide, Ocean_Sink_annual_mean)
dcant_interior <- tcant_ts_zoom %>%
filter(year > 2000) %>%
mutate(dcant_mean = dcant_mean/10) %>%
pull(dcant_mean)
cnat <-
dcant_type_significance %>%
filter(type == "Observation-based\nsurface flux\nproducts" ,
period %in% two_decades) %>%
mutate(dcant_diff = dcant_diff/10) %>%
pull(dcant_diff)
estimates_wide <- estimates_wide %>%
mutate(ocean_sink_interior_Cant = case_when(
between(year, 1994, 2003) ~ -dcant_interior[1],
between(year, 2004, 2013) ~ -dcant_interior[2],
TRUE ~ NaN
)) %>%
mutate(ocean_sink_interior_net = case_when(
between(year, 1994, 2003) ~ -dcant_interior[1]-cnat[1],
between(year, 2004, 2013) ~ -dcant_interior[2]-cnat[2],
TRUE ~ NaN
))
p_ocean_sinks <- estimates_wide %>%
select(year, starts_with("ocean")) %>%
rename(GCB_mean = `ocean sink`) %>%
pivot_longer(-year,
names_to = "estimate",
names_prefix = "ocean_sink_",
values_to = "GtC_yr") %>%
mutate(estimate = str_replace(estimate, "_", " ")) %>%
ggplot(aes(year, GtC_yr, col = estimate)) +
geom_path() +
geom_point(size = 0.5) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1", name = "ocean sink\nestimate") +
labs(y = flux_label,
title = "Ocean sink estimates",
subtitle = "Note: Watson et al. (2020) is included in data products and GCB mean") +
theme(axis.title.x = element_blank(),
legend.title = element_blank())
p_ocean_sinks
land_sink <-
estimates_wide %>%
mutate(emissions_atmosphere = `fossil emissions excluding carbonation` +
`atmospheric growth`) %>%
rename(ocean_sink_gcb_mean = `ocean sink`) %>%
select(year, emissions_atmosphere, starts_with("ocean")) %>%
pivot_longer(
starts_with("ocean_sink"),
names_to = "ocean_sink_estimate",
values_to = "ocean_sink",
names_prefix = "ocean_sink_"
) %>%
mutate(net_land_sink = -emissions_atmosphere - ocean_sink)
p_land_sink_residual <- land_sink %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_line(aes(year, net_land_sink, col = ocean_sink_estimate, linetype = "residual")) +
geom_line(data = estimates_wide %>%
filter(year >= 1990),
aes(year, `net land sink`, linetype = "reported")) +
scale_x_continuous(expand = c(0, 0)) +
scale_linetype_manual(values = c(2, 1), name = "net land sink\nestimate") +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
guides(linetype = guide_legend(order = 1),
color = guide_legend(order = 2)) +
labs(y = flux_label,
title = "Net land sink estimates",
subtitle = "Note: Residuals are determined for a range of ocean sink estimates") +
theme(axis.title.x = element_blank())
p_land_sink_residual
land_sink <-
full_join(
land_sink,
estimates_wide %>%
select(year, net_land_sink_reported = `net land sink`)
)
p_land_sink_residual_delta <- land_sink %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_hline(yintercept = 0) +
geom_line(aes(year, net_land_sink - net_land_sink_reported, col = ocean_sink_estimate)) +
scale_x_continuous(expand = c(0, 0)) +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
labs(y = flux_label,
title = "Let land sink estimates (reported - residual)",
subtitle = "Note: Residuals are determined for a range of ocean sink estimates") +
theme(axis.title.x = element_blank())
p_land_sink_residual_delta
p_land_sink_residual_decade <- land_sink %>%
mutate(period = cut(year, c(1993, 2003, 2013),
c("1994 - 2004", "2004 - 2014"))) %>%
filter(!is.na(period)) %>%
group_by(ocean_sink_estimate, period) %>%
summarise(across(starts_with("net_land_sink"), list(mean = mean, sd = sd))) %>%
ungroup() %>%
mutate(ocean_sink_estimate =
str_replace(ocean_sink_estimate, "_", " ")) %>%
ggplot() +
geom_pointrange(
aes(
period,
net_land_sink_reported_mean,
ymin = net_land_sink_reported_mean - net_land_sink_reported_sd,
ymax = net_land_sink_reported_mean + net_land_sink_reported_sd,
shape = "reported"
),
position = position_dodge2(width = 0.6)
) +
geom_pointrange(
aes(
period,
net_land_sink_mean,
ymin = net_land_sink_mean - net_land_sink_sd,
ymax = net_land_sink_mean + net_land_sink_sd,
col = ocean_sink_estimate,
shape = "residual"
),
position = position_dodge2(width = 0.5)
) +
scale_color_brewer(palette = "Set1",
name = "ocean sink\nestimate\nunderlying\nresidual") +
scale_shape_manual(values = c(17, 16), name = "land sink\nestimate") +
guides(shape = guide_legend(order = 1),
color = guide_legend(order = 2)) +
theme(axis.title.x = element_blank()) +
labs(y = flux_label,
title = "Decadal mean land sink estimates",
subtitle = "Note: Errorbars indicate the StDev of the IAV") +
theme(axis.title.x = element_blank())
p_land_sink_residual_decade
pdf(
file = here::here("output/publication/GCB_net_land_sink_residual.pdf"),
height = 6,
width = 9
)
p_stacked_fluxes
p_individual_fluxes
p_BIM
p_land_sink_gcb
p_ocean_sinks
p_land_sink_residual
p_land_sink_residual_delta
p_land_sink_residual_decade
dev.off()
png
2
rm(
p_stacked_fluxes,
p_individual_fluxes,
p_BIM,
p_land_sink_gcb,
p_ocean_sinks,
p_land_sink_residual,
p_land_sink_residual_delta,
p_land_sink_residual_decade,
estimates,
estimates_wide,
land_sink,
Ocean_Sink_annual_mean,
flux_components,
flux_label,
emission_components,
sink_components
)
GCB_Cant_emissions <- Global_Carbon_Budget %>%
mutate(year = cut(year, c(1994, 2004, 2014), c("2004", "2014")),
year = as.numeric(as.character(year))) %>%
drop_na() %>%
filter(estimate %in% c(
"fossil emissions excluding carbonation",
"land-use change emissions"
)) %>%
group_by(year) %>%
summarise(cant_emissions = sum(GtC_yr)) %>%
ungroup()
left_join(GCB_Cant_emissions,
tcant_ts_zoom) %>%
mutate(
dcant_per_emission = 100 * dcant_mean / cant_emissions,
dcant_per_emission_sd = 100 * dcant_sd / cant_emissions
) %>%
kable() %>%
kable_styling() %>%
scroll_box(height = "300px")
year | cant_emissions | dcant_mean | dcant_sd | dcant_sd_int | pCO2 | tcant | tcant_sd | dcant_per_emission | dcant_per_emission_sd |
---|---|---|---|---|---|---|---|---|---|
2004 | 82.66365 | 29.27668 | 5.258325 | 5.258325 | 376.95 | 29.27668 | 19.71421 | 35.41663 | 6.361110 |
2014 | 101.81399 | 27.34720 | 7.099788 | 4.770430 | 397.34 | 56.62388 | 20.28317 | 26.85997 | 6.973293 |
breaks <- c(-Inf, seq(0, 16, 2), Inf)
legend_title <- expression(atop(Delta * C["ant"],
(mol ~ m ^ {
-2
})))
breaks_n <- length(breaks) - 1
dcant_inv_all_color_test <- dcant_inv_all %>%
filter(data_source %in% c("obs"),
period == "2004 - 2014") %>%
mutate(dcant_int = cut(dcant,
breaks,
right = FALSE))
scico_continous_palettes <- c(
"acton",
"bamako",
"batlow",
"bilbao",
"buda",
"davos",
"devon",
"grayC",
"hawaii",
"imola",
"lajolla",
"lapaz",
"nuuk",
"oslo",
"tokyo",
"turku"
)
p_test_scico <- function(df, i_palette) {
p_reg <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_scico_d(
palette = i_palette,
drop = FALSE,
name = legend_title,
guide = "none"
) +
labs(title = i_palette) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_rev <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_scico_d(
palette = i_palette,
drop = FALSE,
name = legend_title,
direction = -1,
guide = "none"
) +
labs(title = paste(i_palette, "rev")) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_comb <- p_reg / p_rev
return(p_comb)
}
all_plots_scico <- scico_continous_palettes %>%
# head(1) %>%
map(~p_test_scico(df = dcant_inv_all_color_test,
i_palette = .x))
viridis_continous_palettes <- c(
"viridis",
"magma",
"inferno",
"plasma"
)
p_test_viridis <- function(df, i_palette) {
p_reg <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_viridis_d(
option = i_palette,
drop = FALSE,
name = legend_title,
guide = "none"
) +
labs(title = i_palette) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_rev <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_viridis_d(
option = i_palette,
drop = FALSE,
name = legend_title,
direction = -1,
guide = "none"
) +
labs(title = paste(i_palette, "rev")) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_comb <- p_reg / p_rev
return(p_comb)
}
all_plots_viridis <- viridis_continous_palettes %>%
# head(1) %>%
map(~p_test_viridis(df = dcant_inv_all_color_test,
i_palette = .x))
library(colorspace)
colorspace_continous_palettes <- c(
# "Purple - Blue",
# "Red - Purple",
# "Blue - Yellow",
# "Heat",
# "Heat 2",
"Rocket"
# "Mako",
# "Dark",
# "Mint",
# "Mint",
# "BluGrn",
# "Teal",
# "Sunset",
# "SunsetDark",
# "ag_Sunset",
# "YlOrRd",
# "YlGnBu",
# "RdPu"
)
p_test_colorspace <- function(df, i_palette) {
i_palette <<- i_palette
p_reg <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_discrete_sequential(
palette = i_palette,
drop = FALSE,
name = legend_title,
guide = "none"
) +
labs(title = i_palette) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_rev <- map +
geom_raster(data = df,
aes(lon, lat, fill = dcant_int)) +
scale_fill_discrete_sequential(
palette = i_palette,
drop = FALSE,
name = legend_title,
rev = FALSE,
guide = "none"
) +
labs(title = paste(i_palette, "rev")) +
theme(axis.text = element_blank(),
axis.ticks = element_blank())
p_comb <- p_reg / p_rev
return(p_comb)
rm(i_palette)
}
all_plots_colorspace <- colorspace_continous_palettes %>%
# head(2) %>%
map(~p_test_colorspace(df = dcant_inv_all_color_test,
i_palette = .x))
all_plots_colorspace
all_plots <- c(all_plots_colorspace, all_plots_viridis, all_plots_scico)
pdf(here::here("output/publication/test_color_scales.pdf"),
width = 4, height = 4)
all_plots
dev.off()
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: openSUSE Leap 15.3
Matrix products: default
BLAS: /usr/local/R-4.1.2/lib64/R/lib/libRblas.so
LAPACK: /usr/local/R-4.1.2/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggpattern_1.0.0 ggh4x_0.2.1 khroma_1.9.0 BSDA_1.2.1
[5] lattice_0.20-45 kableExtra_1.3.4 ggdist_3.1.1 ggalluvial_0.12.3
[9] geomtextpath_0.1.0 colorspace_2.0-2 marelac_2.1.10 shape_1.4.6
[13] ggforce_0.3.3 metR_0.11.0 scico_1.3.0 patchwork_1.1.1
[17] collapse_1.7.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.7
[21] purrr_0.3.4 readr_2.1.1 tidyr_1.1.4 tibble_3.1.6
[25] ggplot2_3.3.5 tidyverse_1.3.1 workflowr_1.7.0
loaded via a namespace (and not attached):
[1] ellipsis_0.3.2 class_7.3-20 rprojroot_2.0.2
[4] fs_1.5.2 rstudioapi_0.13 proxy_0.4-26
[7] farver_2.1.0 bit64_4.0.5 fansi_1.0.2
[10] lubridate_1.8.0 xml2_1.3.3 splines_4.1.2
[13] cachem_1.0.6 knitr_1.37 polyclip_1.10-0
[16] jsonlite_1.7.3 gsw_1.0-6 broom_0.7.11
[19] dbplyr_2.1.1 compiler_4.1.2 httr_1.4.2
[22] backports_1.4.1 Matrix_1.4-0 assertthat_0.2.1
[25] fastmap_1.1.0 cli_3.1.1 later_1.3.0
[28] tweenr_1.0.2 htmltools_0.5.2 tools_4.1.2
[31] gtable_0.3.0 glue_1.6.0 Rcpp_1.0.8
[34] cellranger_1.1.0 jquerylib_0.1.4 vctrs_0.3.8
[37] nlme_3.1-155 svglite_2.0.0 xfun_0.29
[40] ps_1.6.0 rvest_1.0.2 lifecycle_1.0.1
[43] oce_1.5-0 zoo_1.8-9 getPass_0.2-2
[46] MASS_7.3-55 scales_1.1.1 vroom_1.5.7
[49] hms_1.1.1 promises_1.2.0.1 parallel_4.1.2
[52] RColorBrewer_1.1-2 yaml_2.2.1 memoise_2.0.1
[55] sass_0.4.0 stringi_1.7.6 highr_0.9
[58] e1071_1.7-9 checkmate_2.0.0 rlang_1.0.2
[61] pkgconfig_2.0.3 systemfonts_1.0.3 distributional_0.3.0
[64] evaluate_0.14 SolveSAPHE_2.1.0 labeling_0.4.2
[67] bit_4.0.4 processx_3.5.2 tidyselect_1.1.1
[70] here_1.0.1 plyr_1.8.6 seacarb_3.3.0
[73] magrittr_2.0.1 R6_2.5.1 generics_0.1.1
[76] DBI_1.1.2 mgcv_1.8-38 pillar_1.6.4
[79] haven_2.4.3 whisker_0.4 withr_2.4.3
[82] modelr_0.1.8 crayon_1.4.2 utf8_1.2.2
[85] tzdb_0.2.0 rmarkdown_2.11 isoband_0.2.5
[88] grid_4.1.2 readxl_1.3.1 data.table_1.14.2
[91] callr_3.7.0 git2r_0.29.0 reprex_2.0.1
[94] digest_0.6.29 webshot_0.5.2 httpuv_1.6.5
[97] textshaping_0.3.6 munsell_0.5.0 viridisLite_0.4.0
[100] bslib_0.3.1