Code covered by the BSD License  

Highlights from
netcdfobj - netcdf made easy.

5.0

5.0 | 1 rating Rate this file 17 Downloads (last 30 days) File Size: 5.15 KB File ID: #31615
image thumbnail

netcdfobj - netcdf made easy.

by

 

30 May 2011 (Updated )

Easy interface for reading netcdf files.

| Watch this File

File Information
Description

allows you to easily access atrributes and variables from a netcdf file.

And can also convert the netcdf dates to datenums.

  Example1:
  o=netcdfobj('e:\meanstationpressure.cdf');
  o.vars
  pressure=o.vars.pressure.value;

EXAMPLE2:
n=netcdfobj('ice5g_v1.2_21.0k_1deg.nc');
>> n.vars
lat
bounds_lat
long
bounds_long
orog
sftgit
sftgif
>> n.vars.lat.atts
bounds: bounds_lat
standard_name: latitude
units: degrees_north
axis: Y
>> lat=n.vars.lat.value;
>> imagesc(n.vars.long.value,lat,n.vars.orog.value')
>> axis xy

MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
06 Dec 2011 Tare

Excellent.. Works Great.. Thanks..

01 Jun 2011 Aslak Grinsted

I invite all of you to contribute to the development of this code.

(I would like the code to support writing, and it would also be great if it automatically could insert NaNs and perhaps convert units according to the attributes for a variable).

Updates
04 Sep 2013

added a netcdf date -> datenum parser

Contact us