sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
219 stars 112 forks source link

NAN sometimes appears in the thermo window #48

Closed wblumberg closed 6 years ago

wblumberg commented 9 years ago

Found this oddity where the NAN appeared as the SFC LFC for this data:

%TITLE% OUN 150401/1200

LEVEL HGHT TEMP DWPT WDIR WSPD

%RAW% 1000.00, 84.00, -9999.00, -9999.00, -9999.00, -9999.00 970.00, 357.00, 13.00, 13.00, 205.00, 2.00 966.00, 391.15, 14.00, 13.30, -9999.00, -9999.00 954.00, 494.73, 14.60, 11.60, -9999.00, -9999.00 941.00, 609.24, 18.60, 8.60, -9999.00, -9999.00 940.92, 610.00, 18.59, 8.60, 165.00, 22.01 925.00, 753.00, 17.40, 8.40, 175.00, 22.01 918.00, 817.82, 16.80, 8.80, -9999.00, -9999.00 907.69, 914.00, 16.18, 10.34, 175.00, 27.00 898.00, 1005.33, 15.60, 11.80, -9999.00, -9999.00 891.00, 1071.92, 16.60, 7.60, -9999.00, -9999.00 875.75, 1219.00, 16.88, 3.73, 205.00, 16.01 869.00, 1284.86, 17.00, 2.00, -9999.00, -9999.00 850.00, 1473.00, 16.60, 0.60, 270.00, 4.99 844.91, 1524.00, 16.37, 0.53, 255.00, 4.00 820.00, 1778.11, 15.20, 0.20, -9999.00, -9999.00 815.06, 1829.00, 14.76, 0.35, 255.00, 14.01 787.00, 2124.31, 12.20, 1.20, -9999.00, -9999.00 786.09, 2134.00, 12.10, 1.28, 270.00, 25.00 761.00, 2404.73, 9.40, 3.40, -9999.00, -9999.00 757.95, 2438.00, 9.22, 2.61, 270.00, 22.01 751.00, 2514.49, 8.80, 0.80, -9999.00, -9999.00 730.43, 2743.00, 7.30, -1.49, 280.00, 22.01 703.84, 3048.00, 5.30, -4.55, 295.00, 23.00 700.00, 3093.00, 5.00, -5.00, 295.00, 23.00 697.00, 3128.07, 4.80, -5.20, -9999.00, -9999.00 678.00, 3352.90, 3.00, -8.00, -9999.00, -9999.00 652.79, 3658.00, 0.00, -7.76, 285.00, 21.00 647.00, 3729.78, -0.70, -7.70, -9999.00, -9999.00 613.00, 4158.35, -4.50, -17.50, -9999.00, -9999.00 607.00, 4235.81, -4.70, -23.70, -9999.00, -9999.00 604.58, 4267.00, -4.98, -23.90, 295.00, 20.01 578.00, 4618.65, -8.10, -26.10, -9999.00, -9999.00 559.03, 4877.00, -9.65, -38.83, 300.00, 13.00 556.00, 4919.09, -9.90, -40.90, -9999.00, -9999.00 531.00, 5272.25, -12.50, -39.50, -9999.00, -9999.00 516.33, 5486.00, -13.09, -39.11, 275.00, 18.01 516.00, 5490.88, -13.10, -39.10, -9999.00, -9999.00 500.00, 5730.00, -15.10, -43.10, 275.00, 19.00 485.00, 5958.70, -17.30, -42.30, -9999.00, -9999.00 476.17, 6096.00, -17.69, -45.64, 260.00, 27.99 476.00, 6098.63, -17.70, -45.70, -9999.00, -9999.00 451.00, 6498.52, -21.30, -39.30, -9999.00, -9999.00 441.00, 6663.04, -22.90, -34.90, -9999.00, -9999.00 434.00, 6779.88, -23.70, -30.70, -9999.00, -9999.00 425.00, 6932.31, -24.90, -33.90, -9999.00, -9999.00 420.47, 7010.00, -25.29, -31.71, 275.00, 29.00 418.00, 7052.67, -25.50, -30.50, -9999.00, -9999.00 408.00, 7227.46, -26.90, -31.70, -9999.00, -9999.00 400.00, 7370.00, -26.90, -31.90, 250.00, 36.00 390.00, 7552.56, -27.90, -33.90, -9999.00, -9999.00 386.34, 7620.00, -28.42, -34.42, 245.00, 37.01 368.00, 7967.63, -31.10, -37.10, -9999.00, -9999.00 331.00, 8709.79, -37.70, -46.70, -9999.00, -9999.00 310.59, 9144.00, -41.73, -48.64, 250.00, 52.99 302.00, 9335.26, -43.50, -49.50, -9999.00, -9999.00 300.00, 9380.00, -43.70, -49.70, 255.00, 54.00 294.00, 9515.17, -43.90, -52.90, -9999.00, -9999.00 290.00, 9606.63, -44.70, -54.70, -9999.00, -9999.00 283.63, 9754.00, -46.09, -54.19, 255.00, 58.99 280.00, 9839.37, -46.90, -53.90, -9999.00, -9999.00 274.00, 9981.96, -48.10, -55.10, -9999.00, -9999.00 259.00, 10350.10, -49.90, -74.90, -9999.00, -9999.00 258.49, 10363.00, -49.94, -75.60, 265.00, 42.00 252.00, 10528.29, -50.50, -84.50, -9999.00, -9999.00 250.00, 10580.00, -50.90, -84.90, 260.00, 33.99 235.23, 10973.00, -53.78, -83.52, 255.00, 29.99 224.38, 11278.00, -56.01, -82.44, 240.00, 31.00 223.00, 11317.79, -56.30, -82.30, -9999.00, -9999.00 204.00, 11884.03, -57.50, -74.50, 250.00, 48.00 202.00, 11946.64, -56.50, -73.50, -9999.00, -9999.00 200.00, 12010.00, -56.70, -73.70, 255.00, 54.00 199.00, 12041.62, -56.70, -74.70, -9999.00, -9999.00 194.33, 12192.00, -54.84, -76.56, 255.00, 54.99 194.00, 12202.91, -54.70, -76.70, -9999.00, -9999.00 186.00, 12471.42, -54.10, -86.10, -9999.00, -9999.00 180.00, 12680.39, -54.90, -86.90, -9999.00, -9999.00 175.00, 12859.76, -54.50, -87.50, -9999.00, -9999.00 168.00, 13119.45, -55.30, -87.30, -9999.00, -9999.00 165.00, 13234.02, -54.70, -87.70, -9999.00, -9999.00 161.00, 13390.07, -55.30, -87.30, -9999.00, -9999.00 155.00, 13631.23, -55.30, -87.30, -9999.00, -9999.00 151.00, 13797.63, -54.30, -87.30, -9999.00, -9999.00 150.00, 13840.00, -54.50, -87.50, 275.00, 56.99 145.80, 14021.00, -55.30, -88.07, 280.00, 58.99 133.00, 14606.09, -57.90, -89.90, -9999.00, -9999.00 132.49, 14630.00, -58.08, -90.02, 285.00, 31.00 120.13, 15240.00, -62.66, -93.07, 275.00, 43.01 117.00, 15404.74, -63.90, -93.90, -9999.00, -9999.00 114.34, 15545.00, -64.55, -94.32, 290.00, 31.00 108.77, 15850.00, -65.97, -95.23, 285.00, 20.01 106.00, 16007.19, -66.70, -95.70, -9999.00, -9999.00 100.00, 16360.00, -67.10, -96.10, 275.00, 25.00 92.80, 16806.80, -69.30, -97.30, 250.00, 29.00 88.80, 17069.00, -69.39, -97.39, 260.00, 33.99 84.30, 17377.84, -69.50, -97.50, -9999.00, -9999.00 79.00, 17768.75, -64.10, -94.10, -9999.00, -9999.00 73.90, 18172.65, -67.30, -96.30, -9999.00, -9999.00 72.50, 18288.00, -66.52, -95.52, 290.00, 15.00 70.00, 18500.00, -65.10, -94.10, 310.00, 13.00 69.50, 18543.70, -64.70, -94.70, -9999.00, -9999.00 64.80, 18968.88, -66.70, -95.70, -9999.00, -9999.00 63.90, 19053.81, -64.70, -94.70, -9999.00, -9999.00 62.30, 19208.91, -63.70, -93.70, -9999.00, -9999.00 58.10, 19635.59, -64.90, -94.90, -9999.00, -9999.00 54.20, 20062.20, -61.90, -91.90, -9999.00, -9999.00 51.13, 20422.00, -62.48, -92.48, 330.00, 0.99 50.00, 20560.00, -62.70, -92.70, 60.00, 8.00 44.08, 21336.00, -62.86, -92.86, 60.00, 8.99 42.90, 21503.93, -62.90, -92.90, -9999.00, -9999.00 39.95, 21946.00, -61.46, -92.02, 70.00, 18.01 38.04, 22250.00, -60.48, -91.41, 50.00, 16.01 37.70, 22304.85, -60.30, -91.30, -9999.00, -9999.00 34.49, 22860.00, -60.53, -91.53, 80.00, 19.00 32.84, 23165.00, -60.65, -91.65, 50.00, 16.01 32.20, 23287.40, -60.70, -91.70, -9999.00, -9999.00 30.30, 23667.59, -58.90, -89.90, -9999.00, -9999.00 30.00, 23730.00, -59.30, -90.30, 65.00, 27.99 28.37, 24079.00, -59.70, -90.70, 80.00, 27.00 27.02, 24384.00, -60.05, -91.05, 75.00, 24.01 26.10, 24599.70, -60.30, -91.30, -9999.00, -9999.00 23.50, 25256.26, -58.50, -89.50, -9999.00, -9999.00 23.34, 25298.00, -58.49, -89.49, 60.00, 25.99 21.19, 25908.00, -58.37, -89.37, 80.00, 33.00 20.00, 26270.00, -58.30, -89.30, 75.00, 33.99 16.64, 27432.00, -57.12, -88.86, 75.00, 39.01 15.60, 27840.03, -56.70, -88.70, -9999.00, -9999.00 13.70, 28667.94, -54.50, -87.50, -9999.00, -9999.00 12.90, 29056.08, -51.50, -84.50, -9999.00, -9999.00 11.90, 29578.73, -52.70, -85.70, -9999.00, -9999.00 10.36, 30480.00, -50.20, -84.16, 65.00, 33.99 10.30, 30516.98, -50.10, -84.10, -9999.00, -9999.00 10.00, 30710.00, -50.50, -84.50, 60.00, 33.99 9.60, 30975.70, -51.10, -85.10, -9999.00, -9999.00 9.43, 31090.00, -50.06, -84.26, 65.00, 37.01 8.80, 31547.88, -45.90, -80.90, -9999.00, -9999.00 8.40, 31856.80, -46.70, -81.70, -9999.00, -9999.00 8.22, 32004.00, -44.87, -79.87, 45.00, 20.01 8.20, 32017.24, -44.70, -79.70, -9999.00, -9999.00 8.00, 32182.15, -45.30, -80.30, -9999.00, -9999.00 %END%

----- Parcel Information----- * 100mb MIXED LAYER PARCEL * LPL: P=970 T=69F Td=50F MLCAPE: 0 J/kg MLCINH: 0 J/kg MLLI: 1 C MLLI(300mb): 3 C 3km MLCAPE: 0 J/kg NCAPE: 0.00 m/s2

MLLCL: 827mb 1353m MLLFC: -9999mb -9999m MLEL: 827mb 1353m MLMPL: 827mb 1353m All heights AGL

* MU PARCEL IN LOWEST 400mb * LPL: P=898 T=60F Td=53F MUCAPE: 562 J/kg MUCINH: -238 J/kg MULI: -3 C MULI(300mb): -2 C 3km MUCAPE: 0 J/kg NCAPE: 0.09 m/s2

MULCL: 848mb 1135m MULFC: 653mb 3301m MUEL: 264mb 9868m MUMPL: 185mb 12149m All heights AGL

* SFC PARCEL * LPL: P=970 T=55F Td=55F SBCAPE: 0 J/kg SBCINH: 0 J/kg SBLI: 3 C SBLI(300mb): 5 C 3km SBCAPE: 0 J/kg NCAPE: 0.00 m/s2

SBLCL: 970mb 0m SBLFC: -9999mb -9999m SBEL: 970mb 0m SBMPL: 970mb 0m All heights AGL

----- Misc Thermodynamic Parameters ----- Melting Level: 10828.1 Conv Temp: 30.5 WBZ height: 9112.5 DCAPE: 1279.1

----- Moisture ----- Precip Water: 0.81 in 0-1 km mean W: 7.9 g/Kg 0-3 km mean W: 5.8 g/Kg SFC-850 mb mean W: 7.6 g/Kg

500 mb W: 0.2 g/Kg 700 mb W: 3.8 g/Kg 850 mb W: 4.7 g/Kg 925 mb W: 7.5 g/Kg SFC RH: 100 %

-----Delta T and Lapse Rates ----- 700-500mb 20 C 7.9 C/km 850-500mb 32 C 7.6 C/km 0-3 km 10 C 3.7 C/km 3-6 km 23 C 7.9 C/km

----- Vertical Shear ----- 0-1 km BWD 7 kt 0-3 km BWD 22 kt 0-6 km BWD 27 kt 0-6 km mean wind 13.0 kt

----- Storm_Relative Winds/Shear ----- Bunkers storm motion 326/14 kt 0-1 km SRH 108 ms/s2 0-3 km SRH 201 ms/s2

----- Effective Inflow Layer Parameters ----- Effective inflow base 648 m AGL Effective inflow top 648 m AGL Effective SRH 0 ms/s2 Effective BWD 18 kt

----- Composite Parameters ----- Effective-layer SCP 0.0 Effective-layer STP 0.0 Fixed-layer STP 0.0 SHIP 0.0

----- Fire Weather ----- Fosberg Index 1

screen shot 2015-04-01 at 3 14 33 pm

oun

wblumberg commented 9 years ago

This might be related to what @tsupinie talked about with respect to his smoothed Pilger, NE test he did the other day that gave him NAN CIN/CAPE values.

wblumberg commented 9 years ago

This bug has reappeared with this morning's 12 UTC sounding. The 1 similarity between the data source used in this morning's sounding and the above 4/1/2015 sounding is that the surface temperature and dew point are the exact same values. There might be a conditional related to the LCL somewhere in the code that causes the rest of parcelx() to freak out if the temperature and dew point of the parcel are the exact same.

wblumberg commented 9 years ago

We've also mentioned this to Rich Thompson, as this seems to be a bug in NSHARP too.