Case studies with seacarb
Requirements
R - https://cran.r-project.org/
Rstudio - https://www.rstudio.com/products/rstudio/download/#download
Start R or Rstudio
Install packages seacarb, ggplot2 and dplyr
Download the datasets: https://drive.google.com/open?id=1inOpVRuOAhOVrjRR8ej7_0l5Gco0niat&authuser=fgazeau%40gmail.com&usp=drive_fs
Set the working directory where the datasets are: setwd(“my path”)
Case study #1
Exercise
We are conducting an experiment in our lab during 7 days, and we have recorded pH and total alkalinity during Day 1, 3 and 7. This experiment is focused on evaluating the effect of ocean acidification on the physiological traits of the copepod Acartia tonsa and was conducted at a temperature of 25 \(^\circ\)C. We have considered two different levels of pCO2, 400 and 1200 \(\mu\)atm. We need to check if obtained pCO2 levels are in agreement with our experimental setup. Our lab assistant measured pHT and AT (in \(\mu\)mol kg-1). Please, consider the following data (Dataset#1.txt) and compare the pCO2 calculated with the theoretical level we considered in our experimental setup.
| Day | Sal | pHT | AT | Sal | pHT | AT | ||
|---|---|---|---|---|---|---|---|---|
| 1 | 34.2 | 8.06 | 2376.33 | 34.2 | 7.66 | 2376.21 | ||
| 2 | 34.1 | 8.05 | 2326.24 | 34.1 | 7.65 | 2325.14 | ||
| 3 | 32.0 | 7.95 | 1800.34 | 32.0 | 7.55 | 1799.21 |
Answer
cs1 <- read.table("./Dataset#1.txt", header=TRUE)
cc_cs1 <- carb(8, cs1$pH, cs1$ALK/1000000, S=cs1$S, T=25, Patm=1, P=0, Pt=0, Sit=0,
k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential",
warn="y", eos="eos80", long=1.e20, lat=1.e20)
Results_cs1 <- cbind(cs1$Day, cs1$Treatment, cs1$S, cs1$T, cs1$pH, cs1$ALK, cc_cs1$pCO2)
kable(Results_cs1, col.names = c("Day", "Treatment", "S", "T", "pH~T~", "*A*~T~", "*p*CO~2~"), align=c('l','c', 'c', 'c','c', 'c', 'c')) %>%
kable_styling("striped")| Day | Treatment | S | T | pHT | AT | pCO2 |
|---|---|---|---|---|---|---|
| 1 | Ambient | 34.2 | 25 | 8.06 | 2376.33 | 397.553603821651 |
| 3 | Ambient | 34.1 | 25 | 8.05 | 2326.24 | 400.348675364518 |
| 7 | Ambient | 32 | 25 | 7.95 | 1800.34 | 412.899814809415 |
| 1 | LowpH | 34.2 | 25 | 7.66 | 2376.21 | 1158.47285558744 |
| 3 | LowpH | 34.1 | 25 | 7.65 | 2325.14 | 1163.00622542091 |
| 7 | LowpH | 32 | 25 | 7.55 | 1799.21 | 1167.79080379562 |
Case study #2
Exercise
We run an experiment in Monaco on coccolithophorids with two treatments in closed batch bottles that we have enriched with HCl and NaHCO3 (to acidify but to keep AT constant). Everyday during the experiment, we sacrifice a bottle and measure AT and CT as well as salinity and temperature. We report the results in a table with AT and CT being expressed in \(\mu\)mol L^-1, this table is named Dataset#2.txt.
- What was the average pCO2 for both treatments? Use the function subset() to separate your treatments.
Answer
cs2 <- read.table("./Dataset#2.txt", header=TRUE)
cc_cs2 <- carb(15, cs2$ALK/1000000/(rho(cs2$S, cs2$T, P=0)/1000), cs2$DIC/1000000/(rho(cs2$S, cs2$T, P=0)/1000), S=cs2$S, T=cs2$T, Patm=1, P=0, Pt=0, Sit=0,
k1k2="x", kf="x", ks="d", pHscale="T", b="u74", gas="potential", warn="y", eos="eos80", long=1.e20, lat=1.e20)
Results_cs2 <- data.frame(cbind(cs2$Day, cs2$Treatment, cs2$S, cs2$T, cs2$DIC, cs2$ALK, cc_cs2$pCO2))
colnames(Results_cs2) = c("Day", "Treatment", "S", "T", "CT", "AT", "pCO2")
T1_cs2 <- subset(Results_cs2, Treatment == "A")
T1_mean_pCO2 <- mean(as.numeric(T1_cs2$pCO2))
T1_std_pCO2 <- sd(as.numeric(T1_cs2$pCO2))
T2_cs2 <- subset(Results_cs2, Treatment == "B")
T2_mean_pCO2 <- mean(as.numeric(T2_cs2$pCO2))
T2_std_pCO2 <- sd(as.numeric(T2_cs2$pCO2))
print(T1_mean_pCO2)## [1] 457.3336
print(T1_std_pCO2)## [1] 26.55828
print(T2_mean_pCO2)## [1] 1782.073
print(T2_std_pCO2)## [1] 322.0461
Case study #3
Exercise
We conducted an experiment in an open-flow system with mussels. The system comprises two tanks, one non-acidified and one acidified. In these two tanks, we have continuous (every 1 h) data of voltage using a glass electrode that was calibrated at the salinity and temperature of the experiment with TRIS buffer (ETRIS = -72.4 mV). We assumed AT to be constant during the experiment and equal to 2500 \(\mu\)mol kg-1. Data are stored in the file Dataset#3.txt.
- Plot these continuous pH data as a function of time for both tanks on the total scale (red line for the acidified and blue line for the non-acidified)
Answer
cs3 <- read.table("./Dataset#3.txt", header=TRUE)
pHT_NA <- pH(Ex=cs3$mVNA,Etris=-72.4,S=cs3$S,T=cs3$T)
pHT_A <- pH(Ex=cs3$mVA,Etris=-72.4,S=cs3$S,T=cs3$T)
ggplot() +
geom_line(data = cs3, aes(x=cs3$Hour, y=pHT_NA), color="blue") +
geom_line(data = cs3, aes(x=cs3$Hour, y=pHT_A), color="red") +
xlab("Time") +
ylab("pH")Case study #4
Exercise
During the same experiment, we sampled three times and measured pH using a spectrophotometric method at 25 \(^\circ\)C. Temperature and salinity of the tanks were recorded when samples were taken. Data are stored in the file Dataset#4.txt.
- Compare these discrete values to the continuous records on the previous plot (blue dots for the non acidified, red dots for the acidified).
Answer
cs4 <- read.table("./Dataset#4.txt", header=TRUE)
pHspec_NA <- pHinsi(pH=cs4$pHspec25NA,ALK=2500/1000000,Tinsi=cs4$T,Tlab=25,Pinsi=0,S=cs4$S,Pt=0,Sit=0)
pHspec_A <- pHinsi(pH=cs4$pHspec25A,ALK=2500/1000000,Tinsi=cs4$T,Tlab=25,Pinsi=0,S=cs4$S,Pt=0,Sit=0)
ggplot() +
geom_line(data = cs3, aes(x=cs3$Hour, y=pHT_NA), color="blue") +
geom_line(data = cs3, aes(x=cs3$Hour, y=pHT_A), color="red") +
geom_point(data = cs4, aes(x=cs4$Hour, y=pHspec_NA), color="blue", size=4) +
geom_point(data = cs4, aes(x=cs4$Hour, y=pHspec_A), color="red", size=4) +
xlab("Time") +
ylab("pH")Case study #5
Exercise
For an experiment, we want to acidify a closed bottle of 1 L, initially at a pCO2 of 430 \(\mu\)atm, to reach a pHT of 7.78 and keep AT constant at 2340 \(\mu\)mol kg-1. We do not have pure CO2 to acidify and we only have access to HCl 0.1 N. Salinity is 34.5 and the bottle is kept at 22 \(^\circ\)C.
- How much HCl 0.1 N do we need to add to this 1 L bottle?
- How much did AT change?
- How much NaHCO3 should we add to compensate and increase AT to its initial level (in g)?
Answer
ppH(flag=24, sys=0, var1=430, var2=2340e-6, pCO2a=384, vol=seq(-10e-3, 0, 0.5e-3), N=0.1, S=34.5, T=22, P=0, pHscale="T", kf="pf", k1k2="l", ks="d")## comment flag S T Patm P pH CO2 fCO2
## 1 ppH-closed-initial 24 34.5 22 1 0 8.027174 1.318900e-05 428.5765
## 2 ppH-closed-final 15 34.5 22 1 0 6.132145 7.315797e-04 23772.6836
## 3 ppH-closed-final 15 34.5 22 1 0 6.177986 6.828989e-04 22190.7998
## 4 ppH-closed-final 15 34.5 22 1 0 6.225448 6.342322e-04 20609.3762
## 5 ppH-closed-final 15 34.5 22 1 0 6.274901 5.855968e-04 19028.9682
## 6 ppH-closed-final 15 34.5 22 1 0 6.326793 5.370154e-04 17450.3176
## 7 ppH-closed-final 15 34.5 22 1 0 6.381675 4.885195e-04 15874.4407
## 8 ppH-closed-final 15 34.5 22 1 0 6.440239 4.401529e-04 14302.7702
## 9 ppH-closed-final 15 34.5 22 1 0 6.503377 3.919800e-04 12737.3897
## 10 ppH-closed-final 15 34.5 22 1 0 6.572260 3.440972e-04 11181.4391
## 11 ppH-closed-final 15 34.5 22 1 0 6.648459 2.966562e-04 9639.8441
## 12 ppH-closed-final 15 34.5 22 1 0 6.734112 2.499057e-04 8120.6854
## 13 ppH-closed-final 15 34.5 22 1 0 6.832125 2.042732e-04 6637.8587
## 14 ppH-closed-final 15 34.5 22 1 0 6.946268 1.605245e-04 5216.2448
## 15 ppH-closed-final 15 34.5 22 1 0 7.080518 1.200393e-04 3900.6785
## 16 ppH-closed-final 15 34.5 22 1 0 7.235908 8.506670e-05 2764.2427
## 17 ppH-closed-final 15 34.5 22 1 0 7.404050 5.812711e-05 1888.8406
## 18 ppH-closed-final 15 34.5 22 1 0 7.566930 3.990046e-05 1296.5654
## 19 ppH-closed-final 15 34.5 22 1 0 7.710766 2.844632e-05 924.3631
## 20 ppH-closed-final 15 34.5 22 1 0 7.833107 2.122571e-05 689.7296
## 21 ppH-closed-final 15 34.5 22 1 0 7.937228 1.647497e-05 535.3543
## 22 ppH-closed-final 15 34.5 22 1 0 8.027174 1.318900e-05 428.5765
## pCO2 fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3
## 1 430.0000 428.5765 430.0000 428.5765 430.0000 0.001872607
## 2 23853.7204 23772.6836 23853.7204 23772.6836 23853.7275 0.001322716
## 3 22266.3143 22190.7998 22266.3143 22190.7998 22266.3205 0.001372153
## 4 20679.3882 20609.3762 20679.3882 20609.3762 20679.3936 0.001421531
## 5 19093.4997 19028.9682 19093.4997 19028.9682 19093.5043 0.001470822
## 6 17509.3930 17450.3176 17509.3930 17450.3176 17509.3968 0.001519989
## 7 15928.0880 15874.4407 15928.0880 15874.4407 15928.0912 0.001568978
## 8 14351.0221 14302.7702 14351.0221 14302.7702 14351.0247 0.001617718
## 9 12780.2861 12737.3897 12780.2861 12737.3897 12780.2881 0.001666100
## 10 11219.0303 11181.4391 11219.0303 11181.4391 11219.0319 0.001713964
## 11 9672.1968 9639.8441 9672.1968 9639.8441 9672.1980 0.001761056
## 12 8147.8932 8120.6854 8147.8932 8120.6854 8147.8941 0.001806960
## 13 6660.0615 6637.8587 6660.0615 6637.8587 6660.0620 0.001850962
## 14 5233.6645 5216.2448 5233.6645 5216.2448 5233.6648 0.001891777
## 15 3913.6854 3900.6785 3913.6854 3900.6785 3913.6856 0.001927091
## 16 2773.4483 2764.2427 2773.4483 2764.2427 2773.4484 0.001953118
## 17 1895.1246 1888.8406 1895.1246 1888.8406 1895.1247 0.001965575
## 18 1300.8761 1296.5654 1300.8761 1296.5654 1300.8761 0.001963216
## 19 927.4350 924.3631 927.4350 924.3631 927.4350 0.001949181
## 20 692.0212 689.7296 692.0212 689.7296 692.0212 0.001927657
## 21 537.1327 535.3543 537.1327 535.3543 537.1327 0.001901572
## 22 430.0000 428.5765 430.0000 428.5765 430.0000 0.001872607
## CO3 DIC ALK OmegaAragonite OmegaCalcite
## 1 1.907764e-04 0.002076572 0.002340000 2.99785361 4.59174957
## 2 1.715992e-06 0.002056012 0.001326733 0.02696503 0.04130176
## 3 1.978300e-06 0.002057030 0.001376919 0.03108693 0.04761520
## 4 2.286167e-06 0.002058049 0.001427156 0.03592474 0.05502517
## 5 2.650728e-06 0.002059070 0.001477442 0.04165345 0.06379971
## 6 3.087006e-06 0.002060091 0.001527778 0.04850909 0.07430036
## 7 3.615726e-06 0.002061114 0.001578164 0.05681738 0.08702600
## 8 4.266241e-06 0.002062137 0.001628600 0.06703955 0.10268308
## 9 5.081381e-06 0.002063161 0.001679086 0.07984863 0.12230247
## 10 6.125839e-06 0.002064187 0.001729622 0.09626121 0.14744128
## 11 7.501295e-06 0.002065213 0.001780209 0.11787506 0.18054677
## 12 9.374854e-06 0.002066241 0.001830846 0.14731611 0.22564099
## 13 1.203447e-05 0.002067269 0.001881533 0.18910914 0.28965451
## 14 1.599713e-05 0.002068299 0.001932271 0.25137825 0.38503080
## 15 2.219855e-05 0.002069329 0.001983059 0.34882710 0.53429116
## 16 3.217663e-05 0.002070361 0.002033898 0.50562242 0.77445127
## 17 4.769181e-05 0.002071393 0.002084788 0.74942723 1.14788198
## 18 6.931092e-05 0.002072427 0.002135729 1.08914912 1.66822689
## 19 9.583447e-05 0.002073462 0.002186720 1.50593927 2.30661563
## 20 1.256148e-04 0.002074497 0.002237762 1.97390559 3.02338983
## 21 1.574869e-04 0.002075534 0.002288856 2.47474304 3.79051207
## 22 1.907764e-04 0.002076572 0.002340000 2.99785361 4.59174957
ppH(flag=24, sys=0, var1=430, var2=2340e-6, pCO2a=384, vol=seq(-1.5e-3, -1e-3, 0.05e-3), N=0.1, S=34.5, T=22, P=0, pHscale="T", kf="pf", k1k2="l", ks="d")## comment flag S T Patm P pH CO2 fCO2
## 1 ppH-closed-initial 24 34.5 22 1 0 8.027174 1.318900e-05 428.5765
## 2 ppH-closed-final 15 34.5 22 1 0 7.710766 2.844632e-05 924.3631
## 3 ppH-closed-final 15 34.5 22 1 0 7.723934 2.757015e-05 895.8920
## 4 ppH-closed-final 15 34.5 22 1 0 7.736887 2.673332e-05 868.6992
## 5 ppH-closed-final 15 34.5 22 1 0 7.749625 2.593374e-05 842.7170
## 6 ppH-closed-final 15 34.5 22 1 0 7.762152 2.516944e-05 817.8810
## 7 ppH-closed-final 15 34.5 22 1 0 7.774473 2.443853e-05 794.1301
## 8 ppH-closed-final 15 34.5 22 1 0 7.786590 2.373923e-05 771.4062
## 9 ppH-closed-final 15 34.5 22 1 0 7.798508 2.306984e-05 749.6546
## 10 ppH-closed-final 15 34.5 22 1 0 7.810231 2.242879e-05 728.8234
## 11 ppH-closed-final 15 34.5 22 1 0 7.821762 2.181455e-05 708.8638
## 12 ppH-closed-final 15 34.5 22 1 0 7.833107 2.122571e-05 689.7296
## pCO2 fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3
## 1 430.0000 428.5765 430.0000 428.5765 430.0000 0.001872607 1.907764e-04
## 2 927.4350 924.3631 927.4350 924.3631 927.4350 0.001949181 9.583447e-05
## 3 898.8692 895.8920 898.8692 895.8920 898.8692 0.001947305 9.868985e-05
## 4 871.5860 868.6992 871.5860 868.6992 871.5860 0.001945360 1.015758e-04
## 5 845.5174 842.7170 845.5174 842.7170 845.5174 0.001943348 1.044911e-04
## 6 820.5988 817.8810 820.5988 817.8810 820.5988 0.001941272 1.074343e-04
## 7 796.7688 794.1301 796.7688 794.1301 796.7688 0.001939137 1.104041e-04
## 8 773.9694 771.4062 773.9694 771.4062 773.9694 0.001936944 1.133995e-04
## 9 752.1454 749.6546 752.1454 749.6546 752.1454 0.001934697 1.164193e-04
## 10 731.2450 728.8234 731.2450 728.8234 731.2450 0.001932399 1.194624e-04
## 11 711.2190 708.8638 711.2190 708.8638 711.2190 0.001930051 1.225279e-04
## 12 692.0212 689.7296 692.0212 689.7296 692.0212 0.001927657 1.256148e-04
## DIC ALK OmegaAragonite OmegaCalcite
## 1 0.002076572 0.002340000 2.997854 4.591750
## 2 0.002073462 0.002186720 1.505939 2.306616
## 3 0.002073565 0.002191822 1.550809 2.375341
## 4 0.002073669 0.002196924 1.596159 2.444803
## 5 0.002073772 0.002202027 1.641969 2.514969
## 6 0.002073876 0.002207131 1.688218 2.585808
## 7 0.002073979 0.002212235 1.734886 2.657289
## 8 0.002074083 0.002217339 1.781956 2.729384
## 9 0.002074187 0.002222444 1.829408 2.802067
## 10 0.002074290 0.002227550 1.877228 2.875311
## 11 0.002074394 0.002232656 1.925399 2.949093
## 12 0.002074497 0.002237762 1.973906 3.023390
ppH(flag=24, sys=0, var1=430, var2=2340e-6, pCO2a=384, vol=-1.14e-3, N=0.1, S=34.5, T=22, P=0, pHscale="T", kf="pf", k1k2="l", ks="d")## comment flag S T Patm P pH CO2 fCO2
## 1 ppH-closed-initial 24 34.5 22 1 0 8.027174 1.318900e-05 428.5765
## 2 ppH-closed-final 15 34.5 22 1 0 7.800868 2.293941e-05 745.4163
## pCO2 fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3
## 1 430.0000 428.5765 430.0000 428.5765 430.0000 0.001872607 0.0001907764
## 2 747.8931 745.4163 747.8931 745.4163 747.8931 0.001934242 0.0001170261
## DIC ALK OmegaAragonite OmegaCalcite
## 1 0.002076572 0.002340000 2.997854 4.591750
## 2 0.002074207 0.002223465 1.838944 2.816671
pTA(15, sys=0, 0.002223465, 0.002074212, pCO2a, 0, 0.00234-0.002223465, S=34.5, T=22, P=0, Pt=0, Sit=0, k1k2="x", kf="x", ks="d", pHscale="T", b="u74")## comment flag S T Patm P pH CO2 fCO2
## 1 pTA-closed-initial 15 34.5 22 1 0 7.800856 2.294013e-05 745.4396
## 2 pTA-closed-final 15 34.5 22 1 0 7.788789 2.494242e-05 810.5040
## pCO2 fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3
## 1 747.9164 745.4396 747.9164 745.4396 747.9164 0.001934249 0.0001170232
## 2 813.1972 810.5040 813.1972 810.5040 813.1972 0.002045445 0.0001203595
## DIC ALK OmegaAragonite OmegaCalcite
## 1 0.002074212 0.002223465 1.838899 2.816603
## 2 0.002190747 0.002340000 1.891325 2.896903
HCO3 <- 0.00234-0.002223465 # mol/kg
M_HCO3 <- 84.007 # g/mol
HCO3v <- HCO3 * (rho(S = 34.5, T=22)/1000)
mHCO3 <- HCO3v * M_HCO3
print(mHCO3*1000) # in mg## [1] 10.02312
## attr(,"unit")
## [1] "(kg/m3)"
Case study #6
Exercise
We conduct an experiment with two pH levels, ambient and pH 7.4 on the total scale. We can acidify by bubbling the tanks with a mixture of air + CO2 that we can regulate.
Initial conditions are:
CT = 2230 \(\mu\)mol kg-1
AT = 2550 \(\mu\)mol kg-1
T = 25 \(^\circ\)C
S = 38
At which pCO2 should we set our mixture?
Answer
pgas(flag=15, var1=2550e-6, var2=2230e-6, pCO2g=seq(500, 2500, 100), S=38, T=25, P=0, Pt=0, Sit=0, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")## comment flag S T Patm P pH CO2 fCO2 pCO2
## 1 pgas-initial 15 38 25 1 0 8.005736 1.347573e-05 482.0977 483.6412
## 2 pgas-final 24 38 25 1 0 7.993900 1.393154e-05 498.4043 500.0000
## 3 pgas-final 24 38 25 1 0 7.928220 1.671784e-05 598.0849 600.0000
## 4 pgas-final 24 38 25 1 0 7.871644 1.950414e-05 697.7655 700.0000
## 5 pgas-final 24 38 25 1 0 7.821888 2.229044e-05 797.4460 800.0000
## 6 pgas-final 24 38 25 1 0 7.777446 2.507673e-05 897.1264 900.0000
## 7 pgas-final 24 38 25 1 0 7.737267 2.786303e-05 996.8068 1000.0000
## 8 pgas-final 24 38 25 1 0 7.700589 3.064932e-05 1096.4870 1100.0000
## 9 pgas-final 24 38 25 1 0 7.666839 3.343561e-05 1196.1672 1200.0000
## 10 pgas-final 24 38 25 1 0 7.635577 3.622189e-05 1295.8474 1300.0000
## 11 pgas-final 24 38 25 1 0 7.606456 3.900818e-05 1395.5274 1400.0000
## 12 pgas-final 24 38 25 1 0 7.579198 4.179446e-05 1495.2074 1500.0000
## 13 pgas-final 24 38 25 1 0 7.553575 4.458074e-05 1594.8873 1600.0000
## 14 pgas-final 24 38 25 1 0 7.529401 4.736702e-05 1694.5672 1700.0000
## 15 pgas-final 24 38 25 1 0 7.506518 5.015330e-05 1794.2469 1800.0000
## 16 pgas-final 24 38 25 1 0 7.484794 5.293957e-05 1893.9266 1900.0000
## 17 pgas-final 24 38 25 1 0 7.464116 5.572585e-05 1993.6062 2000.0000
## 18 pgas-final 24 38 25 1 0 7.444388 5.851212e-05 2093.2858 2099.9999
## 19 pgas-final 24 38 25 1 0 7.425525 6.129839e-05 2192.9652 2199.9999
## 20 pgas-final 24 38 25 1 0 7.407454 6.408465e-05 2292.6446 2299.9999
## 21 pgas-final 24 38 25 1 0 7.390111 6.687092e-05 2392.3239 2399.9999
## 22 pgas-final 24 38 25 1 0 7.373438 6.965718e-05 2492.0032 2499.9999
## fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3
## 1 482.0977 483.6412 482.0977 483.6412 0.001984136 2.323881e-04
## 2 498.4043 500.0000 498.4043 500.0000 0.001996100 2.275039e-04
## 3 598.0849 600.0000 598.0849 600.0000 0.002059128 2.017483e-04
## 4 697.7655 700.0000 697.7655 700.0000 0.002108891 1.813864e-04
## 5 797.4460 800.0000 797.4460 800.0000 0.002149267 1.648487e-04
## 6 897.1264 900.0000 897.1264 900.0000 0.002182732 1.511309e-04
## 7 996.8068 1000.0000 996.8068 1000.0000 0.002210949 1.395573e-04
## 8 1096.4870 1100.0000 1096.4870 1100.0000 0.002235079 1.296547e-04
## 9 1196.1672 1200.0000 1196.1672 1200.0000 0.002255961 1.210814e-04
## 10 1295.8474 1300.0000 1295.8474 1300.0000 0.002274216 1.135837e-04
## 11 1395.5274 1400.0000 1395.5274 1400.0000 0.002290316 1.069692e-04
## 12 1495.2074 1500.0000 1495.2074 1500.0000 0.002304624 1.010892e-04
## 13 1594.8873 1600.0000 1594.8873 1600.0000 0.002317426 9.582700e-05
## 14 1694.5672 1700.0000 1694.5672 1700.0000 0.002328949 9.108932e-05
## 15 1794.2469 1800.0000 1794.2469 1800.0000 0.002339378 8.680099e-05
## 16 1893.9266 1900.0000 1893.9266 1900.0000 0.002348861 8.290061e-05
## 17 1993.6062 2000.0000 1993.6062 2000.0000 0.002357523 7.933755e-05
## 18 2093.2858 2100.0000 2093.2858 2099.9999 0.002365467 7.606964e-05
## 19 2192.9652 2200.0000 2192.9652 2199.9999 0.002372778 7.306151e-05
## 20 2292.6446 2300.0000 2292.6446 2299.9999 0.002379530 7.028324e-05
## 21 2392.3239 2400.0000 2392.3239 2399.9999 0.002385785 6.770934e-05
## 22 2492.0032 2500.0000 2492.0032 2499.9999 0.002391595 6.531799e-05
## DIC ALK OmegaAragonite OmegaCalcite
## 1 0.002230000 0.00255 3.607474 5.454006
## 2 0.002237535 0.00255 3.531653 5.339376
## 3 0.002277594 0.00255 3.131836 4.734908
## 4 0.002309781 0.00255 2.815749 4.257027
## 5 0.002336406 0.00255 2.559026 3.868897
## 6 0.002358940 0.00255 2.346079 3.546950
## 7 0.002378369 0.00255 2.166415 3.275323
## 8 0.002395383 0.00255 2.012693 3.042916
## 9 0.002410478 0.00255 1.879605 2.841705
## 10 0.002424022 0.00255 1.763214 2.665738
## 11 0.002436294 0.00255 1.660534 2.510500
## 12 0.002447508 0.00255 1.569257 2.372502
## 13 0.002457834 0.00255 1.487569 2.249001
## 14 0.002467406 0.00255 1.414024 2.137810
## 15 0.002476332 0.00255 1.347454 2.037166
## 16 0.002484702 0.00255 1.286906 1.945626
## 17 0.002492587 0.00255 1.231595 1.862003
## 18 0.002500049 0.00255 1.180866 1.785308
## 19 0.002507138 0.00255 1.134169 1.714709
## 20 0.002513898 0.00255 1.091041 1.649504
## 21 0.002520365 0.00255 1.051085 1.589096
## 22 0.002526570 0.00255 1.013963 1.532973
print(2300)## [1] 2300
Case study #7
Exercise
We are starting an experiment with pelagic mesocosms. We want to set two levels of pCO2: Ambient, 700, 1200 \(\mu\)atm. To acidify, we want to add CO2-saturated seawater. We measure CT and AT at the start of the experiment, as well as T, S, an concentrations of phosphate and silicate.
- CT = 2230 \(\mu\)mol kg-1
- AT = 2550 \(\mu\)mol kg-1
- T = 25 \(^\circ\)C
- S = 38
- Pt = 50 nmol kg-1
- Si = 20 \(\mu\)mol kg-1
Our mesocosms are all 30 m3 of volume.
- How much CO2-saturated seawater should I inject to each mesocosm (in liter)?
- Provide a matrix with the results
Answer
pmix(flag=15, var1=2550e-6, var2=2230e-6, pCO2s=1e6, wf=0.00282, S=38, T=25, P=0, Pt=50e-9, Sit=20e-6, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")## comment flag S T Patm P pH CO2 fCO2 pCO2
## 1 pmix-closed-initial 15 38 25 1 0 8.004518 1.351730e-05 483.5848 485.1330
## 2 pmix-closed-final 15 38 25 1 0 7.871275 1.951844e-05 698.2771 700.5132
## fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3 DIC
## 1 483.5848 485.1330 483.5848 485.1330 0.001984682 0.0002318010 0.002230000
## 2 698.2771 700.5132 698.2771 700.5132 0.002108647 0.0001812116 0.002309377
## ALK OmegaAragonite OmegaCalcite
## 1 0.00255 3.598358 5.440225
## 2 0.00255 2.813036 4.252925
pmix(flag=15, var1=2550e-6, var2=2230e-6, pCO2s=1e6, wf=0.0064, S=38, T=25, P=0, Pt=50e-9, Sit=20e-6, pHscale="T", kf="pf", k1k2="l", ks="d", b="u74")## comment flag S T Patm P pH CO2 fCO2
## 1 pmix-closed-initial 15 38 25 1 0 8.004518 1.351730e-05 483.5848
## 2 pmix-closed-final 15 38 25 1 0 7.666654 3.344578e-05 1196.5312
## pCO2 fCO2pot pCO2pot fCO2insitu pCO2insitu HCO3 CO3
## 1 485.133 483.5848 485.133 483.5848 485.133 0.001984682 0.000231801
## 2 1200.365 1196.5312 1200.365 1196.5312 1200.365 0.002255686 0.000121015
## DIC ALK OmegaAragonite OmegaCalcite
## 1 0.002230000 0.00255 3.598358 5.440225
## 2 0.002410146 0.00255 1.878574 2.840147
print(30 * 0.00282 * 1000)## [1] 84.6
print(30 * 0.0064 * 1000)## [1] 192
Case study #8
Exercise
We are starting a monitoring of carbonate chemistry off Villefranche coast. In our laboratory, we can measure pH, total alkalinity, pCO2 and dissolved inorganic carbon.
The values and precisions obtained with the different methods we use for each parameter are:
- pH: 8.01 ± 0.01
- AT: 2500 ± 5 \(\mu\)mol kg-1
- CT: 2204 ± 5 \(\mu\)mol kg-1
- pCO2: 477 ± 10 \(\mu\)atm
What is the couple allowing the best characterisation of carbonate chemistry in our system (assume a temperature of 25 \(^\circ\)C and a salinity of 35)?
Answer
pH_AT <- errors(8, 8.01, 2500/1000000, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
evar1=0.01, evar2=5/1000000, eS=0.01, eT=0.01, ePt=0, eSit=0,
epK=c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02),
eBt=0.02, method = "ga", r=0.0, runs=10000,
k1k2='x', kf='x', ks="d", pHscale="T", b="u74", gas="potential",
warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)
pH_CT <- errors(9, 8.01, 2204/1000000, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
evar1=0.01, evar2=5/1000000, eS=0.01, eT=0.01, ePt=0, eSit=0,
epK=c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02),
eBt=0.02, method = "ga", r=0.0, runs=10000,
k1k2='x', kf='x', ks="d", pHscale="T", b="u74", gas="potential",
warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)
pH_pCO2 <- errors(21, 477, 8.01, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
evar1=10, evar2=0.01, eS=0.01, eT=0.01, ePt=0, eSit=0,
epK=c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02),
eBt=0.02, method = "ga", r=0.0, runs=10000,
k1k2='x', kf='x', ks="d", pHscale="T", b="u74", gas="potential",
warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)
AT_CT <- errors(15, 2500/1000000, 2204/1000000, S=35, T=25, Patm=1, P=0, Pt=0, Sit=0,
evar1=5/1000000, evar2=5/1000000, eS=0.01, eT=0.01, ePt=0, eSit=0,
epK=c(0.002, 0.0075, 0.015, 0.01, 0.01, 0.02, 0.02),
eBt=0.02, method = "ga", r=0.0, runs=10000,
k1k2='x', kf='x', ks="d", pHscale="T", b="u74", gas="potential",
warn="y", eos = "eos80", long = 1e+20, lat = 1e+20)