In [1]:
from __future__ import (absolute_import, division, print_function)
from six.moves import (filter, input, map, range, zip)  # noqa

import iris
import iris.plot as iplt
import iris.quickplot as qplt
import matplotlib.pyplot as plt

import numpy
import cartopy.crs as ccrs

from iris.experimental.regrid import regrid_weighted_curvilinear_to_rectilinear

In [2]:
%matplotlib inline

In [55]:
#fname = '/g/data/ua6/drstree/CMIP5/GCM/CSIRO-BOM/ACCESS1-0/historical/mon/ocean/thetao/r1i1p1/thetao_Omon_ACCESS1-0_historical_r1i1p1_185001-185412.nc'
fname = '/g/data/r87/dbi599/drstree/CMIP5/GCM/NOAA-GFDL/GFDL-ESM2M/historicalMisc/mon/ocean/thetao/r1i1p5/dedrifted/thetao_Omon_GFDL-ESM2M_historicalMisc_r1i1p5_200101-200512.nc'
cube = iris.load_cube(fname, 'sea_water_potential_temperature')

In [56]:
print(cube)


sea_water_potential_temperature / (K) (time: 60; depth: 50; grid_latitude: 200; grid_longitude: 360)
     Dimension coordinates:
          time                             x          -                  -                    -
          depth                            -          x                  -                    -
          grid_latitude                    -          -                  x                    -
          grid_longitude                   -          -                  -                    x
     Auxiliary coordinates:
          latitude                         -          -                  x                    x
          longitude                        -          -                  x                    x
     Attributes:
          Conventions: CF-1.5
          associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_ocean_fx_GFDL-ESM2M_historicalMisc_r0i0p0.nc...
          branch_time: 58765
          comment: GFDL experiment name = ESM2M-C1_only_aerosol_HOA1. PCMDI experiment name...
          comments: Note: This model output is presented on the model's tripolar grid. The...
          contact: gfdl.climate.model.info@noaa.gov
          creation_date: 2011-08-22T05:50:54Z
          experiment: other historical forcing
          experiment_id: historicalMisc
          forcing: SD,SS,BC,MD,OC
          frequency: mon
          gfdl_experiment_name: ESM2M-C1_only_aerosol_HOA1
          history: Mon Jun 27 14:02:01 2016: /g/data/r87/dbi599/miniconda2/envs/default/bin/python...
          initialization_method: 1
          institute_id: NOAA GFDL
          institution: NOAA GFDL(201 Forrestal Rd, Princeton, NJ, 08540)
          model_id: GFDL-ESM2M
          modeling_realm: ocean
          original_name: temp
          original_units: K
          parent_experiment_id: piControl
          parent_experiment_rip: r1i1p1
          physics_version: 5
          product: output1
          project_id: CMIP5
          realization: 1
          references: The GFDL Data Portal (http://nomads.gfdl.noaa.gov/) provides access to...
          source: GFDL-ESM2M 2010 ocean: MOM4 (MOM4p1_x1_Z50_cCM2M,Tripolar360x200L50); atmosphere:...
          table_id: Table Omon (31 Jan 2011)
          title: NOAA GFDL GFDL-ESM2M, other historical forcing (run 1) experiment output...
          tracking_id: af083e4d-7ce2-47ff-ab0f-1fbebb2ce7c2
     Cell methods:
          mean: time

In [57]:
print(cube[0, 0])


sea_water_potential_temperature / (K) (grid_latitude: 200; grid_longitude: 360)
     Dimension coordinates:
          grid_latitude                             x                    -
          grid_longitude                            -                    x
     Auxiliary coordinates:
          latitude                                  x                    x
          longitude                                 x                    x
     Scalar coordinates:
          depth: 5.0 m, bound=(0.0, 10.0) m
          time: 2001-01-16 12:00:00, bound=(2001-01-01 00:00:00, 2001-02-01 00:00:00)
     Attributes:
          Conventions: CF-1.5
          associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_ocean_fx_GFDL-ESM2M_historicalMisc_r0i0p0.nc...
          branch_time: 58765
          comment: GFDL experiment name = ESM2M-C1_only_aerosol_HOA1. PCMDI experiment name...
          comments: Note: This model output is presented on the model's tripolar grid. The...
          contact: gfdl.climate.model.info@noaa.gov
          creation_date: 2011-08-22T05:50:54Z
          experiment: other historical forcing
          experiment_id: historicalMisc
          forcing: SD,SS,BC,MD,OC
          frequency: mon
          gfdl_experiment_name: ESM2M-C1_only_aerosol_HOA1
          history: Mon Jun 27 14:02:01 2016: /g/data/r87/dbi599/miniconda2/envs/default/bin/python...
          initialization_method: 1
          institute_id: NOAA GFDL
          institution: NOAA GFDL(201 Forrestal Rd, Princeton, NJ, 08540)
          model_id: GFDL-ESM2M
          modeling_realm: ocean
          original_name: temp
          original_units: K
          parent_experiment_id: piControl
          parent_experiment_rip: r1i1p1
          physics_version: 5
          product: output1
          project_id: CMIP5
          realization: 1
          references: The GFDL Data Portal (http://nomads.gfdl.noaa.gov/) provides access to...
          source: GFDL-ESM2M 2010 ocean: MOM4 (MOM4p1_x1_Z50_cCM2M,Tripolar360x200L50); atmosphere:...
          table_id: Table Omon (31 Jan 2011)
          title: NOAA GFDL GFDL-ESM2M, other historical forcing (run 1) experiment output...
          tracking_id: af083e4d-7ce2-47ff-ab0f-1fbebb2ce7c2
     Cell methods:
          mean: time

In [6]:
fig = plt.figure(figsize=(15, 10))
plt.subplot(111)
qplt.contourf(cube[0,0], 15)
plt.gca().coastlines()

iplt.show()


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-64467a0d8764> in <module>()
      2 plt.subplot(111)
      3 qplt.contourf(cube[0,0], 15)
----> 4 plt.gca().coastlines()
      5 
      6 iplt.show()

AttributeError: 'AxesSubplot' object has no attribute 'coastlines'

Try regular interpolation


In [7]:
lat1 = numpy.arange(-90, 91, 1)
lon1 = numpy.arange(0, 361, 1)

result = cube.interpolate([('latitude', lat1), ('longitude', lon1)], iris.analysis.Linear())


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-7-5a5ae7633c32> in <module>()
      2 lon1 = numpy.arange(0, 361, 1)
      3 
----> 4 result = cube.interpolate([('latitude', lat1), ('longitude', lon1)], iris.analysis.Linear())

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/cube.pyc in interpolate(self, sample_points, scheme, collapse_scalar)
   3505         """
   3506         coords, points = zip(*sample_points)
-> 3507         interp = scheme.interpolator(self, coords)
   3508         return interp(points, collapse_scalar=collapse_scalar)
   3509 

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/__init__.pyc in interpolator(self, cube, coords)
   2120         """
   2121         return RectilinearInterpolator(cube, coords, 'linear',
-> 2122                                        self._normalised_extrapolation_mode())
   2123 
   2124     def regridder(self, src_grid, target_grid):

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_interpolation.pyc in __init__(self, src_cube, coords, method, extrapolation_mode)
    242 
    243         # Perform initial start-up configuration and validation.
--> 244         self._setup()
    245 
    246     @property

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_interpolation.pyc in _setup(self)
    436             self._interp_dims += coord_dims
    437 
--> 438         self._validate()
    439 
    440     def _validate(self):

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_interpolation.pyc in _validate(self)
    451         for coord in self._src_coords:
    452             if coord.ndim != 1:
--> 453                 raise ValueError('Interpolation coords must be 1-d for '
    454                                  'rectilinear interpolation.')
    455 

ValueError: Interpolation coords must be 1-d for rectilinear interpolation.

Try regular regrid


In [8]:
def make_grid(lat_values, lon_values):
    """Make a dummy cube with desired grid."""
    
    #coordsys = iris.coord_systems.RotatedGeogCS(np_lat, np_lon)
    
    latitude = iris.coords.DimCoord(lat_values,
                                    standard_name='latitude',
                                    units='degrees_north',
                                    coord_system=None)
    longitude = iris.coords.DimCoord(lon_values,                     
                                     standard_name='longitude',
                                     units='degrees_east',
                                     coord_system=None)

    dummy_data = numpy.zeros((len(lat_values), len(lon_values)))
    new_cube = iris.cube.Cube(dummy_data, dim_coords_and_dims=[(latitude, 0), (longitude, 1)])
    
    return new_cube

In [9]:
target_grid_cube = make_grid(lat1, lon1)
scheme = iris.analysis.Linear(extrapolation_mode='mask')

In [10]:
cube_regridded = cube.regrid(target_grid_cube, scheme)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-10-6ce035618194> in <module>()
----> 1 cube_regridded = cube.regrid(target_grid_cube, scheme)

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/cube.pyc in regrid(self, grid, scheme)
   3532 
   3533         """
-> 3534         regridder = scheme.regridder(self, grid)
   3535         return regridder(self)
   3536 

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/__init__.pyc in regridder(self, src_grid, target_grid)
   2149         """
   2150         return RectilinearRegridder(src_grid, target_grid, 'linear',
-> 2151                                     self._normalised_extrapolation_mode())
   2152 
   2153 

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_regrid.pyc in __init__(self, src_grid_cube, tgt_grid_cube, method, extrapolation_mode)
     77         # Snapshot the state of the cubes to ensure that the regridder
     78         # is impervious to external changes to the original source cubes.
---> 79         self._src_grid = snapshot_grid(src_grid_cube)
     80         self._tgt_grid = snapshot_grid(tgt_grid_cube)
     81         # Check the target grid units.

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_interpolation.pyc in snapshot_grid(cube)
    170 
    171     """
--> 172     x, y = get_xy_dim_coords(cube)
    173     return x.copy(), y.copy()
    174 

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/analysis/_interpolation.pyc in get_xy_dim_coords(cube)
    147     if len(x_coords) != 1:
    148         raise ValueError('Cube {!r} must contain a single 1D x '
--> 149                          'coordinate.'.format(cube.name()))
    150     x_coord = x_coords[0]
    151 

ValueError: Cube u'sea_water_potential_temperature' must contain a single 1D x coordinate.

Try experimental regrid

See this page for details.


In [58]:
src_cube = cube[0, 0]
weights = numpy.ones(src_cube.shape)

In [51]:
target_grid_cube.coord('longitude').guess_bounds()
target_grid_cube.coord('latitude').guess_bounds()


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-51-d1f886e452e8> in <module>()
----> 1 target_grid_cube.coord('longitude').guess_bounds()
      2 target_grid_cube.coord('latitude').guess_bounds()

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/coords.pyc in guess_bounds(self, bound_position)
   1084 
   1085         """
-> 1086         self.bounds = self._guess_bounds(bound_position)
   1087 
   1088     def intersect(self, other, return_indices=False):

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/coords.pyc in _guess_bounds(self, bound_position)
   1032 
   1033         if self.bounds is not None:
-> 1034             raise ValueError('Coord already has bounds. Remove the bounds '
   1035                              'before guessing new ones.')
   1036 

ValueError: Coord already has bounds. Remove the bounds before guessing new ones.

In [59]:
print(target_grid_cube.coord('longitude').bounds[0])
print(target_grid_cube.coord('longitude').bounds[-1])


[-0.5  0.5]
[ 359.5  360.5]

In [60]:
print(src_cube)


sea_water_potential_temperature / (K) (grid_latitude: 200; grid_longitude: 360)
     Dimension coordinates:
          grid_latitude                             x                    -
          grid_longitude                            -                    x
     Auxiliary coordinates:
          latitude                                  x                    x
          longitude                                 x                    x
     Scalar coordinates:
          depth: 5.0 m, bound=(0.0, 10.0) m
          time: 2001-01-16 12:00:00, bound=(2001-01-01 00:00:00, 2001-02-01 00:00:00)
     Attributes:
          Conventions: CF-1.5
          associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_ocean_fx_GFDL-ESM2M_historicalMisc_r0i0p0.nc...
          branch_time: 58765
          comment: GFDL experiment name = ESM2M-C1_only_aerosol_HOA1. PCMDI experiment name...
          comments: Note: This model output is presented on the model's tripolar grid. The...
          contact: gfdl.climate.model.info@noaa.gov
          creation_date: 2011-08-22T05:50:54Z
          experiment: other historical forcing
          experiment_id: historicalMisc
          forcing: SD,SS,BC,MD,OC
          frequency: mon
          gfdl_experiment_name: ESM2M-C1_only_aerosol_HOA1
          history: Mon Jun 27 14:02:01 2016: /g/data/r87/dbi599/miniconda2/envs/default/bin/python...
          initialization_method: 1
          institute_id: NOAA GFDL
          institution: NOAA GFDL(201 Forrestal Rd, Princeton, NJ, 08540)
          model_id: GFDL-ESM2M
          modeling_realm: ocean
          original_name: temp
          original_units: K
          parent_experiment_id: piControl
          parent_experiment_rip: r1i1p1
          physics_version: 5
          product: output1
          project_id: CMIP5
          realization: 1
          references: The GFDL Data Portal (http://nomads.gfdl.noaa.gov/) provides access to...
          source: GFDL-ESM2M 2010 ocean: MOM4 (MOM4p1_x1_Z50_cCM2M,Tripolar360x200L50); atmosphere:...
          table_id: Table Omon (31 Jan 2011)
          title: NOAA GFDL GFDL-ESM2M, other historical forcing (run 1) experiment output...
          tracking_id: af083e4d-7ce2-47ff-ab0f-1fbebb2ce7c2
     Cell methods:
          mean: time

In [53]:
src_cube.coord(axis='x')


Out[53]:
AuxCoord(array([[ 80.5       ,  81.5       ,  82.5       , ...,  77.5       ,
         78.5       ,  79.5       ],
       [ 80.5       ,  81.5       ,  82.5       , ...,  77.5       ,
         78.5       ,  79.5       ],
       [ 80.5       ,  81.5       ,  82.5       , ...,  77.5       ,
         78.5       ,  79.5       ],
       ..., 
       [ 80.04428101,  80.13287354,  80.2215271 , ...,  79.77846527,
         79.86713409,  79.95571899],
       [ 80.02658081,  80.07980347,  80.13302612, ...,  79.86695862,
         79.92021179,  79.97341156],
       [ 80.00888062,  80.02664185,  80.04440308, ...,  79.95558929,
         79.97336578,  79.99111938]], dtype=float32), bounds=array([[[ 80.        ,  81.        ,  81.        ,  80.        ],
        [ 81.        ,  82.        ,  82.        ,  81.        ],
        [ 82.        ,  83.        ,  83.        ,  82.        ],
        ..., 
        [ 77.        ,  78.        ,  78.        ,  77.        ],
        [ 78.        ,  79.        ,  79.        ,  78.        ],
        [ 79.        ,  80.        ,  80.        ,  79.        ]],

       [[ 80.        ,  81.        ,  81.        ,  80.        ],
        [ 81.        ,  82.        ,  82.        ,  81.        ],
        [ 82.        ,  83.        ,  83.        ,  82.        ],
        ..., 
        [ 77.        ,  78.        ,  78.        ,  77.        ],
        [ 78.        ,  79.        ,  79.        ,  78.        ],
        [ 79.        ,  80.        ,  80.        ,  79.        ]],

       [[ 80.        ,  81.        ,  81.        ,  80.        ],
        [ 81.        ,  82.        ,  82.        ,  81.        ],
        [ 82.        ,  83.        ,  83.        ,  82.        ],
        ..., 
        [ 77.        ,  78.        ,  78.        ,  77.        ],
        [ 78.        ,  79.        ,  79.        ,  78.        ],
        [ 79.        ,  80.        ,  80.        ,  79.        ]],

       ..., 
       [[ 80.        ,  80.10617065,  80.07089233,  80.        ],
        [ 80.10617065,  80.21243286,  80.1418457 ,  80.07089233],
        [ 80.21243286,  80.31878662,  80.21286011,  80.1418457 ],
        ..., 
        [ 79.68120575,  79.78757477,  79.85816956,  79.78714752],
        [ 79.78757477,  79.89382172,  79.92910767,  79.85816956],
        [ 79.89382172,  80.        ,  80.        ,  79.92910767]],

       [[ 80.        ,  80.07089233,  80.03549194,  80.        ],
        [ 80.07089233,  80.1418457 ,  80.07098389,  80.03549194],
        [ 80.1418457 ,  80.21286011,  80.10653687,  80.07098389],
        ..., 
        [ 79.78714752,  79.85816956,  79.92901611,  79.89347839],
        [ 79.85816956,  79.92910767,  79.96452332,  79.92901611],
        [ 79.92910767,  80.        ,  80.        ,  79.96452332]],

       [[ 80.        ,  80.03549194,  80.        ,  80.        ],
        [ 80.03549194,  80.07098389,  80.        ,  80.        ],
        [ 80.07098389,  80.10653687,  80.        ,  80.        ],
        ..., 
        [ 79.89347839,  79.92901611,  80.        ,  80.        ],
        [ 79.92901611,  79.96452332,  80.        ,  80.        ],
        [ 79.96452332,  80.        ,  80.        ,  80.        ]]], dtype=float32), standard_name=u'longitude', units=Unit('degrees'), long_name=u'longitude coordinate', var_name='lon')

In [54]:
src_cube.coord(axis='y')


Out[54]:
AuxCoord(array([[-77.87662506, -77.87662506, -77.87662506, ..., -77.87662506,
        -77.87662506, -77.87662506],
       [-77.62971497, -77.62971497, -77.62971497, ..., -77.62971497,
        -77.62971497, -77.62971497],
       [-77.38170624, -77.38170624, -77.38170624, ..., -77.38170624,
        -77.38170624, -77.38170624],
       ..., 
       [ 65.20965576,  65.6240921 ,  66.03219604, ...,  66.03219604,
         65.6240921 ,  65.20965576],
       [ 65.21018219,  65.6256485 ,  66.03475189, ...,  66.03475189,
         65.6256485 ,  65.21018219],
       [ 65.21044159,  65.6264267 ,  66.03603363, ...,  66.03603363,
         65.6264267 ,  65.21044159]], dtype=float32), bounds=array([[[-78.        , -78.        , -77.7531662 , -77.7531662 ],
        [-78.        , -78.        , -77.7531662 , -77.7531662 ],
        [-78.        , -78.        , -77.7531662 , -77.7531662 ],
        ..., 
        [-78.        , -78.        , -77.7531662 , -77.7531662 ],
        [-78.        , -78.        , -77.7531662 , -77.7531662 ],
        [-78.        , -78.        , -77.7531662 , -77.7531662 ]],

       [[-77.7531662 , -77.7531662 , -77.50570679, -77.50570679],
        [-77.7531662 , -77.7531662 , -77.50570679, -77.50570679],
        [-77.7531662 , -77.7531662 , -77.50570679, -77.50570679],
        ..., 
        [-77.7531662 , -77.7531662 , -77.50570679, -77.50570679],
        [-77.7531662 , -77.7531662 , -77.50570679, -77.50570679],
        [-77.7531662 , -77.7531662 , -77.50570679, -77.50570679]],

       [[-77.50570679, -77.50570679, -77.25699615, -77.25699615],
        [-77.50570679, -77.50570679, -77.25699615, -77.25699615],
        [-77.50570679, -77.50570679, -77.25699615, -77.25699615],
        ..., 
        [-77.50570679, -77.50570679, -77.25699615, -77.25699615],
        [-77.50570679, -77.50570679, -77.25699615, -77.25699615],
        [-77.50570679, -77.50570679, -77.25699615, -77.25699615]],

       ..., 
       [[ 65.        ,  65.41696167,  65.4182663 ,  65.        ],
        [ 65.41696167,  65.82750702,  65.83007812,  65.4182663 ],
        [ 65.82750702,  66.23184967,  66.23564911,  65.83007812],
        ..., 
        [ 66.23184967,  65.82750702,  65.83007812,  66.23564911],
        [ 65.82750702,  65.41696167,  65.4182663 ,  65.83007812],
        [ 65.41696167,  65.        ,  65.        ,  65.4182663 ]],

       [[ 65.        ,  65.4182663 ,  65.41905212,  65.        ],
        [ 65.4182663 ,  65.83007812,  65.83162689,  65.41905212],
        [ 65.83007812,  66.23564911,  66.23793793,  65.83162689],
        ..., 
        [ 66.23564911,  65.83007812,  65.83162689,  66.23793793],
        [ 65.83007812,  65.4182663 ,  65.41905212,  65.83162689],
        [ 65.4182663 ,  65.        ,  65.        ,  65.41905212]],

       [[ 65.        ,  65.41905212,  65.41931152,  65.        ],
        [ 65.41905212,  65.83162689,  65.83214569,  65.41931152],
        [ 65.83162689,  66.23793793,  66.23870087,  65.83214569],
        ..., 
        [ 66.23793793,  65.83162689,  65.83214569,  66.23870087],
        [ 65.83162689,  65.41905212,  65.41931152,  65.83214569],
        [ 65.41905212,  65.        ,  65.        ,  65.41931152]]], dtype=float32), standard_name=u'latitude', units=Unit('degrees'), long_name=u'latitude coordinate', var_name='lat')

In [43]:
regridded_cube = regrid_weighted_curvilinear_to_rectilinear(src_cube, weights, target_grid_cube)


---------------------------------------------------------------------------
CoordinateNotFoundError                   Traceback (most recent call last)
<ipython-input-43-bbafd6d57151> in <module>()
----> 1 regridded_cube = regrid_weighted_curvilinear_to_rectilinear(src_cube, weights, target_grid_cube)

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/experimental/regrid.pyc in regrid_weighted_curvilinear_to_rectilinear(src_cube, weights, grid_cube)
    824 
    825     # Get the source cube x and y 2D auxiliary coordinates.
--> 826     sx, sy = src_cube.coord(axis='x'), src_cube.coord(axis='y')
    827     # Get the target grid cube x and y dimension coordinates.
    828     tx, ty = get_xy_dim_coords(grid_cube)

/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/iris/cube.pyc in coord(self, name_or_coord, standard_name, long_name, var_name, attributes, axis, contains_dimension, dimensions, coord, coord_system, dim_coords, name)
   1331                   'They were: %s.' % (len(coords), ', '.join(coord.name() for
   1332                                                              coord in coords))
-> 1333             raise iris.exceptions.CoordinateNotFoundError(msg)
   1334         elif len(coords) == 0:
   1335             bad_name = name or standard_name or long_name or \

CoordinateNotFoundError: u'Expected to find exactly 1 coordinate, but found 2. They were: grid_longitude, longitude.'

In [15]:
print(regridded_cube)


sea_water_potential_temperature / (K) (latitude: 181; longitude: 361)
     Dimension coordinates:
          latitude                             x               -
          longitude                            -               x
     Scalar coordinates:
          depth: 5.0 m, bound=(0.0, 10.0) m
          time: 1850-01-16 12:00:00, bound=(1850-01-01 00:00:00, 1850-02-01 00:00:00)
     Attributes:
          Conventions: CF-1.4
          associated_files: baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_ocean_fx_ACCESS1-0_historical_r0i0p0.nc...
          branch_time: 109207.0
          cmor_version: 2.8.0
          contact: The ACCESS wiki: http://wiki.csiro.au/confluence/display/ACCESS/Home. Contact...
          creation_date: 2012-01-15T15:19:48Z
          experiment: historical
          experiment_id: historical
          forcing: GHG, Oz, SA, Sl, Vl, BC, OC, (GHG = CO2, N2O, CH4, CFC11, CFC12, CFC113,...
          frequency: mon
          history: 2012-01-15T15:19:46Z altered by CMOR: Converted units from 'deg_C' to 'K'....
          initialization_method: 1
          institute_id: CSIRO-BOM
          institution: CSIRO (Commonwealth Scientific and Industrial Research Organisation, Australia),...
          model_id: ACCESS1-0
          modeling_realm: ocean
          original_units: deg_C
          parent_experiment: pre-industrial control
          parent_experiment_id: piControl
          parent_experiment_rip: r1i1p1
          physics_version: 1
          product: output
          project_id: CMIP5
          realization: 1
          references: See http://wiki.csiro.au/confluence/display/ACCESS/ACCESS+Publications
          source: ACCESS1-0 2011. Atmosphere: AGCM v1.0 (N96 grid-point, 1.875 degrees EW...
          table_id: Table Omon (27 April 2011) 694b38a3f68f18e58ba80230aa4746ea
          title: ACCESS1-0 model output prepared for CMIP5 historical
          tracking_id: dd827ba2-11cd-4597-bbf4-73b9eb6c8643
          version_number: v20120115
     Cell methods:
          mean: time

In [16]:
fig = plt.figure(figsize=(15, 10))
plt.subplot(111)
qplt.contourf(regridded_cube, 15)
plt.gca().coastlines()

iplt.show()


/g/data/r87/dbi599/miniconda2/envs/default/lib/python2.7/site-packages/matplotlib/artist.py:221: MatplotlibDeprecationWarning: This has been deprecated in mpl 1.5, please use the
axes property.  A removal date has not been set.
  warnings.warn(_get_axes_msg, mplDeprecation, stacklevel=1)

In [ ]:


In [ ]: