Volume 22, Issue 8 pp. 590-607
New Methods
Open Access

Fitting metabolic models to dissolved oxygen data: The estuarine Bayesian single-station estimation method

Marcus W. Beck

Corresponding Author

Marcus W. Beck

Tampa Bay Estuary Program, St. Petersburg, Florida, USA

Correspondence: [email protected]

Search for more papers by this author
Jill M. Arriola

Jill M. Arriola

The Pennsylvania State University, University Park, Pennsylvania, USA

Search for more papers by this author
Maria Herrmann

Maria Herrmann

The Pennsylvania State University, University Park, Pennsylvania, USA

Search for more papers by this author
Raymond G. Najjar

Raymond G. Najjar

The Pennsylvania State University, University Park, Pennsylvania, USA

Search for more papers by this author
First published: 22 April 2024

Author contribution statement: All authors contributed to the writing and review of the mansuscript, with the original draft written by MWB. RGN conceptualized the method and MH assisted in methods assessment. JMA was responsible for discussing and testing earlier versions of EBASE. MWB developed the EBASE R package and conducted all analyses.

Associate editor: Scott Ensign

Abstract

Continuous measurements of dissolved oxygen (DO) are useful for quantifying ecosystem metabolism, which is critical for understanding estuarine biogeochemistry and ecology, but current methods applied to these data may lead to estimates that are physically impossible and poorly constrained errors. Here, we present a new approach for estimating estuarine metabolism: Estuarine BAyesian Single-station Estimation (EBASE). EBASE applies a Bayesian framework to a simple process-based model and DO observations, allowing the estimation of critical model parameters, specifically light efficiency and respiration, as informed by a set of prior distributions. EBASE improves upon the stream-based model from which it was derived by accommodating missing DO data and allowing the user to set the time period over which parameters are estimated. We demonstrate that EBASE can recover known metabolic parameters from a synthetic time series, even in the presence of noise (e.g., due to tidal advection) and when prior distributions are uninformed. Optimization periods of 7 and 30 d are more preferable than 1 d. A comparison with the more-conventional method of Odum reveals the ability of EBASE to avoid unphysical results (such as negative photosynthesis and respiration) and improves when the DO data are detided. EBASE is available using open-source software (R) and can be readily applied to multiple years of long-term monitoring data that are available in many estuaries. Overall, EBASE provides an accessible method to parameterize a simple metabolic model appropriate for estuarine systems and will provide additional understanding of processes that influence ecosystem status and condition.

Estuaries play a key role in the global cycling of elements because of high rates of biogeochemical activity at the interface between land, river, ocean, and atmosphere. As materials are transported from land to rivers to ocean, estuaries profoundly transform or filter these materials through various processes, chief among which are primary production and respiration, collectively referred to as metabolism (Schubel and Kennedy 1984). For example, estuarine respiration of organic carbon delivered from land produces carbon dioxide, which may be lost to the atmosphere via outgassing (e.g., Cai 2011). Similarly, estuarine primary production consumes dissolved inorganic carbon delivered from land, forming particulate organic carbon with multiple fates, for example, buried in estuarine sediments, incorporated into biota, transferred to the ocean, and so forth (Hu et al. 2006; Middelburg and Herman 2007). Estuarine metabolic processes are fundamentally important, as illustrated by the dissolved inorganic carbon budget of eastern North American estuaries (Najjar et al. 2018); net primary production and heterotrophic respiration far exceed inputs from upland sources and outputs to the atmosphere and ocean. As such, small changes in either net primary production or heterotrophic respiration can have a large impact on the difference between the two, net ecosystem metabolism (NEM, sometimes also referred to as net ecosystem production), which ultimately governs the form and quantity of estuarine materials that are lost to the atmosphere (i.e., outgassing), the sediments (i.e., burial), and the ocean (i.e., advection).

Methods for estimating metabolism in aquatic environments are numerous and include open-water techniques, bottle-based incubations, ecosystem budgets, oxygen isotopes, use of inert gases, and aquatic eddy covariance (Kemp and Testa 2011; Staehr et al. 2011; Berg et al. 2022). Based on the variety of assumptions and limitations of each method, comparisons of metabolic rates within and between ecosystems have been challenging. For example, an assessment in Randers Fjord (Denmark) showed agreement in both the sign and magnitude among four different approaches (Gazeau et al. 2005). However, gross primary production and ecosystem respiration estimates from incubations were consistently lower than those from open-water methods, consistent with the estuarine respiration synthesis of Hopkinson and Smith (2005). Even within one technique, there are numerous choices to be made that alter the outcome. For example, in the commonly used 14 C technique for measuring primary production, Cloern et al. (2014) noted that investigators have made divergent choices with regard to filtering mesozooplankton grazers, measuring 14 C in dissolved organic carbon, changing spectral light quality with depth, the euphotic zone depth, the incubation time, and the incubation location (in situ vs. on-deck). These challenges are further compounded in estuaries, where high temporal and spatial variability have been noted in global syntheses of photosynthesis and respiration. Cloern et al. (2014) found that annual phytoplankton primary production can vary 10-fold within an estuary and up to 5-fold from year to year. Hopkinson and Smith (2005) focused on cross-system variations and found benthic and pelagic respiration rates varying by more than factors of 30 and 40, respectively, ranges that are broadly consistent with whole-system respiration rates based on the open-water method (Hoellein et al. 2013).

Advances in sensor technology for continuous collection of dissolved oxygen time series suggest that the open-water method (Odum 1956) could be leveraged for applications across multiple locations. This method exploits the diel cycle of dissolved oxygen and allows the simultaneous determination of whole-system gross primary production (P = net primary production + autotrophic respiration), ecosystem respiration (R = heterotrophic + autotrophic respiration), and NEM (P − R). A global synthesis of warm-season, open-water metabolism studies (Hoellein et al. 2013) was based on a total of 47 estimates, almost all of which were derived from a single study of US estuaries (Caffrey 2004). A similar synthesis was done by Yvon-Durocher et al. (2012). These studies evaluated the open-water method as applied to continuous monitoring data available for several decades across the National Estuarine Research Reserve System (NERRS), a network of 30 estuaries across the United States. Thus, the approach can be broadly applied where data are available, although it is not without limitations. In particular, tidal advection can violate an assumption of the method that the measurements are from the same parcel of water with a continuous metabolic history (Kemp and Boynton 1980). Striking evidence of this limitation is the large number of physically impossible negative P and R estimates in the open-water analysis of 28, 3-year time series by Caffrey (2003). The computed rates were negative 23% of the time for both P and R, on average, and as high as 69% for individual sites. Note that R is often expressed as a negative value indicating consumption of dissolved oxygen. Here and throughout, we express correct values of R as positive values given the metabolic model described below.

Another limitation of the open-water method is the estimation of the air–water oxygen flux, which is an important term in the oxygen budget. Most approaches estimate this flux using an empirically derived gas transfer velocity that is dependent on wind speed and temperature or held at a constant value (e.g., Caffrey 2004; Russell and Montagna 2007; Nagel et al. 2009; Beck et al. 2015; Murrell et al. 2018). Particularly challenging is that the exchange velocity in estuaries also depends on water depth and tides (Ho et al. 2016) and possibly additional factors, such as fetch and the concentration of total suspended solids (Borges and Abril 2011). The importance of the air–water gas flux in the oxygen budget opens up the possibility that the oxygen data themselves may be used to determine the gas transfer velocity, an approach that has been applied in streams (e.g., Riley and Dodds 2013).

A unified model to explain the large variability of metabolic rates within and across estuaries is clearly lacking as a critical tool for understanding metabolic processes. Bayesian statistical techniques have only been explored in limited estuarine applications despite their potential to address the above (e.g., Tassone and Bukaveckas 2019). Bayesian models allow for incorporation of prior knowledge about model parameters and robust estimation of parameter probability distributions (Holtgrieve et al. 2010) using highly efficient computational algorithms (Grace et al. 2015; Winslow et al. 2016). These techniques are very powerful because they not only estimate P and R as standard open-water methods do, but they retrieve estimates and their uncertainties of parameters related to gas exchange, P, and R (e.g., the initial slope of the photosynthesis–irradiance curve), which reveals quantitative information about the mechanisms of metabolism and gas exchange. Tassone and Bukaveckas (2019) adapted a Bayesian approach developed for streams (Appling et al. 2018) in an estuarine setting to estimate metabolic rates in the James River. Although this approach demonstrated the utility of such an approach in estuaries, much of the core model structure developed for streams was unchanged and may not have been fully descriptive of fundamental processes influencing metabolism in open-water environments. Another potentially useful application developed for streams is the BAyesian Single-station Estimation (BASE) method (Grace et al. 2015). BASE has been demonstrated to accurately determine metabolic parameters and their uncertainty using continuous monitoring data that are similar to those available at many estuarine locations. The underlying model components can also easily be updated given the relatively simple format of the approach. As such, modification of BASE to include model characterizations more appropriate for estuaries, while maintaining the fundamental Bayesian approach, could prove useful.

The goal of this paper is to describe the development and application of a new Bayesian method for simultaneously determining gross primary production and ecosystem respiration in estuaries from high-resolution dissolved oxygen time series. We call this method Estuarine BAyesian Single-station Estimation (EBASE), which builds and improves on the BASE method (Grace et al. 2015) using an approach more appropriate for estuarine time series. We focus on BASE given the relative simplicity and, therefore, ease of application compared to other stream-based Bayesian approaches (e.g., Appling et al. 2018). The rationale and changes made to BASE are described in detail, followed by a demonstration of how EBASE can estimate known metabolic parameters with reasonable certainty from a synthetic time series. Lastly, metabolic estimates from EBASE are compared with those of the Odum open-water method to identify key differences related to both the theoretical and statistical differences associated with each method. These comparisons combine results using real observations and those based on detided dissolved oxygen inputs to demonstrate effects of tidal advection on metabolic estimates. We also attempt to constrain (i.e., accurately estimate) the gas transfer velocity using EBASE but are unable, at least with the data sets used in this study. EBASE is available as an open-source software package created with the R statistical programming language (https://cran.r-project.org/web/packages/EBASE/index.html, Beck et al. 2024; R Core Team 2023) and the results herein provide practical suggestions for use of the software on novel datasets.

Materials and procedures

EBASE uses a mass balance equation for dissolved oxygen, assuming a well-mixed water column of depth Z and no lateral transport processes:
Z dC dt = P R + D (1)
where the terms on the right side of the equation are gross primary production ( P ), ecosystem respiration ( R ), and the net diffusive gas flux at the air–water interface ( D ), respectively, processes that result in the change in dissolved oxygen concentration ( dC ) per unit time ( dt ). Both P and R are expressed as positive values, whereas D can be positive (ingassing) or negative (outgassing). The equation has dimensions of moles per unit area and time (e.g., mmol m 2 d 1 ). P is modeled as aPAR , where PAR is the surface photosynthetically active radiation and a is the light efficiency; R is constant; and D is modeled in the standard manner (e.g, Sarmiento and Gruber 2013) as k w C sat C , where k w is the gas transfer velocity and C sat is the saturation (or equilibrium) concentration, calculated from salinity and temperature (García and Gordon 1992). The gas transfer velocity is modeled using the formulation in Wanninkhof (2014):
k w = b U 10 2 Sc 600 0.5 (2)
where b is constant, U 10 is the wind speed at 10 m above the water, and Sc is the Schmidt number, which is the ratio of the kinematic viscosity of water to the molecular diffusivity of oxygen in water ( Sc is computed from water temperature and salinity using the polynomial fit in Wanninkhof 2014). The b parameter is fairly well known for open-ocean conditions primarily as an expression of the sensitivity of gas exchange to wind, but may be different in estuaries, where the transfer velocity is influenced by factors other than wind speed and Sc . As such, the three parameters estimated by EBASE are a , R , and b using the required input data that include time series of dissolved oxygen, water temperature, salinity, PAR, wind speed, and water column depth (Table 1).
Table 1. EBASE model parameters showing the required input, parameters derived from the model input, and model output.
Type Description Model notation Units
Input Dissolved oxygen (observed) C mmol m 3
Water temperature °C
Salinity psu
Total photosynthetically active radiation PAR W m 2
Wind speed m s 1
Water column depth (mean or tidal height vector) Z m
Input-derived Wind speed at 10 m height, squared U 10 2 m 2 s 2
Schmidt number (from water temperature and salinity) Sc Unitless
Dissolved oxygen at saturation (from water temperature and salinity) C sat mmol m 3
Output Dissolved oxygen (modeled) C mod mmol m 3
Production P mmol m 2 d 1
Respiration R mmol m 2 d 1
Gas exchange D mmol m 2 d 1
Light efficiency a (mmol m 2 d 1 )/(W m 2 )
Sensitivity of gas transfer to wind speed b (cm h 1 )/(m 2 s 2 )

Changes to BASE

Equation 1 is similar to the oxygen mass balance equation in BASE (Grace et al. 2015), with the main difference being the treatment of gas exchange. While both assume that gas exchange is proportional to the concentration gradient across the air–water interface, the treatments of the proportionality differ. Grace et al. (2015) used the following for the volumetric gas flux ( Dvol ) in BASE:
Dvol = K · 1.024 T T C sat C (3)
where T is the instantaneous water temperature, T is the average water temperature over each 24-h period in the oxygen time series (both in °C), C is the measured dissolved oxygen, and C sat is the saturation concentration. K is the reaeration coefficient, which was estimated from the data. In EBASE, gas flux per unit surface area of the air–water interface is proportional to the concentration gradient, with the proportionality taken from the well-established wind- and temperature-based parameterization for gas exchange of Wanninkhof (2014) (see Eq. 2). EBASE also allows b to be a free parameter that may reflect spatial and temporal variability in factors other than wind and temperature that may influence transfer velocity. Wanninkhof (2014) estimated a fixed b parameter as 0.251 cm h 1 / m 2 s 2 .

BASE was also modified by removing the temperature dependence of respiration and the potential for P to depend nonlinearly on PAR. While there is evidence for both dependencies in aquatic systems, we found, in preliminary model runs, that model stability was enhanced when these dependencies were removed. It would be straightforward to include such dependencies in EBASE as our understanding of them improve and as data become available that will allow them to be robustly constrained.

For ease of application, an R package was developed to implement EBASE (https://cran.r-project.org/web/packages/EBASE/index.html, Beck et al. 2024; R Core Team 2023), similar to the R package available for BASE (https://github.com/dgiling/BASEmetab). EBASE differs from BASE in model implementation in two ways. First, users can specify the model optimization period as the amount of time over which the unknown parameters are estimated from the Bayesian prior distributions (i.e., a , R , and b ). The optimization period determines how much data are used to estimate each parameter. Only one estimate for each of a , R , and b is returned for each optimization period as defined by the model, although P and D can vary continuously given the dependence on other inputs that can vary at each time step (e.g., PAR and wind). The optimization period can vary from a minimum of 1 d (defined as midnight to midnight the following day) to a maximum of the entire length of the time series. This differs from the BASE approach where the optimization period is set at 1 d. Sensitivity of the EBASE method to different optimization periods is described below. Second, the EBASE software can accommodate missing observations in the input data by interpolating gaps prior to estimating the metabolic parameters. All gaps are linearly interpolated to allow the model estimation to proceed continuously and any results for an optimization period with gaps larger than 12 h are removed, eliminating the need to pre- and post-process the data when using EBASE. The user can vary the criteria for removing results (e.g., 6 h as a more conservative criteria). Again, this feature was not included in the original BASE method and a complete time series was required for use. A detailed web page (https://fawda123.github.io/EBASE/) describes how to use the package, with explanations of the functions for viewing model results, including a plot of the modeled dissolved oxygen with the observed, a time series plot of the oxygen budget terms (P, R, and D), and a time series plot of the credible intervals for the a , R , and b parameters. All results provided herein were generated using the EBASE R package (v1.0.1, specific materials for this manuscript can be found at https://github.com/fawda123/ebase-manu).

EBASE model estimation

The parameters a , R , and b are estimated by likelihood given the observed data and prior distributions for the parameters. The “Just Another Gibbs Sampler” (JAGS) software (as for BASE, Plummer 2003) is used with the EBASE R package (described above) to estimate probability distributions of the unknown parameters using Markov Chain Monte Carlo (MCMC) simulations (default 10,000) in a Bayesian framework applied to a finite-difference form of Eq. 1. A JAGS model file is included with the package that implements Eq. 1, with options to supply a custom model file as needed. All parameter inputs and outputs for EBASE are shown in Table 1.

The metabolism estimates and their parameters returned by the Bayesian routine implemented in JAGS are affected by the prior distributions assigned to each. As for BASE, relatively uninformed prior distributions following a normal Gaussian distribution are used by default, although the priors can be changed based on previous knowledge of parameters specific to an ecosystem or as informed by other metabolic modeling approaches. Reasonable uninformed prior distributions for EBASE were chosen with mean values using approximate estimates from the literature (Caffrey 2004; Wanninkhof 2014) and standard deviations that were sufficiently large to allow the Bayesian routine to search an unconstrained parameter space.

Specifically, the prior mean for R was chosen as 300 mmol m 2 d 1 (~ 10 g O 2 m 2 d 1 ) using a synthesis based on NERRS data (table 2 in Caffrey 2004). Although this synthesis focused on small, shallow estuaries that are part of the NERRS, this dataset is the largest, longest, and most consistently collected in the United States and it is reasonable to expect others may apply EBASE to these data. The prior mean for a was chosen assuming that P and R are comparable at long time scales, such that a PAR = R , or a = 300 mmol m 2 d 1 / PAR . Using the global mean surface PAR of 80 W m 2 , which is based on a global mean surface total shortwave radiation of 200 W m 2 (Kiehl and Trenberth 1997) and a PAR fraction of total shortwave radiation of 0.4 (Jacovides et al. 2004), the prior mean for a is reasonably set at 4 mmol m 2 d 1 / W m 2 . Lastly, the prior mean for b was chosen as 0.251 cm h 1 / m 2 s 2 following Wanninkhof (2014).

The prior standard deviation for R was based on the standard deviation of the mean values of R at the NERRS sites in Caffrey (2004). The standard deviation of R was 171 mmol m 2 d 1 , which was rounded to 50% of the mean, or 150 mmol m 2 d 1 . The standard deviation for a was set proportionally to 2 mmol m 2 d 1 / W m 2 . For the prior standard deviation of b , we considered using the 20% error estimated for b by Wanninkhof (2014). However, we chose a larger value, 50%, because the wind speed-based gas transfer velocity formulation of Wanninkhof (2014) was mainly developed and calibrated for open-ocean applications, where the complications of surfactants (Frew 1997) and tidal currents (Ho et al. 2016), as well as fetch and suspended matter (Borges and Abril 2011), are expected to be minimal.

Together, the default prior distributions for a , R , and b (Fig. 1) are:
a N 4 , 2 I 0 mmol m 2 d 1 / W m 2 (4)
R N 300 , 150 I 0 mmol m 2 d 1 (5)
b N 0.251 , 0.125 I 0 , 0.502 cm h 1 / m 2 s 2 (6)
where N α β indicates a normal distribution with mean α and standard deviation β and I γ θ is 1 between γ and θ and 0 elsewhere; I has the effect of truncating the normal distribution to minimum and maximum values. All prior distributions were constrained to positive values based on known physical constraints and requirements of the model formula in Eq. 1. In addition, the prior distribution for b was constrained to an upper limit of 0.502 cm h 1 / m 2 s 2 (~ twice the default mean). Initial development of EBASE showed that using an undefined upper limit of b led to unstable and unreasonable estimates for all parameters. Functions in the EBASE R package allow alternative prior distributions from those above.
Details are in the caption following the image
The default prior distributions for a , R , and b used in EBASE. All priors are normal distributions and truncated to positive values. b is also truncated to a maximum of 0.502 cm h 1 / m 2 s 2 . Probabilities have been normalized to the maximum probability.

Assessment

EBASE comparison with known results

A preliminary assessment of the ability of EBASE to produce reasonable parameter estimates for a , R , and b (Eq. 1) was conducted using a synthetic time series of dissolved oxygen concentration created from observed water temperature, salinity, air temperature, PAR , and wind speed measured every 15 min. This assessment evaluated if (1) EBASE estimates similar values for the known parameters used to create the synthetic time series, and (2) how the estimated values change with different model configurations. The synthetic time series used inputs from 1 yr (2021) of continuous data from the NERRS reserve in Apalachicola Bay, Florida (NOAA NERRS 2023). Water temperature and salinity were from the Cat Point water quality monitoring station (29.7021°N, 84.8802°W) and the meteorological observations were from the nearby East Bay station (29.7694°N, 84.8815°W, ~ 10 km north of Cat Point). Missing observations in the water and meteorological data (5.1% and 3.4% of all observations in each dataset, respectively) were filled using autoregressive modeling (Akaike 1969) of the actual data vs. time to create a complete dataset from 01 January to 31 December.

The synthetic oxygen time series was generated using Eq. 1 as a forward calculating model with specified daily values for a , R , and b . The b parameter was fixed at 0.251 cm h 1 / m 2 s 2 (Wanninkhof 2014). Daily values of a and R were estimated by (1) applying the Odum open-water method as implemented in the WtRegDO R package (Beck 2023), (2) computing monthly averages of the resulting daily estimates of P and R , (3) computing the monthly average of the parameter a by dividing the monthly average of P by the monthly average of PAR , and (4) by fitting a spline function to the monthly averages of R and a .

The resulting synthetic time series of light efficiency, dissolved oxygen budget terms ( P , D , and R ), and dissolved oxygen concentration are shown in Fig. 2. The light efficiency has a complex structure, with maxima in the summer, fall, and winter, and a strong minimum in spring (Fig. 2a). The oxygen budget terms (Fig. 2b) reveal that (1) photosynthesis has a structure similar to, yet noisier than, that of light efficiency, reflecting the synoptic-scale variability of PAR ; (2) respiration has the expected structure of being greatest during the summer (Caffrey 2004), stimulated by greater autochthonous organic matter availability and high temperature; and (3) the air–water gas flux mimic productivity on short time scales, with outgassing during high productivity and ingassing during low productivity. The synthetic dissolved oxygen time series shows high variability at multiple time scales (Fig. 2c). There is a prominent diurnal cycle that is superimposed on subseasonal variability, presumably driven by radiation and winds.

Details are in the caption following the image
Synthetic time series for 1 yr of continuous data at Apalachicola Bay. Synthetic data were created using the (a) a parameter to estimate (b) metabolic estimates for gross primary production ( P ), ecosystem respiration ( R ), and gas exchange ( D ), and the (c) dissolved oxygen time series (including saturation, C sat ).

Recovery of model parameters

The synthetic time series was used as input to EBASE to predict metabolic parameters with the default prior distributions above. Two optimization periods of 7 and 30 d were evaluated. This analysis provided a demonstration that the default priors are not entirely unreasonable based on the ability to reproduce the known parameters in the synthetic time series (Fig. 3). Overall, EBASE produced reasonable results for a and R , with higher accuracy using the 30-d optimization period (Fig. 3b) compared to the 7-d optimization period (Fig. 3a). However, the model was unable to return the b parameter with acceptable accuracy, suggesting the data were insufficient to constrain this parameter. Furthermore, many of the 95% credible intervals from the posterior distributions of each parameter did not overlap the known values from the synthetic time series. Estimates for each optimization period may be inaccurate despite overall similarities comparing all estimates to the known values for the whole year.

Details are in the caption following the image
Comparison of EBASE results using default prior distributions to a synthetic time series created with known model parameters ( a , R , and b ). Results are compared for EBASE parameters estimated with a (a) 7-d and (b) 30-d optimization period. 95% Credible intervals from the posterior distributions of the parameter estimates from EBASE are also shown.

Sensitivity to priors

Several configurations of the EBASE model can influence how the parameters and metabolic rates are estimated. Two types of sensitivity analyses were conducted to evaluate changes in the results returned by EBASE, where in all cases, the results were compared to the known values in the synthetic time series. First, results were compared to the known values after changing characteristics of their prior distributions. Second, results were compared using a model period of optimization for 1, 7, and 30 d to assess how results varied based on the amount of data used for the Bayesian estimation. Details of these analyses are as follows.

The prior distributions for the EBASE parameters follow truncated normal distributions with defined means ( μ ) and standard deviations ( σ ) (Eqs. 4-6). The sensitivity analysis evaluated changes in the distributions by varying the means and standard deviations from small to large to test the effect of changes in the central tendencies and more or less constrained ranges, respectively, on the results. Low and high values for the means and standard deviations for R were assessed following reasonable ranges from Caffrey (2004) using logic similar to that for choosing the default priors. The minimum and maximum mean values for R were evaluated as 138 and 1009 mmol m 2 d 1 , which we rounded to 1 / 2 and 3 times the mean (150 and 900 mmol m 2 d 1 ) and proportionally for a as 2.0 and 12 mmol m 2 d 1 / W m 2 . The minimum and maximum values for the standard deviations for R and a were chosen as 10% and 1000% of the default mean values to test a range from high precision to completely uninformed values. The mean and standard deviation for the b parameter were not tested and the prior value was set as the fixed constant used in the synthetic time series, 0.251 cm h 1 / m 2 s 2 . There is minimal prior knowledge on expectations for the b parameter and initial assessments with the synthetic time series demonstrated that the parameter was poorly constrained, primarily because the fixed parameter could not be estimated using observed data (i.e., wind, water temperature) that affected the actual realization of b . As such, each unique combination of low and high values for the means and standard deviations for a and R were evaluated, creating 2 4  = 16 different combinations of prior distributions that were used with the synthetic time series in EBASE.

The optimization period used for a time series determines how much data are used to estimate the metabolic parameters. A short period of optimization (e.g., 1 d) may return unstable parameter estimates if forcing factors (e.g., wind, temperature) that affect estuarine biogeochemical rates occur at time scales longer than the chosen period of optimization for EBASE. As such, potentially longer optimization periods may return more stable and robust estimates given that more data are used for parameter estimation, although at the risk of overgeneralizing metabolic rates if biogeochemical variation occurs at time scales less than the optimization period. Results from optimization periods of 1, 7, and 30 d were compared to the synthetic one-year time series ( b was fixed for the sensitivity analysis) based on daily averages for both the synthetic and EBASE results. For the latter, parameters that are only returned as individual values for each optimization period ( a , R , and b ) were assigned as daily values for comparability of summary statistics where n is the same across analyses. For the models with 7- and 30-d optimization periods, the final period in the annual time series was excluded from the results due to incomplete number of observations compared to earlier periods (i.e., the total number of days in the time series was not evenly divided by 7 or 30, resulting in a remainder for the last period). Each optimization period was also evaluated for every unique combination of prior distributions, totaling 48 (16 × 3 optimization periods) unique analyses for the assessment of changing priors of all parameters.

Changing the prior distributions affected the ability of EBASE to return the known parameters from the synthetic time series, with results varying by optimization period. Figure 4 shows a summary of the comparisons of the synthetic data with EBASE for each unique combination of prior distributions and the three optimization periods of 1, 7, and 30 d. The results are shown using Nash–Sutcliffe Efficiency (NSE) values (Nash and Sutcliffe 1970; Moriasi et al. 2007):
NSE = 1 i = 1 n Y i Syn Y i EBASE 2 i = 1 n Y i Syn Y Syn 2 (7)
where Y i is the estimate from EBASE or the synthetic times series for the optimization period i , evaluated for each of five model outputs ( D , DO , R , a , and P ), each of 16 unique combinations of priors, and each of 3 optimization periods. The value n is the number of optimization periods in the 1-yr time series, that is, n = 365 for comparability among the optimization periods. The NSE value is conceptually similar to the coefficient of determination, but varies from to 1. Values in the positive range from 0 to 1 are desirable with 1 being a perfect fit, whereas values in the negative range indicate the mean of the synthetic data is a better predictor than EBASE.
Details are in the caption following the image
Comparison of EBASE results to a synthetic time series created with known model parameters ( a , R , and b ). Results are compared for unique combinations of prior distributions and optimization period. The means ( μ ) and standard deviations ( σ ) are evaluated as low (L) or high (H) values (see the text for details) and the optimization period for EBASE is 1 d, 7 d, or 30 d. The model predictions of DO, gross primary production (P), ecosystem respiration (R), air–water oxygen flux (D), and light efficiency ( a ) are evaluated based on NSE values between the EBASE results and synthetic values. The b parameter is a fixed constant and was not evaluated. Rankings of each combination as the median NSE value across all five model outputs in a row are shown on the right, with the top three as black/bold and bottom three as black/italic.

Several conclusions can be made from the results in Fig. 4 following the patterns of the NSE values. Overall, most models regardless of optimization period or priors were able to show some skill at reproducing the dissolved oxygen time series, which had a median NSE across all optimization periods and priors of 0.91. The only models where the NSE values were less than zero for dissolved oxygen were those where σ of the a and R parameters was low and μ for one of the a and R parameters was high. However, substantial variation in NSE values was observed among all other model outputs, with some very low values of NSE occurring while the DO simulation was fairly good, showing the potential for the model to produce the right answer (accurate DO ) for the wrong reasons (inaccurate P , R , or D ), since DO is simply a mass balance of P , R , and D (Eq. 1). This issue, or equifinality, has been encountered in stream metabolic models (Appling et al. 2018). After dissolved oxygen, gas exchange ( D ) was estimated with the highest median NSE of 0.73. This result makes sense, given that differences in D across all optimization periods and priors are due solely to difference in DO . Conversely, the a parameter was reproduced the most poorly, with a median NSE of −0.75.

By optimization period, median NSE values across all model outputs increased as the number of days used for model optimization increased (1 d = −2.42, 7 d = 0.26, 30 d = 0.6). The top three ranked models were identical for the 1- and 7-d optimization period, whereas the top three models for the 30-d optimization appeared less dependent on the choice of priors. Median NSE values across model outputs for the top models increased with optimization period (1 d = 0.09, 7 d = 0.44, 30 d = 0.64). The NSE values for all model outputs were greater than zero for the top three models in the 30-d optimization period, whereas the a parameter had NSE less than zero for the top model in the 7-d optimization period and R and a had negative NSE values for the top model in the 1-d optimization period. Less than half of the model outputs regardless of optimization period or priors had NSE < 0 (43%). As such, the prior combinations that produced the highest NSE values across all parameters were those where all prior distributions had low μ and σ values for both a and R for the 1- and 7-d optimization periods, whereas the combination of priors did not have a notable effect on the output for the 30-d optimization period. Notably, many of the top models for the shorter optimization periods had at least one high value for σ for a or R , suggesting that models with sufficient flexibility to search a larger parameter space can produce metabolic estimates most similar to actual values.

The actual model results for the best and worst performing combinations of prior distributions for the three optimization periods are shown in Fig. 5 (all results are averaged at the time-step of the optimization period for visual comparability). The best performing models were those with the highest median NSE values across all model outputs in Fig. 4. The best performing models for each optimization period (Fig. 5a,c,e) showed similar results where the model outputs were similar to the synthetic time series, although more variation in the EBASE results were of course observed with the 1-d optimization period. The worst performing models for the 1- and 7-d optimization periods (Fig. 5b,d) demonstrate the negative NSE values that were obtained (i.e., EBASE values much lower or higher than the synthetic values). The worst performing models were caused by constraining EBASE to a small parameter space, such as a high μ and low σ for a as in the bottom row for subplots (b) and (d). In such cases, the DO simulation (4th row) can still be quite good as a result of compensating errors in a and R . The EBASE-derived rates of photosynthesis and respiration are both much higher than in the synthetic data for subplots (b) and (d), errors that compensate well enough to produce fairly accurate recoveries of the DO time series. Furthermore, results for the worst model for the 30-d optimization period in subplot (f) are visually indistinguishable from those of the best model in subplot (e), suggesting that poor estimates from inadequate priors can in part be mitigated using longer optimization periods.

Details are in the caption following the image
Comparison of EBASE results for the best and worst performing models to a synthetic time series created with known metabolic parameters. The best and worst performing models for the 1-d (a,b), 7-d (c,d), and 30-d (e,f) optimization periods are based on the EBASE results with prior distributions that produced the highest and lowest median NSE values across all parameter estimates (Fig. 4). The results are averaged at the time step of the model optimization period.

Impact of noise on parameter recovery

As a final evaluation of EBASE to return known metabolic parameters, a 2nd synthetic time series was created that added estimated effects of noise to the original synthetic time series. The objective of the analysis is to develop an expectation of how metabolic estimates may change using in situ data with noise that may substantially mask a biological signal in dissolved oxygen measurements. The noise estimates were created using a weighted regression analysis (Beck et al. 2015; Beck 2023) on observed dissolved oxygen time series for Apalachicola Bay in 2021. This approach models dissolved oxygen as a function of time (day), hour, and water depth using a moving window approach with weights of the independent variables appropriate for each time period within the windows. The results of this analysis return a predicted and detided dissolved oxygen time series, where the detided results are simply the predictions at average tidal height (see Beck et al. 2015 for details). This method was only applied to dissolved oxygen since it has not been evaluated with any other parameters. Two separate time series of noise, representing residual (any other random process not related to metabolism or tidal advection) or tidal noise, were derived from the observed, predicted, and detided time series. The residual noise was estimated as the difference between the observed and predicted time series and the tidal noise was estimated as the difference between the predicted and detided time series (Fig. 6a). Both the residual and tidal noise were added to the original synthetic time series in Fig. 2c and are shown in Fig. 6b. EBASE was then used on the synthetic time series with noise, then compared with results from the original synthetic time series. The default priors (Eqs. 4, 5) were used with a 7-d optimization period. The prior for the b parameter was fixed at 0.251 cm h 1 / m 2 s 2 following similar logic used for the sensitivity analysis described above.

Details are in the caption following the image
A subset of the synthetic time series (Fig. 2c) and the synthetic time series with noise for evaluating the ability of EBASE to recover known metabolic parameters. The (a) estimated residual and tidal noise added to the (b) synthetic time series are shown.

Figure 7 shows the comparison of the results recovered from EBASE for the synthetic time series with noise (residual and tidal) and for the synthetic time series without noise. EBASE was able to recover reasonable estimates for both a and R , although the results from the noisy time series were slightly biased towards higher values as shown by the blue regression lines on the right side of Fig. 7. The higher values for a will produce higher estimates for P , and combined with R , will produce inflated values for metabolic estimates compared to the results for the synthetic time series without noise. Although the results for the latter were not biased toward higher values, both estimates provided by EBASE had a relatively large range of variability around the known values. As noted above, a longer optimization period could reduce this variability.

Details are in the caption following the image
Comparisons of EBASE to recover parameters a (top) and R (bottom) from a synthetic time series and a synthetic time series with residual and tidal noise included. The left plots show the time series and the right plots show a 1 : 1 comparison for each result. See Fig. 6 for subsets of both dissolved oxygen time series.

EBASE and Odum comparison with real observations

Metabolic estimates from EBASE were further compared to those from existing methods to benchmark and evaluate potential differences from alternative model formulations used by each approach. The observed 1-yr continuous time series described above for water quality and weather data from Apalachicola Bay was used to compare metabolic estimates from EBASE and the Odum open-water method (Odum 1956). The Odum method used an approach described in Murrell et al. (2018) created for estuarine application that uses a gas-exchange approach from Thébault et al. (2008). For a better comparison with the EBASE methods, the gas exchange parameterization in the Odum method was modified to use the Wanninkhof (2014) approach and the b parameter was fixed at 0.251 cm h 1 / m 2 s 2 (as available in the WtRegDO R package, Beck 2023). An additional and fundamental difference between EBASE and the Odum method is that the former is likelihood-based with metabolic rates estimated by fitting the model to the data, whereas the latter is strictly arithmetic-based primarily on integration of the diel dissolved oxygen curve. Thus, potentially different results are expected based on the alternative statistical approaches to estimate the metabolic results. Each comparison also evaluated differences in the results using the observed dissolved oxygen time series and a detided time series using weighted regression (Beck et al. 2015; Beck 2023). The latter comparison provided an assessment of metabolic rates that are expected to be minimally influenced by tidal advection, as a fundamental assumption of metabolic models using in situ dissolved oxygen time series from fixed monitoring stations. The prior distributions for EBASE used the default values (Eqs. 4-6). Similar to the previous analyses, the prior distribution for the b parameter was fixed given the difficulty in recovery. A 1-d model optimization period was used for EBASE for comparability with the Odum method that returns daily estimates.

Pairwise comparisons of the daily estimates of NEM , P , and R returned by each method were evaluated using simple summary statistics, including Pearson correlation coefficients ( ρ ) and root mean square differences (RMSD) of the linear regression fit comparing the same flux type between methods. Figure 8 and Table 2 provide a comparison of the metabolic estimates from the EBASE and Odum methods. Correlations for all metabolic estimates, regardless of the input time series, were positive and significantly correlated, as expected. However, correlations were generally stronger (and RMSDs smaller) for the metabolic results based on the detided dissolved oxygen time series. The observed time series clearly produced a much larger range of values for results from both the EBASE and Odum methods.

Details are in the caption following the image
Comparisons of daily metabolic estimates from the EBASE and Odum methods for one year of continuous monitoring data at Apalachicola Bay. Results for (a) gross primary production ( P ), (b) ecosystem respiration ( R ), and (c) NEM are compared using the observed and detided dissolved oxygen time series as input to each model. Black lines show the 1 : 1 comparison and the red lines show the linear regression fit.
Table 2. Summary statistics of daily metabolic estimates comparing the EBASE and Odum methods for gross primary production ( P ), ecosystem respiration ( R ), and NEM using the observed (left values) and detided (right values) dissolved oxygen time series as input to each model. Summary statistics include Pearson correlation coefficients and RMSD between the metabolic estimates obtained from each method. p-values for correlation coefficients all less than 0.005.
Parameter ρ RMSD ( mmol O 2 m 2 d 1 )
P 0.7/0.71 76.17/14.9
R 0.51/0.49 98.76/27.29
NEM 0.36/0.52 42.28/17.98

The comparisons in Fig. 8 and Table 2 suggest that tidal effects on continuous monitoring data can severely violate assumptions required for methods of estimating ecosystem metabolism (as described in detail in Beck et al. 2015). These effects are easily identified by stronger correlations and lower RMSD using the detided dissolved oxygen. Furthermore, effects of tidal advection can be seen with estimates from the Odum method as negative values for P and R, that is, “anomalous” values. The effects of tidal advection on estimates from EBASE were more subtle as anomalous values cannot be returned based on constraints of the priors (i.e., none can be negative), although the range of values for the metabolic estimates were much larger with observed dissolved oxygen. A similar result (larger estimates for P and R) was observed using the synthetic time series with instrument and tidal noise (Fig. 7). Overall, the results suggest that detiding the dissolved oxygen time series prior to estimating metabolic rates reduces tidal noise and produces more stable estimates with smaller ranges, regardless of the method used.

Discussion

The above analyses demonstrated that EBASE can successfully recover known metabolic parameters from a synthetic time series and provides robust estimates on real data covering a year of observations. The success of these results was predicated on the requirements of EBASE to address several critical needs that existing methods for estimating metabolism do not address for coastal applications. These needs were addressed primarily using a Bayesian framework that estimates the best fit of the model to the data with posterior probabilities describing the likelihood of the fit. This framework enables hypothesis testing of how a model can be fit to data by using prior knowledge in the model fitting process, which results in posterior probabilities describing the certainty of the parameter estimates (Hilborn and Mangel 2013). The advantages of the Bayesian approach have led to widespread adoption over frequentist approaches in many scientific applications, especially in the coastal and marine community (e.g., Borsuk et al. 2001; Myers et al. 2001; Brown 2017), yet these methods have not been rigorously explored for estimating metabolic rates in estuaries.

Our results demonstrated that even using uninformed priors, EBASE can reproduce known metabolic parameters and rates with reasonable certainty. However, initial analyses suggested an inability of the model to estimate stable values for the b parameter that influence gas exchange. This parameter was fixed for the sensitivity analyses and we were unable to evaluate the ability of EBASE to recover it from the synthetic time series. Future work should focus on understanding the sensitivity of EBASE to estimating b where the dominance of the relative processes that manifest signals in the dissolved oxygen time series could vary. For example, estuarine dissolved oxygen at Apalachicola Bay may be dominated by production and respiration, and less so from gas exchange, such that the available data may provide insufficient information for EBASE to estimate b . This aligns with others that have suggested gas exchange may be a relatively small component of the metabolic signal in shallow estuaries of the Gulf of Mexico (Murrell et al. 2018). In such cases, more constrained prior distributions for b could be appropriate or EBASE could be tested in settings with expected larger contributions of gas exchange expressed by dissolved oxygen. For application, users of EBASE may simply use a fixed value for b (e.g., 0.251 cm h 1 / m 2 s 2 ) or perform a simple sensitivity analysis by varying b +/− a small percentage to determine how P and R may change. Further model development may consider alternative approaches for dealing with equifinality, that is, when the same modeled DO time series can be returned with different estimates of P , R , and D . Appling et al. (2018) provide a useful example for a stream metabolic model that addresses equifinality by allowing model parameters to vary with key drivers at sub-daily scales (e.g., gas exchange vs. discharge) and avoiding assumptions that model residuals are uncorrelated.

Our results also confirmed that the effects of tidal advection on metabolic estimates can lead to biases in understanding gross primary production and ecosystem respiration. This result has previously been shown using the Odum open-water method (Kemp and Boynton 1980; Caffrey 2003; Beck et al. 2015) and confirmed herein, whereby results using observed time series can produce over- and under-estimates of metabolic rates with more variation than those without tidal influence (Figs. 7, 8). As a result, detiding dissolved oxygen data is recommended prior to estimating metabolism, regardless of whether EBASE or an alternative method is used. In addition to inaccurate and imprecise metabolic estimates, tidal influences are also most likely observed as negative (or anomalous) values in the production and respiration rates using the Odum method (Caffrey 2003). Tidal effects may be less obvious using EBASE since negative values cannot be obtained based on constraints of the prior distributions, although as noted above, more variable estimates are returned. A potential future approach for developing EBASE could be an explicit formulation of tidal advection in the model using a synoptic tidal height time series in the Bayesian framework. Such an approach would have the advantage of simultaneously detiding and estimating metabolic rates using the same model, whereas using weighted regression prior to EBASE, as used herein, requires additional analysis and assumptions. However, field measurements (e.g., control volume approaches, Falter et al. 2008; Nidzieko et al. 2014) may be required to provide reasonable constraints on the prior distributions for any parameters that quantify advective influences on dissolved oxygen.

As described in the “Materials and procedures” section, EBASE is an estuarine adaptation of BASE (Grace et al. 2015), which was developed for stream applications and some assumptions of the underlying model of the latter were inappropriate for the former. The most critical change made to BASE was adopting the gas transfer velocity parameterization in Wanninkhof (2014), which is primarily wind-based and more appropriate than the formulation in BASE. EBASE also removed the temperature dependency of respiration, consistent with applications of the Odum method to other shallow estuaries (Beck et al. 2015; Murrell et al. 2018). Overall, these changes also reduced the required inputs and many monitoring locations nationwide include the requisite data for applying EBASE (i.e., dissolved oxygen, water temperature, salinity, PAR, and wind speed, as collected by the NERRS). Furthermore, EBASE could be applied to other non-tidal, lotic systems, although additional comparisons with existing methods are needed and the default uninformed prior distributions should be chosen carefully given the justification herein based primarily on estuarine literature (e.g., Caffrey 2004).

EBASE also provides several computational advantages over BASE implemented in the R package that was created for the purposes herein (Beck et al. 2024). Most importantly, EBASE was developed to allow different model optimization periods, whereas BASE was developed to estimate results for a single day. Allowing EBASE to incorporate more than a day of observations in the optimization can likely produce more accurate and precise estimates for the metabolic parameters. Physical and biological characteristics of an ecosystem that affect the metabolic rates are likely acting at time scales longer than a day, for example, ecological and biogeochemical characteristics influencing the a and R parameters (such as community composition and nutrient availability) may persist for several days. Exposing the model to additional observations may produce more stable results as the parameters for the best fit are estimated by the Bayesian routine as a function of the data that are evaluated each optimization period. However, we cannot provide a precise recommendation on the number of days to use for the optimization period as the exact length of time that ecosystem characteristics can affect metabolic rates may not be known and likely varies by location. Our example using the synthetic time series from Apalachicola Bay suggested that the most precise results were obtained using the 30-d optimization period, although results are likely to vary across systems. For most applications, very short (e.g., 1 d) or very long (e.g., > 30 d) are not recommended, such that the former may produce unstable results and the latter may miss important events in the time series producing parameters that are overly generalized. However, an advantage of the Bayesian approach is the ability to evaluate different optimization periods and, therefore, the amount of data on which to estimate key parameters. Hypotheses can be generated on the amount of time over which critical metabolic parameters may vary across systems. These hypotheses may relate to the length of time over which potential factors affect metabolism, for example, storm events may affect metabolism at short time scales and a shorter optimization period could be used, whereas longer optimization periods may be more desirable if interested in long-term, climate-related effects on metabolism. These hypotheses may also consider frequency of continuous monitoring (e.g., 15 min vs. hourly) and how this may influence the results, as this is currently unknown for EBASE.

The EBASE R package can also accommodate missing observations in the input data. This feature allows the estimation of metabolic rates for time series that cover relatively long periods of time (e.g., more than one year), when data gaps are likely to occur for several reasons (e.g., equipment malfunction and routine maintenance). The R package accommodates data gaps using linear interpolation for any required input used by EBASE, allowing the Bayesian routine to provide continuous estimates across the time series. The results are then automatically post-processed to remove any metabolic estimates that exceed a threshold for the number of interpolated observations. The analyst can determine the appropriate length of time to use for excluding results, although the default setting for EBASE is 12 h, where results for an entire optimization period are removed if any interpolated period exceeded 12 h within that period. Although this does not apply to the synthetic time series, some of the estimates using the 2021 observed data for Apalachicola Bay were excluded from the analysis. This feature allows EBASE to be applied more easily to other data sets because an analyst does not need to manually screen data that include missing values prior to analysis. More conservative gaps can be chosen if, for example, semidiurnal tidal signals operating at time scales less than 12 h are expected to influence the results. However, detiding is strongly encouraged in these cases and the default gap size of 12 h that describes the diurnal oxygen signal is likely appropriate after detiding.

Although the EBASE theory and software provide advantages for metabolic estimates, the approach is not without limitations. Like most models, explicit choices are needed to apply EBASE to time series data. First, the use of unconstrained prior distributions was shown to reproduce known metabolic parameters with reasonable certainty, although initial assessments suggested the b parameter was relatively unstable and unconstrained priors may not provide useful estimates. Parameters that are poorly estimated may require constrained priors, although doing so may produce biased results in the absence of additional data to justify a constraint. Field-based measurements or alternative metabolic models could be used for informing priors. As an example, initial application of BASE to estuarine data prior to developing EBASE demonstrated that unstable and unrealistic metabolic rates were returned with uninformed priors. The Odum method was used on the same data to develop an expectation of the range of values for the reaeration coefficient, K , which was then used to create an informed prior distribution for the same parameter using the BASE method. More stable and realistic metabolic estimates were then returned by BASE, demonstrating the value of the Bayesian approach that can incorporate prior knowledge. A similar approach using alternative metabolic models for informing priors could be applied to create more accurate estimates from EBASE. An additional choice for using EBASE is the model optimization period, although some guidance is provided above.

A final limitation of EBASE is the relatively long processing time when applying the method to a time series longer than a few days. For example, the execution time applying EBASE to a year of data on a conventional laptop computer was approximately 40 min, depending on the model settings. This time is compared to the Odum method applied to the same dataset, where results are obtained in a matter of seconds. Given the Bayesian framework used by EBASE, not considering the additional statistical advantages, it is not reasonable to expect comparable processing times between the methods. Regardless, computation times could be reduced with additional hardware improvements (e.g., accessing multiple processing cores) or changing the model estimation methods (e.g., reducing the number of MCMC simulations used by JAGS), although the latter may negatively affect model accuracy.

Comments and recommendations

The development of EBASE represents a new approach for estimating metabolic rates in estuarine settings that leverages existing methods in a Bayesian framework. Our results have demonstrated that unknown metabolic parameters can be estimated with reasonable certainty and EBASE could be a valuable approach to improve the understanding of critical ecosystem processes as the method can be readily applied to other settings. A notable limitation of EBASE was an inability to constrain the gas transfer velocity from a synthetic time series, although this result may be explained by a minimal contribution of gas exchange as expressed in the dissolved oxygen time series. Effects of tidal advection on dissolved oxygen measurements were also observed, demonstrating a violation of the assumption that the measured data represent a water sample having a continuous metabolic history. Further development of EBASE to accommodate a tidal signal, or exploring alternative methods for detiding dissolved oxygen data, are promising avenues of future research to more accurately quantify metabolic parameters in estuaries. Overall, EBASE represents a potentially powerful tool that removes many of the assumptions of existing methods by allowing unknown metabolic parameters to be estimated by the data and can also incorporate existing knowledge for further exploration of estuarine ecosystem properties.

Data availability statement

All materials and data for the manuscript are available at https://github.com/fawda123/ebase-manu. The EBASE R package is available at https://fawda123.github.io/EBASE/.

Acknowledgments

We thank Jason Garwood and Ethan Borque of the Apalachicola National Estuarine Research Reserve for assisting with the deployment and processing of data used herein. We also thank Wade McGillis for assisting in this effort. We thank Darren Giling for initial conversations on applying BASE to estuarine data. We thank three anonymous reviewers that provided helpful feedback that improved the manuscript. This research was funded by award 1924559 from the National Science Foundation to co-PIs Raymond Najjar, Maria Herrmann, and Kathleen Hill.