# A Process-Oriented Method for Tracking Rainstorms with a Time-Series of Raster Datasets
## 3 PoAIR Algorithm
### Identifying Instantaneous Rainstorm Objects  
A rainstorm is defined when the accumulated rainfall within a specified time period exceeds a threshold, e.g., 50 mm/24 h [19]. As a time interval of obtaining rainfall datasets lower than the specified duration, PoAIR firstly determines which grid cells in a temporal domain are rainstorm cells.  
Figure 1: Basic concepts of a rainstorm (**a**) at a given time snapshot; (**b**) during the lifespan of the rainstorm. A solid black arrow represents a change from time snapshots T–T+1.  
Figure 2: The workflow of the process-oriented algorithm for identifying and tracking rainstorms (PoAIR).  
According to [PERSON]'s first law of geography, rainstorm cells tend to belong to the same group as the rainstorm cells in their neighborhood. Therefore, the PoAIR algorithm groups spatially connected rainstorm cells into rainstorm regions. Finally, the rainstorm regions are transformed into rainstorm objects, which are used to match and track rainstorm processes.  
According to the definition of a rainstorm [19], the criteria for identifying rainstorm cells are as follows:  
Step 1: Search for the local maximum rainfall in successive snapshots, and sort these values in descending order;  
Step 2: Take the first local maximum rainfall as a searching center, and 24 h as the maximum searching time range. Then, find the successive snapshots with rainfall, which are defined as a valid time span;  
Step 3: Calculate the accumulated rainfall within the valid time span. If the accumulated rainfall is over 50 mm, go to Step 4, otherwise, go to Step 6;  
Step 4: Expand the valid time span forward/backward with successive snapshots until no rainfall is found, and define the expanded time span as a rainstorm duration;  
Step 5: All the grid cells within the rainstorm duration are labeled as rainstorm cells;  
Step 6: Go to the next local maximum rainfall value, then repeat Steps 2-5 until all the local maximum values have been analyzed.  
To group grid cells into a rainstorm region, PoAIR uses spatial proximities to connect rainstorm cells. A k-neighborhood is the general spatial template used in geoinformatics for proximity analysis [24]. Using the k-neighborhood, there are three types of connections:  
* Connection between rainstorm cells: If one rainstorm cell is a k-neighborhood of the other one, the former connects with the latter, otherwise, the former is regarded as noise.
* Connection between a rainstorm cell and a rainstorm region: If one rainstorm cell is a k-neighborhood of a rainstorm region, the rainstorm cell connects with the rainstorm region, otherwise, the rainstorm cell is noise.
* Connection between rainstorm regions: If at least one cell of the former rainstorm region is a k-neighborhood of the latter rainstorm region, the former connects with the latter.  
Figure 3 takes the 8-neighborhood as an example to show these three types of linkage. In Figure 3c, the independent grid cells P2 and P3 are linked together, grid cells P1 and P4 are regarded as noise, grid cell P5 links with R1, rainstorm region R3 links with R4, and rainstorm region grid cell R2 links with no rainstorm grid cells or rainstorm regions.