Build Status Coverage Status DOI

Sea ice drift from Sentinel-1 SAR data

A computationally efficient, open source feature tracking algorithm, called ORB, is adopted and tuned for retrieval of the first guess sea ice drift from Sentinel-1 SAR images. Pattern matching algorithm based on MCC calculation is used further to retrieve sea ice drift on a regular grid.

References:

Requirements:

Installation with conda

# Install Python, OpenCV and other requirements using miniconda (http://conda.pydata.org/miniconda.html):
conda create -q --yes -n py3drift -c conda-forge python=3.6 numpy scipy matplotlib netcdf4 gdal opencv nose

# Activate the conda environment with installed requirements:
source activate py3drift

# Use pip to install from the repo:
pip install https://github.com/nansencenter/sea_ice_drift/archive/v0.7.tar.gz

Installation with docker

# run ipython with Nansat and SeaIceDrift installed
docker run --rm -it -v /path/to/data:/src nansencenter/seaicedrift ipython

# run jupyter notebook with Nansat and SeaIceDrift installed
docker run --rm -it -p 8888:8888 -v /path/to/data/and/notebooks:/src nansencenter/seaicedrift

Example

# download example datasets
wget https://github.com/nansencenter/sea_ice_drift_test_files/raw/master/S1B_EW_GRDM_1SDH_20200123T120618.tif
wget https://github.com/nansencenter/sea_ice_drift_test_files/raw/master/S1B_EW_GRDM_1SDH_20200125T114955.tif

# start Python and import relevant libraries
import numpy as np
import matplotlib.pyplot as plt
from nansat import Nansat
from sea_ice_drift import SeaIceDrift

# open pair of satellite images using Nansat and SeaIceDrift
filename1='S1B_EW_GRDM_1SDH_20200123T120618.tif'
filename2='S1B_EW_GRDM_1SDH_20200125T114955.tif'
sid = SeaIceDrift(filename1, filename2)

# run ice drift retrieval using Feature Tracking
uft, vft, lon1ft, lat1ft, lon2ft, lat2ft = sid.get_drift_FT()

# plot
plt.quiver(lon1ft, lat1ft, uft, vft);plt.show()

# define a grid (e.g. regular)
lon1pm, lat1pm = np.meshgrid(np.linspace(-33.5, -30.5, 50),
                             np.linspace(83.6, 83.9, 50))

# run ice drift retrieval for regular points using Pattern Matching
# use results from the Feature Tracking as the first guess
upm, vpm, apm, rpm, hpm, lon2pm, lat2pm = sid.get_drift_PM(
        lon1pm, lat1pm,
        lon1ft, lat1ft,
        lon2ft, lat2ft)
# select high quality data only
gpi = rpm*hpm > 4

# plot high quality data on a regular grid
plt.quiver(lon1pm[gpi], lat1pm[gpi], upm[gpi], vpm[gpi], rpm[gpi])

Full example here

Feature Tracking and the first SAR image

Pattern Matching and the second SAR image