MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

Add the calculation of tropopause from sounding data

Open zxdawn opened this issue 6 years ago • 5 comments

Currently, calculation of tropopause isn't available from the Reference Guide. If someone can add that feature, it could benefit a lot for people dealing with common sondes and ozone sondes.

I find the NCL version of calculating thermal tropopause defined by WMO: troppo_wmo. The Fortran source code can be found on the NCL Github: stattrop_dp.f.

Hope that's easy to add it to MetPy :) Thanks in advance!

zxdawn avatar Feb 20 '20 07:02 zxdawn

Thanks for the detailed sources for how it's been calculated elsewhere, that's really helpful. We'll look at including that in a future release.

dopplershift avatar Feb 28 '20 00:02 dopplershift

Thanks to work on a class project by @robertej09, @lbunting, and @PuraCiensualidad, a draft implementation of this is underway. They implemented the NCL method as well as the version in Birner (2006). Please see the README at their repository for a description of the work in progress. I’m told there is some work forthcoming to compare a large number of soundings, and I’ve also sent them some notes about vectorizing the code and adding graphical annotation of the tropopause to the sounding plots. However, the foundational implementation has been coded and checked.

deeplycloudy avatar Dec 17 '20 02:12 deeplycloudy

@deeplycloudy Thanks for the notification, Eric! Nice to see the support of different methods of calculating tropopause. Hope it will be merged soon.

zxdawn avatar Dec 17 '20 03:12 zxdawn

I'm not sure how this compares with:

GEOPHYSICAL RESEARCH LETTERS, VOL. 30, NO. 20, 2042, doi:10.1029/2003GL018240, 2003

dopplershift avatar Jun 21 '22 18:06 dopplershift

Hey @dopplershift

At a glance it looks like this does the same thing. I would like to note an issue that was brought up regarding a typo and some potential discrepancies or cases where the method fails.

See this pdf for a quick derivation of the equation that's implemented in wmo.py. You'll see that, ignoring notation, it's the same as Equation 5 from that paper you cited. One key difference is that the paper cited calculates lapse rates in linear pressure, while ours does it in log(pressure).

Admittedly our code isn't documented as well as I'd like it to be. If you have any other questions let me know and I'd be glad to work through it again.

ana-v-espinoza avatar Jun 21 '22 20:06 ana-v-espinoza