Option to return full (cumulative) profile from thickness_hydrostatic functions
It would be useful if one could calculate the thickness of layers of the full atmosphere in one go, i.e., if thickness_hydrostatic_from_relative_humidity() and thickness_hydrostatic() would (optionally) not only return the full thickness (i.e., between bottom and top) but instead all the layer thicknesses individually.
To explain more technically: The current return value (the full thickness) would then be the top layer of the cumsum of the individual thicknesses.
This would help clean up some of https://github.com/Unidata/MetPy/pull/2064.
+1 in 2022
I want to give this implementation a shot but I am a bit confused about what the interface should be. IMO, the interface should be a combination of several types of usages of the function:
- The user can specify a
bottom, and thedepthdefaults to the full profile; - The user can specify both a
bottomand adepth(1000 - 500 hPa thickness) - The user can specify a
depth, andbottomdefaults to the bottom of the layer - The user can specify that they want the thickness of each individual layer. In this case, the
bottomanddepthare invalid parameters.
It can be quite difficult to specify these three parameters in a single function, i.e., thickness_hydrostatic, as the rich behavior provided by a combination of these parameters can confuse the user. I think it would be better to implement a new function, e.g., thickness_hydrostatic_each_layer, to return the thickness of individual layers, but would also like to know what others think the correct approach should be.