MEXNC: Difference between revisions
From WikiROMS
Jump to navigationJump to search
New page: MEXNC is a mex-file interface to NetCDF files for MATLAB. In simple terms, it is a set of files (mex and .m files) that allows Matlab to read and write NetCDF files, which are the standard... (change visibility) |
No edit summary (change visibility) |
||
Line 6: | Line 6: | ||
You have to download the MEXNC version that matches BOTH, your specific Matlab version and your operating system. | You have to download the MEXNC version that matches BOTH, your specific Matlab version and your operating system. | ||
* First determine what Matlab version you have by typing on the Matlab command line:<div class="box"><span class="red">version('-release') </span | * First determine what Matlab version you have by typing on the Matlab command line:<div class="box"><span class="red">version('-release') </span> | ||
* Then, go to the [http://mexcdf.sourceforge.net/downloads/ download] area, scroll down and <span style="color:red">click</span> your Matlab version (verify that you operating system is listed as an option). | * Then, go to the [http://mexcdf.sourceforge.net/downloads/ download] area, scroll down and <span style="color:red">click</span> on your Matlab version (verify that you operating system is listed as an option). | ||
* Download the latest release | * Download the latest release | ||
* Extract (i.e. unzip or unpack) the file in a location where it can stay indefinitely | * Extract (i.e. unzip or unpack) the file in a location where it can stay indefinitely | ||
* In Matlab, add the path of your recently extracted mexnc directory. To do this... | * In Matlab, add the path of your recently extracted mexnc directory. To do this... | ||
Line 18: | Line 18: | ||
# Click on the <span style="color:red"> Add with Subfolders...</span> button, and add the path to your new mexnc folder | # Click on the <span style="color:red"> Add with Subfolders...</span> button, and add the path to your new mexnc folder | ||
# Click on the <span style="color:red">Save</span> button, and close the GUI | # Click on the <span style="color:red">Save</span> button, and close the GUI | ||
* If you are using WINDOWS operating system (I don't know if other too), you will have to add the netcdf.dll file to your Matlab system directory. To do this... | |||
# Go to your recently extracted mexnc directory and go inside the win32 folder... | |||
# Copy the <span style="color:red">netcdf.dll</span> file and PASTE it in both:<div class="box"><span class="red">C:\MATLAB\bin</span> | |||
and/or<div class="box"><span class="red">C:\MATLAB701\bin\win32</span> |
Revision as of 17:06, 11 April 2008
MEXNC is a mex-file interface to NetCDF files for MATLAB. In simple terms, it is a set of files (mex and .m files) that allows Matlab to read and write NetCDF files, which are the standard input and output files of ROMS.
HERE is a link to the MEXNC project page.
How to install MEXNC?
You have to download the MEXNC version that matches BOTH, your specific Matlab version and your operating system.
- First determine what Matlab version you have by typing on the Matlab command line:version('-release')
- Then, go to the download area, scroll down and click on your Matlab version (verify that you operating system is listed as an option).
- Download the latest release
- Extract (i.e. unzip or unpack) the file in a location where it can stay indefinitely
- In Matlab, add the path of your recently extracted mexnc directory. To do this...
- Click on File > Set Path... (a GUI will pop-up)
- Click on the Add with Subfolders... button, and add the path to your new mexnc folder
- Click on the Save button, and close the GUI
- If you are using WINDOWS operating system (I don't know if other too), you will have to add the netcdf.dll file to your Matlab system directory. To do this...
- Go to your recently extracted mexnc directory and go inside the win32 folder...
- Copy the netcdf.dll file and PASTE it in both:C:\MATLAB\bin
and/or
C:\MATLAB701\bin\win32