In [1]:
import xarray as xr
import atmPy


/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/xarray/core/formatting.py:16: FutureWarning: The pandas.tslib module is deprecated and will be removed in a future version.
  from pandas.tslib import OutOfBoundsDatetime

In [2]:
%matplotlib inline
plt.style.use('hagen_default')

load using xarray


In [5]:
ceil = atmPy.data_archives.arm.read_ceilometer_nc('/Volumes/HTelg_4TB_Backup/arm_data/OLI/ceilometer/oliceilM1.b1.20170522.000013.nc')

In [ ]:


In [30]:
fname = '/Volumes/HTelg_4TB_Backup/arm_data/OLI/kazr/olikazrgeM1.a1.20170522.190520.nc'
data = xr.open_dataset(fname)

In [14]:
data.reflectivity.plot()


Out[14]:
<matplotlib.collections.QuadMesh at 0x1110650b8>

In [15]:
ts = atmPy.general.timeseries.TimeSeries_2D(data.reflectivity.to_pandas())

In [16]:
f,a,pc,cb = ts.plot()
a.set_ylim((0,3000))


Out[16]:
(0, 3000)

In [22]:
snr = data.snr_copol.to_pandas()

In [23]:
reflectivity = data.reflectivity.to_pandas()

In [6]:
from matplotlib.colors import LogNorm

In [5]:
import inspect

In [2]:
fname = '/Volumes/HTelg_4TB_Backup/arm_data/OLI/kazr/olikazrgeM1.a1.20170522.190520.nc'
kazr = atmPy.data_archives.arm.read_kazr_nc(fname)

In [4]:
out = kazr.zoom_time('2017-05-22 19:05:20', '2017-05-22 19:15:00')

In [7]:
out.reflectivity.plot(snr_max=10)


Out[7]:
(<matplotlib.figure.Figure at 0x1103e9b38>,
 <matplotlib.axes._subplots.AxesSubplot at 0x116afecf8>,
 <matplotlib.collections.QuadMesh at 0x117106ba8>,
 None)

In [9]:
type(kazr.reflectivity).__name__


Out[9]:
'Reflectivity'

In [6]:
inspect.getmro(kazr.reflectivity)


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-a2a6ea03c80d> in <module>()
----> 1 inspect.getmro(kazr.reflectivity)

/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/inspect.py in getmro(cls)
    446 def getmro(cls):
    447     "Return tuple of base classes (including cls) in method resolution order."
--> 448     return cls.__mro__
    449 
    450 # -------------------------------------------------------- function helpers

AttributeError: 'Reflectivity' object has no attribute '__mro__'

Kazar and ceilometer


In [2]:
fname = '/Volumes/HTelg_4TB_Backup/arm_data/OLI/kazr/olikazrgeM1.a1.20170522.190520.nc'
kazr = atmPy.data_archives.arm.read_kazr_nc(fname)
ceil = atmPy.data_archives.arm.read_ceilometer_nc('/Volumes/HTelg_4TB_Backup/arm_data/OLI/ceilometer/oliceilM1.b1.20170522.000013.nc')

In [5]:
f,a = plt.subplots()
kazr.reflectivity.plot(ax = a, snr_max=10)
ceil.cloudbase.plot(ax = a)
a.set_ylim((0,1100))
a.set_xlim(kazr.reflectivity.get_timespan())


Out[5]:
(736471.7953725425, 736471.9999775961)

In [ ]: