AquaEnv: Bjerrum plots

## =============================================================================
## Bjerrum plots of sumCO2 species
## implemented by Karline Soetaert
## =============================================================================

library(AquaEnv)
pH.seq <- seq(1, 13, length.out = 50)

ae1 <- aquaenv(S = 20, t = 0, pH = pH.seq, SumCO2 = 0.002)
ae2 <- aquaenv(S = 20, t = 30, pH = pH.seq, SumCO2 = 0.002)

matplot(ae1$pH, cbind(ae1$CO2, ae1$HCO3, ae1$CO3), type = "l",
  ylab = "mmol/kg-soln", xlab = "free scale pH", lwd = 2, lty = 1, 
  main = "CO2 speciation")

matplot(ae2$pH, cbind(ae2$CO2, ae2$HCO3, ae2$CO3), type = "l",
  lwd = 2, lty = 2, add = TRUE)

legend("left", lty = 1, lwd = 2, col =1:3, legend = c("CO2", "HCO3", "CO3"))
legend("right", lty = 1:2, lwd = 2, legend = c(0, 30), title = "temperature")

Go back