You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, Field.data is in (time, depth, lat, lon) format, but Field interpolation in Kernels is in [time, lon, lat, depth]. That of course is needlessly confusing to users. We should harmonise/standardise this
If/when Parcels move to xarray and Dask (#216), we should carefully rethink in which order we assume the dimensions of Fields to be, also depending on what the most efficient way is for I/O.
Finally, this could also be an opportunity to remove the transposing that is currently done in Fields.from_netcdf()
The text was updated successfully, but these errors were encountered:
The harmonisation of dimension order in Field.data and Kernel.interpolate has now been implemented in #503.
Note that, if you're therefore updating the Parcels code, you should also update your kernels!
That is because the syntax for Field interpolation has changed from the old (time, lon, lat, depth) to the new (time, depth, lat, lon) order.
In order to help you realise that Kernel interpolation syntax has changed, we have also changed the way Kernels are defined. The dt argument in Kernel definition is now gone; use the particle.dt attribute if you need access to the integration timestep.
You will get an error if you run your old Kernels with the latest version of Parcels, which prompts you to update your code:
AssertionError: Since Parcels v2.0, kernels do only take 3 arguments: particle, fieldset, time
!! AND !!
Argument order in field interpolation is time, depth, lat, lon.
At present,
Field.data
is in(time, depth, lat, lon)
format, butField
interpolation inKernels
is in[time, lon, lat, depth]
. That of course is needlessly confusing to users. We should harmonise/standardise thisIf/when Parcels move to
xarray
andDask
(#216), we should carefully rethink in which order we assume the dimensions ofFields
to be, also depending on what the most efficient way is for I/O.Finally, this could also be an opportunity to remove the transposing that is currently done in
Fields.from_netcdf()
The text was updated successfully, but these errors were encountered: