Standard Install Instructions:
========================================================================
If your download already contains a mex-file and if you don't use 
windows, you may already be set.  Just add the path to this directory 
to your matlab path and give it a go.  If you need to compile the mex-
file, read down below in the section "Rolling Your Own".  But first,
some platform-specific notes for windows users.



Platform-Specific Notes:
========================================================================
  If your platform isn't listed here, then either there aren't any
  problems with the standard installation or nobody has reported any
  yet...


  Windows
  ======================================================================
    If do not have the netcdf.dll file, please retrieve that from 

    http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/

    and then install that somewhere on your system path.  A good candidate
    for this would be

        C:\path\to\matlab\bin 

    but some users report that they instead had to use

        C:\path\to\matlab\bin\win32

    Don't forget to add the path to this file that you are currently
    reading to your matlab path!

Compiling your Own:
========================================================================
If you need to roll your own on UNIX or unix-like systems, first locate
a file called "mexopts.sh" on your system.  It should be located
under your matlab bin directory.  For example, on my linux system,
matlab is installed in /opt/matlab, and the location of mexopts.sh is
/opt/matlab/bin/mexopts.sh .  So copy that file into the directory into
which you unpacked mexnc.  

You then need to edit it, inserting the following lines in down at the
bottom in the "Architecture independent lines" section.  

    NETCDF="/path/to/netcdf"
    EXTRA_CFLAGS="-I${NETCDF}/include"
    EXTRA_CLIBS="-L${NETCDF}/lib -lnetcdf "
    CFLAGS="-g $CFLAGS ${EXTRA_CFLAGS}"
    CLIBS="$CLIBS ${EXTRA_CLIBS} "

Just change the value of NETCDF to reflect the netcdf installation
location on your system.

Then, from the command line prompt, type

    make

The result of this should be a mex-file called "mexnc.mex___", where the
"___" is replaced by a suffix suitable to your platform (e.g. "glx" for
linux, "mac" for Mac OS X, etc).  

If compiling for windows, please take a look at the m-file
win32_make_mexnc.  It requires Microsoft Visual C++ compiler version 7.1
and Matlab 7 (sp1) and single threaded NetCDF 3.6.1 library (w/ large
file support), but maybe you can get it to work for other variations.
Note, I do not have access to Microsoft Visual C++, so I cannot test this.

You will need to already have NetCDF installed on your system before
attempting to compile mexnc.

Make sure you add the directory into which this file was unpacked to
your matlab path.  If you also dowload the netcdf_toolbox, make sure
that mexnc precedes the netcdf_toolbox in your matlab path.

For information about building with opendap libraries, please see 
http://mexcdf.sourceforge.net/opendap/.

