4.47059

4.5 | 17 ratings Rate this file 262 downloads (last 30 days) File Size: 2.65 KB File ID: #15177

NetCDF reader

by Paul Spencer

 

02 Jun 2007 (Updated 05 Jun 2007)

Code covered by the BSD License  

Reads NetCDF files into matlab structure

Download Now | Watch this File

File Information
Description

Function to read version 1 (classic 32bit) NetCDF files into a matlab structure.

MATLAB release MATLAB 7 (R14)
Other requirements Currently only tested under 32bit windows.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (19)
04 Jun 2007 Kelly Kearney

This is a nice complement to some of the more powerful netcdf libraries available. Becuase it reads in an entire file at once, it can only deal with small .nc files, but is much less hassle than the mexnc library I usually use. However, it would be nice if it did some checks ahead of time to see if the file it's reading is too big to be read into Matlab all at once (based on the header data), and errored out immediately, rather trying to do the impossible.

11 Jun 2007 FAISA MOHTI

good

22 Jun 2007 Patrick Gagnon

It's by far the simplest way that I found to read netcdf data in Matlab R14.

22 Oct 2007 Liam Harrington-Missin

Very Easy to use and quick, at least for smaller NetCDF files

23 Nov 2007 Ibrahim Modibbo

Wow! I cant believe it...even people's comments until i saved this file into my working dir and used it in place of load on matlab prompt...my file is there!
Thats a great job!

Will it be possible for you to extend this for ARGO data, and possibly how to make some few plots? This would have added extreme help to many people! Pls reply me....

I am PhD student at National Oceanography Centre, Southampton, UK.

Hope to hear from you!

Cheers!

21 Jan 2008 ali altalhy  
29 Jan 2008 w s

Thanks a lot. Exactly what I needed.

08 Apr 2008 D Luna

Great! Fantastic!

06 May 2008 Patrizio M

thanks

17 May 2008 Usama Anber

great, but how to visualize climate data on a map ?

03 Jun 2008 ramy MAROUS  
27 Jul 2008 Niranjan kumar

I am extreamly thank you

10 Sep 2008 William Amidon

works beautifully. Thank you so much. This is a great help for us matlab users trying to work with large climate datasets.

30 Sep 2008 Jian Xu

I really need this function, I hope it's helpful..

21 Oct 2008 roc light  
22 Jan 2009 naratip santitissadeekorn

??? Error using ==> feval
Undefined function or method 'mexcdf60' for input arguments of type 'char'.

What should I do to resolve the above error?
I am totally new to this type of data and mex-files. Please, help.

26 Feb 2009 Richard Sonnenfeld

I haven't used it heavily yet so there may still be issues -- but it appears that this script works just fine for Matlab in Linux. (Ubuntu/Debian). It really ought to -- NETCDF is supposed to be platform agnostic.

20 May 2009 Michael Kleder

Excellent submission. Note that unsigned integer variables (uint8) seem to be loaded as signed integers (int8). I use the typecast function to correct that. I haven't checked for any other bugs. Thanks for this really useful function!

16 Oct 2009 Imtiaz Rangwala

visualize netcdf

Please login to add a comment or rating.
Updates
05 Jun 2007

Updated to allow for the reading of selected data arrays and records

Tag Activity for this File
Tag Applied By Date/Time
data import Paul Spencer 22 Oct 2008 09:14:16
data export Paul Spencer 22 Oct 2008 09:14:16
netcdf Paul Spencer 22 Oct 2008 09:14:16
reader Paul Spencer 22 Oct 2008 09:14:16
matlab Paul Spencer 22 Oct 2008 09:14:16
utilities Paul Spencer 22 Oct 2008 09:14:16
data Paul Spencer 22 Oct 2008 09:14:16
i got this error messaeg error using feval undefined function or naratip santitissadeekorn 22 Jan 2009 01:35:56
data ks fu 26 Feb 2009 00:59:22
data Tarun Verma 26 Feb 2009 05:01:16
netcdf Vincent 28 May 2009 08:00:58
matlab Stelios Flamp 09 Feb 2010 10:37:40
data Stelios Flamp 09 Feb 2010 10:37:47
data export Stelios Flamp 09 Feb 2010 10:37:50
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com