MATLAB Implementation of the SPAR TC Framework for Real-World Datasets
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.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-06-07
- DOI
- https://doi.org/10.5281/zenodo.15615774
- Primary Topic
- Marine and coastal ecosystems
- Type
- article
- Field-Weighted Citation Impact
- 0.00