For full notebook, kindly refer to the attached PDF document.
This project conducts signal decomposition on spatiotemporal data, such as hydrological data that varies spatially across grids over a specific period. The decomposition process is applied to terrestrial water storage anomaly (TWSA) data from the GRACE satellite mission.
The method used to decompose the hydrological data is Seasonal and Trend decomposition using Loess (STL). The original/raw signal will be decomposed into three constituents: trend (including linear and non-linear trends), seasonal, and remainder or residual. For additional literature, please read Cleveland et al. (1990).
The main data is provided in a CSV format (file = GRACE-GSFC_2002.04_2017.06.csv). The raw data was downloaded from NASA Goddard Space Flight Center (GSFC) with spatial and temporal resolutions of 0.5 degrees and 1 month, respectively, and in *nc format. The source code to convert *nc data to a data frame refers to DSSG2023-Groundwater by uwescience. The short-term gap in the GRACE GSFC data was already filled using the simple linear interpolation approach.
The data covers the Kalimantan Island of Indonesia and contains four columns:
- lon = longitude;
- lat = latitude;
- time = monthly time from 2002.04 to 2017.06; and
- lwe_cm = liquid water equivalent in centimeters, also known as the terrestrial water storage anomaly.
The main R-script is in STL-Decomposition-GRACE.R. Four primary stages included in the code comprise:
- Library (installation and) preparation;
- Calling the CSV data;
- Creating a time series object for each grid;
- Performing STL for each grid; and
- Converting the decomposed signal into a DataFrame.
Result for:
head(grace_gsfc)
and
tail(grace_gsfc)
Result for:
autoplot(object = stl_list[1],ncol = 1)
Result for:
head(grace_gsfc_decomposed)
and
tail(grace_gsfc_decomposed)
Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin [Available at: https://www.geo.fu-berlin.de/en/v/soga-r/Advances-statistics/Time-series-analysis/Seasonal-decompositon/Seasonal-and-Trend-decomposition-using-Loess/index.html].
For suggestions and collaboration, kindly reach me at: LinkedIn or rizkasafira20@gmail.com.