Chapter 2. Setting Up the Backend

For the purposes of this tutorial, I'm going to assume that you will use java to access OPeNDAP datasets. It's possible to use an OPeNDAP-enabled version of mexnc as the backend instead of java, but it's more complicated to get set up. So, without further ado, you need to

  1. Get MEXNC (2.0.29 or better)

    and follow its installation instructions.
  2. Get SNCTOOLS (2.4.8 or better)

    and follow its installation instructions.
  3. Get the toolsUI jar file (try 4.0 if you are brave). You need to go to Unidata for this.

  4. After downloading, introduce the jar file to matlab with something like the following command (the path will be different on your system)

     
    >> javaaddpath ( '/home/jevans/matlab/classes/toolsUI-2.2.22.jar' ) ; 
                    

  5. You will then need to set a preference. From within the matlab prompt, type

     
    >> setpref ( 'SNCTOOLS', 'USE_JAVA', true ); % this requires SNCTOOLS 2.4.8 or better
                    

    and you should be good to go.

    It's possible to use an opendap-enabled version of mexnc for your opendap connectivity (rather than java), but I don't really recommend it.