Chapter 1. Introduction

This is an adaptation of a tutorial that was originally meant for OPeNDAP, but was later refocused on SNCTOOLS as the way to access both OPeNDAP and local netCDF files. SNCTOOLS can use either java or mexnc as a way to read both OPeNDAP and local netcdf files, but currently requires mexnc to write to local netCDF files.

Mexnc is the name of the mex-file that sits between MATLAB and the netCDF library. It's been around for a while now, and it's pretty robust. It's very easy to compile mexnc on just about every platform. Every platform except Windows, that is... SNCTOOLS is a set of m-files that was originally written to sit on top of mexnc and shield the user from some of the nittier, grittier details of mexnc.

The OPeNDAP website defines itself as

OPeNDAP provides software which makes local data accessible to remote locations regardless of local storage format. OPeNDAP also provides tools for transforming existing applications into OPeNDAP clients (i.e., enabling them to remotely access OPeNDAP served data).

So, you can basically think of it as a way to access remotely-stored datasets from your matlab window or desktop.

So how do SNCTOOLS, mexnc, OPeNDAP, and java relate? Normally, mexnc is compiled on top of the netCDF libraries, but this compile process can be rejiggered to use the OPeNDAP libraries instead. This is a little trickier and less stable than a normal mexnc compile, and the reader is gently urged to consult this resource before proceeding. It's possible for one to dispense with the opendap libraries altogether and use java as a backend to SNCTOOLS, but this currently provides only read-access to OPeNDAP URLs and local netCDF files.