Learn R Programming

wq (version 0.2-9)

ammFrac: Un-ionized ammonia

Description

Calculates fraction of total ammonium in un-ionized form.

Usage

ammFrac(pH, t, S, pHscale = c('total', 'free'))

Arguments

Value

Fraction of total ammonium occurring as un-ionized ammonium.

Rdversion

1.1

Details

The stoichiometric dissociation constant $K_a^*$ of the ammonium ion is estimated using the equations of Clegg and Whitfield (1995). There are separate equations for use with pH measurements made on the total and free scales. Equations should be valid in the range of 0 to 40 salinity and -2 to 40 C. Accuracy is probably better than 5% at all temperatures and salinities. The dissociation constant is then used to calculate the mole fraction from $1/(1+ 10^{-pH}/K_a^*)$. If input vectors are not of the same length, shorter ones will be recycled as necessary without warning.

References

Clegg, S. and Whitfield, M. (1995) A chemical model of seawater including dissolved ammonia and the stoichiometric dissociation constant of ammonia in estuarine water and seawater from -2 to 40 C. Geochimica et Cosmochimica Acta 59(12), 2403--2421.

Millero, F. (1995) Thermodynamics of the carbon dioxide system in the oceans. Geochimica et Cosmochimica Acta 59(4), 661--677.

Examples

Run this code
## Examine different combinations of environmental variables:
ph = c(8, 8, 8, 7.8)
temp = c(10 , 25, 25, 25)
sal = c(0, 0, 35, 35)
round(ammFrac(ph, temp, sal), 4)  # 0.0183 0.0539 0.0556 0.0358
round(ammFrac(ph, temp, sal, 'free'), 4)  # 0.0183 0.0539 0.0440 0.0282

Run the code above in your browser using DataLab