Total alkalinity measurement using an open‐source platform

Total alkalinity is a pivotal water quality parameter dictating the response of natural waters to acid–base system perturbations such as ocean acidification and acid mine drainage. Its value as a biogeochemical and ecological variable is enhanced not just by high measurement quality, but also by measurement accessibility. This research demonstrates an instrument that advances the accessibility of high‐precision, high‐accuracy total alkalinity measurement using open‐source, and low‐cost instrumentation. Repeated testing of water samples from Lake Superior demonstrated a measurement precision (standard deviation or SD) of 3.0 μmol kg−1. Analysis of standards and reference materials demonstrated an uncertainty of 5.3 μmol kg−1 as well as robustness to freshwater and saltwater matrices. This instrument adds to the wealth of inorganic carbon measurement technologies in marine and lacustrine settings and stands to enhance the ability of both communities to generate accurate and accessible measurements of total alkalinity.

Alkalinity in natural waters plays a central role in determining pH and CO 2 flux, as well as biogeochemical responses to perturbations including acidification (Lerman and Stumm 1989), whiting events (Morse et al. 2003;Müller et al. 2016), and phytoplankton blooms (Verspagen et al. 2014). As a concentration of buffering species, alkalinity moderates acidification, such that aquatic systems with relatively low alkalinity have been found to be more vulnerable to anthropogenic acidification (Shadwick et al. 2013). Total alkalinity (A T ) or its closely related analogues and proxies (acid neutralizing capacity, phenolphthalein alkalinity, carbonate alkalinity, etc.) are frequently measured in scientific studies of lacustrine and marine systems and as water quality parameters by regulatory bodies. This study considers only total alkalinity, which was defined at a zero level of protons of pH = 4.5 by Dickson (1981) as: where concentration is in units of moles kg À1 to ensure independence from temperature and pressure. The zero proton level separates proton acceptors (with pK a values above 4.5) from proton donors (with pK a values below 4.5), and is an arbitrary but careful choice designed to enable use of A T as a parameter of equilibrium calculations. In most fresh, oxic waters, this value is close to, but not identical to that of carbonate alkalinity (A C ), which excludes all terms except the inorganic carbon, proton, and hydroxide concentrations: In many systems including oceans, saline lakes, euxinic waters, highly eutrophic bodies, and polluted waters, the other terms in Eq. 1 play a larger relative role; in typical marine waters, A C /A T = $ 93-95% (Zeebe and Wolf-Gladrow 2001), while in Mono Lake, California, a similar value is obtained for its saline, alkali waters (Oxburgh et al. 1991). In these and similar systems, A C is not a useful approximation of A T for the purposes of equilibrium calculations and studies of carbon cycling. Methods of A T determination involve titration of a water sample with a strong acid to a pH endpoint, which may be measured potentiometrically (e.g., Thompson and Anderson 1940), spectrophotometrically (Yao and Byrne 1998), or conductometrically (Park et al. 1963). An improvement upon singleendpoint titration methods is represented by Gran titration, which involves acidimetric titration of a water sample past a defined zero proton level to determine the endpoint titrant volume with a high degree of precision (Dyrssen and Sillén 1967). This method has been further developed into open-and closedcell alkalinity titrations with standardized procedures adopted by the oceanographic community (Dickson et al. 2007). Further applications of alkalinity measurement may be found in management (Davis and Simon 1995) and aquaculture (Somridhivej and Boyd 2016) contexts, in which accurate measurements of alkalinity enhance its use as an environmental variable.
This study follows metrological convention in defining precision and uncertainty (Eurachem Working Group on Uncertainty in Chemical Measurement 2012). Precision denotes the variability of measurements about a mean value caused by random error. Accuracy is a describes how a measurement differs from the true or accepted value. Measurement uncertainty is a function of both precision and accuracy, and is denoted by an interval within which the true value of a measurand may be found. In this work, precision is estimated using the standard deviation (SD) of replicate measurements, accuracy is determined empirically from a measurement of standards, and standard measurement uncertainty is expressed as the SD of the difference between a measured value and the known value for a suite of standards. This study estimates measurement uncertainty via empirical means (Type A determination) and propagation of uncertainties (Type B determination) contributing to the uncertainty in A T . Standard errors (SE) are also indicated where applicable, for example, describing uncertainty in linear regression coefficients.
Chemical oceanographers have advanced the definition and measurement of A T rapidly over the past century in pursuit of minimizing measurement uncertainty, which makes A T more valuable as a parameter of oceanic interaction with anthropogenic CO 2 and climate change (Dickson 1992). Faced with continuing ocean acidification and a changing carbon cycle, the Global Ocean Acidification Observing Network (GOA-ON) set A T measurement uncertainty goals of 10 μmol kg À1 to observe short term ("weather"-level) variability and 2 μmol kg À1 to observe long-term ("climate"-level) variability (Newton et al. 2015). Such goals are made feasible by the oceanographic community's widespread utilization of standardized analytical procedures and reference materials (Bockmon and Dickson 2015). No such goals, methodologies, or reference materials have been elaborated for inland waters, despite calls for improved measurement and standardization of inorganic carbon chemistry measurements in the face of climate change and other anthropogenic impacts on biogeochemical cycling (Phillips et al. 2015). It is not yet clear how suitable certified reference materials of ocean water are as analytical standards for A T determination in water with different major ion concentrations and ratios than the ocean, such as the freshwater Laurentian Great Lakes, or saline lakes such as Mono Lake.
A high level of analytical finesse is necessary not just for detecting trends and variability in A T , but also for accuracy in equilibrium calculations (such as calcium carbonate saturation state) that use other measured inorganic carbon parameters including pH, dissolved inorganic carbon (DIC), and partial pressure of CO 2 ( pCO 2 ). This latter parameter drives CO 2 flux, and pCO 2 can be estimated from equilibrium calculations or measured directly without propagating error from these calculations. That said, investigators of CO 2 dynamics in water must also measure at least two of the above-listed inorganic carbon parameters to constrain the inorganic carbon system and quantify the competing biogeochemical drivers of pCO 2 . The potential pairs of parameters (pH-pCO 2 , pH-A T , pH-DIC, pCO 2 -A T , pCO 2 -DIC, and DIC-A T ) vary in their suitability for equilibrium calculations as some pairs (e.g., pH-pCO 2 ) exhibit significant covariance when calculating other parameters (e.g., A T ) (Orr et al. 2018).
Estimations of pCO 2 as a function of measured A T and pH have been used to constrain CO 2 flux models of lakes and rivers thanks to the great quantity of measurements of these two parameters produced over the preceding century (Cole et al. 1994); however, insufficient attention has been given to the quality of these measurements until recently. Unpredictable biases in glass-electrode pH measurements caused by liquid junction potentials have been demonstrated to bias carbon cycling observations especially in low-ionic strength waters (Golub et al. 2017), leading to the nascent yet growing use of spectrophotometric pH determination in inland waters (Young et al. 2022). A similar advancement in technology is needed for lake and river alkalinity measurements, which are produced via a variety of methods with little published accounting for comparability, uncertainty, and bias. Biases in glass-electrode pH measurement are likely to introduce uncertainty into singleendpoint potentiometric A T titrations; less so the titration calculation method described in Dickson (2007) and utilized in this work: the liquid junction potential is subsumed into the calculated Nernst equation E* in a nonlinear stepwise regression carried out in the software associated with the instrument described in this work.
Uncertainty (u) in pCO 2 propagated from pH and A T can be visualized in an error space diagram (Orr et al. 2018), which demonstrates the dual dependence of pCO 2 uncertainty on both pH and A T measurement quality (Fig. 1). Uncertainty in inorganic carbonate parameters can be directly propagated from u(pH) and u(A T ) values using PyCO2SYS software in conditions like late summer surface waters of Lake Superior. GOA-ON guidelines for "climate" level uncertainty in pH and A T ($AE 0.003 and AE 2 μmol kg À1 , respectively) produce a propagated uncertainty in pCO 2 of only AE 2 μatm, while "weather" level uncertainty ($AE 0.02 and AE 10 μmol kg À1 ) is associated with a pCO 2 uncertainty of AE17 μatm. This latter value is greater than the diel variability in pCO 2 observed in early summer 2001 in Lake Superior by Atilla et al. (2011), greater than the annual variability of Earth's atmospheric pCO 2 , and greater than the mean daily difference between atmospheric and surface water pCO 2 in Lake Superior for large portions of the 5-year period modeled by Bennington et al. (2012). The uncertainty associated with measurements of pH and A T in the Great Lakes National Program Office biannual surveys of Laurentian Great Lakes is estimated as 0.2 pH units and 50 μmol kg À1 (Minor and Brinkley 2022), which propagate to a pCO 2 uncertainty of AE163 μatm. Uncertainty in measured inorganic carbon parameters including pH and A T has the potential to hinder carbon cycling studies and obscure biogeochemical observations of inland waters. This highlights the importance of development and application of improved measurement capabilities for both measurements.
A broad-scale challenge facing scientists and policymakers around the world is the disproportionate under-sampling of inorganic carbon parameters in inland waters and developing coastal regions (McDonald et al. 2013;Raymond et al. 2013). In reference to this gap in knowledge, Kim et al. (2022) emphasize the importance of adopting a combination of open-source and low-cost solutions to make high-quality carbon and greenhouse gas data generation more accessible. Development of new instruments, analyses, and technologies makes the prospect of a comprehensive global carbon observation network more feasible (Harmon 2020). This study attempts to remove some of the barriers to increased quantity and quality of A T measurements in heretofore under-sampled waters by demonstrating a new A T instrument based upon proven open-cell titration techniques and optimized to utilize open-source and low-cost components for the measurement of A T in inland or marine waters. This instrument expands the accessibility of vital water chemistry measurements and bridges a gap between oceanographic and limnological understanding of inorganic carbon chemistry.

Materials
An instrument for A T analysis was constructed from commercially available and custom-made components. Instrument functions are controlled by a Raspberry Pi microcomputer, an open-source platform for both user interface and data acquisition (Raspberry Pi 3 Model B+, Raspberry Pi Ltd.; any Raspberry Pi model currently available should work as long as a 40-pin GPIO header is available with standard Raspberry Pi pin layout). The Raspberry Pi is supplemented with a "DAQ HAT" (Data AcQuisition, Hardware Attached on Top) module (MCC128, Measurement Computing Corporation) that collects 16-bit analog voltage signals across a user-defined range (AE 1 VDC for this case) from a combination glass pH electrode (Ecotrode Plus, Metrohm) via a custom amplifier circuit designed by Texas Instruments (2013) (Fig. S1). While not a requirement, the custom circuit was assembled on a Raspberry Pi breadboard HAT, mounting it directly above the MCC-128 DAQ HAT and condensing the setup into a compact solution. The titration flask temperature is monitored with a thermistor (DS18B20, Analog Devices) with a resolution of 0.0625 C and calibrated to an accuracy better than 0.1 C against a NISTcalibrated thermistor (RBRsolo T, RBR). Titration is carried out in a 250 mL jacketed borosilicate beaker (Wilmad-LabGlass) atop a stir plate with a continuous flow of water controlled by a water pump (a gear drive pump was used here, but an aquarium pump suffices) recirculating water from a 20 L reservoir acting as a heat sink. This system employs titration flask temperature stabilization rather than temperature control in order to eliminate costly bath temperature controllers and increase affordability and accessibility of the method. Acid titrant is dispensed with a manual titrator (Hach 1,690,001) calibrated to have a volumetric uncertainty of 1.25 μL over a working range of 0-3 mL. The titrator calibration followed the procedure specified by Dickson et al. (2007). In brief, a calibration curve was constructed by dispensing volumes of ultrapure water, then weighing the dispensate, correcting for buoyancy, converting to volume via a density factor, and plotting expected vs. calculated volume to obtain a type-I linear regression with an uncertainty of volume delivered indicated above as the standard error of the dependent variable. Instrument components are diagrammed in Fig. 2 and pictured in Fig. S2. u(pH), and u(A T ) in conditions of late summer surface waters of lake superior. A T = 850 μmol kg À1 , pH T = 7.95, practical salinity = 0.05, and in situ water temperature = 10 C. u(pCO 2 ) is indicated with contours as μatm.
The carbonate equilibrium constants of Cai et al. (1998) were used based upon improved system consistency in over-constrained measurements (Minor and Brinkley 2022). Code for this diagram is available in Data S1.
All instrument functions are coordinated within an opensource Python program, "RPi-Alkalinity," which provides a textbased interface for users to conduct titrations, plot results, and manipulate instrument settings. Details of the RPi-Alkalinity software functions are provided in the Data S1 section and on its Github page (https://github.com/d-sandborn/RPi-Alkalinity). While users need no knowledge of Python coding to operate the instrument (which enhances technical accessibility), this interface promotes the flexibility of this instrument to adaptations in hardware and procedures. Instrument components are listed in the Data S1 to aid replication of this work. All numerical and statistical analyses in this study were completed using Python 3.7, utilizing various packages: PyCO2SYS (Humphreys et al. 2020), Calkulate (Humphreys and Matthews 2022), Pandas (Pandas Development Team 2023), Numpy (Harris et al. 2020), Scipy (Virtanen et al. 2020), Scikit-learn (Pedregosa et al. 2011), and Matplotlib (Hunter 2007).

Procedures
A T sample analyses were conducted as similarly as possible to the specifications of the oceanographic communitystandard Best Practices SOP 3b open-cell titration (Dickson et al. 2007). The pH electrode was calibrated in NIST-traceable pH buffers (Fisherbrand) before use, requiring 15 min at the beginning of every analysis session. A 100 g aliquot of water AE 0.001 g was dispensed into a jacketed beaker, which was lightly covered with paraffin film to limit evaporation, connected to the recirculation system, and allowed to come to a stable temperature. The pH electrode and thermistor were suspended in the sample, and titration began after pH and temperature readings were stable within 0.002 pH units and 0.05 C, which usually took 4 min for samples already at lab temperature. If probe readings were unstable before the next step, over-or under-acidification could result from measured pH biases. Hydrochloric acid (HCl) titrant solution was added to the sample until it reached a pH of 3.8, after which it was degassed by stirring vigorously with vortex-induced bubbles for 6 min. Following the degassing process, acid was added with a digital titrator (after ensuring the burette was free of bubbles) in increments of at least 12.5 μL and the probe potential measured after each addition. The titration was concluded once the sample reached a pH of 3.0, typically after 15-20 additions. Overall titration time per sample was generally 15 min, and a 7.5 h work period yielded 20-24 sample analyses with time allotted for instrument warmup, probe calibration, and standard analyses. The Python package Calkulate was integrated into the Raspberry Pi interface to calculate A T from paired measurements of dispensed titrant volume, electrode potential, and sample temperature over the pH range 3.5-3.0. Analyses in which the titrand temperature changed by more than 0.05 C were rejected.
Titrant acid was prepared by diluting concentrated HCl (Macron, ACS grade) with ultrapure (18.2 MΩ cm) water to $ 0.25 mol kg À1 . Titrant acid was stored in acid-rinsed and combusted 500 mL borosilicate media bottles with minimal headspace, then sealed tightly using the bottles' plastic caps and electrical tape around the cap-bottle interface until use. This titrant was standardized against standard solutions as part of the Assessment section, below. The standard titration procedure was the same as the sample titration procedure, except that a "provisional" A T was calculated with an assumed [HCl] = 0.25 mol kg À1 . This provisional A T informed the calculation of titrant concentration via the stepwise acid standardization procedure described in Best Practices SOP 3a (Dickson et al. 2007). A standardized acid titrant concentration of 0.25237 AE 0.00029 (SD) mol kg À1 was calculated for the batch of HCl used in all titrations in this study. The instrument software facilitates recalculation with revised sample masses, salinities, acid concentrations, and other parameters.
Three standard solutions were prepared or obtained: Na 2 CO 3 solutions prepared from a solid, certified reference material (CRM) batch 196 obtained from the laboratory of Dr. A. Dickson at Scripps Institute of Oceanography, and dilutions of CRM 196 in ultrapure water, referred to as "sub-reference materials (SRM) hereafter. Na 2 CO 3 standards were prepared with solid Na 2 CO 3 (Nacalai Tesque special analytical grade) dried in an oven at 270 C for 4 h then cooled and stored in a desiccator. Additions of Na 2 CO 3 with masses known to within 0.001 mg (measured on a Sartorius M2P microbalance) were dissolved into ultrapure water to create standard solutions with a mass AE 0.001 g. SRM solutions were created with salinity and alkalinity gradients spanning 2-17 and 135-1119 μmol kg À1 , respectively. Aliquots of CRM solution with masses known to within 0.01 g were dispensed into acid-rinsed and combusted 500 mL borosilicate flasks with Apiezon-greased ground glass closures. These solutions were diluted to $ 300 g total volume with ultrapure water with a mass known to within 0.01 g. Alkalinity and salinity were assumed to act conservatively with respect to dilution with ultrapure water. Buoyancy corrections were made to all gravimetric measurements (Harris 2019), which impacted standards' salinities negligibly and A T concentrations by < 2 μmol kg À1 . CRMs were analyzed as provided.
All standards were analyzed identically, but two sets of thermodynamic constants were employed in the calculation of A T from their titration curves via the Calkulate Python package. Freshwater samples and Na 2 CO 3 standards were analyzed using the carbonic acid dissociation constants reported in Millero (1979), along with estimated concentrations of total sulfate (Chapra et al. 2012) and silicate (Johnson and Eisenreich 1979) for Lake Superior samples. The carbonic acid dissociation constants of Lueker et al. (2000), the total borate to salinity ratio of Lee et al. (2010), the total fluoride to salinity ratio of Perez and Fraga (1987), and the bisulfate dissociation constants of Dickson (1990) were used for CRM and SRM analyses. It is crucial for the accuracy of A T analysis that suitable sets of constants be used. To choose these, noncarbonate alkalinity must be parameterized by salinity for marine and estuarine samples (which are assumed to have relatively constant proportions of major ions to each other) or otherwise determined (e.g., by ion chromatography) for inland waters that have varying major ion compositions.

Assessment
Measurement precision was investigated with analyses of paired samples of water from Lake Superior. Measurement uncertainty was explored with standard solutions of Na 2 CO 3 , and ocean water CRM and SRM solutions. A subset of standard solutions was first used to standardize the acid titrant, after which measurement uncertainty was estimated from a separate subset as the SD of errors from the differences between measured and known A T . An additional estimate of measurement uncertainty was formulated from propagation of estimated uncertainties associated with the calculation of A T .
An estimation of measurement precision was obtained via analysis of two sets of lake water samples. Simultaneously with underway pCO 2 measurement with a SuperCO2 system (Sunburst Sensors), water samples were collected from the surface of Lake Superior through the underway water system of the R/V Blue Heron at two open-water sites in the Western Arm in October 2021. Site 1 was at N 46 53.25 0 W 91 53.44 0 near the outlet of the French River into Lake Superior, while Site 2 was at N 46 57.44 0 W 91 53.06 0 in the Western Arm of Lake Superior. Water was dispensed from the underway system through silicone tubing into 500 mL borosilicate flasks with a full-bottle overflow, given a 5 mL headspace, and poisoned with 140 μL saturated HgCl 2 solution (Ricca). Practical salinity was calculated for each sample from underway thermosalinograph-measured conductivity and temperature using the equations of Hill et al. (1986). DIC was then analyzed via coulometry (CM150, UIC). Particulate inorganic carbon is nonexistent in Lake Superior, so we assume total inorganic carbon equals DIC. For alkalinity measurements, samples were filtered through a GF/F to remove particulate matter.
From these two filtered water batches, 100-150 g aliquots (n = 5) were analyzed for A T . Analysis results (Table 1) demonstrate a repeatable measurement precision of 3.0 μmol kg À1 (SD) associated with A T analysis by this instrument. The measured values of A T and DIC are indistinguishable from the values given in (Zigah et al. 2011;Chapra et al. 2012). The discrepancy between measured and observed pCO 2 is likely due in part to the influence of proton-binding dissolved organic matter on carbonate equilibria (Kuli nski et al. 2014). If pCO 2 at Site 1 is recalculated in PyCO2SYS using an assumed DOM concentration of 100 μmol C L À1 (Zigah et al. 2011) along with assumptions of 14% of DOM providing acidic functional groups with a bulk K a of 2.94 Â 10 À8 (both measured in the Baltic Sea by Kuli nski et al. 2014) then the recalculated pCO 2 of 309 μatm closely approximates the measured value. We do not assert that DOM characteristics from the Baltic Sea accurately represent Lake Superior, but the increase in pCO 2 resulting from reasonable assumptions of DOM properties is of the right magnitude to explain the discrepancy between our measured and calculated values.
Standard A T solutions were analyzed in $ 100 g aliquots with masses AE 0.001 g; 31 solutions provided 78 analyses (Table S3). These data were randomly split into a training dataset (75% or n = 58) and a testing dataset (25% or n = 20) with the "train_test_fit" function of the scikit-learn Python package in order to avoid overfitting and provide an unbiased assessment of uncertainty. The acid titrant concentration was calculated via a stepwise linear regression from the training dataset, as previously noted. This titrant standardization allowed calculation of measured A T in the testing dataset, after which the measurement uncertainty was then evaluated as the SD of the distribution of errors (measured A T -known A T ) in the testing dataset. This train/ test process was repeated 100 times with different random dataset splits to yield an acid titrant concentration of 0.25237 AE 0.00029 (SD) mol kg À1 and a mean measurement uncertainty of 6.3 μmol kg À1 . The calibrated A T measurements of all 78 trials illustrate a standard curve (Fig. 3) with a type-I linear regression slope (1.000 AE 0.001 SE) insignificantly different from unity and an intercept (0.87 AE 1.2 SE μmol kg À1 ) indistinguishable from the origin. This study employed standards spanning a wide range of A T and salinity values encountered in inland, estuarine, and marine waters. Carbonate standards displayed a mean absolute error of 4.0 μmol kg À1 , while SRM solutions displayed a larger mean absolute error of 7.3 μmol kg À1 . SRM and CRM standards performed similarly to carbonate standards in terms of within-bottle measurement precision, but a higher mean absolute error was observed among SRM solutions (Fig. 3b), which is likely due to random errors during preparation of the SRM solutions by dilution of the CRM standard. It is recommended that all A T analyses with this instrument be referenced to and corrected with multiple reliable reference materials with a range of A T exceeding that of samples. Titrant standardization and correction similar to the method used above is already built into the Calkulate package, which can calibrate titrant concentration and apply a correction based upon results of standard analyses.
Analysis of CRM batch 196 resulted in a mean measured A T that was 4.5 μmol kg À1 (n = 2) higher than the certified value of 2215.32 μmol kg À1 and falls within the stated uncertainty of this instrument. While a difference in ionic strength existed between the reference material (I $ 0.7 M) and titrant acid (I $ 0.25 M), the decrease in ionic strength of the sample matrix does not exceed 1% for a typical titration of a 100 g sample. Nonlinearity in the Gran function due to changing proton activity and liquid junction potential might be expected given a change in titrand ionic strength during titration, but none was observed; R 2 values of linear regressions of the Gran function over titrant volume exceeded 0.9995 for each CRM and SRM analysis and were indistinguishable from the freshwater background standards in shape or behavior.
An additional estimation of measurement uncertainty associated with A T analysis by this instrument can be developed via propagation of uncertainties through the alkalinity calculation software employed by this study. A T is calculated as a function of titrant mass (m HCl ), titrant concentration (C HCl ), and sample mass (m Sample ) via the equation: Titrant concentration was determined to be 0.25237 AE 0.00029 (SD) mol kg À1 and sample masses are typically $ 100 and measured to AE0.001 g. The uncertainty in acid titrant mass (u(m HCl )) can be determined from the uncertainty in the x-intercept of the Gran function. u(m HCl ) is dependent upon, for example, temperature drift, probe calibration drift, electronic noise, and evaporation effects. Temperature drift is eliminated for this instrument by its recirculating system, while evaporative concentration is insignificant over the course of a 15-min titration in laboratory conditions. Table 1. Measured or calculated inorganic carbon parameter values for samples of Lake Superior surface water. Measurement precision is denoted as AE SD for measured values. Uncertainty in calculated pCO 2 was propagated from uncertainty in DIC observed from measurements of reference materials and observed uncertainty in A T from this study. The carbonate equilibrium constants of Cai et al. (1998) were used based upon improved system consistency in over-constrained measurements (Minor and Brinkley 2022).

SST ( C)
Practical salinity A T (μmol kg À1 ) DIC (μmol kg À1 ) pCO 2 (μatm) measured pCO 2 (μatm) calculated Probe calibration drift is of little concern because the A T calculation algorithm does not rely upon the pH probe's calibration, but instead calculates its standard potential for the Nernst equation for each titration (Dickson et al. 2007).
The noise-related uncertainty in the Gran function intercept can be estimated by a jackknife resampling analysis of titration curves, in which A T analyses of standards and reference materials were each resampled by removing one point of their titration curves, after which A T was calculated with the remainder of the curve. This was done repeatedly for 10 samples of Lake Superior water, once for each titration point, yielding a mean A T and SD for each, from which a corresponding mean titrant mass of titrant and its uncertainty was calculated. Jackknife resampling analysis code is provided in the Data S1. The mean standard error of titrant mass was 32 μg.
Given the uncertainty estimates for each term in Eq. 3, the resulting uncertainty in A T (u(A T ) in Eqs. 5 and 6) can be propagated for a sample with a mass of 100.000 g and A T = 1000 μmol kg À1 , requiring 0.400 g titrant (as described in Eq. 4): 0:001 mol kg ¼ 0:25051 mol kg *0:400 g 100:000 g ð4Þ u A T ð Þ¼1000 μmol kg ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi 0:00029 mol kg À1 0:25237 mol kg À1 2 þ 0:000032 g 0:39919 g 2 þ 0:001 g 100:000 g 2 s The uncertainty in A T is dominated by the titrant calibration, which displays a relative uncertainty of 1.1‰. The resulting propagated standard uncertainty of 1.2 μmol kg À1 approximates and contributes to the experimentally-determined uncertainty of 5.3 μmol kg À1 . We note that the Python package Calkulate also provides a function estimating uncertainty in measured A T as a function of titration curve variability, but it does not propagate error from other sources.
The effect of decreasing sample volume can be estimated by recalculating Eq. 6 for the volume of interest; halving the sample volume (as well as the required titrant) nearly doubles the propagated uncertainty to 1.9 μmol kg À1 . The pH probe used in this study has a geometry, which limits sample volume to > 60 mL. Smaller sample volumes may decrease the time needed for CO 2 sparging and amount of acid titrant consumed, leading to less time and expense per sample but larger measurement uncertainty.
Regardless of whether experimentally determined or propagated measurement uncertainties are considered, the A T instrument described in this study achieved a measurement uncertainty well within the "weather" goal of the GOA-ON framework, justifying its use to produce high-quality low-cost open source measurements of a crucial carbon cycling parameter.

Discussion
This study describes a development in the science of A T measurement and demonstrates the capabilities of an instrument designed upon open-source, low-cost principles. Replicate A T analysis of lake water samples indicated a measurement precision of 3.0 μmol kg À (SD), while analyses of standard solutions demonstrated an empirical measurement uncertainty of 5.3 μmol kg À1 (SD). This result was reinforced by a propagation of uncertainties associated with titration, which resulted in a propagated measurement uncertainty of 1.2 μmol kg À1 . We hypothesize that the discrepancy between the two estimations of uncertainty is associated with uncertainty in the preparation of standard solutions. Dashed lines indicate the "climate" goal of AE2 μmol kg À1 for A T measurement uncertainty indicated by Newton et al. (2015). Dotted lines indicate the "Weather" goal of AE10 μmol kg À1 .
This instrument produces results falling within the GOA-ON "weather" goal (Newton et al. 2015), fulfilling the stated goal of this study to develop an instrument suitable for accurate and cost-effective measurement of A T .
One significant decision made in this study when developing a method of alkalinity determination was the choice of titrant acid. HCl was chosen for several reasons: it is a relatively cheap and accessible reagent; it is a strong acid; it is the standard titrant in oceanographic A T titrations; and it carries no risk of forming protonated species at the pH range of Gran titration (pH 3.5-3.0). Sulfuric acid (H 2 SO 4 ) has been used by many investigators as a titrant, but it forms bisulfate ions at pH levels approaching its second acid dissociation pK a $ 2. This carries some ramifications for single-point titrations (which cease at or around pH 4.5) and even more for Gran titrations, which continue to around pH 3.0. While knowledge of sulfate equilibrium constants allows accounting for bisulfate ion formation in A T titration analysis software such as Calkulate (Humphreys, personal communication), the problem can be avoided altogether with HCl. Biases associated with H 2 SO 4 titrants are considered in greater detail in Data S1. The acid titrant standardization determined in this study appeared to be stable over a period of months in tightly sealed bottles, but this must be determined with periodic standard analyses (preferably with A T standards bracketing expected sample concentrations and spanning several orders of magnitude) and the use of control charts.
Apart from measurement uncertainties created by methodology, environmental factors such as high concentrations of particulate and dissolved organic matter also pose a challenge to high-quality measurements of inorganic carbon parameters. Proton-accepting behavior of organic matter has been termed "organic alkalinity" or "excess alkalinity." In sufficiently high concentrations, as in bog lakes, tannin-rich rivers, the coastal ocean, and eutrophic ponds, the interaction of organic matter with the inorganic carbon complex can shift concentrations and behavior of carbonate species, potentially biasing observations of carbon cycling (Liu et al. 2020;Sharp and Byrne 2020). The instrument described by this study is expected to be similarly affected by organic alkalinity as the instrumentation of other investigators. While filtration methods have been suggested to deal with particulate matter (Bockmon and Dickson 2014), dissolved organic alkalinity can be quantified by one of several titration methods (e.g., Cai et al. 1998), which this instrument could be readily modified to accomplish. The significance of organic alkalinity to the inorganic carbon complex varies according to its concentration and acid dissociation constant; organic matter with pK a values between 5 and 7 exert the greatest influence on measurements of A T and may bias the fit of the Gran function (Sharp and Byrne 2020), potentially requiring novel titration curve fitting methods (Michałowski and Asuero 2012) and/or inorganic carbon equilibria calculations explicitly accounting for organic alkalinity (Yang et al. 2015). Improved measurement of carbon cycling across the marine-lacustrine spectrum would be aided by further research should investigating the link between organic matter and the inorganic carbon complex.
The lake water samples collected in this study were poisoned with a saturated HgCl 2 solution because DIC and A T were measured using the same sample. Poisoning samples for A T analysis is unnecessary if samples are to be analyzed immediately (Dickson et al. 2007), or filtered to 0.45 μm and stored for up to 6 months (Mos et al. 2021;Moore et al. 2023). Hg(II) solutions present a significant safety and environmental hazard; the necessary precautions for handling Hg(II) may hinder the accessibility goals of this research; so it is recommended that investigators carefully consider their use of Hg-poisoned water samples. Investigators of freshwater and coastal processes should also note the potential for Hg-organic alkalinity complexes (Mos et al. 2021) to bias A T measurements made using this instrument just as for other A T instruments.
The open-source low-cost design philosophy guiding the development of this study ties into the broader picture of open science. This initiative seeks to increase access to both the means and products of scientific inquiry. While the drivers and outcomes of this initiative are discussed at length elsewhere (National Academies of Sciences, Engineering, and Medicine 2018), this research delivers a product in line with its goals. Open-source low-cost instrumentation such as that described here has the potential to increase the accessibility, reproducibility, and inclusivity of the means of science. These goals would be compromised in an instrument requiring frequent maintenance; however, over the course of more than 500 titrations in connection with this work and other projects not detailed here, the only regular maintenance involved refilling the acid burette and pH probe filling solution as per the manufacturer's instructions. The performance of the digital titrator was observed to decline over time. This titrator had been used in other studies for 4-5 years before being incorporated into this project and its plastic and metal parts developed considerable corrosion over the course of this work. We encourage analysts to investigate alternative titration systems or to assess the digital titrator regularly and plan on replacing it every few years.

Comments and recommendations
The instrument described in this study represents a balancing act of open-source low-cost design philosophy and analytical finesse. The requirements of the inorganic carbon chemistry community along with the requirements of valueconscious investigators together inform the solution presented here. We assert that this instrument represents a substantial improvement upon alkalinity measurement systems available at a similar price point (see Data S1 for comparison) in terms of accuracy and precision of results. It combines a proven procedure with innovative components to increase the accessibility of high-quality A T measurement, which will inform scientific knowledge of Earth's changing carbon cycle. The flexibility and open-source nature of this instrument's design opens the door to further modifications and improvements in instrumental analysis. The acknowledged labor-intensive operation of this instrument could be addressed with a syringe pump automated by the instrument's Raspberry Pi microcomputer in an exchange of labor for additional instrumentation cost and power needs. Portability and field deployment might also be accommodated by the design of this instrument. Given a 12 VDC power source (such as a conventional lead-acid battery) with the requisite connections to the Raspberry Pi microcomputer, stir plate, and aquarium pump, this instrument could conceivably measure A T in the field and in locations without a reliable electricity supply. We note that the signal amplifier circuit appears to be sensitive to mechanical vibration and electromagnetic field sources, which may constrain its use to laboratory or field camp settings rather than shipboard deployments. Inclement weather could also pose a barrier to deployment if waterproofing measures are not taken as suggested in Data S1. Future work should explore novel deployments as well as further cost-saving improvements to expand the horizons of inorganic carbonate parameter measurement.
This study used carbonate solutions, CRMs, and dilutions of the latter to demonstrate the abilities of a novel A T measurement system. These solutions were prepared with ionic strengths and A T comparable to a wide range of inland, estuarine, and marine waters. All standard solutions were analyzed with identical methodologies, using a titrant with a deionized water background, and produced indistinguishable results when A T (rather than merely carbonate alkalinity) was calculated with a nonlinear stepwise regression method. We suggest that CRMs may be used by investigators measuring A T across the spectrum of fresh to saline waters if and only if they utilize a method capable of accounting for all A T species; however, matching the solution matrix of standards and samples remains analytical best practice. Further research should explore the use of these and other alkalinity reference materials in a broader suite of natural waters.
This instrument recommends itself to practitioners of water analysis across the spectrum of research, regulatory, and academic sectors. It is not intended to displace the existing suite of A T measurement systems, but to supplement and expand accurate analyses to locations and labs that may not have access to these systems. Additionally, we suggest that the analytical practices of the marine chemistry community be applied to limnological practice after suitable modification. The adoption of standardized procedures, reference materials, and high-accuracy analyses have great potential to deliver high-quality data on total alkalinity and across inorganic carbon parameters, necessary to disentangle the effects of various drivers of change for inland waters, which include land-use changes, invasive species effects, changing hydrology and changing temperature ranges, and ice phenology.

Data availability statement
The data that support the findings of this study are available in the Supporting Information and the code that supports replication of this instrument is openly available on Zenodo at DOI: 10.5281/zenodo.7864447, and on Github at https:// github.com/d-sandborn/RPi-Alkalinity.