Spatio-temporal Index Based on Time Series of Leaf Area Index for Identifying Heavy Metal Stress in Rice under Complex Stressors.

Crops under various types of stresses, such as stress caused by heavy metals, drought and pest/disease exhibit similar changes in physiological-biochemical parameters (e.g., leaf area index [LAI] and chlorophyll). Thus, differentiating between heavy metal stress and nonheavy metal stress presents a great challenge. However, different stressors in crops do cause variations in spatiotemporal characteristics. This study aims to develop a spatiotemporal index based on LAI time series to identify heavy metal stress under complex stressors on a regional scale. The experimental area is located in Zhuzhou City, Hunan Province. The situ measured data and Sentinel-2A images from 2017 and 2018 were collected. First, a series of LAI in rice growth stages was simulated based on the WOrld FOod STudies (WOFOST) model incorporated with Sentinel 2 images. Second, the local Moran’s I and dynamic time warping (DTW) of LAI were calculated. Third, a stress index based on spatial and temporal features (SIST) was established to assess heavy metal stress levels according to the spatial autocorrelation and temporal dissimilarity of LAI. Results revealed the following: (1) The DTW of LAI is a good indicator for distinguishing stress levels. Specifically, rice subjected to high stress levels exhibits high DTW values. (2) Rice under heavy metal stress is well correlated with high-high SIST clusters. (3) Rice plants subjected to high pollution are observed in the northwest of the study regions and rice under low heavy metal stress is found in the south. The results suggest that SIST based on a sensitive indicator of rice biochemical impairment can be used to accurately detect regional heavy metal stress in rice. Combining spatial-temporal features and spectral information appears to be a highly promising method for discriminating heavy metal stress from complex stressors.


Introduction
Heavy metals, such as Cadmium (Cd), in paddy rice fields can efficiently accumulate in rice grain, straws, and roots [1] due to their high ingestion rate [2], disturb various physiological processes [3], and ultimately have adverse effects on human health [4]. Although field surveys can accurately detect heavy metal concentrations in paddy fields [5], they are often time consuming and expensive and do not facilitate mapping the extent of heavy metal contamination for lager regions. Remote sensing techniques enable the examination of the influence of heavy metal contamination on rice at a large scale.
Researchers have attempted to measure heavy metal stress levels by using physiological and spectral features, because heavy metal contaminants have direct or indirect influences on physiological

Point Data
Meteorological data and crop growth parameters are used to localize the WOFOST models. The growth of rice can be simulated by taking in-situ data as WOFOST inputs.
Meteorological data during the growing season (June 1 to September 30) from 2017 to 2018, including daily maximum temperature (T max ), daily minimum temperature (T min ) and daily sunshine hours, were acquired from Zhuzhou Meteorological Station and can be accessed via the National Meteorological Information Center (http://data.cma.cn/en).
LAIs were collected between July 2017 and August 2017 using a LAI-2000 plant canopy analyzer. LAI in each sample point was measured thrice and the mean value of the measurements was taken as the final LAI of a sample and used to incorporate the LAI and remote sensing images. We first modelled the relationship between measured LAIs and satellite-derived NDVIs and calculated images of LAI according to the model. Satellite-derived LAIs were then taken as the crop growth parameter inputs of the WOFOST model.
We used soil heavy metal concentration and factory coordinates for accuracy measurements in this study. Soil heavy metal concentrations were collected at the field level for validation. The concentrations of Cd in soil were determined by using inductively coupled plasma mass spectrometry (7500a, Agilent Technologies, USA). During analysis process, the accuracy of the samples were controlled by a program blank and soil composition analysis standard material GSS-13 (National Standards Research Center). Each soil sample was measured for thrice, and the concentration is presented as the mean value of these measurements.
The coordinates of factories in Zhuzhou were collected from AutoNavi, one of the largest online map service providers in mainland China. This provider includes millions of up-to-date points of interest data. GCJ-02, the coordinate system of AutoNavi, was transformed into WGS-84 using an open source Python version of eviltransform [29] to maintain the same spatial reference used by Sentinel 2 images. These coordinates were used for validation.

Satellite Imagery
In this study, we used Sentinel 2 images taken during the growing season (June 1 to Sep 30) from 2017 to 2018. Compared with Landsat, Sentinel 2 has higher revisit frequency (10 days for a single satellite and 5 days for combined constellation) and a spatial resolution of up to 10m. Sentinel 2 images were acquired from Google Earth Engine's Javascript API [30].
To generate a LAI time series with increased accuracy, we filtered all Sentinel 2 scenes with a cloud coverage less than 10% in the study area and removed clouds with the cloud mask band. The acquisition dates of Sentinel 2 images and dates of WOFOST simulated LAIs are illustrated in Figure 2. Then, we calculated NDVIs from the cloud-free image collection and transformed the values into LAI.

Methods
Previous studies have shown that heavy metals are stable across space and time [31], whereas other stresses, such as pests and diseases, show more variability. Therefore, discriminating heavy metal stresses from other stresses using proper spatial temporal dissimilarity measurements is possible.
Unfortunately, because of frequent cloud coverage in the study area, the temporal resolution of remote sensing images could not meet the demands of dissimilarity measurements. Thus, we used an improved WOFOST model with a stress factor to simulate the growth of rice. The overall workflow is shown in Figure 3.

Mapping Rice Fields
We choose random forest as the classifier to extract rice fields in Zhuzhou. A cloud-free Sentinel 2 image from September 15, 2017 was selected to map rice fields in this study. Samples were chosen on the basis of field surveys and Google Satellite imagery. A total of 85,474 pixels were selected and divided into training (80%) and testing (20%) datasets. The random forest algorithm is implemented in dzetsaka plugin by Mathieu Fauvel and Nicolas Karasiak in QGIS software for remote sensing classification [32].
Rice objects smaller than four pixels under 4-connectivity were removed and filled with the class values of the surrounding pixels after classification to assess the spatial patterns of heavy metal stress accurately.

Incorporation of Sentinel 2 Images
We selected LAI as the rice physiological parameter to assess heavy metal stress levels because leaves and other aboveground organs are prone to heavy metal stress [23]. A stress factor f was introduced into the WOFOST model to simulate rice LAI series dynamically under different conditions. This factor f was determined by Particle Swarm Optimization (PSO), which finds the optimal solution iteratively by minimizing the cost function (C) and stops when the maximum iteration or cost threshold is reached [33]. C measures the difference between the satellite-derived and simulated LAI series and is defined by Equation (1) where LAI m,i is the ith measurement of the LAI and derived from satellite NDVIs using the formula previously modeled in Equation (2) [34] by using field data, LAI s,i is the ith WOFOST simulation of LAI, and N is the number of measurements.

WOFOST Model
WOFOST is a physical model that dynamically simulates the daily growth of crops under different stress levels in a year.
In this study, daily sunshine hours were transformed into solar radiation power prior to the integration of the meteorological data into the WOFOST model. The relevant formulas are listed in Equations (3)- (8).
R a = 37.6 × D r (ω s · sin ϕ sin δ + cos ϕ cos δ sin ω s ) where DOY is the number of days since Jan 1 of a year, D r is the distance between the sun and Earth, δ is the declination of the Sun when Sentinel 2 images were captured, and ϕ is the latitude of the rice pixel (in decimal degrees). ω s is the solar hour angle when Sentinel 2 satellite passes the study area, R a is the irradiation at the top of the aeropause, N is the number of daily potential sunshine hours, n is the actual number of sunshine hours. a s and b s are empirical constants for temperate climate zones and take the values a s = 0.18 and b s = 0.55, R s is the solar radiation energy. The f determined by PSO is then integrated into the WOFOST model because heavy metals in soil and water may influence photosynthesis in rice. The daily total gross assimilation under stress level (CVF f ) can be defined as follows: where CVF is the daily total gross assimilation under the potential growth level and f is the stress factor, which ranges from 0 (stressed) to 1 (healthy).
To reduce the redundancy of time series and accelerate calculation, we simulated the LAI series at 5-day intervals from DOYs 160 to 255 in 2017 and 2018. This period represents the major growth season of rice in Zhuzhou area.

Conceptual Model to Distinguish Heavy Metal Stress
The temporal features of rice LAI series under heavy metal stress are different from other stressors. Figure 4 shows the conceptual series under four major types of stress in our study area, namely pest, disease, nutrition and heavy metal stress. Temporal characteristics can be classified into two categories.

1.
In-year characteristics: The duration of in-year signals vary when rice pixels are under different stress types. Signals of pest or disease only exist at a single period of a growing season, while signals of nutrition stress and heavy metal stress last longer and exist in the whole growing season.

2.
Inter-annual characteristics: The variability of inter-annual signals also vary if rice pixels are under these stressors. Although nutrition stress and heavy metal stress show similar signals in a grwoing season, the variability of heavy metal stress signals are more stable than those of nutrition stress.
According to these differences in temporal characteristics, heavy metal stress can be discriminated using inter-annual stability measurements. A rice pixel is likely under heavy metal stress if its stress signals are stable in adjacent years.

DTW
DTW is a alignment-based measurement of similarity between two time series; its goal is to find the optimal alignment between series with a minimum cost [35]. Let Reference Series (A{a 1 , a 2 , a 3 , · · · , a m } ) and Query Series (B{b 1 , b 2 , b 3 , · · · , b n } ) be two time series of lengths m and n, respectively.
Here we define D i,j as the DTW distance between A(1 : i) and B(1 : j) and the corresponding warping path (p i , q j ), illustrated in Figure 5a, is from (1, 1) to (i, j). The matching nodes is illustrated in Figure 5b. Then, the DTW distance can be calculated by using Equation (10) where δ(a i , b j ) is the distance measurement between node a i and b j , D i,j is the summed distance from (1, 1) to (i, j). When i = m and j = n, recursion stops and D(m, n) is the final DTW distance between series A and B. Some constraints to the calculation of DTW distance [36] were implemented to keep the warping path continuous and accelerate calculations given that the time complexity of classic DTW is O(MN). Let node (i, j) denote points on the warping path. The constraints of the DTW algorithm can be written as follows: • Boundary limits: The warping path should start from (1, 1) and end in (m, n).
• Global constraint: The "Sakoe Chiba Band", illustrated in Figure 5c, was used as the global constraint to limit the warping scope to r samples around the main diagonal y = n m x [37]. Each point (p i , q j ) of the warping path (p, q) should meet the following constraint: • Local constraints: Local constraints are illustrated in Figure 5d. Given a node (p i , q j ) from the warping path, the subsequent node should be chosen from (i + 1, j), (i + 1, j + 1) or (i, j + 1) such that the warping path is continuous and monotonically nondecreasing [38,39].
In this study, DTW was chosen for temporal dissimilarity and rice stress measurements. Temporal dissimilarity was measured for each LAI series of the same pixel between adjacent years, while stress level was derived from the DTW distance between the current and sample LAI series.

Determination of Stress Levels in Rice
Stress levels were measured by using DTW distances from sample pixel series. To accurately detect rice stress levels, we simulated a sample series under no stress with the WOFOST model for each year. Here, the DTW distance between the LAI series of the rice pixel series (LAI i ) and the sample pixel series (LAI sample ) in the same year was defined as the stress level of the pixel (S i ) for every rice pixel (i) of a raster series. Stress levels were calculated using Equation (13) and then normalized using Equation (14) where S i,norm is the normalized stress level of pixel i, S i is the original stress level in Equation (13), and S min and S max are the maximum and minimum stress levels, respectively. The DTW distance is positively related to the stress level, that is, a greater DTW distance from the sample series indicates that the pixel is weaker in health, and that the rice pixel is under higher stress. In this work, we applied the mean value of stress levels in 2017 and 2018 as the final stress level.

Measurement of Temporal Dissimilarity between Rice LAI Series
In this study, temporal dissimilarity was regarded as the interannual DTW distance between the two time series of the same pixel in adjacent years (years 2017 and 2018 in this case). The temporal dissimilarity for pixel i was calculated by using Equation (15) where TD i is the temporal dissimilarity of pixel i and LAI i,2017 and LAI i,2018 are the LAI series of pixel i in 2017 and 2018, respectively. A small DTW distance of the same pixel indicates similar rice growth status in adjacent years.
Temporal stability, defined as the normalized negative temporal dissimilarity, was transformed from temporal dissimilarity given that temporal dissimilarity is negatively correlated with temporal stability. A high temporal dissimilarity measured by DTW distance indicates low temporal stability. It is calculated using Equation (16) where TS i is the normalized temporal stability of pixel i, TD i is the original temporal dissimilarity in Equation (15), and TD min and TD max are minimum and maximum temporal dissimilarity, respectively. TS ranges from 0 to 1, and a high TS value indicates the rice pixel is stable and a low TS value indicates the rice pixel is unstable. As shown in Figure 6,

Measurement of the Spatial Variation of Temporal Dissimilarity
Local Moran's I, a commonly used local indicator of spatial autocorrelation, can find spatial patterns such as high-high clusters. By comparing central pixel i and the statistics of its neighbors j, the value of the central pixel can be determined to be lower or higher than that of a random distribution in space. A positive value indicates a spatial cluster and a low value indicates a spatial dispersion. In this case, a spatial dispersion indicates that the value is unstable across space, and the rice in that pixel would probably be affected by abrupt stress.
In this study, we measured the spatial patterns of DTW distances in the previous step by using local Moran's I. The Moran's I at pixel i can be calculated using Equations (17) and (18) where x i and x j are temporal dissimilarities of central pixel i and neighbor j, respectively, and w ij is the spatial weight between i and j.x is the mean value of all rice pixels. S 0 is the sum of all spatial weights between central pixel i and its neighbors j. In this work, we used a 3 × 3 matrix as the neighborhood of the central pixel, and only rice pixels in the neighborhood were used for calculation. An I that is significantly greater than 0, indicates the presence of a spatial cluster around pixel i because it is positively correlated with its neighbors. If I is significantly less than 0, the central pixel i is negatively correlated with its surrounding values. This negative correlation indicates that the central pixel may as well be in an unstable state in space. Therefore, the local Moran's I of a rice pixel would be high if it is affected by heavy metal stress.
The local Moran's I of pixel i was then normalized by using equation: where I i,norm is the normalized local Moran's I, I i is the original Moran's I of pixel i and I min and I max are the minimum and maximum local Moran's I, respectively.

Construction of SIST for Assessing Heavy Metal Stress Levels
To distinguish heavy metal stress from other stresses, we considered stress levels, the temporal dissimilarity measured by DTW and local Moran's I and developed a stress index based on spatial and temporal characteristics (SIST). SIST was calculated by using normalized stress levels (S norm ), temporal stability (TS norm ) and local Moran's I (I norm ): Given that SIST takes normalized factors into consideration, it should range from 0 to 1. A high SIST indicates that rice in a specific pixel is highly likely under strong heavy metal stress; a low value means the pixel is likely under weak heavy metal stress.

Spatial Distribution of Rice Fields
The overall accuracy of the random forest classifier is 96.99%, and the Cohen's kappa coefficient is 0.9586. The producer's and user's accuracy of rice are higher than 94%. The confusion matrix of the classification is shown in Table 1. After classification, rice objects less than 4 pixels under 4-connectivity were removed from the rice classification results and filled with the class value of the nearest neighbors. The final classification result is shown in Figure 7.  Figure 8 shows the spatial distribution of stress levels and temporal stability measured by using DTW. For temporal stability, a high DTW distance indicates that rice in a specific pixel is unstable. For stress levels, a pixel with a high DTW distance could be regarded as a high stress level, which means the rice is under stress. Stress levels, shown in Figure 8 (Left), decreases as the distance from cities increases. In the north, rice fields tend to be under high stress levels, whereas, in the south, rice is healthy. However, temporal stability from 2017 to 2018, shown in Figure 8 (Right), shows that rice fields close to the Changsha-Zhuzhou-Xiangtan city clusters in northern areas tend to be more stable than those in the south, which is distant from industrial parks and cities. Figure 9 shows high heavy metal stress levels in the industrial areas and lower levels in rural areas. This trend is similar to the trend of general stress levels. High-high clusters are defined as places where local Moran's I is greater than 0 and have high TS values, low-low clusters are defined as places where local Moran's I is greater than 0 and have low TS values. Heavy metal-stressed rice pixels and healthy pixels have high Moran's I value, indicating that under nonstress or heavy metal stress, rice growth shows a spatial pattern of clustering. The only difference between the two spatial patterns is that healthy rice pixels are in low-low TS clusters, whereas heavy metal stressed ones are in high-high TS clusters. In the center of the study area near Zhuzhou County, where heavy metal stress is at a moderate level, Moran's I is close to 0, which implies the presence of other types of abrupt stressors, such as pests and diseases in that area.

Spatial Patterns of Rice under Different Stress Types
As illustrated in Figure 9, the spatial distribution of SIST, temporal stability, and stress levels shows similar trends with a high degree of heavy metal stress in the northern areas and a low degree in the south. The Moran's I of temporal stability is close to 0 in the central region, where heavy metal stress is at a moderate level, and shows no significant spatial clustering patterns. Heavy metal-stressed areas and healthy fields show a high Moran's I, indicating that, under both conditions, temporal stability shows a spatial pattern of clustering.

How DTW Works in Temporal Dissimilarity Measurement
In this article, we choose DTW over Euclidian distance as the measurement of temporal dissimilarity. The reason is that DTW can eliminate the unwanted distance caused by different timings of rice phenology stages. Take the two series in Figure 10 for example. The two series are LAI series from the same pixel, and the major difference between them is the timing, not amplitude. Timings of rice phenology stages vary from year to year, so this different timing can result in unwanted increase in distance measurement. The distance between the two series is 7.8 if we use Euclidian distance, but for DTW distance, the distance is 2.3, which is much smaller.

Correlation between SIST and Heavy Metal Concentration
Soil Cd concentrations (mg/kg) in Section 2.2.1 is used as reference data to assess the accuracy of SIST in detecting heavy metal stress levels. Pearson correlation coefficient (r) [40] is chosen as the accuracy measurement. Given two variables x and y, r is calculated using the following formula: where n is sample size, x i and y i are SIST values and Cd concentrations (mg/kg), respectively.x andȳ are mean values of SIST and Cd concentrations, respectively. As is shown in Figure 11, SIST is positively correlated with Cd concrations, with a r of 0.8236. This high correlation between SIST and Cd concentrations demonstrates that SIST is correlated with heavy metal stress levels in rice. Correlation: 0.8236 SIST Figure 11. Correlation between SIST and Cd concentrations.

Relationship between Heavy Metal Stress Levels and Industrial Activities
To identify the relationship between heavy metal stress in rice and industrial activities, we searched for factories that may cause heavy metal contamination by using AutoNavi, one of the largest online map services in China. Among various types of factories, those associated with metallurgy and machine manufacturing contribute greatly to heavy metal pollution, pose threats to the surrounding soil, and negatively affect rice growth. The spatial distribution of these factories are shown in Figure 12. From the spatial distribution of factories in Zhuzhou, we can find that most factories are located north of Zhuzhou City, where SIST values are high. SIST values near Zhuzhou County in the center of the study area, where factories are scarce, are much lower than those in northern areas but still noticeably higher than those in southern rural areas. The spatial distribution of high-pollution factories is mostly consistent with that of SIST.

Advantages and Disadvantages of SIST
SIST can distinguish long-term stable stress signals such as heavy metals in rice, from multiple types of stress. Given that the impact of heavy metal stress on rice is stable across space and time and exhibits similar stress signals between adjacent years and in surrounding fields, SIST can be used to distinguish heavy metal stress levels by taking stress levels, temporal variation, and spatial patterns of a rice pixel into consideration. In this way, the signals of abrupt stress (pest and diseases), which may be unstable in one or more life cycles, are eliminated and only long-term stress signals retained. DTW is used in temporal dissimilarity measurement to eliminate the temporal scaling and shifting effects of different rice phenology stages, thereby increasing the accuracy of temporal dissimilarity.
However, SIST shows several limitations in the measurement of heavy metal stress levels. First, SIST is based on the assumption that a pixel should not be under a composite of heavy metal stress and other stresses at the same time. It cannot distinguish heavy metal stress if the rice pixel is under abrupt stress (pest and disease) as well. Second, the calculation of SIST requires a dense and long time series. This requirement necessitates the use of at least a 2-year-long time series with a suitable temporal interval in a growing season.

Limitations of This Study
There are some limitations of this study although heavy metal stress signals are captured by SIST effectively. First, we assumed that the relationship between LAI and NDVI remain unchanged in 2017 and 2018, which might introduce some uncertainty to heavy metal stress detection. Second, temporal stability was measured based on two-year-long time series. Although pest, disease and nutrition stress vary from year to year, two years' observations may be insufficient to distinguish heavy metal stress in rice, which might also introduce some errors to temporal stability measurements. We will take longer time series for analysis in our future research. Finally, Cd concentration in soil is an indirect reflection of heavy metal stress levels in rice. The relationship between Cd concentrations and heavy metal stress levels is not modeled here, which might bring some uncertainties to the study as well.

Conclusions
In this study, we used DTW to measure stress levels, temporal stability, and its spatial patterns of rice LAI series. By comparing series of the same pixel in adjacent years, the temporal dissimilarity can be measured, and temporal stability can then be calculated. Heavy metal stress can be distinguished from other types of stress using these spatio-temporal characteristics of rice LAI series. We also introduced a stress index based on these features (SIST) to assess heavy metal stress levels in rice. The results demonstrate that 1.
Heavy metal stress can be discriminated by extracting temporal characteristics of rice LAI series because unlike signals of other types of stress, heavy metal stress signals are stable during the whole growing season, and show similar temporal profiles in different years.

2.
Spatial patterns of rice temporal features, measured by local Moran's I, can help to discriminate heavy metal stress because heavy metal stress tend to be clustered while abrupt stress tend to be random in space.

3.
SIST, a spatio-temporal index based on time series of leaf area index, can detect heavy metal stress by taking both temporal and spatial features into consideration. The high correlation between SIST and heavy metal concentrations demonstrates that SIST is capable of this task. 4.
The difference between temporal profiles of rice LAI series under heavy metal stress and other stress types could be accurately discriminated using DTW because it can eliminate the influence of the different timings of phenological stages on rice growth, which is quite common for crops in different years or locations. DTW might be suitable for other time series based applications like forest disturbance detection.