Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds versatile, depth-dependent masking to GliderTools.
For example masking out all data above/below the mixed layer depth. Or above/below a constant depth. Or just the euphotic zone. Or everything above a pycnocline. The possibilities are endless!
The previous implementation was hard coded into the algorithm of the mixed layer depth algorithm. Now the masking function is versatile and can take any depth array as input. :)
pre-commit run --all-files
whats-new.rst
api.rst
Example image: Return all data below mixed-layer depth. How to reproduce is sufficiently documented in our .docs/physics.md, which is the basis of https://glidertools.readthedocs.io/.