OceanParcels / Parcels

Main code for Parcels (Probably A Really Computationally Efficient Lagrangian Simulator)
https://www.oceanparcels.org
MIT License
297 stars 138 forks source link

Adding new tutorial on the impact of grid and velocity interpolation scheme on trajectories #1769

Open erikvansebille opened 3 days ago

erikvansebille commented 3 days ago

This new tutorial was developed with @sruehs and @michaeldenes during discussions on the relation between grids and interpolation schemes.

erikvansebille commented 1 day ago

Thanks for this clean-up, @VeckoTheGecko. Defining a class is perhaps a bit overkill for a tutorial (we don't do it in other tutorials) but on the other hand can also inspire Parcels users (including me) to work more with classes themselves

Note that there was a small change in your last figure, where the red dots ('Cgrid and analytical advection' were different in your rendering. If I rerun your code, I get the original values for these experiments. Not sure why you get (slightly) different results for analytical advection; perhaps the version of scipy?? Anyways, since we're working on a newer, more robust implementation of AnalyticalAdvection anyways (see #1612), I don't worry too much for now

erikvansebille commented 1 day ago

@michaeldenes or @sruehs, do you still have comments/feedback on this tutorial before I merge into master? We can of course still update/amend it after merging too

VeckoTheGecko commented 1 day ago

Note that there was a small change in your last figure,

Yes, I noticed that as well. I agree that its likely dependencies

Defining a class is perhaps a bit overkill for a tutorial

Yes, that's fair. If it hinders understanding I'm happy to revert (I'm not too committed to the class approach - I just find it more readable but I'm also not the average Parcels user, so good to know what others think :) )