In [1]:
    
import iris
fname = iris.sample_data_path('atlantic_profiles.nc')
cubes = iris.load(fname)
    
    
2. Print a sorted list of unique names for the cubes.
In [2]:
    
print(sorted([cube.name() for cube in cubes]))
    
    
3. Extract the "sea_water_potential_temperature" cube. Print the minimum, maximum, mean and standard deviation of the cube's data.
In [3]:
    
cube = cubes.extract('sea_water_potential_temperature')[0]
print(cube)
print('minimum value:', cube.data.min())
print('maximum value:', cube.data.max())
print('standard deviation:', cube.data.std())
    
    
4. Print the attributes of the cube.
In [4]:
    
print(cube.attributes)
    
    
5. Print the names of all coordinates on the cube. (Hint: Remember the cube.coords method)
In [5]:
    
for coord in cube.coords():
    print(coord.name())
    
    
6. Get hold of the "latitude" coordinate on the cube. Identify whether the cube has bounds. Print the minimum and maximum latitude points in this cube.
In [6]:
    
latitude = cube.coord('latitude')
print(latitude.has_bounds())
print('minimum latitude:', latitude.points.min())
print('maximum latitude:', latitude.points.max())