parcels logo

PolyTEOS10_bsq Kernel Bug Identified

Tuesday, August 5th, 2025 (2 days ago)



Update to PolyTEOS10_bsq kernel

In recent days we’ve come across a bug in an application kernel of parcels. The PolyTEOS10_bsq kernel is used to calculate the density of seawater from the temperature and salinity fields. The kernel is based on equation (13) from Roquet et al. (2014) where the density ρ\rho is determined from the summation of a vertical reference profile r0r_0 and a residual function or density anomaly rr. That is, ρ(S,T,z)=r0(z)+r(S,T,z)\rho(S,T,z) = r_0(z) + r(S,T,z).

Up until the fix in v3.1.3 (see PR #2133), the kernel only computed the density anomaly rr, and did not include the vertical reference profile. At the ocean surface this isn’t a problem, as r0(z=0)=0r_0(z=0) = 0 and so the computed density was correct. However, r0(z)>0r_0(z)>0 below the ocean surface, and at relatively deep depths, this value can be significant. For example, at 100 m depth this value is 0.46443 kg/m3^3 and at 500 m depth this value is 2.31175 kg/m3^3, see the figure below.

Vertical reference profile as a function of depth

By using the kernel implementation before the fix in PR #2133, the seawater density at depths below the ocean surface were being underestimated, as the actual seawater density would have otherwise been higher. Simulations that computed vertical velocities (such as sinking/rise velocities) using density differences between a particle and its surrounding seawater may have been impacted.

Below we’ve compiled a list of several papers that may be impacted, but we urge the community to check their own projects for use of this kernel at depth. This list may be updated as we become aware of other potentially impacted papers.

Potentially impacted papers

Back to Blog

parcels logo

© 2025, Parcels core developers. Apache 2.0 Licensed.

Parcels

How to cite ParcelsPapers citing ParcelsBlogBrand AssetsAccessibility