Agricultural and Meteorological Software


Skip Navigation Links

NetCDF Matlab
NetCDF Matlab can convert NetCDF files to Mat-file (Matlab Data File)

What is a Mat-file?

A MAT-file stores data in binary (not human-readable) form. In MATLAB, you create MAT-files by using the 'save' command, which writes the arrays currently in memory to a file as a continuous byte stream. By convention, this file has the filename extension .mat; thus the name MAT-file. The load command reads the arrays from a MAT-file into the MATLAB workspace. Most MATLAB users do not need to know the internal format of a MAT-file. Even users who must read and write MAT-files from C and Fortran programs do not need to know the MAT-file format if they use the MATLAB Application Program Interface (API). This API shields users from dependence on the details of the MAT-file format. However, if you need to read or write MAT-files on a system for which the MATLAB API library is not supported, you must write your own read and write routines. The MATLAB API is only available for platforms on which MATLAB is supported. This document provides the details about the MAT-file format you will need to read and write MAT-files on these systems. reference

How can we use "NetCDF Matlab"?

NetCDF Matlab is a simple windows tool and the user should open a NetCDF file then the variables would be shown on the list. The user can select one or all variables of NetCDF file from the list, then save them to Mat-file. We added a new variable in the list and the global attributes has been saved on it so the user can select it from the list of NetCDF variables for converting to Mat-file.

NetCDF Matlab can read and convert any NetCDF files but the ability of NetCDF Matlab depends on the RAM of your system. If you want to use the NetCDF Matlab for convert a big NetCDF dataset to Mat-file so please consult to AgriMetSoft supporter. When you use NetCDF Matlab for big NetCDF dataset, so, It is better you convert each NetCDF variable, as separately (in separate Mat-file).

NetCDF Matlab will save all NetCDF variable to "double" (type of data = "double"). But the "GlobalAttributes" will convert to Mat-file in string format.