Converting NetCDF to Raster

Sometimes, especially when working with climate data, it is necessary to work with NetCDFs (Network Common Data Format – standard data packaging for scientific data). While NetCDF is good for data distribution, storage, and provenance, it is less good for working into standard raster data processing workflows. If you’re used to working with Tiffs or JPEGs, the following command might be helpful, assuming you have gdal installed on your machine.

# convert the specified dimension to Raster

This will create an N-banded raster with one band for each time dimension related in your dataset.

For example, to convert a netcdf file called (climate data from the SynTrace paleoclimate experiment) using the dimension aice (area of gridcell covered in glacier) to a tiff (GTiff), I might enter:

gdal_translate -of "GTiff" aice.tif

This creates a 2204 band raster representing ice area in the tiff format. Super handy for then converting into a format to be digested by a web application.