OceanParcels / virtualship

Authentic tool and teaching material about sea-based research
https://virtualship.oceanparcels.org/
MIT License
5 stars 1 forks source link

Using private grid._depth for negating depth #75

Closed erikvansebille closed 3 weeks ago

erikvansebille commented 4 weeks ago

As Parcels v3.1.0 has moved from grid.depth to grid._depth, the code for VirtualShip is now broken.

This PR fixes that, although a more proper implementation would be to add a grid.negate_depth() method to Parcels itself?

erikvansebille commented 4 weeks ago

The other issue that causes the CI to fail is not easily fixed within virtualship; it has to do with a bug in a new warning in Parcels, see https://github.com/OceanParcels/Parcels/pull/1747.

In any case, because it's 'only a warning', it doesn't affect the functionality of virtualship. We probably have to wait until Parcels is patched, @VeckoTheGecko?

VeckoTheGecko commented 2 weeks ago

@erikvansebille I wonder if a better solution would be to pin parcels<3.1.0 for the timebeing? That way we can implement .negate_depth and fix the warnings in parcels without having to push out a new release, and virtualship can be good to go for students.

erikvansebille commented 2 weeks ago

Yes I agree; pinning to <3.1.0 (or even 'not 3.1.0'; is that possible?) might be a better solution. Can you implement?

ammedd commented 2 weeks ago

Just so you know. There is no rush to fix things for virtual ship. I plan to have the next group of students working with the code early February.