The Generate Trend Raster tool estimates the trend for each pixel along a dimension for one or more variables in a multidimensional raster.
Note:
To run this tool, the portal must be configured for raster analysis.
This functionality is currently only supported in Map Viewer Classic (formerly known as Map Viewer). It will be available in a future release of the new Map Viewer. If you do not see this tool in Map Viewer Classic, contact your organization administrator. Your portal may not be configured for raster analysis, or you may not have the privileges required to run the tool.
Workflow diagram
Example
 Given 40 years of monthly ocean temperature data, calculate the linear trend line fit for each pixel to see where and how temperature changed over time.
 Given daily precipitation data collected over 10 years, use the harmonic trend line option and examine the Rsquared goodness of fit statistic to see whether a seasonal trend is present in the data.
Usage notes
This tool can be used to fit data along a linear, harmonic, or polynomial trend line, or it can be used to perform trend detection using the MannKendall or SeasonalKendall test.
The output trend raster generated with this tool is used as the input to the Predict Using Trend Raster tool.
The MannKendall and SeasonalKendall tests are used to determine whether there is a monotonic trend in the data. They are nonparametric, meaning they do not assume a specific distribution of data The MannKendall test does not consider serial correlation or seasonal effects. If the data is seasonal, the SeasonalKendall test is more appropriate.
There are three trend line options for fitting a trend to the variable values along a dimension: linear, harmonic, and polynomial.
 Linear—The linear trend line is a bestfit straight line that is used to estimate simple linear relationships. A linear trend highlights a rate of change that is increasing or decreasing at a steady rate. The formula for the linear trend line is as follows:
 Harmonic—The harmonic trend line is a periodically repeating curved line that is best used to describe data that follows a cyclical pattern, such as seasonal temperature changes. The formula for the harmonic trend line is as follows:
 Polynomial—The polynomial trend line is a curved line that is useful for data that fluctuates. In this case, a polynomial order value is used to indicate the maximum number of fluctuations that occur. The formula for the polynomial trend line is as follows:
If you perform linear, harmonic, or polynomial trend fitting, the output is a multidimensional imagery layer in which each slice is a multiband raster containing information about the trend line. If you are analyzing the trend for a single variable for a dataset containing a single dimension (for example, time), there will be a single slice in the output dataset. If you are analyzing a single variable for a dataset containing multiple dimensions (for example, time and depth), each slice will contain trend information for each dimension value along the dimension that was not included in the analysis.
If the tool is used to perform either the MannKendall test or the SeasonalKendall test, the output is a fiveband raster as follows:
 Band 1 = Sen's slope
 Band 2 = pvalue
 Band 3 = MannKendall score (S)
 Band 4 = S Variance
 Band 5 = Zscore
Model goodnessoffit statistics can be generated as optional outputs for linear, harmonic, and polynomial trend rasters. The root mean square error (RMSE), Rsquared, and the trend slope pvalue can be calculated and displayed in the output raster using the RGB renderer and specifying the statistics as the red, green, and blue channels.
For information on how to publish multidimensional imagery layers, see Publish multidimensional imagery layers.
If Use current map extent is checked, only the pixels that are visible in the current map extent will be analyzed. If unchecked, the entire input imagery layer will be analyzed.
The parameters for this tool are listed in the following table:
Parameter  Explanation 

Choose multidimensional imagery layer to analyze trend  The input multidimensional imagery layer to analyze. 
Choose dimension along which variable trend will be analyzed  The dimension along which a trend will be calculated for the variable or variables selected. 
Choose variable(s) to analyze trend  The variable or variables for which trends will be calculated. If no variable is specified, the first variable in the multidimensional imagery layer will be analyzed. 
Choose the type of line to fit variable values along a dimension  Specifies the type of line that will be used to fit to the pixel values along a dimension.

Specify the time unit for the length of a seasonal period  Specifies the time unit that will be used for the length of a seasonal period when performing the SeasonalKendall test.

Specify the length of harmonic cycle  The length of periodic variation that will be modeled. For example, leaf greenness often has one strong cycle of variation in a single year, so the cycle length is 1 year. Hourly temperature data has one strong cycle of variation throughout a single day, so the cycle length is 1 day. If you expect your data to go through two cycles of variation in one year, the length of cycle is 0.5 years or 182.5 days. The default length is 1 year for data that varies on an annual cycle. This parameter is required when the trend line type is set to Harmonic and the dimension is time. 
Choose the time unit of harmonic cycle length  Specifies the time unit that will be used for the length of a harmonic cycle.
This parameter is required when the trend line type is set to Harmonic and the dimension is time. 
Specify the frequency number for the harmonic trend fitting  The frequency that will be used in harmonic trend fitting. This parameter specifies the frequency of cycles in a year. If the frequency is set to 1, a combination of linear and the first order harmonic curve will be used to fit the model. If the frequency is 2, a combination of linear, first order harmonic curve, and second order harmonic curve will be used to fit the data. The default value is 1. This parameter is required when the trend line type is set to Harmonic and the dimension is time. 
Specify the polynomial order number for the trend fitting  The polynomial order number that will be used in polynomial trend fitting. The default value is 2, or second order polynomial. This parameter is required when the trend line type is set to Polynomial and the dimension is time. 
Choose model statistics to be included in trend raster  Specifies the statistics that will be calculated in the output.

Ignore missing values in calculation  Specifies whether missing values are ignored in the analysis.

Result layer name  The name of the layer that will be created in My Content and added to the map. The default name is based on the tool name and the input layer name. If the layer already exists, you will be prompted to provide another name. You can specify the name of a folder in My Content where the result will be saved using the Save result in dropdown box. 
Environments
Analysis environment settings are additional parameters that affect a tool's results. You can access the tool's analysis environment settings by clicking the gear icon at the top of the tool pane.
This tool honors the following Analysis Environments:
 Output coordinate system—Specifies the coordinate system of the output layer.
 Extent—Specifies the area to be used for analysis.
 Snap Raster—Adjusts the extent of the output so it matches the cell alignment of the specified snap raster layer.
 Cell size—The cell size to use in the output layer.
 Mask—Specifies a mask layer, where only the cells that fall within the mask area will be used for analysis.
 Resampling method—The method to use to interpolate pixel values.
 Recycle interval of processing workers—Defines how many image sections to process before restarting worker processes.
 Parallel processing factor—Controls the raster processing CPU or GPU instances.
 Number of retries on failures—Defines how many retries a worker process will attempt when there is random failure processing a job.
Similar tools and raster functions
Use Generate Multidimensional Anomaly to calculate anomaly values for variables over time. Other tools may be useful in solving similar problems.
Map Viewer Classic analysis tools and raster functions
The Predict Using Trend Raster tool uses the output from the Generate Trend Raster tool to forecast variable values to a future date or range of dates.
ArcGIS Pro analysis tools and raster functions
The Generate Trend Raster geoprocessing tool is available in the Image Analyst toolbox.
Generate Trend is also available as a raster function.
ArcGIS Enterprise developers resources
If you are working in ArcGIS REST API, use the Generate Trend Raster task.
If you are working in ArcGIS API for Python, use Generate Trend Raster from the arcgis.raster.analytics module.