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: 4.57 KB File ID: #31615 Version: 1.2
image thumbnail

netcdfobj - netcdf made easy.

by

Aslak Grinsted (view profile)

 

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)
MATLAB Search Path
/
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

Tare (view profile)

Excellent.. Works Great.. Thanks..

01 Jun 2011 Aslak Grinsted

Aslak Grinsted (view profile)

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).

Comment only
Updates
04 Sep 2013 1.1

added a netcdf date -> datenum parser

04 Feb 2015 1.2

fixed serious bug in cdfdate2num

Contact us