Skip to content

Change particle.depth to particle.z throughout code and Kernels #2257

@erikvansebille

Description

@erikvansebille

Ever since the start of Parcels, Particle positions are stored in the lon, lat and depth properties. However, particle.depth does not make sense in e.g. the atmosphere, where it would be altitude.

The general vertical coordinate name is z, which is also what is advised in the CF convention for trajectory data.

Note that in the output zarr files, we already use z instead of depth (following CF convention), so using particle.z in Kernels increases the logic of the Parcels workflow.

We could then specify what kind of vertical coordinate z is (depth or altitude) through metadata in the output file (which could inherit/be parsed from the hydrodynamics data).

So should we change particle.depth to particle.z throughout the code? This would requires users updating Kernels, so a bit of effort. But now would be a good moment as we're changing the v4 API anyways.

(Note: let's keep lon and lat - and not change to x and y - to keep aligned with the CF conventions)

Metadata

Metadata

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions