PyESPERv1.0.0: a Python implementation of empirical seawater property estimation routines (ESPERs) - Dias, Larissa M.; Carter, Brendan R. (Geoscientific Model Development, 2025)
This project produced a Python language implementation of locally interpolated regression (LIR) and neural network (NN) algorithms from empirical seawater property estimation routines (PyESPERv1.0.0). These routines estimate total alkalinity, dissolved inorganic carbon, total pH, nitrate, phosphate, silicate, and oxygen from geographic coordinates, depth, salinity, and 16 combinations of zero to four additional predictors (temperature and biogeochemical information) and were previously available only in the MATLAB programming language. Here, we document modifications to reduce discrepancies between the implementations, calculate the disagreements between the methods, and quantify Global Ocean Data Analysis Project (GLODAPv2.2022) reconstruction errors with PyESPER. While the PyESPER routine based on neural networks (PyESPER_NN) faithfully reproduces the corresponding MATLAB routine estimates of properties that do not require anthropogenic carbon change information, PyESPER_LIR and – to a lesser extent – PyESPER_NN estimates for total pH and dissolved inorganic carbon do not exactly reproduce the MATLAB routine estimates due to differences in interpolation and extrapolation methods between the programming languages. While the MATLAB and Python LIR-based estimates are not identical, we show that they are similarly skilled at reproducing the GLODAPv2.2022 data product and are thus comparable. This project increases the accessibility of ESPERv1.01.01 algorithms by providing users with code in the freely available Python language and enables future ESPER updates to be released in multiple coding languages.