Extrude a land surface based on topography


This document is part of a series teaching how to Create a multi-variable image / animation from a coupled ice sheet - climate simulation.

If you don’t already have it (files in the example are already prepared), you will need a (high-resolution) topography, e.g. from cdo -topo. Remap your data to the resolution of the topography. Something along the lines of:

cdo -f nc -topo topo.nc # will create a topo on a 0.5 deg lat/lon grid.
cdo -merge -remapnn,topo.nc MYFILE topo.nc MYFILE_TOPO.nc


The calculator needs point data for processing. Often the topo data ends up being cell data. Check if you have cell or point data and, if necessary, Convert cell data to point data before applying the calculator.

Make sure the Attribute Type Setting in your calculator is on Point Data, select Coordinate Results, give your resulting coordinates a reasonable name, and use the equation (assuming your topography variable is called topg and in m, this yields a vertical exaggeration of 100)


Where the first paren scales the topography to a strong extrusion around a unit sphere, and the second part is the vector from the origin to the current grid point’s position. Your topography variable should appear in the Scalars dropdown menu. If not, go back to Check if you have cell or point data.



For plane projections (Mercator, Mollweide / …) use something along the lines of:

(1+topo/20000) * coordsZ*kHat + (coordsX*iHat+coordsY*jHat)

(return to Load the vegetation data)