MATLAB Implementation of the SPAR TC Framework for Real-World Datasets
Authors/Creators
Description
This methodology involves estimating scale-dependent error variances for three gridded datasets (fine, medium, and coarse resolution) using the SPAR‑TC (Spatially Representative Triple Collocation) approach.
The code includes four main functions. The spartc_matframework is the main driver function that handles all operations—re-gridding, data alignment, and final error variance computation. It takes the fine (X), medium (Y), and coarse (Z) datasets and applies SPAR-TC equations to output error variances: sigma_error_X, sigma_error_Y, and sigma_error_Z.
The extract_gridded_data_with_larger_smaller_equal_gridsize function is used within the main driver function to interpolate or aggregate data from one grid resolution to another using a 4-point area-weighted scheme.
The nan_eliminate_series_calculation function ensures that all three input datasets share identical NaN positions by setting all values to NaN wherever one dataset has a missing value. This step is crucial for consistent statistical analysis.
The variance_series_calculation function computes pointwise variances and covariances between the datasets after they have been aligned and re-gridded. These outputs are used by the main driver function to apply the SPAR‑TC variance formulas.
Files
SPARTC_Matframework.zip
Files
(4.7 kB)
| Name | Size | Download all |
|---|---|---|
|
md5:4765a07c6fe9de26d8a21fd834de94b8
|
4.7 kB | Preview Download |
Additional details
Software
- Programming language
- MATLAB