environmentaltools.spatiotemporal.raster.calculate_temporal_differences
- environmentaltools.spatiotemporal.raster.calculate_temporal_differences(info)[source]
Calculate temporal differences between elevation layers and analyze change statistics.
This function computes the differences between consecutive time steps in elevation data and calculates what percentage of cells (x*y*t) are different from zero relative to the total number of cells.
- Parameters:
info (dict) – Configuration dictionary containing datacube filenames and processing parameters.
- Returns:
Dictionary containing temporal difference statistics: - ‘total_cells’: Total number of cells across all dimensions (x*y*t) - ‘changed_cells’: Number of cells with non-zero differences - ‘change_percentage’: Percentage of cells that changed - ‘change_statistics’: Additional statistics per simulation
- Return type:
dict
Notes
The function processes each NetCDF file and calculates: 1. Temporal differences: elevation[t+1] - elevation[t] 2. Counts non-zero differences across all space-time dimensions 3. Reports percentage of changed cells relative to total