# Measuring Gas Flaring in Russia with Multispectral VIIRS Nightfire
## 2 Method
### Flare Locations from Clusters in the VNF Detections Database  
Candidate flare locations are defined as watershed features of a raster detection probability map. To map the detection probability, for each grid cell of the 15 arcsec latitude-longitude raster, we counted the VNF detections in the database when the combustion temperature \(T>1200\) K and the detection was a local maxima of radiance in the M10 spectral band. The temperature threshold \(T>1200\) K was derived from the bi-modaldistribution of the combustion temperatures in the database with the 2 local maxima of 800 K for biomass burning and 1700 K for gas flares and the local minimum number of detections around 1200 K. By counting only high-temperature detections, we were able to filter out most of the persistent signal from forest and agricultural fires, as well as some industrial objects. Grid cells with less than three detections were considered as \"random noise\" and ignored (set to zero) in the further watershed analysis (Figure 1). To define preliminary locations of gas flares and their vector boundaries, we applied watershed segmentation to the raster probability map [35]. Centers of mass of the watershed basins were used as preliminary coordinates of flares, and the vector boundaries of the basins, expanded outside by one pixel with the mathematical morphology dilation, were used in the aggregation of the time series of VNF detections as the flare boundaries. This is a simplified version of the watershed algorithm used for flare location in [6]. The original algorithm was used to build the annual flare datasets in 2012-2017. Starting from January 2018, VIIRS has added one more night-time channel, M11. Enhanced sensitivity of the Nightfire algorithm after that addition [24] allowed us to simplify the watershed definition of the flare boundaries in 2018-2020 datasets. Cross-Matching the Annual Nightfire Datasets  
Gas flares have a subpixel source size compared to the footprint of a VIIRS M-band pixel. The latter depends on the satellite view angle and varies along a scanline from 0.75 to 1.6 km [36]. By averaging the VNF detection coordinates as described above, we were able to compile a list of persistent gas flare centroids and assign a unique ID to every flare. Comparison with Google Earth high-resolution images reveals a possible offset of the watershed centroids up to 400 m from the gas flare stack, while single overpass detections may be offset by 1.1 km [16]. This creates a problem for cross-matching, as a different ID can potentially be issued for the same flare in various annual datasets. While single-year datasets are preferable as they help in lowering the complexity of annual data production, a continuously cross-matched gas flare contour ID catalog allows observing a \"life cycle\"  
Figure 1: Probability map of detections and watershed contours for a chain of large flares in Basra, Iraq, overlaid with daytime image from Google Earth. of any given flare, distinguish newly lit flares, and spot abrupt surges or declines in flaring for specific objects. Cross-matching of the gas flare contours was performed for the annual Nightfire dataset (most datasets are annual, except the 2012-2015 observations, which are compiled into a single dataset). Most of the gas flare contours from subsequent annual datasets were successfully cross-matched, applying the rule that if the centroid of the new contour (i.e., a gas flare from a more recent annual dataset) falls inside any contour previously (i.e., from an older dataset) identified as a gas flare, then it is assigned the ID of the \"older\" contour. However, infrequently detected flares (e.g., gas flares at the well clusters of large natural gas producing fields) may have their \"older\" contours ill-defined, which results in \"duplicated\" non-intersecting contours for a single flare. Other sources of the cross-matching errors are newly lit flares neighboring previously detected ones and dense clusters of gas flare stacks.