Read in dropsonde data file from the NOAA P-3 and plot


In [9]:
# Load the needed packages
#from awot.dropsondes.dropsondes import get_dropsonde_data, splitFile
import awot

import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
# Set the project name
Project="DYNAMO"

filename = '/Users/guy/data/dynamo/dropsonde/NOAA_P3_20111116.cls'

In [3]:
#sp = splitFile(filename)

ds = awot.io.read_dropsonde_data(filename, split_file=True)


55 sonde profiles in file, working to split...

In [4]:
ds['201111161245']['fields'].keys()


/Users/guy/anaconda/lib/python2.7/site-packages/IPython/core/formatters.py:92: DeprecationWarning: DisplayFormatter._ipython_display_formatter_default is deprecated: use @default decorator instead.
  def _ipython_display_formatter_default(self):
/Users/guy/anaconda/lib/python2.7/site-packages/IPython/core/formatters.py:669: DeprecationWarning: PlainTextFormatter._singleton_printers_default is deprecated: use @default decorator instead.
  def _singleton_printers_default(self):
Out[4]:
['Azi',
 'Qu',
 'Qt',
 'Temp',
 'Qp',
 'Qrh',
 'spd',
 'Wcmp',
 'Lon',
 'Dewpt',
 'Ele',
 'Lat',
 'QdZ',
 'dir',
 'Qv',
 'Time',
 'Press',
 'Alt',
 'RH',
 'Vcmp',
 'Ucmp']

In [5]:
ds['201111161245']['fields']['Temp']['data']


Out[5]:
masked_array(data = [26.7 -- 26.7 ..., -- -- -11.6],
             mask = [False  True False ...,  True  True False],
       fill_value = 1e+20)

In [7]:
print("Min/Max Temp: %g/%g\n"
      "Min/Max Dewpt: %g/%g\n"
      "Min/Max Pressure: %g/%g\n"%(
        ds['201111161245']['fields']['Temp']['data'].min(), ds['201111161245']['fields']['Temp']['data'].max(),
        ds['201111161245']['fields']['Dewpt']['data'].min(), ds['201111161245']['fields']['Dewpt']['data'].max(),
        ds['201111161245']['fields']['Press']['data'].min(), ds['201111161245']['fields']['Press']['data'].max()))


Min/Max Temp: -11.6/26.7
Min/Max Dewpt: -14.3/22.8
Min/Max Pressure: 428.7/998.6


In [8]:
awot.graph.plot_skewt_logp(ds,'201111161245', x_min=-20, x_max=40)#, p_min=400, p_max=1000)



In [ ]: