Skip to content

Update dataset interpolation procedure#573

Draft
gmaze wants to merge 13 commits intomasterfrom
improve-interp
Draft

Update dataset interpolation procedure#573
gmaze wants to merge 13 commits intomasterfrom
improve-interp

Conversation

@gmaze
Copy link
Member

@gmaze gmaze commented Jan 8, 2026

The ADMT has recently endorsed a clean vertical interpolation procedure for T/S profiles.

The procedure is described in the EasyOneArgo data product specification and the interpolation method is based on "multiple Piecewise Cubic Hermite Interpolating Polynomials" as introduced by Barker and McDougall method, which is effective in avoiding the production of spurious water masses from interpolation of T and S separately.

The goal of this PR is to implement this new interpolation procedure in Argopy.

The current interpolation method is described here:
https://argopy.readthedocs.io/en/latest/user-guide/working-with-argo-data/data_manipulation.html#pressure-levels-interpolation

The current API is:

press_levels = [0,10,20,30,40,50]
ds_interp = ds.argo.interp_std_levels(press_levels)

which relies on the argopy.utils.linear_interpolation_remap function.

The new API would use the xarray dataset extension design, and provides a new option to select the interpolation method:

ds_interp = ds.argo.interp.spl(press_levels)
ds_interp = ds.argo.interp.spl(press_levels, method='pchip') # default, new EasyOneArgo method
ds_interp = ds.argo.interp.spl(press_levels, method='linear') # Method used in < v1.4.0 (i.e. linear_interpolation_remap)

To complete the EasyOneArgo integration, we could also add the possibility to provide a string instead of an array with pressure levels:

ds.argo.interp.spl('EasyOneArgoLite') # Use pre-defined pressure levels from EasyOneArgo

Rq: Update to BGC variables interpolation will be addressed in another PR

PR to-do list

  • Implement new interpolation procedure for core T/S
  • Validate methods against EasyOneArgo product
  • Check how to interpolate BGC variables with legacy or new functions (to be done in another PR)
  • Document deprecation of the legacy API
  • Add CI tests
  • Update documentation

@gmaze gmaze self-assigned this Jan 8, 2026
@gmaze gmaze added enhancement New feature or request, development argo-core About core variables (P, T, S) labels Jan 8, 2026
@gmaze gmaze moved this from Queued to In Progress in Argopy Management Dashboard Jan 8, 2026
@euroargodev euroargodev deleted a comment from sonarqubecloud bot Jan 25, 2026
@gmaze gmaze marked this pull request as draft February 9, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

argo-core About core variables (P, T, S) enhancement New feature or request, development

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant