This issue is part of the JOSS review (openjournals/joss-reviews#2497)
The general_depth_subset function assumes that depth values do not cross z = 0, i.e. that the input depths are either all positive or all negative. While this is typically the case for in-situ measurement, where z = 0 is set at the water's surface, some datasets, particularly modeled ones, set z = 0 to mean sea level (in which case, depths are mostly negative but can exceed zero when sea surface height is higher than average). You may want to consider handling this not-too-uncommon case, given the plan to continue incorporating new data sources into the toolbox.
At the very least, a user trying to subset something across, for example, [-100 2] should be warned that the 2 will be treated as 2 below the surface, not above.
This issue is part of the JOSS review (openjournals/joss-reviews#2497)
The general_depth_subset function assumes that depth values do not cross z = 0, i.e. that the input depths are either all positive or all negative. While this is typically the case for in-situ measurement, where z = 0 is set at the water's surface, some datasets, particularly modeled ones, set z = 0 to mean sea level (in which case, depths are mostly negative but can exceed zero when sea surface height is higher than average). You may want to consider handling this not-too-uncommon case, given the plan to continue incorporating new data sources into the toolbox.
At the very least, a user trying to subset something across, for example, [-100 2] should be warned that the 2 will be treated as 2 below the surface, not above.