# Mapping Surface Flow Velocity of Glaciers at Regional Scale Using a Multiple Sensors Approach
## Data and Methods
### Description of the Workflow
#### 2.2.3 Glacier Surface Velocity  
We modified the algorithm ampcor developed by JPL which was part of the Repeated Orbit Interferometry Package (ROI-PAC) [27]. Our workflow uses the core of the cross-correlation algorithm, written in Fortran-90 and integrated it into a Python environment to maintain both efficiency and flexibility with the rest of the workflow. The python environment extracts the chips from the master and slave images and calls ampcor using the interface numpy.f2 py. The Fortran-90 code of ampcor calculates a standardized cross correlation map between the reference image chip and the slave chips. From this correlation map, a peak correlation value is determined. The reference and slave image chips are deramped and oversampled by a factor of two using 2D fast Fourier transform. The correlation procedure is then repeated around the previously determined peak value. The resulting new correlation map is itself oversampled by a factor of two and the location of correlation peak is then determined. Finally, the outputs ampcor are returned to the python procedure.  
Thanks to the Python environment, new features can now be more easily implemented and added than if only the Fortran code had been retained, such as the ability to restart a process in the event of a crash, the use of a mask to determine where to calculate the correlation, or an initial guessed displacement map to guide cross correlation in a fast moving region, thus reducing calculation time and avoiding correlation errors due to long distance travel.  
The mask provided to ampcor is derived from the shapefile of the study region delineated in the first step of the workflow. It includes glaciers and surrounding ice-free areas for calibration purposes. We use an adaptive search window ranging from 4 \(\times\) 4 to 64 \(\times\) 64 that depends on the length of the repetition cycle, the resolution of the sensor and the average speeds of mountain glaciers according to previous studies [13,14,24]. Thus, we assume maximum surface velocities of about 100-300 m/year [13,24] for small mountain glaciers (e.g., Andes, Alps, New Zealand). We have defined a spacing of 5 pixels and a sub-image (chip) size of 16 \(\times\) 16 pixels for the Sentinel-2, Venus and Landsat 7/8. Since the chip size is larger than the spacing, each point on the offset map may not be completely independent of its direct neighbors, however, this approach would seem to provide better results than interpolating coarser offset maps at our final resolution of 50 meters (see Section 3). The size of the sub-images may also be sub-optimal for correlation [24], but seems more appropriate for monitoring mountain glaciers because it will tend to preserve characteristics on a smaller scale. Since the resolution of Pleiades data is 10-30 times higher than that of other sensors, larger search windows and sub-images have been defined (52 \(\times\) 52 and 32 \(\times\) 32, respectively) in order to be able to track surface displacements while preserving the high spatial resolution of the images. Differences in the size of the correlation windows result in more detailed final velocity maps for Venus and Pleiades and slightly less detailed for Landsat.