Exercise 2:
Print the result of iris.sample_data_path('uk_hires.pp') to verify that it returns a string pointing to a file on your system. Use this string directly in the call to iris.load and confirm the result is the same as in the previous example e.g.:
print iris.load('/path/to/iris/sampledata/uk_hires.pp', 'air_potential_temperature')
Exercise 2 continued: Read in the files found at iris.sample_data_path('GloSea4', 'ensemble_010.pp') and iris.sample_data_path('GloSea4', 'ensemble_011.pp') using a single load call. Do this by:
1. Providing a list of the two filenames.
In [2]:
import iris
print iris.load([iris.sample_data_path('GloSea4', 'ensemble_010.pp'),
iris.sample_data_path('GloSea4', 'ensemble_011.pp')])
2. Providing a suitable glob pattern.
In [3]:
print iris.load(iris.sample_data_path('GloSea4', 'ensemble_01[12].pp'))