5.0

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

netcdfobj - netcdf made easy.

by Aslak Grinsted

 

30 May 2011

Easy interface for reading netcdf files.

| Watch this File

File Information
Description

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

  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  
Everyone's Tags
data import, netcdf, object, oop, wrapper
Tags I've Applied
Add New Tags 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).

Contact us