cosima-recipes
cosima-recipes copied to clipboard
Small contour ordering bug in `Cross-contour_transport.ipynb`
The cross-contour transport currently has a bug (even when run with the right kernel -note this is an issue too https://github.com/COSIMA/cosima-recipes/issues/327) where the ordering of the contour transports at corners can be slightly wrong. My understanding is that the correct transports are taken across the contour, but when put in the array they can be a slightly different order to the order expected by following the contour (monotonically increasing contour_index
). More details on the ordering issue are here: https://github.com/COSIMA/cosima-recipes/issues/291#issuecomment-1747990241
This is currently a warning ("Alert") in the notebook. It shouldn't affect cumulative sums of transport or transport calculations with smoothing or averaging, but it might make a difference if you're looking very locally at the transport values.
It would require some changes to the algorithm that determines where cells are positioned relative to each other. I might be missing something but this seems quite tricky as there are there are a lot of possible configurations of the contour when diagonal connections are allowed.