Spatial Reference System

A spatial reference system specifies how a pair of numbers becomes a location: the datum defining the Earth’s shape and origin, the coordinate system, and, if the data is projected, the projection converting the curved surface to a plane. Without it, coordinates are numbers without referents.

The reason it deserves attention rather than assumption is that omitting it rarely produces an obvious failure. Data plots. Grids overlay. The results are just wrong by a distance that varies with location, which looks far more like a physical signal than like a metadata error.

The parts, and where each goes wrong

The datum defines the reference ellipsoid and its position relative to the Earth. WGS84 is the usual default. Datum differences produce offsets of up to a few hundred metres — small enough to be invisible on a coarse climate grid, large enough to matter for station siting, urban work, or anything compared against high-resolution terrain.

The projection maps the ellipsoid onto a plane, and every projection distorts something. The relevant question is never which projection is correct but which distortion is acceptable. Computing areas in a non-equal-area projection is a common and quiet error — a grid cell of constant degree spacing has an area that varies with latitude by a factor of two across the mid-latitudes, so an unweighted mean over a lat-lon grid is not a spatial mean. This is the single most frequent spatial mistake I see in climate analysis, and it is entirely invisible in the output.

Rotated poles, which regional climate models use routinely to get a quasi-uniform grid over the domain of interest, are a further trap. The coordinates in the file are not geographic latitude and longitude, and treating them as such places the domain somewhere else entirely. The rotation parameters are metadata; lose them and the data becomes unlocatable.

Why it belongs in the file

The system has to travel with the data, because it cannot be recovered from the data. A grid of numbers is consistent with many reference systems, and there is no way to detect the wrong choice from the values alone. This is why CF conventions specify grid mapping attributes, why ATMODAT and the UC2 data standard require them, and why “the coordinates are in the filename” is not adequate documentation.

An EPSG code is usually the most reliable way to record it — a single integer identifying a fully specified system, far less prone to transcription error than spelling out ellipsoid and projection parameters.

See also: metadata generally, netCDF and CF conventions for how it is encoded, and climate data for what depends on it.