In [2]:
from ahh import vis, exp

In [3]:
da = exp.arr_ds()['air'] # initialize data
da


Out[3]:
<xarray.DataArray 'air' (time: 366, lat: 73, lon: 144)>
[3847392 values with dtype=float64]
Coordinates:
  * lat      (lat) float32 90.0 87.5 85.0 82.5 80.0 77.5 75.0 72.5 70.0 67.5 ...
  * lon      (lon) float32 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 22.5 ...
  * time     (time) datetime64[ns] 1948-01-01 1948-01-02 1948-01-03 ...
Attributes:
    long_name:     mean Daily Air temperature at sigma level 995
    units:         degK
    precision:     2
    GRIB_id:       11
    GRIB_name:     TMP
    var_desc:      Air temperature
    dataset:       NCEP Reanalysis Daily Averages
    level_desc:    Surface
    statistic:     Mean
    parent_stat:   Individual Obs
    actual_range:  [ 188.29000854  315.29998779]
    valid_range:   [ 185.16000366  331.16000366]

In [4]:
ax = vis.plot_map(da[35], contour=range(280, 290, 5)) # provide the intervals to contour; here contour 280, 285


/home/solactus/anaconda3/lib/python3.5/site-packages/matplotlib/ticker.py:1856: UserWarning: Steps argument should be a sequence of numbers
increasing from 1 to 10, inclusive. Behavior with
values outside this range is undefined, and will
raise a ValueError in future versions of mpl.
  warnings.warn('Steps argument should be a sequence of numbers\n'

In [5]:
ax = vis.plot_map(da[0], da.lat, da.lon, wrap=True,
                  data2=da[0].values, # you don't need to provide lats2, lons2 though; it'll inherit
                  contour=[260, 285, 290]) # can be non-monotonically increasing contours too



In [7]:
ax = vis.plot_map(da[0], contour=[260, 285, 290]) # can be non-monotonically increasing contours too



In [8]:
ax = vis.plot_map(da[0].values, da.lat, da.lon, wrap=True, # can also add contour2 for dotted lines
                  data2=da[0].values, contour=[285], contour2=[295, 300]) # commonly used to differentiate negative values



In [12]:
ax = vis.plot_map(da[0], # can also stipple; commonly used for showing statistical significance
                  stipple=[290, 295], # here stipple values greater than 290 up to 295
                  contour=range(295, 305, 5), contour2=[285, 290]) # can mix in contour and contour2 too
# but not recommended to add all of them unless you have a good reason to as it gets super messy fast!



In [ ]: