Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonise Field interpolation order to consistently be (time, depth, lat, lon) throughout the code #1646

Open
erikvansebille opened this issue Aug 9, 2024 · 1 comment
Labels

Comments

@erikvansebille
Copy link
Member

erikvansebille commented Aug 9, 2024

Since Parcels v2, the order for Field interpolation has been (time, depth, lat, lon). However, under the hood, there are still multiple cases (especially in JIT-mode) where that order is different. E.g.

https://github.com/OceanParcels/parcels/blob/b6dd5c852134ac78d9e19af575dd8793fbce0fc7/parcels/field.py#L1236-L1240

Or
https://github.com/OceanParcels/parcels/blob/b6dd5c852134ac78d9e19af575dd8793fbce0fc7/parcels/field.py#L1552

For consistency, it might be good to harmonise the order of variables throughout the code-base

@erikvansebille
Copy link
Member Author

Another place where the order is wrong is in the FieldOutOfBoundSurfaceError message (and similar messages):

message = f"{field.name if field else 'Field'} sampled out-of-bound, at ({self.x}, {self.y}, {self.z})"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant