Comment on gi-2021-27

This manuscript improves a previously developed algorithm to detect thermohaline staircases from temperature and salinity profiles. As the developer of the first algorithm, I see that the improvements suggested in this manuscript are highly valuable. Especially the possibility to operate on dataset with any regular vertical spacing is a significant improvement to the original algorithm. Besides improving the algorithm, the authors apply their algorithm on glider profiles in the North Atlantic Ocean and conclude that the vertical gradients in temperature and salinity determine the height of the mixed layers in the thermohaline staircases. Overall, I think this manuscript is of substantial interest to the scientific community, but there are a few points that need to be addressed before it is ready for publication.

This manuscript improves a previously developed algorithm to detect thermohaline staircases from temperature and salinity profiles. As the developer of the first algorithm, I see that the improvements suggested in this manuscript are highly valuable. Especially the possibility to operate on dataset with any regular vertical spacing is a significant improvement to the original algorithm. Besides improving the algorithm, the authors apply their algorithm on glider profiles in the North Atlantic Ocean and conclude that the vertical gradients in temperature and salinity determine the height of the mixed layers in the thermohaline staircases. Overall, I think this manuscript is of substantial interest to the scientific community, but there are a few points that need to be addressed before it is ready for publication.
Major comment: One of the suggested changes is that the algorithm can now use suboptimal salinity data. As thermohaline staircases have a staircase structure in both the temperature and salinity profiles, I wonder how this adjustment affected the performance of the algorithm. (how do you distinguish thermohaline staircases from thermohaline intrusions, etc.) Because the impact of this change is only discussed qualitatively, it remains unclear whether this simplification can be applied. So therefore, a quantitative discussion on this topic is necessary to justify this adjustment.
Line-by-line comments: line 33-36: These two sentences suggest here that double-diffusive mixing affects the meridional overturning circulation. However, this effect seemed to be negligible small when considering the contribution of the mixing by thermohaline staircases (https://doi.org/10.1038/s43247-021-00113-x). Therefore, this suggestion needs to be either weakened or given more context.
line 40: What do you mean with 'steps'? Is that the mixed layer thickness? Or do you refer to the height of the temperature and salinity steps between the mixed layers? line 50: 'Firstly, the Turner angle must fall in the regime favourable to double diffusive processes of diffusion-convection (−90â¦≤Tu ≤−45â¦) or salt finger (45â¦≤Tu ≤90â¦). Secondly, the density ratio must be within a critical range.' The Turner angle and the density ratio are both indicators of the stratification, and can be transformed into each other with the equation: Rρ = −tan(Tu+45â¦). So, this means that the Turner angle and density ratio are in essence two different variables to describe the same thing. Therefore, it is not clear to me why the Turner angle and density ratio are described as two different criteria here.  Fig. 9, it seems that the masks of the Turner angle (Fig.  9a), the density ratio (Fig. 9b) and the salinity gradient (Fig. 9d) are all valid, while the temperature gradients (Fig. 9c) changes in time. Can you explain why you use all 4 criteria, instead of just the temperature gradient, as that appears to be the governing one.
lines 200-203: It is not entirely clear to me on which data the results are based in different sections. For example, the glider data is obtained in the North Atlantic, while they are here compared to thermohaline staircases in the Mediterranean Sea. This is confusing, because Fig. 1 and Fig. 5 contain observations from the Mediterranean Sea.
line 224: In the Arctic, the raw data of the Ice-Tethered Profilers can be used to analyze the thermohaline staircases. The vertical resolution of this data is much higher than the Argo floats. I think it is worth mentioning that there has been studies that analyzed the Arctic staircases (for example: https://doi.org/10.1002/2016JC012419), before discussing how gliders can be used in that region as well.  'We used the parameter set demonstrated in profile iii for this study'. What are exact numbers / settings that you used? And does that mean that you only used temperature profiles to detect the staircases throughout this study? How did that affect your results? line 301: If your algorithm works on any regular vertical spacing, could you then apply it as well to the dataset of VDB? If so, you can make a comparison between the two algorithms and more quantitatively (compared to Figure 5) discuss how and where the detection of staircases differ. Such an analysis would also clarify whether using only temperature profiles give significant different results.
line 305: can you elaborate more on how you can use your study to improve model subgrid parameterizations?
Other comments: the figures do not appear in chronological order.