To follow up on Jon Herman’s posts on netCDF, including how to convert ascii to netCDF, using lists in netCDF, and using matplotlib with netCDF data, we also wanted to just learn how to access and plot netCDF data in native Matlab.
First of all, there is an impressive list of netCDF utilities at the NCAR website, including some that are designed for Matlab, such as the CSIRO toolbox. However, what if you can’t install packages and extra utilities in Matlab?
Well, it turns out there are some built in functions that can handle these data. Again, thanks to Jon Herman for finding these. He provides a sample file that gives the instructions. Basically, the ncdisp function gives a list of what elements are within the netCDF file. And then, you can extract the data using ncread.
Want to find some data to play around with? The IRI Climate Data Library is a great place to start. There are data from an impressive number of sources, including some precipitation and streamflow data from South America.
Questions/comments/etc? Post them below!