Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Lab 7: Assessing Sea Ice Trends

In this notebook, you’ll learn to assess trends in time series in passive microwave sea ice data available from the National Snow and Ice Data Center.

This notebook has four components:

  1. Download sea ice concentration data from the National Snow and Ice Data Center

  2. Generate a monthly time series of sea ice area from 1979 to 2025

  3. Analyze trends of sea ice area during the September sea ice minimum

  4. Compute the trend in sea ice in a given area

Import the modules for this notebook

Part 1: Downloading Sea Ice Data from NSIDC

This notebook is designed to download sea ice concentration data, available at https://nsidc.org/data/g02202/versions/6. In this box below, define a data_folder where you will download the sea ice data.

Make a list of file paths

Next, we’ll make a list of download links to the monthly sea ice files. The code below will generate a list of all files from 1979 through 2025:

Download the data

With all of the links in hand, we can download these files to our data folder using simple get requests with the requests package:

All 564 have been downloaded

Part 2: Generating a time series of sea ice area

Before reading in all of the data in a loop, it’s helpful to open up a single file and see what’s inside. Use the Panoply program to get a list of the variables and determine the name of the sea ice variable:

Passive microwave sea ice data in Panoply

Figure 1:Passive microwave sea ice data in Panoply

We’ll use this information when looping through each file and generating a time series of sea ice area.

Explore a monthly sea ice file

After determining which variable will be used for the sea ice area calculation, read in the grid into an array using the netcdf4 package and examine the range of sea ice data values:

minimum: 0.0
maximum: 255.0

Hmm... sea ice concentration is supposed to be in the range 0-1. What’s going on here? To get a sense of this data, it helps to have a visual.

Make a histogram

A histogram will give us a sense of the range of datain this file.

<Figure size 1000x400 with 2 Axes>

As we can see, the sea ice data contains a lot of values assigned 255 - these are “fill” values to represent land in the regularly-gridded data and are designed to be easily filtered or masked.

Compute the total sea ice area for the test file

To compute sea ice area, we’ll convert the concentration into an area using the information that each grid cell is sized 25 km by 25 km:

seaice area: 14647320.0 km^2

Make a time series from the sea ice area

Using all of the information above, we can loop through each of the sea ice fields and generate a time series of the area through time. This calculation follows the approach introduced in the previous Sea Surface Salinity lab - the only difference is that the here, we compute the total area of sea ice rather than sampling the field at a given point.

Plot the sea ice time series

With our date array and associated sea ice time series in hand, we can now plot the time series to assess the seasonal and interannual variability in northern hemisphere sea ice:

<Figure size 1000x400 with 1 Axes>

🤔 What do you observe?

The time series shows some interesting changes seasonally and through the years. What are 2-3 features of the time series above?

The extent of sea ice at the September sea ice minimum is the an important metric of overall sea ice health. It is also becoming increasingly important for commerce as more ships are beginning to use the Arctic Ocean as a shipping lane.

To assess changes in the September sea ice area, we will compute the trends in area since 1979. However, before computing this, we’ll need to filter the sea ice to extract only the values pertaining to September and we’ll need to convert our dates to format which can be represented in years.

Filtering the sea ice data by month

To filter the sea ice data for the month of September, we’ll loop through all of our data and keep only those dates which have a month equal to 9.

Plot the filtered time series

Let’s have a look at what the September time series looks like now that we have our filtered values in hand:

<Figure size 1000x400 with 1 Axes>

🤔 What do you observe?

How does the September time series compare to the full monthly time series? Are there any new features observable in this time series that were not visible before?

Define a function for decimal years

If we’d like to compute trends in units of area change per year, we’ll need to express our time in units of years. Here, we’ll introduce yet another time called “decimal years” which can be computed with the following function:

We can see how this function works by considering the decimal year as a few dates:

2000.0
2000.4344262295083
2000.931693989071

As we can see, the decimal part of the decimal year expresses the time elapsed through the year (between 0 and 1).

Make a decimal year array for the September values

Now that we’ve got a function to convert our data to decimal years, let’s generate a new time array with the dates expressed in decimal years:

Compute the best fit line

Now that our date units are appropriate for our goal, we can compute trends by fitting a line to the data. The numpy package provides an easy way to fit a polynomial to a collection of data - we’ll leverage this tool for a linear fit:

Create the plot with the line of best fit

With our best fit line in hand, let’s regenerate our plot now with the line of best fit:

<Figure size 1000x400 with 1 Axes>

🤔 What do you observe?

What is the average loss in sea ice area in September of each year? How does this area compare to the, say, the total area of the state of California?

In the above example, we computed changes in sea ice in the entire northern hemisphere. Next, we’ll consider computing these trends in a regional area. As an example, we’ll consider Fram Strait - the region between northeast Greenland and Svalbard which is an important sea ice export region.

To subsample the sea ice data regionally, we’ll need to identify where our location of interest is in the data grid. In the last two labs, the SST and SSS data was provided in geographic (longitude-latitude) coordinates. Since the sea ice data is centered around the north (or south) pole, this data set is projected into a different coordinate system. Open up Panoply and examine the file one more time. The projection for this data is stored in the crs variable (short for Coordinate Reference System). This is a text variable (rather than a variable with coordinate or data information) which has a lot of details about the projection:

A snapshot of the coordinate reference system for the sea ice data.

Figure 2:A snapshot of the coordinate reference system for the sea ice data.

As we can see, the EPSG code for this data is 3411 - the National Snow and Ice Data Center polar stereographic projection. We can use this information in QGIS to define our area of interest.

Identify the coordinates of the area of interest using QGIS

Open QGIS and add the global coastline from our first lab. Then, change the projection using the information identified in the sea ice data file.

A snapshot of the global coastline in the polar stereographic projection.

Figure 3:A snapshot of the global coastline in the polar stereographic projection.

Using the map in QGIS, find the bounds of the region of interest in the projected coordinates and add them below. You can use the approximate locations of a box around Fram Strait:

Compute the regional area with one file

To test out the regional calculation, we’ll again explore the steps using a single file. Let’s read in the grid for the first file here as well as the geographic information:

Next, we’ll find where our region of interest is located inside the grid for the full northern hemisphere. Similar to our identification of locations in the previous labs for SST and SSS time series, we will identify the indices of our location within the broader grid:

x indices: 180 190
y indices: 260 280

Using these indices, we can next subset our grid to our location of interest. It helps to print out the shapes of the grid to ensure the indices are applied in the correct locations:

Shape of sea ice grid: (1, 448, 304)
Shape of sea ice grid subset: (20, 10)

As we can see, there is a time array that only has a single dimension. As a final sanity check before running calculations, we can also plot our sea ice grid to ensure we are identifying the correct region within the broader grid:

<Figure size 700x600 with 2 Axes>

Generate a time series in the region of interest

Now that we’ve got our region of interest defined and verified, we can generate a time series in this region. The coding block below is almost identical to the time series code above - the only difference is that now we compute our statistics in the subsetted grid rather than whole northern hemisphere:

Plot the regional time series

After generating our time series, we can plot it and compare it to the time series above:

<Figure size 1000x400 with 1 Axes>

Filter the time series to only include values in September

Finally, just like our previous assessment, let’s take a look at trends during the September sea ice minimum. First, make a subsetted time series:

Then, compute trends:

Finally, visualize the time series:

<Figure size 1000x400 with 1 Axes>

🤔 What do you observe?

How does this regional trend compare to the hemisphere-wide trend? What might be different in this regional location?