Repository: Unidata/siphon
Pull request #696 (2023-05-23 18:01:07)

MNT: Fix WyomingUpperAir height folding
Pandas `read_fwf` only infers column widths based on the first 100 rows, leading to cut off values in later rows. Define column widths explicitly fixes this. Cut off after 8 columns since we ignore those anyway.

Thanks to the issue report in the python-users unidata mailing list and credit to @kgoebber for similar solution and test changes/additions.

#### Checklist

- [X] Tests added


Patch:
diff --git a/src/siphon/simplewebservice/wyoming.py b/src/siphon/simplewebservice/wyoming.py
index 25761f95..305ba8e0 100644
--- a/src/siphon/simplewebservice/wyoming.py
+++ b/src/siphon/simplewebservice/wyoming.py
@@ -71,7 +71,9 @@ class WyomingUpperAir(HTTPEndPoint):
         soup = BeautifulSoup(raw_data, 'html.parser')
         tabular_data = StringIO(soup.find_all('pre')[0].contents[0])
         col_names = ['pressure', 'height', 'temperature', 'dewpoint', 'direction', 'speed']
-        df = pd.read_fwf(tabular_data, skiprows=5, usecols=[0, 1, 2, 3, 6, 7], names=col_names)
+        df = pd.read_fwf(tabular_data, widths=[7] * 8, skiprows=5,
+                         usecols=[0, 1, 2, 3, 6, 7], names=col_names)
+
         df['u_wind'], df['v_wind'] = get_wind_components(df['speed'],
                                                          np.deg2rad(df['direction']))
 


Test patch:
diff --git a/tests/fixtures/wyoming_sounding_heights b/tests/fixtures/wyoming_sounding_heights
new file mode 100644
index 00000000..5dcd894a
--- /dev/null
+++ b/tests/fixtures/wyoming_sounding_heights
@@ -0,0 +1,328 @@
+interactions:
+- request:
+    body: null
+    headers:
+      Accept:
+      - '*/*'
+      Accept-Encoding:
+      - gzip, deflate, br
+      Connection:
+      - keep-alive
+      User-Agent:
+      - Siphon (0.9.post348+g7db2634.d20230523)
+    method: GET
+    uri: http://weather.uwyo.edu/cgi-bin/sounding/?region=naconf&TYPE=TEXT%3ALIST&YEAR=2023&MONTH=05&FROM=2212&TO=2212&STNM=OUN
+  response:
+    body:
+      string: "<HTML>\n<TITLE>University of Wyoming - Radiosonde Data</TITLE>\n<BODY
+        BGCOLOR=\"white\">\n<H2>72357 OUN Norman Observations at 12Z 22 May 2023</H2>\n<PRE>\n-----------------------------------------------------------------------------\n
+        \  PRES   HGHT   TEMP   DWPT   RELH   MIXR   DRCT   SKNT   THTA   THTE   THTV\n
+        \   hPa     m      C      C      %    g/kg    deg   knot     K      K      K
+        \n-----------------------------------------------------------------------------\n
+        1000.0    142                                                               \n
+        \ 977.0    345   12.8   12.8    100   9.59      0      0  287.9  314.8  289.5\n
+        \ 971.0    397   15.0   12.7     86   9.59    145     10  290.6  317.9  292.3\n
+        \ 966.0    440   16.0   13.0     82   9.83    151     12  292.0  320.2  293.8\n
+        \ 960.0    493   16.6   14.0     85  10.57    159     15  293.1  323.5  295.0\n
+        \ 955.0    537   16.2   14.1     87  10.71    165     17  293.2  324.0  295.1\n
+        \ 952.0    564   16.0   14.2     89  10.80    165     17  293.2  324.2  295.1\n
+        \ 944.0    635   15.6   14.3     92  10.97    167     16  293.5  325.0  295.5\n
+        \ 935.0    716   15.2   13.3     88  10.36    168     14  293.9  323.8  295.8\n
+        \ 928.0    779   15.0   10.1     73   8.43    169     13  294.4  318.9  295.9\n
+        \ 925.0    806   14.8   10.0     73   8.40    170     13  294.4  318.9  295.9\n
+        \ 918.0    870   14.6    8.8     68   7.78    165     10  294.9  317.6  296.3\n
+        \ 917.0    880   14.6    8.6     67   7.70    162     10  295.0  317.5  296.3\n
+        \ 914.0    907   14.6    6.6     59   6.73    155      9  295.2  315.0  296.4\n
+        \ 908.0    963   14.2    9.2     72   8.10    140      8  295.4  319.1  296.8\n
+        \ 901.0   1028   13.8    8.8     72   7.95    122      7  295.6  318.9  297.0\n
+        \ 896.0   1075   13.6    8.6     72   7.88    109      7  295.9  319.0  297.3\n
+        \ 894.0   1094   13.4   10.2     81   8.81    104      6  295.9  321.6  297.4\n
+        \ 891.0   1122   13.8    5.8     58   6.53     96      6  296.6  315.9  297.7\n
+        \ 886.0   1170   14.4    1.4     41   4.80     83      5  297.7  312.2  298.5\n
+        \ 882.0   1208   14.2    0.2     38   4.42     72      4  297.9  311.3  298.6\n
+        \ 880.0   1227   14.0    1.0     41   4.70     67      4  297.8  312.1  298.7\n
+        \ 876.0   1266   14.8  -12.2     14   1.72     56      3  299.1  304.6  299.4\n
+        \ 873.0   1295   14.8   -7.2     21   2.56     48      3  299.3  307.4  299.8\n
+        \ 870.0   1324   15.0  -10.0     17   2.06     40      2  299.9  306.4  300.2\n
+        \ 860.0   1421   14.8  -14.2     12   1.49     14      1  300.6  305.5  300.9\n
+        \ 855.0   1471   14.8  -13.2     13   1.63      0      0  301.1  306.4  301.4\n
+        \ 850.0   1520   14.4  -13.6     13   1.58    295      1  301.2  306.4  301.5\n
+        \ 848.0   1540   14.2  -12.8     14   1.69    296      1  301.2  306.7  301.5\n
+        \ 820.0   1822   13.0  -25.0      5   0.62    307      3  302.8  305.0  303.0\n
+        \ 816.0   1863   13.0   -3.0     33   3.77    309      4  303.3  315.1  304.0\n
+        \ 806.0   1966   12.2    1.2     47   5.21    313      4  303.5  319.5  304.4\n
+        \ 801.0   2019   12.0   -1.0     41   4.46    316      5  303.8  317.7  304.6\n
+        \ 793.0   2103   11.6   -0.4     43   4.71    319      5  304.3  318.9  305.1\n
+        \ 736.0   2720    6.8    1.9     71   5.98    345     10  305.6  324.0  306.7\n
+        \ 722.0   2879    5.6    2.4     80   6.36    355     10  305.9  325.5  307.1\n
+        \ 718.0   2925    5.2    2.6     83   6.47    347     10  306.0  325.9  307.2\n
+        \ 703.0   3097    4.7    0.3     73   5.62    315     10  307.3  324.8  308.3\n
+        \ 700.0   3132    4.6   -0.1     72   5.46    315     10  307.6  324.6  308.6\n
+        \ 689.0   3261    3.8   -3.2     60   4.41    325     10  308.1  322.0  308.9\n
+        \ 681.0   3356    3.2   -1.3     72   5.14    312     11  308.4  324.6  309.4\n
+        \ 678.0   3392    3.2   -1.8     70   4.97    308     11  308.8  324.5  309.7\n
+        \ 676.0   3416    3.0   -5.0     56   3.92    304     11  308.8  321.4  309.6\n
+        \ 673.0   3452    3.0   -4.0     60   4.25    300     11  309.2  322.8  310.0\n
+        \ 666.0   3536    2.8  -10.2     38   2.66    288     12  309.9  318.6  310.4\n
+        \ 664.0   3561    2.8  -11.2     35   2.46    285     12  310.2  318.3  310.7\n
+        \ 660.0   3609    2.4   -7.6     48   3.29    283     12  310.3  320.9  310.9\n
+        \ 656.0   3658    2.0  -10.0     41   2.74    281     12  310.4  319.3  310.9\n
+        \ 642.0   3832    0.6   -9.4     47   2.94    274     13  310.7  320.3  311.2\n
+        \ 635.0   3920   -0.3   -5.3     69   4.08    271     13  310.6  323.7  311.4\n
+        \ 623.0   4072   -1.3   -8.3     59   3.31    265     13  311.2  322.0  311.8\n
+        \ 611.0   4227   -2.3  -11.3     50   2.65    279     12  311.8  320.5  312.3\n
+        \ 606.0   4292   -2.9  -10.9     54   2.77    285     12  311.8  320.9  312.3\n
+        \ 597.0   4410   -4.1  -10.1     63   2.99    285     13  311.8  321.6  312.3\n
+        \ 594.0   4450   -4.3  -11.3     58   2.73    285     13  312.0  321.0  312.5\n
+        \ 592.0   4477   -4.5  -10.5     63   2.92    285     13  312.1  321.6  312.6\n
+        \ 589.0   4517   -4.9  -10.9     63   2.85    285     13  312.1  321.4  312.6\n
+        \ 584.0   4584   -5.5  -11.5     63   2.73    281     13  312.1  321.1  312.6\n
+        \ 582.0   4611   -5.7  -12.7     58   2.49    280     14  312.2  320.4  312.6\n
+        \ 581.0   4624   -5.7  -13.7     53   2.30    279     14  312.3  320.0  312.8\n
+        \ 575.0   4705   -5.5  -22.5     25   1.10    275     14  313.5  317.3  313.7\n
+        \ 557.0   4954   -6.5  -30.5     13   0.55    261     16  315.2  317.2  315.3\n
+        \ 549.0   5067   -6.7  -27.7     17   0.72    254     17  316.2  318.8  316.4\n
+        \ 546.0   5110   -7.1  -24.1     24   1.00    252     17  316.3  319.8  316.5\n
+        \ 543.0   5153   -7.5  -16.5     49   1.95    250     18  316.3  322.9  316.7\n
+        \ 541.0   5181   -7.7  -14.7     57   2.27    248     18  316.4  324.1  316.8\n
+        \ 531.0   5326   -8.8  -15.8     57   2.11    240     19  316.7  323.9  317.1\n
+        \ 527.0   5385   -9.3  -16.3     57   2.04    237     18  316.8  323.8  317.2\n
+        \ 525.0   5414   -9.5  -15.5     62   2.19    235     17  316.9  324.4  317.4\n
+        \ 518.0   5518  -10.1  -17.1     57   1.94    229     14  317.4  324.1  317.8\n
+        \ 514.0   5577   -9.5  -28.5     20   0.71    226     13  318.9  321.5  319.0\n
+        \ 513.0   5592   -9.7  -26.7     24   0.84    225     12  318.8  321.9  319.0\n
+        \ 512.0   5607   -9.7  -28.7     20   0.70    224     12  319.0  321.6  319.1\n
+        \ 511.0   5623   -9.9  -19.9     44   1.55    223     12  318.9  324.3  319.2\n
+        \ 507.0   5683  -10.4  -17.2     57   1.97    220     10  319.1  325.8  319.4\n
+        \ 506.0   5698  -10.5  -16.5     61   2.09    221     10  319.1  326.3  319.5\n
+        \ 502.0   5759  -10.9  -15.7     68   2.25    227     11  319.3  327.0  319.8\n
+        \ 500.0   5790  -11.3  -16.1     68   2.19    230     12  319.2  326.7  319.6\n
+        \ 488.0   5976  -12.5  -18.5     61   1.83    235     13  319.9  326.3  320.3\n
+        \ 470.0   6262  -15.1  -18.8     73   1.85    243     14  320.2  326.6  320.5\n
+        \ 462.0   6391  -15.9  -22.9     55   1.32    246     14  320.8  325.4  321.0\n
+        \ 455.0   6506  -17.1  -22.0     66   1.45    250     15  320.6  325.8  320.9\n
+        \ 454.0   6523  -17.2  -22.9     61   1.34    250     15  320.8  325.5  321.0\n
+        \ 450.0   6589  -17.5  -26.5     45   0.98    249     14  321.2  324.7  321.4\n
+        \ 446.0   6656  -17.9  -25.9     50   1.04    248     13  321.5  325.2  321.7\n
+        \ 439.0   6774  -18.7  -28.7     41   0.82    247     12  321.9  324.9  322.1\n
+        \ 431.0   6911  -20.1  -29.1     45   0.80    246     11  321.8  324.8  322.0\n
+        \ 428.0   6962  -20.5  -25.5     64   1.13    245     10  322.0  326.0  322.2\n
+        \ 425.0   7014  -20.9  -27.9     53   0.91    249     10  322.1  325.4  322.3\n
+        \ 424.0   7032  -21.1  -26.0     65   1.09    250      9  322.1  326.0  322.3\n
+        \ 422.0   7067  -21.3  -27.3     58   0.97    253      9  322.2  325.8  322.4\n
+        \ 420.0   7102  -21.7  -24.3     79   1.28    255      9  322.2  326.8  322.4\n
+        \ 419.0   7119  -21.7  -25.5     71   1.15    257      9  322.4  326.5  322.6\n
+        \ 418.0   7137  -21.9  -24.7     78   1.24    258      9  322.4  326.8  322.6\n
+        \ 411.0   7261  -22.5  -26.4     70   1.08    267      8  323.1  327.1  323.4\n
+        \ 410.0   7279  -22.5  -27.5     64   0.98    268      8  323.4  326.9  323.6\n
+        \ 409.0   7297  -22.5  -30.5     48   0.74    270      8  323.6  326.4  323.7\n
+        \ 407.0   7333  -22.3  -32.3     40   0.63    272      7  324.3  326.7  324.4\n
+        \ 405.0   7369  -22.5  -31.2     45   0.70    275      7  324.5  327.1  324.6\n
+        \ 401.0   7442  -22.9  -28.9     58   0.88    267      9  324.9  328.1  325.1\n
+        \ 400.0   7460  -22.9  -30.9     48   0.73    265      9  325.1  327.9  325.3\n
+        \ 399.0   7478  -23.0  -31.0     48   0.73    265     10  325.2  327.9  325.4\n
+        \ 396.0   7534  -23.3  -31.3     48   0.71    264     10  325.6  328.2  325.7\n
+        \ 390.0   7645  -24.3  -32.3     48   0.66    261     11  325.7  328.1  325.8\n
+        \ 388.0   7683  -24.7  -32.7     47   0.63    260     11  325.6  328.0  325.8\n
+        \ 387.0   7701  -24.9  -32.9     47   0.62    261     11  325.6  327.9  325.7\n
+        \ 385.0   7739  -25.1  -36.1     35   0.46    264     11  325.8  327.6  325.9\n
+        \ 380.0   7834  -25.9  -35.9     39   0.47    272     11  326.0  327.8  326.1\n
+        \ 368.0   8065  -27.9  -42.5     23   0.25    290     12  326.3  327.3  326.3\n
+        \ 367.0   8085  -28.1  -43.1     22   0.23    290     12  326.3  327.2  326.4\n
+        \ 366.0   8104  -28.1  -43.1     22   0.23    291     12  326.6  327.5  326.6\n
+        \ 364.0   8144  -28.3  -36.3     46   0.47    291     12  326.8  328.6  326.9\n
+        \ 361.0   8203  -28.9  -38.9     38   0.37    292     12  326.8  328.2  326.9\n
+        \ 359.0   8243  -29.3  -51.3     10   0.09    292     12  326.8  327.2  326.8\n
+        \ 355.0   8322  -29.7  -49.7     13   0.12    294     12  327.3  327.8  327.3\n
+        \ 352.0   8383  -30.1  -57.1      5   0.05    294     12  327.5  327.7  327.5\n
+        \ 350.0   8423  -30.3  -55.3      7   0.06    295     12  327.8  328.1  327.8\n
+        \ 349.0   8444  -30.3  -43.3     27   0.24    295     12  328.1  329.0  328.1\n
+        \ 348.0   8464  -30.3  -44.3     24   0.22    296     12  328.3  329.2  328.4\n
+        \ 339.0   8650  -32.1  -45.1     26   0.20    298     11  328.4  329.2  328.4\n
+        \ 336.0   8713  -32.5  -41.5     40   0.30    299     11  328.6  329.8  328.7\n
+        \ 330.0   8839  -33.7  -43.7     36   0.24    301     11  328.7  329.7  328.7\n
+        \ 328.0   8882  -33.9  -39.9     55   0.36    301     11  329.0  330.4  329.1\n
+        \ 325.0   8946  -34.5  -38.9     64   0.41    302     11  329.0  330.6  329.1\n
+        \ 323.0   8989  -34.7  -41.7     49   0.31    303     11  329.3  330.5  329.4\n
+        \ 316.0   9142  -36.1  -42.1     54   0.30    305     11  329.4  330.6  329.5\n
+        \ 314.0   9186  -36.5  -40.9     64   0.34    302     11  329.5  330.8  329.6\n
+        \ 307.0   9341  -37.9  -42.6     61   0.29    290     10  329.7  330.8  329.7\n
+        \ 304.0   9409  -38.5  -43.4     60   0.27    279     11  329.7  330.8  329.8\n
+        \ 303.0   9432  -38.7  -43.7     59   0.26    276     11  329.8  330.8  329.8\n
+        \ 302.0   9454  -38.9  -53.9     19   0.08    272     11  329.8  330.1  329.8\n
+        \ 301.0   9477  -38.9  -47.9     38   0.17    269     12  330.1  330.8  330.1\n
+        \ 300.0   9500  -38.9  -46.9     43   0.19    265     12  330.4  331.2  330.5\n
+        \ 299.0   9523  -39.1  -46.8     44   0.19    265     13  330.5  331.3  330.5\n
+        \ 289.0   9754  -40.9  -45.8     59   0.22    268     14  331.1  332.0  331.2\n
+        \ 287.0   9801  -41.1  -47.1     52   0.19    269     15  331.5  332.3  331.5\n
+        \ 284.0   9872  -41.7  -46.0     63   0.22    270     15  331.6  332.5  331.7\n
+        \ 280.0   9968  -42.5  -47.5     58   0.19    272     16  331.8  332.6  331.9\n
+        \ 277.0  10040  -43.3  -47.2     65   0.20    273     16  331.7  332.5  331.7\n
+        \ 273.0  10138  -43.9  -50.9     46   0.13    274     17  332.2  332.8  332.2\n
+        \ 271.0  10187  -44.3  -50.3     51   0.14    275     17  332.3  332.9  332.4\n
+        \ 265.0  10336  -45.5  -54.5     36   0.09    266     17  332.7  333.1  332.7\n
+        \ 258.0  10512  -47.1  -54.0     46   0.10    255     17  332.8  333.2  332.8\n
+        \ 250.0  10720  -49.1  -53.3     61   0.11    250     20  332.9  333.4  333.0\n
+        \ 247.0  10800  -49.9  -53.6     65   0.11    250     21  332.9  333.3  332.9\n
+        \ 243.0  10907  -50.5  -57.5     43   0.07    250     23  333.6  333.8  333.6\n
+        \ 242.0  10934  -50.9  -57.9     43   0.06    250     24  333.4  333.6  333.4\n
+        \ 240.0  10988  -51.1  -59.1     38   0.06    250     25  333.8  334.1  333.9\n
+        \ 239.0  11015  -51.1  -61.1     29   0.04    250     25  334.2  334.4  334.2\n
+        \ 237.0  11070  -51.5  -61.1     31   0.04    250     26  334.4  334.6  334.4\n
+        \ 225.0  11407  -54.3  -61.3     42   0.04    254     25  335.1  335.4  335.2\n
+        \ 223.0  11465  -54.3  -63.3     32   0.03    255     25  336.0  336.2  336.0\n
+        \ 219.0  11581  -55.3  -63.3     36   0.04    256     24  336.2  336.4  336.2\n
+        \ 217.0  11640  -55.1  -65.1     28   0.03    257     24  337.4  337.5  337.4\n
+        \ 209.0  11880  -56.9  -63.9     41   0.03    260     23  338.2  338.4  338.2\n
+        \ 208.0  11911  -57.0  -65.0     36   0.03    260     23  338.5  338.7  338.5\n
+        \ 207.0  11942  -57.1  -66.1     31   0.03    261     24  338.8  339.0  338.8\n
+        \ 205.0  12003  -57.7  -64.7     40   0.03    264     25  338.8  339.0  338.8\n
+        \ 203.0  12066  -57.5  -70.5     18   0.01    266     27  340.1  340.2  340.1\n
+        \ 200.0  12160  -58.1  -70.1     20   0.02    270     29  340.6  340.7  340.6\n
+        \ 196.0  12286  -58.9  -69.9     23   0.02    265     31  341.3  341.4  341.3\n
+        \ 194.0  12351  -58.5  -68.5     26   0.02    264     33  342.9  343.0  342.9\n
+        \ 192.0  12416  -57.7  -72.7     13   0.01    262     35  345.2  345.3  345.2\n
+        \ 182.0  12754  -56.0  -76.9      6   0.01    255     45  353.2  353.3  353.2\n
+        \ 172.0  13112  -54.3  -81.3      2   0.00    263     38  361.9  361.9  361.9\n
+        \ 159.0  13611  -56.0  -83.7      2   0.00    275     28  367.2  367.2  367.2\n
+        \ 154.0  13814  -56.7  -84.7      2   0.00    272     31  369.4  369.4  369.4\n
+        \ 150.0  13980  -55.7  -83.7      2   0.00    270     34  373.9  373.9  373.9\n
+        \ 140.0  14421  -54.1  -84.3      1   0.00    265     51  384.1  384.1  384.1\n
+        \ 136.0  14607  -53.5  -84.5      1   0.00    269     45  388.4  388.4  388.4\n
+        \ 126.0  15094  -56.3  -85.3      1   0.00    280     31  391.9  391.9  391.9\n
+        \ 121.0  15352  -56.1  -86.1      1   0.00    266     34  396.9  396.9  396.9\n
+        \ 117.0  15564  -57.3  -86.3      1   0.00    255     37  398.5  398.5  398.5\n
+        \ 113.0  15784  -58.5  -86.5      2   0.00    259     43  400.2  400.2  400.2\n
+        \ 111.0  15896  -57.9  -86.9      1   0.00    262     46  403.4  403.4  403.4\n
+        \ 108.0  16068  -58.5  -87.0      1   0.00    265     50  405.4  405.5  405.4\n
+        \ 100.0  16550  -60.1  -87.1      2   0.00    280     41  411.3  411.4  411.3\n
+        \  92.8  17014  -63.9  -88.9      2   0.00    280     37  412.7  412.7  412.7\n
+        \  82.0  17764  -67.5  -90.0      3   0.00    280     30  420.3  420.3  420.3\n
+        \  77.0  18145  -69.3  -90.6      3   0.00    255     29  424.1  424.1  424.1\n
+        \  75.9  18232  -69.7  -90.7      3   0.00    260     30  425.0  425.0  425.0\n
+        \  74.5  18344  -67.5  -90.5      3   0.00    272     28  431.9  431.9  431.9\n
+        \  73.0  18467  -67.3  -90.3      3   0.00    286     25  434.8  434.8  434.8\n
+        \  72.0  18550  -67.9  -90.2      3   0.00    295     23  435.3  435.3  435.3\n
+        \  70.0  18720  -69.1  -90.1      3   0.00    300     23  436.2  436.2  436.2\n
+        \  69.4  18771  -69.5  -90.5      3   0.00    304     21  436.4  436.4  436.4\n
+        \  68.0  18893  -68.9  -90.3      3   0.00    315     16  440.3  440.3  440.3\n
+        \  66.0  19071  -68.0  -90.0      3   0.00    300     12  445.9  445.9  445.9\n
+        \  65.7  19098  -67.9  -89.9      3   0.00    299     13  446.8  446.8  446.8\n
+        \  64.0  19254  -68.2  -90.2      3   0.00    290     20  449.4  449.4  449.4\n
+        \  61.0  19541  -68.9  -90.9      3   0.00    330     15  454.2  454.2  454.2\n
+        \  59.0  19740  -69.3  -91.3      3   0.00    300     10  457.5  457.5  457.5\n
+        \  58.3  19811  -69.5  -91.5      3   0.00    303     11  458.7  458.7  458.7\n
+        \  55.7  20084  -66.1  -91.1      2   0.00    316     15  472.5  472.5  472.5\n
+        \  55.0  20161  -65.8  -91.0      2   0.00    320     16  474.9  474.9  474.9\n
+        \  53.0  20386  -65.0  -90.5      2   0.00    350     12  481.8  481.8  481.8\n
+        \  51.0  20619  -64.1  -90.1      2   0.00    330      7  489.1  489.1  489.1\n
+        \  50.9  20631  -64.1  -90.1      2   0.00    331      7  489.5  489.5  489.5\n
+        \  50.7  20655  -64.1  -90.1      2   0.00    331      8  490.1  490.1  490.1\n
+        \  50.0  20740  -64.1  -90.1      2   0.00    335     10  492.0  492.0  492.0\n
+        \  49.0  20864  -64.4  -89.9      2   0.00      0     13  494.1  494.1  494.1\n
+        \  48.2  20964  -64.7  -89.7      2   0.00    359     14  495.8  495.8  495.8\n
+        \  46.8  21145  -63.1  -90.1      2   0.00    357     15  503.8  503.8  503.8\n
+        \  45.9  21266  -59.7  -89.7      1   0.00    356     15  514.8  514.8  514.8\n
+        \  45.0  21389  -59.9  -89.3      1   0.00    355     16  517.1  517.2  517.1\n
+        \  44.0  21530  -60.2  -89.0      1   0.00     20     10  519.8  519.9  519.8\n
+        \  42.9  21688  -60.5  -88.5      1   0.00     52      7  522.9  522.9  522.9\n
+        \  41.0  21971  -60.2  -88.5      1   0.00    110      2  530.3  530.4  530.3\n
+        \  38.0  22445  -59.8  -88.5      1   0.00     50     10  543.1  543.1  543.1\n
+        \  37.0  22612  -59.6  -88.5      1   0.00     60     11  547.6  547.7  547.6\n
+        \  36.1  22766  -59.5  -88.5      1   0.00     27     11  551.9  551.9  551.9\n
+        \  33.9  23162  -56.5  -87.5      1   0.01    301     10  569.8  569.8  569.8\n
+        \  33.0  23333  -56.9  -87.2      1   0.01    265     10  573.2  573.2  573.2\n
+        \  32.5  23430  -57.1  -87.1      1   0.01    260     10  575.1  575.1  575.1\n
+        \  32.0  23529  -56.5  -86.9      1   0.01    255     10  579.2  579.2  579.2\n
+        \  31.0  23731  -55.3  -86.5      1   0.01    290     13  587.7  587.7  587.7\n
+        \  30.0  23940  -54.1  -86.1      1   0.01    290      4  596.6  596.6  596.6\n
+        \  29.5  24048  -53.9  -86.9      1   0.01    265      3  600.0  600.0  600.0\n
+        \  29.4  24070  -53.7  -85.7      1   0.01    260      2  601.1  601.2  601.1\n
+        \  29.0  24157  -54.2  -86.2      1   0.01    240      1  602.1  602.2  602.1\n
+        \  28.3  24314  -55.1  -87.1      1   0.01    252      4  603.8  603.9  603.8\n
+        \  27.2  24568  -53.5  -86.5      1   0.01    271      9  615.2  615.2  615.2\n
+        \  27.0  24615  -53.6  -86.5      1   0.01    275     10  616.2  616.2  616.2\n
+        \  25.4  25007  -54.5  -86.5      1   0.01    291     10  624.5  624.6  624.5\n
+        \  25.0  25109  -53.9  -86.3      1   0.01    295     10  629.0  629.1  629.0\n
+        \  24.0  25373  -52.4  -86.0      1   0.01    340     11  640.8  640.9  640.8\n
+        \  23.0  25648  -50.8  -85.6      1   0.01    340     17  653.2  653.4  653.2\n
+        \  22.8  25704  -50.5  -85.5      1   0.01    348     16  655.8  655.9  655.8\n
+        \  22.0  25937  -50.2  -85.2      1   0.01     20     10  663.4  663.6  663.4\n
+        \  20.7  26335  -49.7  -84.7      1   0.01     20      6  676.6  676.8  676.6\n
+        \  20.0  26560  -49.9  -84.9      1   0.01     20      3  682.7  682.8  682.7\n
+        \  19.7  26659  -50.3  -85.3      1   0.01     29      3  684.4  684.5  684.4\n
+        \  18.2  27179  -46.7  -84.7      1   0.02     77      6  711.4  711.5  711.4\n
+        \  16.0  28034  -46.1  -84.2      1   0.02    155     10  739.8  740.1  739.8\n
+        \  15.8  28117  -46.1  -84.1      1   0.02    169     10  742.7  742.9  742.7\n
+        \  15.4  28288  -44.3  -83.3      1   0.03    196     11  754.0  754.3  754.1\n
+        \  15.0  28465  -43.9  -83.2      1   0.03    225     11  761.0  761.3  761.0\n
+        \  14.2  28833  -43.1  -83.1      0   0.03    261     17  775.8  776.1  775.8\n
+        \  14.0  28928  -43.4  -83.4      0   0.03    270     19  777.9  778.3  778.0\n
+        \  13.4  29222  -44.3  -84.3      0   0.02    261      8  784.6  784.9  784.6\n
+        \  13.0  29427  -43.1  -83.4      0   0.03    255      1  795.5  795.9  795.5\n
+        \  11.9  30025  -39.7  -80.7      0   0.05    319      6  828.0  828.6  828.0\n
+        \  11.1  30501  -39.3  -81.3      0   0.05      9     10  846.1  846.7  846.1\n
+        \  11.0  30562  -39.6  -81.5      0   0.05     15     10  847.3  848.0  847.4\n
+        \  10.0  31210  -42.3  -83.3      0   0.04      0     15  860.5  861.0  860.5\n
+        \   9.9  31278  -42.3  -83.3      0   0.04     16     15  863.0  863.5  863.0\n
+        \   9.4  31628  -42.5  -82.5      0   0.05     97     12  875.1  875.7  875.1\n
+        \   9.0  31925  -40.2  -81.0      0   0.06    165     10  895.0  895.9  895.0\n
+        \   8.5  32315  -37.1  -79.1      0   0.09    197     14  921.7  923.0  921.8\n
+        \   8.2  32563  -37.9  -79.9      0   0.08    216     17  928.1  929.2  928.1\n
+        \   8.0  32734  -35.9  -78.9      0   0.10    230     19  942.6  944.0  942.6\n
+        \   7.3  33369  -36.7  -79.7      0   0.10    264     15  964.3  965.7  964.4\n
+        \   7.0  33660  -35.1  -78.1      0   0.13    280     13  982.5  984.4  982.6\n
+        \   6.5  34180  -32.1  -76.1      0   0.19    287     13 1016.2 1019.0 1016.3\n
+        \   6.2  34513  -32.1  -76.1      0   0.20    292     13 1030.0 1033.0 1030.2\n
+        \   6.0  34747  -29.9  -74.9      0   0.25    295     13 1049.1 1052.8 1049.2\n
+        \   5.8  34988  -27.7  -73.7      0   0.31               1069.0 1073.8 1069.2\n</PRE><H3>Station
+        information and sounding indices</H3><PRE>\n                         Station
+        identifier: OUN\n                             Station number: 72357\n                           Observation
+        time: 230522/1200\n                           Station latitude: 35.18\n                          Station
+        longitude: -97.44\n                          Station elevation: 345.0\n                            Showalter
+        index: 13.38\n                               Lifted index: 4.36\n    LIFT
+        computed using virtual temperature: 4.35\n                                SWEAT
+        index: 13.99\n                                    K index: 7.40\n                         Cross
+        totals index: -2.30\n                      Vertical totals index: 25.70\n
+        \                       Totals totals index: 23.40\n      Convective Available
+        Potential Energy: 0.00\n             CAPE using virtual temperature: 0.00\n
+        \                     Convective Inhibition: 0.00\n             CINS using
+        virtual temperature: 0.00\n                     Bulk Richardson Number: 0.00\n
+        \         Bulk Richardson Number using CAPV: 0.00\n  Temp [K] of the Lifted
+        Condensation Level: 285.47\nPres [hPa] of the Lifted Condensation Level: 913.76\n
+        \  Equivalent potential temp [K] of the LCL: 321.47\n     Mean mixed layer
+        potential temperature: 292.94\n              Mean mixed layer mixing ratio:
+        9.99\n              1000 hPa to 500 hPa thickness: 5648.00\nPrecipitable water
+        [mm] for entire sounding: 23.36\n</PRE>\n<P>Description of the \n<A HREF=\"/upperair/columns.html\">data
+        columns</A>\nor <A HREF=\"/upperair/indices.html\">sounding indices</A>.\n\n<P>\n<FORM>\n<INPUT
+        CLASS=\"button\" TYPE=\"button\" VALUE=\" Close this window \" \n onClick=\"window.close();\">\n<INPUT
+        CLASS=\"button\" TYPE=\"button\" VALUE=\" Select another map \" \n onClick=\"window.blur();\">\n</FORM>\n<HR
+        SIZE=\"1\">\n<I>Interested in graduate studies in atmospheric science?\nCheck
+        out our program at the\n<a href=\"http://www.uwyo.edu/atsc/howtoapply/\"\ntarget=_top>University
+        of Wyoming\n</a></I>\n<HR SIZE=\"1\"><FONT SIZE=\"-1\">\nQuestions about the
+        weather data provided by this site can be\naddressed to <A HREF=\"mailto:ldoolman@uwyo.edu\">\nLarry
+        Oolman (ldoolman@uwyo.edu)</A></FONT>\n<HR SIZE=\"1\">\n<SCRIPT TYPE=\"text/javascript\">\n<!--\nwindow.focus();\n//
+        -->\n</SCRIPT>\n</BODY>\n</HTML>\n"
+    headers:
+      Accept-Ranges:
+      - bytes
+      Connection:
+      - Keep-Alive
+      Content-Length:
+      - '22766'
+      Content-Type:
+      - text/html; charset=UTF-8
+      Date:
+      - Tue, 23 May 2023 17:46:33 GMT
+      ETag:
+      - '"58ee-5fc5e90f13fa5"'
+      Keep-Alive:
+      - timeout=5, max=100
+      Last-Modified:
+      - Tue, 23 May 2023 16:06:12 GMT
+      Server:
+      - Apache
+    status:
+      code: 200
+      message: OK
+version: 1
diff --git a/tests/test_wyoming.py b/tests/test_wyoming.py
index 8179042a..44b58a7d 100644
--- a/tests/test_wyoming.py
+++ b/tests/test_wyoming.py
@@ -29,6 +29,7 @@ def test_wyoming():
 
     assert_almost_equal(df['pressure'][5], 867.9, 2)
     assert_almost_equal(df['height'][5], 1219., 2)
+    assert_almost_equal(df['height'][30], 10505., 2)
     assert_almost_equal(df['temperature'][5], 17.4, 2)
     assert_almost_equal(df['dewpoint'][5], 14.3, 2)
     assert_almost_equal(df['u_wind'][5], 6.60, 2)
@@ -131,3 +132,12 @@ def test_no_data_wyoming():
     """Test Wyoming data when no data are available."""
     with pytest.raises(ValueError):
         WyomingUpperAir.request_data(datetime(2010, 12, 9, 1), 'BOI')
+
+
+@recorder.use_cassette('wyoming_sounding_heights')
+def test_wyoming_heights():
+    """Test that we are properly parsing height data from the Wyoming archive."""
+    df = WyomingUpperAir.request_data(datetime(2023, 5, 22, 12), 'OUN')
+
+    assert_almost_equal(df['height'][140], 10336.0, 2)
+    assert_almost_equal(df['direction'][1], 145.0, 1)