[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
octcdf, a netcdf toolbox for octave
From: |
Alexander |
Subject: |
octcdf, a netcdf toolbox for octave |
Date: |
Sun, 23 Oct 2005 08:27:11 -0500 |
Hi all,
I have written a toolbox, octcdf, for reading and creating netcdf files from
octave. The toolbox uses the same syntax than the matlab toolbox of Charles R.
Denham (http://woodshole.er.usgs.gov/staffpages/cdenham/public_html/). But
unlike
the matlab toolbox, octcdf is not based on a mexcdf (or mexnc) gateway. The
octcdf
toolbox is written in C++ calling directly the netcdf library. It uses an
operator
syntax (subsref and subsasgn) to manipulate netcdf dimensions, variables and
attributes. A minimal example for using octcdf would be:
% create a netcdf file
nc = netcdf('example.nc','c');
% define netcdf dimension "dim" of length 4
nc('dim') = 4;
% define a netcdf variable "var" of type double
nc{'var'} = ncdouble('dim');
% store [1 2 3 4] in netcdf variable var
nc{'var'}(:) = [1 2 3 4];
% close netcdf file
ncclose(nc);
Any suggestions or comments are of course very appreciated. You can download the
toolbox at: http://ocgmod1.marine.usf.edu/octcdf/
Cheers,
Alexander
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- octcdf, a netcdf toolbox for octave,
Alexander <=