parcels icon indicating copy to clipboard operation
parcels copied to clipboard

Move to float64 throughout Parcels?

Open erikvansebille opened this issue 7 months ago • 1 comments

Early on in the design of Parcels (pre-v2), we decided to do most computations in float32. With the development of C-grid interpolation in v2, we required float64 accuracy to properly deal with boundary conditions. Still, we left a lot of float32 support under the hood in Parcels

With the recent release of NumPy v2, some of these float32-implementations seem to be breaking some of the unit tests. This probably has to do with this change to data type promotion in NumPy. See also https://github.com/OceanParcels/parcels/pull/1603#issuecomment-2238974528.

This has been quick-fixed in https://github.com/OceanParcels/parcels/pull/1603/commits/20206c23e7f993d6f846c47ca1bdbf9b5f325d15, but ideally, we may want to reconsider the use of float32 in Parcels altogether.

This Issue is a place to discuss/explore what would happen if we move fully to float64 in Parcels

erikvansebille avatar Jul 19 '24 11:07 erikvansebille