Calculate the pH of seawater
Author: kegasaExecutions: 217
※ This library was created by a member. This site is not responsible for its content.
Given the partial pressure of carbon dioxide (pCO₂) and the total dissolved inorganic carbon (DIC) concentration in the atmosphere, calculate the pH of seawater.
Hp = (-K1*pCO2 - sqrt(K1^2*pCO2^2 - 4*K1*K2*pCO2*(pCO2 - DIC/K0)))/(2*(pCO2 - DIC/K0));
pH = -log(Hp);
H₂CO₃ = pCO₂ * K₀;
HCO₃⁻ = H₂CO₃ * K₁ / Hp;
CO₃²⁻ = HCO₃⁻ * K₂ / Hp;
print(Hp);
print(pH);
print(H2CO3);
print(HCO3m);
print(CO32m);
print(H2CO3*10^6);
print(HCO3m*10^6);
print(CO32m*10^6);
print(DIC*10^6);
print(H2CO3/DIC*100);
print(HCO3m/DIC*100);
print(CO32m/DIC*100);
pH = -log(Hp);
H₂CO₃ = pCO₂ * K₀;
HCO₃⁻ = H₂CO₃ * K₁ / Hp;
CO₃²⁻ = HCO₃⁻ * K₂ / Hp;
print(Hp);
print(pH);
print(H2CO3);
print(HCO3m);
print(CO32m);
print(H2CO3*10^6);
print(HCO3m*10^6);
print(CO32m*10^6);
print(DIC*10^6);
print(H2CO3/DIC*100);
print(HCO3m/DIC*100);
print(CO32m/DIC*100);
| H+ | mol/L |
| Ph | |
| H₂CO₃ | mol/L |
| HCO3- | mol/L |
| CO₃²⁻ | mol/L |
| H₂CO₃ | μmol/L |
| HCO3- | μmol/L |
| CO₃²⁻ | μmol/L |
| DIC | μmol/L |
| H₂CO₃ | % |
| HCO3- | % |
| CO₃²⁻ | % |
| K0 | |
| K1 | |
| K2 |
Check the intermediate calculations for determining the pH of seawater
https://repun-app.fish.hokudai.ac.jp/mod/page/view.php?id=2295
https://repun-app.fish.hokudai.ac.jp/mod/page/view.php?id=2295
No customer feedback for this calculation yet.