Spherekit: Demos
1. "Smart" Interpolation
Elevation data are used to assist a multiquadric interpolation of temperature.
2. Global Interpolation
Global land temperatures are interpolated using the GHCN data set.
3. Error Analysis
A comparison of two interpolation algorithms (thin-plate splines and Cressman's method) using cross-validation.
4. Spatial Variability
Spatial variability of a dataset is explored using the semivariogram.

1. "Smart" Interpolation

"Smart" interpolation improves the performance of traditional interpolations by using knowledge of the processes that produced the spatial variations (Willmott and Matsuura, 1995). In this example, we use the physical law that temperature falls with altitude, roughly at the environmental lapse rate. Standard and topologically informed interpolations are compared using a sparse network of 160 weather stations in China. The data set is deficient in that high altitude locations in the Himalayan mountains are underrepresented.

The first diagram below shows the standard, interpolated temperature field using the multiquadric method. The fit fails to take into account the large variations in topography that produce very low temperatures at high altitudes.

  1. Reduce temperatures to sea-level using the environmental lapse rate.
    (SeaLevTemp= Temp + Env LapseRate * Elevation)

  2. Interpolate the "sea-level" temperature field to a one-degree grid using the multiquadric method.

  3. Reintroduce elevation effect on the interpolated field.
    (Temp= SeaLevelTemp - EnvLapseRate * Elevation)

    This final step was carried out automatically by Spherekit, by inverting the operations in Step 1.

The key point is that the first-order effect of the temperature- elevation relation was incorporated into the interpolation.


Standard Multiquadric Interpolation (Degrees C)

Topographically Informed Interpolation (Degrees C)

This "smart" interpolation captures the climatological influences of topography. The low temperatures associated with the mountains of western China are now visible, despite the lack of high altitude temperature stations


2. Global Interpolation

This example focuses on interpolation over the entire globe. A large data base containing mean temperatures from 2,456 GHCN weather stations in January 1990 is used. The observation network is not uniformly distributed about the globe, as unpopulated regions tend to be underrepresented. The temperature field is interpolated to a one degree global grid. Note that the use of spherical geometry ensures realistic isotherms throughout the polar region.

The interpolation method used is inverse distance weighting. The user specifies which of several inverse distance functions are to be used and specifies the radius of influence. This radius can be either fixed in radius, fixed in number of points, or as an average radius based upon a specified number of points. The user can select two additional options. An extrapolation correction is available to prevent peaks from falling at the data points, based upon the gradient of the interpolated field. Secondly, a spatial bias correction adjusts the distance weights based upon the angular distribution of the points in the neighborhod. The influence of both the extrapolation and spatial bias corrections may be independently scaled.

The orthographic projection shown below reimpliments Shepard's (1968) interpolator, with an average of seven nearest neighbors, a limited extrapolation capability, and an angular correction.


Global Interpolation of GHCN Data (Degrees C)

3. Error Analysis

Spherekit provides researchers with the ability to quickly and easily compare interpolation methods or compare parameter settings. This example compares interpolations using two methods: thin-plate spline and Cressman (an inverse distance weighted method). The next two images present error analyses of these methods applied to a small subset of the GHCN dataset used in Example 2. Cross-validation is used to generate the at-station errors. These errors are then interpolated to a grid, reducing spatial bias. The plots below are gridded, revealing the one-degree granularity of the interpolation.

MAE= Mean average error MBE= Mean bias RMSE= Root mean square error

     MAE       0.593

     MBE      -0.13

     RMSE      0.873

     MIN      -4.568

     MAX       3.173

     COUNT.....1,248
Thin-Plate Spline Cross-validation (Degrees C)

     MAE       1.068

     MBE      -0.335

     RMSE      1.379

     MIN      -4.407

     MAX       3.437

     COUNT.....1,248
Cressman Cross-validation (Degrees C)

Further analyses may be carried out using Spherekit's matrix math capabilities. The image below displays the difference field (Cressman-Spline) of the above error plots. It is interesting to note that the standard deviation of the difference field is greater than both mean average errors.

     MIN      -4.999

     MAX       4.176

     AVG      -0.223

     STD       1.410

     COUNT.....1,248

4. Spatial Variability

Several exploratory data analysis tools are available to examine the spatial variability of a dataset. Many of the features of the GSLIB software library are integrated into Spherekit. The GHCN temperature dataset of Example 2 is used again to demonstrate the long-distance correlations present in climate data. As Spherekit computes distances using great circle distances, distances at continental and global scales are computed correctly.

The first figure shows an isotropic semivariogram of the datset. There is a plateau in the semivariogram in the 2000-4000 km range and a sharp rise thereafter. This calculation is repeated using anisotropic semivariograms in the east-west and north-south directions. The second figure (the east-west semivariogram) displays the plateau more prominently. This characteristic corresponds to the common notion that zonal variations are relatively small. The north-south variations vary at shorter distances, as would be expected. Interestingly, the semivariogram falls after reaching a peak; presumably this is due to a return to the same latitude zone at these distances.


Isotropic semivariogram of GHCN Data

East-West anisotropic semivariogram

North-South anisotropic semivariogram


5. References

Deutsch, C. V. and A. G. Journel (1992) GSLIB: Geostatistical Software Library and User's Guide, New York, Oxford University Press.

Shepard, D. (1968) A two-dimensional interpolation function for irregularly-spaced data, Proc. 23rd National Conference ACM, ACM, 517-524.



NCGIA 1997