Problem Set 2 - Arctic ice maps

Total points: 30

Due: Monday 14th September 2020, 7pm CEST

Format: IPython/Jupyter Notebook or python program

The purpose of this problem set is to get familiar with image data, plotting and combining it in various ways for analysis.

The data used in this problem set was collected by the AMSR-E instrument Aqua satellite. The data consists of maps of the sea-ice concentration in the Arctic, i.e. the covered percentage of a given area with sea ice, collected between 2006 and 2011. The data were downloaded and extracted from here and converted into a format that can be more easily used.

The data you should use is in here (use this link if you need a zip archive) and can also be accessed in data/PS02-ice_data/ice_data if you are using the CIP computers (no need to copy that directory, just read the files from there). To use it, copy the tgz file into your day-3 working directory and type:

 tar -xvf ice-data.tgz

The data is in 'Numpy' format, which means that you can read it as a Numpy array using:

>>> import numpy as np
>>> data = np.load('ice_data/20080415.npy')

which will give you a 2-d array. Just for information, this was created with:

>>> np.save('ice_data/20080415.npy', data)

Part 1 - examining a single map (6 points)

Start by reading in one of the maps as shown above, and plot it with Matplotlib. Note that to get the correct orientation, you will need to call the imshow command with the origin='lower' option, which ensures that the (0,0) pixels is on the bottom left, not the top left. You can try and use different colormaps if you like (set by the cmap option) - see here for information on available colormaps. You can specify a colormap to use with e.g. cmap='<name-of-colormap>' (i.e. cmap='magma'). Note that you can make figures larger by specifying the size of the figure

>>> plt.figure(figsize=(8, 8))

where the size is given in inches. Also find a way to plot a colorbar on the side to indicate which color corresponds to which value. Examples can be found in the Matplotlib Gallery. You may also want to try to remove the tick labels (100, 200, etc.) since they are not useful.

Part 2 - reading in multiple maps (10 points)

We now want to make a plot of the ice concentration over time. Reading in a single map is easy, but since we have 137 maps, we do not want to read them all in individually by hand. Write a loop over all the available files, and inside the loop, read in the data to a variable (e.g. data), and also extract the year, month, and day as integer values (e.g. year, month, and day). Then, still within the loop, compute a variable time which is essentially the fractional time in years (so 1st July 2012 is 2012.5). You can assume for simplicity that each month has 30 days - this will not affect the results later. Finally, also compute for each file the total number of pixels that have a value above 50%. After the loop, make a plot of the number of pixels with a concentration above 50% against time.

You will likely notice that the ticks are in a strange format, where they are given in years since 2006, but you can change this with the following code:

>>> from matplotlib.ticker import ScalarFormatter
>>> plt.gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))

Describe what you see in the plot.

We now want something a little more quantitative than just the number of pixels, so we will try and compute the area where the ice concentration is above a given threshold. However, we first need to know the area of the pixels in the image, and since we are looking at a projection of a spherical surface, each pixel contains a different area. The areas of each pixel (in km^2) are inside the file named ice_data_area.npy (if you are using the CIP pool, this is data/PS02-ice_data/ice_data_area.npy). Read in the areas and make a plot (with colorbar) to see how the pixel area varies over the image.

Now, loop over the files again as before, but this time, for each file, compute the total area where the concentration of ice is 99% or above. Make a new plot showing the area of >99% ice concentration against time.

Describe what you see - how does the minimum change over time?

Part 3 - visualizing changes over time (10 points)

Find the date at which the area of the region where the ice concentration is above 99% is the smallest. What is the value of the minimum area?

Next, read in the map for this minimum, and the map for the same day and month but from 2006. Make a side-by-side plot showing the 2006 and the 2011 data.

Compute the difference between the two maps so that a loss in ice over time will correspond to a negative value, and a gain in ice will correspond to a positive value. Make a plot of the difference, and use the RdBu colormap to highlight the changes (include a colorbar). Also, use the RdYlBu colormap for comparison for the latter part.

Part 4 - yearly averages (4 points)

Compute average ice concentration maps for 2006 and 2011, and plot them side by side.

Epilogue

The data that we have only cover five years, so we cannot reliably extract information about long term trends. However, it is worth noting that the minimum ice coverage you found here was a record minimum - never before (in recorded history) had the size of the ice shelf been so small. This is part of a long term trend due to global warming. In 2012, the record was again beaten, and most scientists believe that by ~2050, the Arctic will be completely ice-free for at least part of the summer.