-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inefficient mask construction in Cross-contour_transport.ipynb
#179
Comments
True that this is very inefficient. But in this code, the mask is only computed once and then the very expensive part is calculating the cross-contour transport (often using daily output). Unless changing the mask code is really easy for someone to do, I don't think it's worth the effort for the time it would save us. |
I'm closing this issue. The code mentioned in this issue only takes 25s and only has to be done once and then the mask is usually saved to file. There is another cell in this script (calculating the distance along contour) which takes 10 minutes. I think it's more worthwhile that we spend our efforts fixing that distance code instead of this mask code. |
I agree it's less of a priority! Only thing I could think that it might be useful for is if you want to calculate transport over a moving SSH contour e.g. at daily resolution or something for a more Lagrangian approach, but that's probably too big a task for cosima recipes! |
The Documented example
Cross-contour_transport.ipynb
creates masks in a very inefficient way (using nested for loops). A more efficient way would be to utilize xarray's functionalityby @angus-g
The text was updated successfully, but these errors were encountered: