[python-users] Siphon/MetPy: Invalid height data read from U of Wyoming RAOBs

<html><head><meta http-equiv="content-type" content="text/html; 
charset=utf-8"></head><body style="overflow-wrap: break-word; 
-webkit-nbsp-mode: space; line-break: after-white-space;"><span 
style="font-size: 14px;">Hello,</span><div><span style="font-size: 
14px;"><br></span></div><div><span style="font-size: 14px;">I recently 
encountered&nbsp;a&nbsp;situation in which the data returned by Siphon’s client 
for the&nbsp;University of Wyoming Upper Air 
archive&nbsp;contained&nbsp;invalid height data. (Please see 
below.)</span></div><div><span style="font-size: 
14px;"><br></span></div><div><div style="caret-color: rgb(0, 0, 0); color: 
rgb(0, 0, 0);"><span style="font-size: 14px;">Thanks for any assistance or 
advice with this issue,</span></div><div style="caret-color: rgb(0, 0, 0); 
color: rgb(0, 0, 0);"><span style="font-size: 14px;"><br></span></div><div 
style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><span style="font-size: 
14px;">Geoff</span></div></div><div><span style="font-size: 
14px;"><br></span></div><div><span style="font-size: 
14px;"><br></span></div><div><div><div style="caret-color: rgb(0, 0, 0); color: 
rgb(0, 0, 0);"><span style="font-size: 
14px;">-------------------------------------------------------------------------------</span></div></div></div><div><span
 style="font-size: 14px;"><br></span></div><div><span style="font-size: 
14px;">SUMMARY: &nbsp;</span><span style="font-size: 14px; caret-color: rgb(0, 
0, 0); color: rgb(0, 0, 0);">&nbsp;</span><span style="font-size: 14px; 
caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">&nbsp;This&nbsp;involves the 
5/22/2023 12Z RAOB for station OUN. &nbsp;</span><span style="font-size: 
14px;">The heights appeared to be the "actual heights modulo 10km”. &nbsp; 
T</span><span style="font-size: 14px;">he data in the U of Wyoming web form 
does not show any issue, nor is&nbsp;there a problem with the height when using 
Siphon to read the sounding from Iowa State. &nbsp;</span></div><div><span 
style="font-size: 14px;"><br></span></div><div><span style="font-size: 
14px;">My MetPy/Siphon&nbsp;environment is</span></div><div><span 
style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px;">• 
&nbsp; MetPy 1.5.0</span></div><div><span style="font-size: 14px;">• &nbsp; 
Siphon 0.9</span></div><div><span style="font-size: 
14px;"><br></span></div><div><br></div><div><span style="font-size: 14px;">Here 
is a simple example of code to reproduce the situation:</span></div><div><span 
style="font-size: 14px;"><br></span></div><div><div style="caret-color: rgb(0, 
0, 0); color: rgb(0, 0, 0);"><span style="font-size: 
14px;">-------------------------------------------------------------------------------</span></div></div><div><span
 style="font-size: 14px;"><br></span></div><div><div><span style="font-size: 
14px;">from datetime import datetime</span></div><div><span style="font-size: 
14px;">import matplotlib.pyplot as plt</span></div><div><span style="font-size: 
14px;">import numpy as np</span></div><div><span style="font-size: 14px;">from 
siphon.simplewebservice.wyoming import 
WyomingUpperAir</span></div><div><br></div><div><span style="font-size: 
14px;">Year = 2023</span></div><div><span style="font-size: 14px;">Month = 
5</span></div><div><span style="font-size: 14px;">Day = 
22</span></div><div><span style="font-size: 14px;">Hour = 
12</span></div><div><span style="font-size: 
14px;">date=datetime(Year,Month,Day,Hour)</span></div><div><span 
style="font-size: 14px;">station = 'OUN'</span></div><div><span 
style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px;"># 
&nbsp;Read height data</span></div><div><span style="font-size: 14px;">df = 
WyomingUpperAir.request_data(date, station)</span></div><div><span 
style="font-size: 14px;">Z1 = df<span style="caret-color: rgb(0, 0, 0); color: 
rgb(0, 0, 0);">['height'].values</span></span></div><div><span 
style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px;"># 
&nbsp;Data extracted manually from the University of Wyoming Web 
form</span></div><div><span style="font-size: 
14px;"><br></span></div><div><span style="font-size: 14px;">WebForm = 
np.array([ &nbsp;345, &nbsp; 397, &nbsp; 440, &nbsp; 493, &nbsp; 537, &nbsp; 
564, &nbsp; 635, &nbsp; 716, &nbsp; 779,</span></div><div><span 
style="font-size: 14px;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;806, &nbsp; 870, 
&nbsp; 880, &nbsp; 907, &nbsp; 963, &nbsp;1028, &nbsp;1075, &nbsp;1094, 
&nbsp;1122,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 1170, &nbsp;1208, &nbsp;1227, &nbsp;1266, &nbsp;1295, &nbsp;1324, 
&nbsp;1421, &nbsp;1471, &nbsp;1520,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 1540, &nbsp;1822, &nbsp;1863, &nbsp;1966, 
&nbsp;2019, &nbsp;2103, &nbsp;2720, &nbsp;2879, 
&nbsp;2925,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 3097, &nbsp;3132, &nbsp;3261, &nbsp;3356, &nbsp;3392, &nbsp;3416, 
&nbsp;3452, &nbsp;3536, &nbsp;3561,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 3609, &nbsp;3658, &nbsp;3832, &nbsp;3920, 
&nbsp;4072, &nbsp;4227, &nbsp;4292, &nbsp;4410, 
&nbsp;4450,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 4477, &nbsp;4517, &nbsp;4584, &nbsp;4611, &nbsp;4624, &nbsp;4705, 
&nbsp;4954, &nbsp;5067, &nbsp;5110,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 5153, &nbsp;5181, &nbsp;5326, &nbsp;5385, 
&nbsp;5414, &nbsp;5518, &nbsp;5577, &nbsp;5592, 
&nbsp;5607,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 5623, &nbsp;5683, &nbsp;5698, &nbsp;5759, &nbsp;5790, &nbsp;5976, 
&nbsp;6262, &nbsp;6391, &nbsp;6506,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 6523, &nbsp;6589, &nbsp;6656, &nbsp;6774, 
&nbsp;6911, &nbsp;6962, &nbsp;7014, &nbsp;7032, 
&nbsp;7067,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 7102, &nbsp;7119, &nbsp;7137, &nbsp;7261, &nbsp;7279, &nbsp;7297, 
&nbsp;7333, &nbsp;7369, &nbsp;7442,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 7460, &nbsp;7478, &nbsp;7534, &nbsp;7645, 
&nbsp;7683, &nbsp;7701, &nbsp;7739, &nbsp;7834, 
&nbsp;8065,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 8085, &nbsp;8104, &nbsp;8144, &nbsp;8203, &nbsp;8243, &nbsp;8322, 
&nbsp;8383, &nbsp;8423, &nbsp;8444,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 8464, &nbsp;8650, &nbsp;8713, &nbsp;8839, 
&nbsp;8882, &nbsp;8946, &nbsp;8989, &nbsp;9142, 
&nbsp;9186,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; 
&nbsp; &nbsp; 9341, &nbsp;9409, &nbsp;9432, &nbsp;9454, &nbsp;9477, &nbsp;9500, 
&nbsp;9523, &nbsp;9754, &nbsp;9801,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp; 9872, &nbsp;9968, 10040, 10138, 10187, 
10336, 10512, 10720, 10800,</span></div><div><span style="font-size: 
14px;">&nbsp; &nbsp; &nbsp; &nbsp;10907, 10934, 10988, 11015, 11070, 11407, 
11465, 11581, 11640,</span></div><div><span style="font-size: 14px;">&nbsp; 
&nbsp; &nbsp; &nbsp;11880, 11911, 11942, 12003, 12066, 12160, 12286, 12351, 
12416,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; &nbsp; 
&nbsp;12754, 13112, 13611, 13814, 13980, 14421, 14607, 15094, 
15352,</span></div><div><span style="font-size: 14px;">&nbsp; &nbsp; &nbsp; 
&nbsp;15564, 15784, 15896, 16068, 16550])</span></div></div><div><span 
style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px;"># 
&nbsp;Simple plot of the data. &nbsp;The third plot shows the "modulo 10k" of 
the Webform data for comparison.</span></div><div><span style="font-size: 
14px;"><br></span></div><div><div><span style="font-size: 14px;">fig, axes = 
plt.subplots(nrows=1, ncols=3, figsize=(10, 5))</span></div><div><span 
style="font-size: 14px;">axes[0].plot(z1)</span></div><div><span 
style="font-size: 
14px;">axes[0].set_title('UWYO-siphon')</span></div><div><span 
style="font-size: 14px;">axes[1].plot(WebForm)</span></div><div><span 
style="font-size: 
14px;">axes[1].set_title('UWYO-WebForm')</span></div><div><span 
style="font-size: 14px;">axes[2].plot(WebForm % 10000)</span></div><div><span 
style="font-size: 14px;">axes[2].set_title('WebForm modulo 
10k')</span></div><div><span style="font-size: 
14px;">fig.tight_layout()</span></div></div><div><span style="font-size: 
14px;"><br></span></div><div><div><div style="caret-color: rgb(0, 0, 0); color: 
rgb(0, 0, 0);"><span style="font-size: 
14px;">-------------------------------------------------------------------------------</span></div></div></div><div><span
 style="font-size: 14px;"><br></span></div><div><span style="font-size: 
14px;">Output:</span></div><div><span style="font-size: 
14px;"><br></span></div><div><span style="font-size: 
14px;"><br></span></div><div><img 
src="cid:C5C4F92C-DF42-4F99-9FFB-814D36FEA577" style="box-sizing: unset; 
max-width: 100%; height: auto; caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); 
font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, 
Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI 
Emoji&quot;, &quot;Segoe UI Symbol&quot;; font-size: 14.000001px;" 
alt="+P88Jbv7ya7TIAAAAAElFTkSuQmCC.png"></div><div><span style="font-size: 
14px;"><br></span></div></body></html>

PNG image

  • 2023 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: