From: <aba...@us...> - 2009-02-19 20:58:18
|
Revision: 5562 http://octave.svn.sourceforge.net/octave/?rev=5562&view=rev Author: abarth93 Date: 2009-02-19 20:58:12 +0000 (Thu, 19 Feb 2009) Log Message: ----------- pass link option in env var LIBS instead of cmd line options of mkoctfile Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/src/Makefile Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2009-02-18 21:20:27 UTC (rev 5561) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2009-02-19 20:58:12 UTC (rev 5562) @@ -1,8 +1,8 @@ Name: octcdf -Version: 1.0.11 -Date: 2008-08-23 -Author: Alexander Barth <ab...@ma...> -Maintainer: Alexander Barth <ab...@ma...> +Version: 1.0.12 +Date: 2009-02-19 +Author: Alexander Barth <bar...@gm...> +Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Description: A NetCDF interface for octave Depends: octave (>= 2.9.7) Modified: trunk/octave-forge/main/octcdf/src/Makefile =================================================================== --- trunk/octave-forge/main/octcdf/src/Makefile 2009-02-18 21:20:27 UTC (rev 5561) +++ trunk/octave-forge/main/octcdf/src/Makefile 2009-02-19 20:58:12 UTC (rev 5562) @@ -42,14 +42,13 @@ TARGETS = $(NCTARGET) MOFLAGS = $(OCTCDF_CFLAGS) +MOLIBS = $(shell mkoctfile --print LIBS) $(OCTCDF_LIBS) # # comment this line out if your octave installation does not have integer types. # MOFLAGS := $(MOFLAGS) -DHAVE_OCTAVE_INT -EXTRALIBS = $(OCTCDF_LIBS) - ifeq ($(HAVE_NETCDF),yes) all: $(TARGETS) else @@ -62,7 +61,7 @@ ov-netcdf.o ov-ncfile.o ov-ncvar.o ov-ncatt.o ov-ncdim.o: ov-netcdf.h ov-ncfile.h ov-ncvar.h ov-ncatt.h ov-ncdim.h $(NCTARGET) : $(OBJECTS) - $(MKOCTFILE) -o $@ $(MOFLAGS) $(OBJECTS) $(EXTRALIBS) + LIBS="$(MOLIBS)" $(MKOCTFILE) -o $@ $(MOFLAGS) $(OBJECTS) %.o:%.cc $(MKOCTFILE) -c $< $(MOFLAGS) $(DEFINES) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2009-06-07 10:16:29
|
Revision: 5900 http://octave.svn.sourceforge.net/octave/?rev=5900&view=rev Author: hauberg Date: 2009-06-07 10:16:15 +0000 (Sun, 07 Jun 2009) Log Message: ----------- Allow compilation with Octave 3.2 Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/src/ov-netcdf.cc Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2009-06-07 10:08:53 UTC (rev 5899) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2009-06-07 10:16:15 UTC (rev 5900) @@ -5,7 +5,7 @@ Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Description: A NetCDF interface for octave -Depends: octave (>= 2.9.7) +Depends: octave (>= 3.1.55) Autoload: yes BuildRequires: netcdf-devel License: GPL version 2 or later Modified: trunk/octave-forge/main/octcdf/src/ov-netcdf.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2009-06-07 10:08:53 UTC (rev 5899) +++ trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2009-06-07 10:16:15 UTC (rev 5900) @@ -50,14 +50,6 @@ octave_ncdim::register_type (); netcdf_type_loaded = true; - - // Lock constructor function in place, otherwise - // "nc=netcdf("file.nc","r"); clear functions; nc" generates a seg-fault!! - - mlock("netcdf"); - mlock("ncvar"); - mlock("ncatt"); - mlock("ncdim"); } @@ -99,6 +91,7 @@ @end deftypefn\n\ @seealso{ncclose}\n") { + mlock (); string format; // @@ -244,7 +237,7 @@ @end example \n\ @seealso{ncatt,ncdim,ncname,ncdatatype}\n") { - + mlock (); if (args.length() != 1) { print_usage (); return octave_value(); @@ -285,7 +278,7 @@ @end example \n\ @seealso{ncvar,ncdim,ncname,ncdatatype}\n") { - + mlock (); if (args.length() != 1) { print_usage (); return octave_value(); @@ -330,7 +323,7 @@ @end deftypefn\n\ @seealso{ncvar}\n") { - + mlock (); if (args.length() != 1) { print_usage (); return octave_value(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2009-06-16 12:58:31
|
Revision: 5955 http://octave.svn.sourceforge.net/octave/?rev=5955&view=rev Author: abarth93 Date: 2009-06-16 12:58:19 +0000 (Tue, 16 Jun 2009) Log Message: ----------- overloading numel for octave 3.2.x Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/src/ov-ncfile.h Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2009-06-16 10:30:59 UTC (rev 5954) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2009-06-16 12:58:19 UTC (rev 5955) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.0.13 -Date: 2009-02-19 +Version: 1.0.14 +Date: 2009-06-16 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/src/ov-ncfile.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncfile.h 2009-06-16 10:30:59 UTC (rev 5954) +++ trunk/octave-forge/main/octcdf/src/ov-ncfile.h 2009-06-16 12:58:19 UTC (rev 5955) @@ -68,6 +68,8 @@ return octave_value_list(); } + octave_idx_type numel (const octave_value_list&) { return 1; }; + ~octave_ncfile(); void close(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2009-10-06 09:21:13
|
Revision: 6294 http://octave.svn.sourceforge.net/octave/?rev=6294&view=rev Author: abarth93 Date: 2009-10-06 09:21:04 +0000 (Tue, 06 Oct 2009) Log Message: ----------- get libraries and compiler flags from nc-config (if present) Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/src/configure.base Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2009-10-05 18:49:21 UTC (rev 6293) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2009-10-06 09:21:04 UTC (rev 6294) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.0.14 -Date: 2009-06-16 +Version: 1.0.15 +Date: 2009-10-06 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/src/configure.base =================================================================== --- trunk/octave-forge/main/octcdf/src/configure.base 2009-10-05 18:49:21 UTC (rev 6293) +++ trunk/octave-forge/main/octcdf/src/configure.base 2009-10-06 09:21:04 UTC (rev 6294) @@ -305,28 +305,38 @@ OCTCDF_LIBS="$LDFLAGS" OCTCDF_CFLAGS="$CPPFLAGS" -dnl first checking for opendap support +dnl first checking for nc-config, then nc-dap -AC_MSG_CHECKING([for nc-dap]) +AC_MSG_CHECKING([for nc-config]) -if ncdap-config --version > /dev/null 2>&1; then +if nc-config --version > /dev/null 2>&1; then AC_MSG_RESULT([yes]) - OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`" - OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`" - + OCTCDF_LIBS="$OCTCDF_LIBS `nc-config --libs`" + OCTCDF_CFLAGS="$OCTCDF_CFLAGS `nc-config --cflags`" HAVE_NETCDF=yes else AC_MSG_RESULT([no]) + AC_MSG_CHECKING([for nc-dap]) - dnl if no opendap, checking if the NetCDF library exists. + if ncdap-config --version > /dev/null 2>&1; then + AC_MSG_RESULT([yes]) + OCTCDF_LIBS="$OCTCDF_LIBS `ncdap-config --libs`" + OCTCDF_CFLAGS="$OCTCDF_CFLAGS `ncdap-config --cflags`" - AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) + HAVE_NETCDF=yes + else + AC_MSG_RESULT([no]) - if test $HAVE_NETCDF = yes ; then - OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf" + dnl if no opendap, checking if the NetCDF library exists. - dnl we have the libraries, no we have also the headers? - AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) + AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) + + if test $HAVE_NETCDF = yes ; then + OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf" + + dnl we have the libraries, no we have also the headers? + AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) + fi fi fi @@ -355,4 +365,6 @@ octave-forge is configured with octave: $OCTAVE (version $OCTAVE_VERSION) mkoctfile: $MKOCTFILE for Octave $subver - octcdf toolbox: $OCTCDFSTATUS" + octcdf toolbox: $OCTCDFSTATUS + netCDF compiler flags: $OCTCDF_CFLAGS + netCDF libraries: $OCTCDF_LIBS" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2009-11-19 09:13:06
|
Revision: 6481 http://octave.svn.sourceforge.net/octave/?rev=6481&view=rev Author: abarth93 Date: 2009-11-19 09:12:59 +0000 (Thu, 19 Nov 2009) Log Message: ----------- implements the fillvalue function Modified Paths: -------------- trunk/octave-forge/main/octcdf/INDEX trunk/octave-forge/main/octcdf/PKG_ADD Added Paths: ----------- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m Modified: trunk/octave-forge/main/octcdf/INDEX =================================================================== --- trunk/octave-forge/main/octcdf/INDEX 2009-11-17 14:31:07 UTC (rev 6480) +++ trunk/octave-forge/main/octcdf/INDEX 2009-11-19 09:12:59 UTC (rev 6481) @@ -6,6 +6,7 @@ ncchar ncdouble ncdump + ncfillvalue ncfloat ncint nclong Modified: trunk/octave-forge/main/octcdf/PKG_ADD =================================================================== --- trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-17 14:31:07 UTC (rev 6480) +++ trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-19 09:12:59 UTC (rev 6481) @@ -22,6 +22,7 @@ dispatch('autoscale','ncautoscale','ncvar'); dispatch('autonan','ncautonan','ncvar'); +dispatch('fillvalue','ncfillvalue','ncvar'); dispatch('isrecord','ncisrecord','ncdim'); Added: trunk/octave-forge/main/octcdf/inst/ncfillvalue.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:12:59 UTC (rev 6481) @@ -0,0 +1,40 @@ +## Copyright (C) 2009 Alexander Barth <a....@ul...> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{fillvalue} = } ncfillvalue(@var{ncvar}) +## @deftypefnx {Loadable Function} ncfillvalue(@var{ncvar},@var{fillvalue}) +## returns or sets the fillvalue of the NetCDF variable ncvar +## +## @seealso{netcdf} + +## Author: Alexander Barth <a....@ul...> + +function varargout = ncfillvalue(varargin); + +varargout = {}; + +if nargin == 1 + ncvar = varargin{1}; + varargout{1} = ncvar.FillValue_; +elseif nargin == 1 + ncvar = varargin{1}; + fv = varargin{2}; + + ncvar.FillValue_ = fv; +else + error('ncfillvalue: wrong number of arguments'); +end + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2009-11-19 09:29:56
|
Revision: 6485 http://octave.svn.sourceforge.net/octave/?rev=6485&view=rev Author: abarth93 Date: 2009-11-19 09:29:44 +0000 (Thu, 19 Nov 2009) Log Message: ----------- update email Modified Paths: -------------- trunk/octave-forge/main/octcdf/inst/ncbyte.m trunk/octave-forge/main/octcdf/inst/ncchar.m trunk/octave-forge/main/octcdf/inst/ncdouble.m trunk/octave-forge/main/octcdf/inst/ncdump.m trunk/octave-forge/main/octcdf/inst/ncfillvalue.m trunk/octave-forge/main/octcdf/inst/ncfloat.m trunk/octave-forge/main/octcdf/inst/ncint.m trunk/octave-forge/main/octcdf/inst/nclong.m trunk/octave-forge/main/octcdf/inst/ncshort.m trunk/octave-forge/main/octcdf/inst/nctest.m trunk/octave-forge/main/octcdf/src/nctype.m4 trunk/octave-forge/main/octcdf/src/ov-ncatt.cc trunk/octave-forge/main/octcdf/src/ov-ncatt.h trunk/octave-forge/main/octcdf/src/ov-ncdim.cc trunk/octave-forge/main/octcdf/src/ov-ncdim.h trunk/octave-forge/main/octcdf/src/ov-ncfile.cc trunk/octave-forge/main/octcdf/src/ov-ncfile.h trunk/octave-forge/main/octcdf/src/ov-ncvar.cc trunk/octave-forge/main/octcdf/src/ov-ncvar.h trunk/octave-forge/main/octcdf/src/ov-netcdf.cc trunk/octave-forge/main/octcdf/src/ov-netcdf.h Modified: trunk/octave-forge/main/octcdf/inst/ncbyte.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncbyte.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncbyte.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncbyte(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncchar.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncchar.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncchar.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncchar(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncdouble.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncdouble.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncdouble.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncdouble(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncdump.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncdump.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncdump.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -25,7 +25,7 @@ ## ## @seealso{ncdim,ncvar,ncatt} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> Modified: trunk/octave-forge/main/octcdf/inst/ncfillvalue.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,4 +1,4 @@ -## Copyright (C) 2009 Alexander Barth <a....@ul...> +## Copyright (C) 2009 Alexander Barth <bar...@gm...> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <a....@ul...> +## Author: Alexander Barth <bar...@gm...> function varargout = ncfillvalue(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncfloat.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfloat.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncfloat.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncfloat(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncint.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncint.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncint.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncint(varargin); Modified: trunk/octave-forge/main/octcdf/inst/nclong.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/nclong.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/nclong.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = nclong(varargin); Modified: trunk/octave-forge/main/octcdf/inst/ncshort.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncshort.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/ncshort.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -32,7 +32,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = ncshort(varargin); Modified: trunk/octave-forge/main/octcdf/inst/nctest.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/nctest.m 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/inst/nctest.m 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,4 +1,4 @@ -## Copyright (C) 2005 Alexander Barth <ab...@ma...> +## Copyright (C) 2005 Alexander Barth <bar...@gm...> ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ ## should pass. ## @end deftypefn -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> Modified: trunk/octave-forge/main/octcdf/src/nctype.m4 =================================================================== --- trunk/octave-forge/main/octcdf/src/nctype.m4 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/nctype.m4 2009-11-19 09:29:44 UTC (rev 6485) @@ -33,7 +33,7 @@ ## @end deftypefn ## @seealso{netcdf} -## Author: Alexander Barth <ab...@ma...> +## Author: Alexander Barth <bar...@gm...> function c = nc`'TYPE`'(varargin); Modified: trunk/octave-forge/main/octcdf/src/ov-ncatt.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncatt.cc 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncatt.cc 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncatt.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncatt.h 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncatt.h 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncdim.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncdim.cc 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncdim.cc 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncdim.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncdim.h 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncdim.h 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncfile.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncfile.cc 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncfile.cc 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncfile.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncfile.h 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncfile.h 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncvar.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncvar.cc 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncvar.cc 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-ncvar.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncvar.h 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-ncvar.h 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-netcdf.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Modified: trunk/octave-forge/main/octcdf/src/ov-netcdf.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-netcdf.h 2009-11-19 09:22:07 UTC (rev 6484) +++ trunk/octave-forge/main/octcdf/src/ov-netcdf.h 2009-11-19 09:29:44 UTC (rev 6485) @@ -1,6 +1,6 @@ /* octcdf, a netcdf toolbox for octave - Copyright (C) 2005 Alexander Barth <ab...@ma...> + Copyright (C) 2005 Alexander Barth <bar...@gm...> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2009-11-19 09:54:18
|
Revision: 6486 http://octave.svn.sourceforge.net/octave/?rev=6486&view=rev Author: abarth93 Date: 2009-11-19 09:54:08 +0000 (Thu, 19 Nov 2009) Log Message: ----------- fillvalue -> fillval (for compatibility) Modified Paths: -------------- trunk/octave-forge/main/octcdf/INDEX trunk/octave-forge/main/octcdf/PKG_ADD Added Paths: ----------- trunk/octave-forge/main/octcdf/inst/ncfillval.m Removed Paths: ------------- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m Modified: trunk/octave-forge/main/octcdf/INDEX =================================================================== --- trunk/octave-forge/main/octcdf/INDEX 2009-11-19 09:29:44 UTC (rev 6485) +++ trunk/octave-forge/main/octcdf/INDEX 2009-11-19 09:54:08 UTC (rev 6486) @@ -6,7 +6,7 @@ ncchar ncdouble ncdump - ncfillvalue + ncfillval ncfloat ncint nclong Modified: trunk/octave-forge/main/octcdf/PKG_ADD =================================================================== --- trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-19 09:29:44 UTC (rev 6485) +++ trunk/octave-forge/main/octcdf/PKG_ADD 2009-11-19 09:54:08 UTC (rev 6486) @@ -22,7 +22,7 @@ dispatch('autoscale','ncautoscale','ncvar'); dispatch('autonan','ncautonan','ncvar'); -dispatch('fillvalue','ncfillvalue','ncvar'); +dispatch('fillval','ncfillval','ncvar'); dispatch('isrecord','ncisrecord','ncdim'); Copied: trunk/octave-forge/main/octcdf/inst/ncfillval.m (from rev 6485, trunk/octave-forge/main/octcdf/inst/ncfillvalue.m) =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfillval.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/ncfillval.m 2009-11-19 09:54:08 UTC (rev 6486) @@ -0,0 +1,40 @@ +## Copyright (C) 2009 Alexander Barth <bar...@gm...> +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; If not, see <http://www.gnu.org/licenses/>. + +## -*- texinfo -*- +## @deftypefn {Loadable Function} {@var{fillvalue} = } ncfillval (@var{ncvar}) +## @deftypefnx {Loadable Function} ncfillval(@var{ncvar},@var{fillvalue}) +## returns or sets the @var{fillvalue} of the NetCDF variable @var{ncvar}. +## @end deftypefn +## @seealso{netcdf} + +## Author: Alexander Barth <bar...@gm...> + +function varargout = ncfillval(varargin); + +varargout = {}; + +if nargin == 1 + ncvar = varargin{1}; + varargout{1} = ncvar.FillValue_; +elseif nargin == 2 + ncvar = varargin{1}; + fv = varargin{2}; + + ncvar.FillValue_ = fv; +else + error('ncfillval: wrong number of arguments'); +end + Property changes on: trunk/octave-forge/main/octcdf/inst/ncfillval.m ___________________________________________________________________ Added: svn:mergeinfo + Deleted: trunk/octave-forge/main/octcdf/inst/ncfillvalue.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:29:44 UTC (rev 6485) +++ trunk/octave-forge/main/octcdf/inst/ncfillvalue.m 2009-11-19 09:54:08 UTC (rev 6486) @@ -1,40 +0,0 @@ -## Copyright (C) 2009 Alexander Barth <bar...@gm...> -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. - -## -*- texinfo -*- -## @deftypefn {Loadable Function} {@var{fillvalue} = } ncfillvalue (@var{ncvar}) -## @deftypefnx {Loadable Function} ncfillvalue(@var{ncvar},@var{fillvalue}) -## returns or sets the @var{fillvalue} of the NetCDF variable @var{ncvar}. -## @end deftypefn -## @seealso{netcdf} - -## Author: Alexander Barth <bar...@gm...> - -function varargout = ncfillvalue(varargin); - -varargout = {}; - -if nargin == 1 - ncvar = varargin{1}; - varargout{1} = ncvar.FillValue_; -elseif nargin == 2 - ncvar = varargin{1}; - fv = varargin{2}; - - ncvar.FillValue_ = fv; -else - error('ncfillvalue: wrong number of arguments'); -end - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2010-02-09 10:05:16
|
Revision: 6855 http://octave.svn.sourceforge.net/octave/?rev=6855&view=rev Author: abarth93 Date: 2010-02-09 10:05:10 +0000 (Tue, 09 Feb 2010) Log Message: ----------- removing obsolete function from INDEX Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/INDEX trunk/octave-forge/main/octcdf/src/ov-ncvar.h Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2010-02-09 09:01:38 UTC (rev 6854) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2010-02-09 10:05:10 UTC (rev 6855) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.0.16 -Date: 2009-11-19 +Version: 1.0.17 +Date: 2010-02-09 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/INDEX =================================================================== --- trunk/octave-forge/main/octcdf/INDEX 2010-02-09 09:01:38 UTC (rev 6854) +++ trunk/octave-forge/main/octcdf/INDEX 2010-02-09 10:05:10 UTC (rev 6855) @@ -11,7 +11,6 @@ ncint nclong ncshort - netcdf_setup ncatt ncclose ncdatatype Modified: trunk/octave-forge/main/octcdf/src/ov-ncvar.h =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-ncvar.h 2010-02-09 09:01:38 UTC (rev 6854) +++ trunk/octave-forge/main/octcdf/src/ov-ncvar.h 2010-02-09 10:05:10 UTC (rev 6855) @@ -90,6 +90,7 @@ int ndims() const { return dims().length(); } octave_idx_type numel() const { return dims().numel(); } + //octave_idx_type numel() const { return 1; } // Get dim_vector following NetCDF conventions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2010-04-27 13:19:58
|
Revision: 7271 http://octave.svn.sourceforge.net/octave/?rev=7271&view=rev Author: abarth93 Date: 2010-04-27 13:19:51 +0000 (Tue, 27 Apr 2010) Log Message: ----------- remove depreciated function calls (2) Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/src/ov-netcdf.cc Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2010-04-27 13:07:31 UTC (rev 7270) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2010-04-27 13:19:51 UTC (rev 7271) @@ -1,11 +1,11 @@ Name: octcdf -Version: 1.0.17 -Date: 2010-02-09 +Version: 1.1.0 +Date: 2010-04-27 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Description: A NetCDF interface for octave -Depends: octave (>= 3.1.55) +Depends: octave (>= 3.3.51) Autoload: yes BuildRequires: netcdf-devel License: GPL version 2 or later Modified: trunk/octave-forge/main/octcdf/src/ov-netcdf.cc =================================================================== --- trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2010-04-27 13:07:31 UTC (rev 7270) +++ trunk/octave-forge/main/octcdf/src/ov-netcdf.cc 2010-04-27 13:19:51 UTC (rev 7271) @@ -829,7 +829,7 @@ int status; // permutation vector for Fortran-storage to C-storage // not used if ncndim == 1 - Array<int> perm_vector(ncndim); + Array<int> perm_vector(1,ncndim); # ifdef OV_NETCDF_VERBOSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2012-07-03 12:35:21
|
Revision: 10714 http://octave.svn.sourceforge.net/octave/?rev=10714&view=rev Author: abarth93 Date: 2012-07-03 12:35:14 +0000 (Tue, 03 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/inst/ncread.m trunk/octave-forge/main/octcdf/src/Makeconf.in trunk/octave-forge/main/octcdf/src/Makefile trunk/octave-forge/main/octcdf/src/configure.base Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2012-07-03 12:35:14 UTC (rev 10714) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.1.4 -Date: 2012-02-17 +Version: 1.1.5 +Date: 2012-04-30 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/inst/ncread.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 12:35:14 UTC (rev 10714) @@ -21,14 +21,18 @@ stride = ones(1,nd); end +% replace inf in count +i = count == inf; +count(i) = (sz(i)-start(i))./stride(i) + 1; + % end index endi = start + (count-1).*stride; % replace inf in count -i = endi == inf; -endi(i) = sz(i); +%i = endi == inf; +%endi(i) = sz(i); % load data @@ -68,5 +72,5 @@ end x = permute(x,[ndims(x):-1:1]); - +x = reshape(x,count); close(nc) Modified: trunk/octave-forge/main/octcdf/src/Makeconf.in =================================================================== --- trunk/octave-forge/main/octcdf/src/Makeconf.in 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/Makeconf.in 2012-07-03 12:35:14 UTC (rev 10714) @@ -36,18 +36,18 @@ # cannot use mkoctfile directly can request the flags that mkoctfile # would use as follows: # FLAG = $(shell $(MKOCTFILE) -p FLAG) -# The following flags are for compiling programs that are independent -# of Octave. How confusing. -CC = @CC@ -CFLAGS = @CFLAGS@ -CPPFLAGS = @CPPFLAGS@ -CPICFLAG = @CPICFLAG@ -CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -CXXPICFLAG = @CXXPICFLAG@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FPICFLAG = @FPICFLAG@ +# # The following flags are for compiling programs that are independent +# # of Octave. How confusing. +# CC = @CC@ +# CFLAGS = @CFLAGS@ +# CPPFLAGS = @CPPFLAGS@ +# CPICFLAG = @CPICFLAG@ +# CXX = @CXX@ +# CXXFLAGS = @CXXFLAGS@ +# CXXPICFLAG = @CXXPICFLAG@ +# F77 = @F77@ +# FFLAGS = @FFLAGS@ +# FPICFLAG = @FPICFLAG@ OCTAVE = @OCTAVE@ OCTAVE_VERSION = @OCTAVE_VERSION@ Modified: trunk/octave-forge/main/octcdf/src/Makefile =================================================================== --- trunk/octave-forge/main/octcdf/src/Makefile 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/Makefile 2012-07-03 12:35:14 UTC (rev 10714) @@ -70,5 +70,4 @@ $(MFILES): nctype.m4 m4 --define=TYPE=$(patsubst nc%.m,%,$@) nctype.m4 > $@ -clean: ; -$(RM) *.o core* octave-core *.oct *~ *.nc - +clean: ; -$(RM) -R *.o core* octave-core *.oct *~ *.nc autom4te.cache Modified: trunk/octave-forge/main/octcdf/src/configure.base =================================================================== --- trunk/octave-forge/main/octcdf/src/configure.base 2012-07-03 12:06:21 UTC (rev 10713) +++ trunk/octave-forge/main/octcdf/src/configure.base 2012-07-03 12:35:14 UTC (rev 10714) @@ -152,41 +152,51 @@ dnl ******************************************************************* +dnl Get LDFLAGS and CPPFLAGS set by user +dnl These flags will be added to the mkoctfile command line +OCTCDF_LIBS="$LDFLAGS" +OCTCDF_CFLAGS="$CPPFLAGS" + + dnl XXX FIXME XXX Should we allow the user to override these? dnl Do we even need them? The individual makefiles can call mkoctfile -p dnl themselves, so the only reason to keep them is for configure, and dnl for those things which are not built using mkoctfile (e.g., aurecord) dnl but it is not clear we should be using octave compile flags for those. -dnl C compiler and flags -AC_MSG_RESULT([retrieving compile and link flags from $MKOCTFILE]) -CC=`$MKOCTFILE -p CC` -CFLAGS=`$MKOCTFILE -p CFLAGS` -CPPFLAGS=`$MKOCTFILE -p CPPFLAGS` -CPICFLAG=`$MKOCTFILE -p CPICFLAG` -LDFLAGS=`$MKOCTFILE -p LDFLAGS` -LIBS=`$MKOCTFILE -p LIBS` -AC_SUBST(CC) -AC_SUBST(CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(CPICFLAG) +dnl octcdf does not need CFLAGS, CPPFLAGS,... from mkoctfile +dnl -> comment corresponding lines -dnl Fortran compiler and flags -F77=`$MKOCTFILE -p F77` -FFLAGS=`$MKOCTFILE -p FFLAGS` -FPICFLAG=`$MKOCTFILE -p FPICFLAG` -AC_SUBST(F77) -AC_SUBST(FFLAGS) -AC_SUBST(FPICFLAG) +# dnl C compiler and flags +# AC_MSG_RESULT([retrieving compile and link flags from $MKOCTFILE]) +# CC=`$MKOCTFILE -p CC` +# CFLAGS=`$MKOCTFILE -p CFLAGS` +# CPPFLAGS=`$MKOCTFILE -p CPPFLAGS` +# CPPFLAGS="not used" +# CPICFLAG=`$MKOCTFILE -p CPICFLAG` +# LDFLAGS=`$MKOCTFILE -p LDFLAGS` +# LIBS=`$MKOCTFILE -p LIBS` +# AC_SUBST(CC) +# AC_SUBST(CFLAGS) +# AC_SUBST(CPPFLAGS) +# AC_SUBST(CPICFLAG) -dnl C++ compiler and flags -CXX=`$MKOCTFILE -p CXX` -CXXFLAGS=`$MKOCTFILE -p CXXFLAGS` -CXXPICFLAG=`$MKOCTFILE -p CXXPICFLAG` -AC_SUBST(CXX) -AC_SUBST(CXXFLAGS) -AC_SUBST(CXXPICFLAG) +# dnl Fortran compiler and flags +# F77=`$MKOCTFILE -p F77` +# FFLAGS=`$MKOCTFILE -p FFLAGS` +# FPICFLAG=`$MKOCTFILE -p FPICFLAG` +# AC_SUBST(F77) +# AC_SUBST(FFLAGS) +# AC_SUBST(FPICFLAG) +# dnl C++ compiler and flags +# CXX=`$MKOCTFILE -p CXX` +# CXXFLAGS=`$MKOCTFILE -p CXXFLAGS` +# CXXPICFLAG=`$MKOCTFILE -p CXXPICFLAG` +# AC_SUBST(CXX) +# AC_SUBST(CXXFLAGS) +# AC_SUBST(CXXPICFLAG) + dnl ******************************************************************* dnl Check for features of your version of mkoctfile. @@ -298,13 +308,6 @@ ;; esac -AC_SUBST(HAVE_NETCDF) -AC_SUBST(OCTCDF_LIBS) -AC_SUBST(OCTCDF_CFLAGS) - -OCTCDF_LIBS="$LDFLAGS" -OCTCDF_CFLAGS="$CPPFLAGS" - dnl first checking for nc-config, then nc-dap AC_MSG_CHECKING([for nc-config]) @@ -328,6 +331,7 @@ AC_MSG_RESULT([no]) dnl if no opendap, checking if the NetCDF library exists. + dnl AC_CHECK_LIB takes the value of LDFLAGS into account AC_CHECK_LIB(netcdf,nc_open, HAVE_NETCDF=yes, HAVE_NETCDF=no,) @@ -335,11 +339,17 @@ OCTCDF_LIBS="$OCTCDF_LIBS -lnetcdf" dnl we have the libraries, no we have also the headers? + dnl AC_CHECK_HEADER takes the value of CPPFLAGS into account + AC_CHECK_HEADER(netcdf.h, HAVE_NETCDF=yes, HAVE_NETCDF=no) fi fi fi +AC_SUBST(HAVE_NETCDF) +AC_SUBST(OCTCDF_LIBS) +AC_SUBST(OCTCDF_CFLAGS) + if test $HAVE_NETCDF = yes ; then OCTCDFSTATUS=yes else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2012-07-03 15:23:37
|
Revision: 10724 http://octave.svn.sourceforge.net/octave/?rev=10724&view=rev Author: abarth93 Date: 2012-07-03 15:23:26 +0000 (Tue, 03 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/main/octcdf/INDEX trunk/octave-forge/main/octcdf/inst/ncinfo.m trunk/octave-forge/main/octcdf/inst/ncread.m trunk/octave-forge/main/octcdf/inst/ncwrite.m Modified: trunk/octave-forge/main/octcdf/INDEX =================================================================== --- trunk/octave-forge/main/octcdf/INDEX 2012-07-03 14:57:21 UTC (rev 10723) +++ trunk/octave-forge/main/octcdf/INDEX 2012-07-03 15:23:26 UTC (rev 10724) @@ -22,6 +22,9 @@ ncvar netcdf ncisrecord + ncread + ncwrite + ncinfo Examples example_netcdf example_opendap Modified: trunk/octave-forge/main/octcdf/inst/ncinfo.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-03 14:57:21 UTC (rev 10723) +++ trunk/octave-forge/main/octcdf/inst/ncinfo.m 2012-07-03 15:23:26 UTC (rev 10724) @@ -1,3 +1,5 @@ +% Information about complete netCDF file or variable. +% % finfo = ncinfo(filename) % vinfo = ncinfo(filename,varname) % return information about complete netCDF file (filename) or about Modified: trunk/octave-forge/main/octcdf/inst/ncread.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 14:57:21 UTC (rev 10723) +++ trunk/octave-forge/main/octcdf/inst/ncread.m 2012-07-03 15:23:26 UTC (rev 10724) @@ -1,3 +1,5 @@ +% Read a NetCDF variable. +% % x = ncread(filename,varname) % x = ncread(filename,varname,start,count,stride) % read the variable varname from file filename. Modified: trunk/octave-forge/main/octcdf/inst/ncwrite.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncwrite.m 2012-07-03 14:57:21 UTC (rev 10723) +++ trunk/octave-forge/main/octcdf/inst/ncwrite.m 2012-07-03 15:23:26 UTC (rev 10724) @@ -1,3 +1,5 @@ +% Write a NetCDF variable. +% % ncwrite(filename,varname,x) % ncwrite(filename,varname,x,start,stride) % write the variable varname to file filename. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2010-11-17 09:12:28
|
Revision: 7926 http://octave.svn.sourceforge.net/octave/?rev=7926&view=rev Author: abarth93 Date: 2010-11-17 09:12:22 +0000 (Wed, 17 Nov 2010) Log Message: ----------- remove short-circuit operator Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/inst/example_netcdf.m trunk/octave-forge/main/octcdf/inst/ncdump.m Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2010-11-17 08:34:13 UTC (rev 7925) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2010-11-17 09:12:22 UTC (rev 7926) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.1.0 -Date: 2010-04-27 +Version: 1.1.1 +Date: 2010-11-17 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/inst/example_netcdf.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/example_netcdf.m 2010-11-17 08:34:13 UTC (rev 7925) +++ trunk/octave-forge/main/octcdf/inst/example_netcdf.m 2010-11-17 09:12:22 UTC (rev 7926) @@ -44,27 +44,29 @@ nc{'longitude'} = ncdouble('longitude'); % create a variable longitude of type double with % 360 elements (dimension longitude). nc{'longitude'}(:) = longitude; % store the octave variable longitude in the netcdf file -nc{'longitude'}.units = 'degree West'; % define a string attribute of the variable longitude +nc{'longitude'}.units = 'degrees_east'; % define a string attribute of the variable longitude % coordinate variable latitude nc{'latitude'} = ncdouble('latitude');; % create a variable latitude of type double with % 181 elements (dimension latitude). nc{'latitude'}(:) = latitude; % store the octave variable latitude in the netcdf file -nc{'latitude'}.units = 'degree North'; % define a string attribute of the variable latitude +nc{'latitude'}.units = 'degrees_north'; % define a string attribute of the variable latitude % variable temp -nc{'temp'} = ncdouble('longitude','latitude'); % create a variable temp of type double of the size 360x181 +nc{'temp'} = ncdouble('latitude','longitude'); % create a variable temp of type double of the size 360x181 % (dimension longitude and latitude). nc{'temp'}(:) = temp; % store the octave variable temp in the netcdf file +nc{'temp'}.long_name = 'Temperature'; nc{'temp'}.units = 'degree Celsius'; % define a string attribute of the variable nc{'temp'}.valid_range = [-10 40]; % define a vector of doubles attribute of the variable + % define a global string attribute nc.history = 'netcdf file created by example_netcdf.m in octave'; - % define a global string attribute +nc.title = 'sample file'; -ncclose(nc) % close netcdf file and all changes are written to disk +close(nc) % close netcdf file and all changes are written to disk disp(['example.nc file created. You might now inspect this file with the shell command "ncdump -h example.nc"']); Modified: trunk/octave-forge/main/octcdf/inst/ncdump.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/ncdump.m 2010-11-17 08:34:13 UTC (rev 7925) +++ trunk/octave-forge/main/octcdf/inst/ncdump.m 2010-11-17 09:12:22 UTC (rev 7926) @@ -105,7 +105,7 @@ fprintf(fid,['nc.%s = nc%s(%s);\n'],ncname(na{j}),datatype,att2str(na{j})); end -fprintf(fid,'ncclose(nc)\n'); +fprintf(fid,'close(nc)\n'); if (fid ~= 1) fclose(fid); @@ -131,7 +131,7 @@ n = length(att); val = att(:); - if (n == 1 | strcmp(datatype,'char')) + if (n == 1 || strcmp(datatype,'char')) s = sprintf(f,val); else s = '['; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2012-01-06 12:33:48
|
Revision: 9498 http://octave.svn.sourceforge.net/octave/?rev=9498&view=rev Author: abarth93 Date: 2012-01-06 12:33:41 +0000 (Fri, 06 Jan 2012) Log Message: ----------- remove dispatch Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/PKG_ADD Added Paths: ----------- trunk/octave-forge/main/octcdf/inst/@ncatt/ trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m trunk/octave-forge/main/octcdf/inst/@ncatt/name.m trunk/octave-forge/main/octcdf/inst/@ncdim/ trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m trunk/octave-forge/main/octcdf/inst/@ncdim/name.m trunk/octave-forge/main/octcdf/inst/@ncfile/ trunk/octave-forge/main/octcdf/inst/@ncfile/att.m trunk/octave-forge/main/octcdf/inst/@ncfile/close.m trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m trunk/octave-forge/main/octcdf/inst/@ncfile/endef.m trunk/octave-forge/main/octcdf/inst/@ncfile/name.m trunk/octave-forge/main/octcdf/inst/@ncfile/redef.m trunk/octave-forge/main/octcdf/inst/@ncfile/sync.m trunk/octave-forge/main/octcdf/inst/@ncfile/var.m trunk/octave-forge/main/octcdf/inst/@ncvar/ trunk/octave-forge/main/octcdf/inst/@ncvar/att.m trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m trunk/octave-forge/main/octcdf/inst/@ncvar/name.m Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2012-01-06 10:12:47 UTC (rev 9497) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2012-01-06 12:33:41 UTC (rev 9498) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.1.1 -Date: 2010-11-17 +Version: 1.1.2 +Date: 2012-01-06 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/PKG_ADD =================================================================== --- trunk/octave-forge/main/octcdf/PKG_ADD 2012-01-06 10:12:47 UTC (rev 9497) +++ trunk/octave-forge/main/octcdf/PKG_ADD 2012-01-06 12:33:41 UTC (rev 9498) @@ -1,32 +1,3 @@ - -dispatch('close','ncclose','ncfile'); -dispatch('redef','ncredef','ncfile'); -dispatch('endef','endef','ncfile'); -dispatch('sync','ncsync','ncfile'); - -dispatch('var','ncvar','ncfile'); - -dispatch('att','ncatt','ncfile'); -dispatch('att','ncatt','ncvar'); - -dispatch('dim','ncdim','ncfile'); -dispatch('dim','ncdim','ncvar'); - -dispatch('name','ncname','ncfile'); -dispatch('name','ncname','ncvar'); -dispatch('name','ncname','ncatt'); -dispatch('name','ncname','ncdim'); - -dispatch('datatype','ncdatatype','ncvar'); -dispatch('datatype','ncdatatype','ncatt'); - -dispatch('autoscale','ncautoscale','ncvar'); -dispatch('autonan','ncautonan','ncvar'); -dispatch('fillval','ncfillval','ncvar'); - -dispatch('isrecord','ncisrecord','ncdim'); - - autoload ("ncclose", fullfile (fileparts (mfilename ("fullpath")), "netcdf.oct")); autoload ("ncredef", fullfile (fileparts (mfilename ("fullpath")), "netcdf.oct")); autoload ("ncenddef", fullfile (fileparts (mfilename ("fullpath")), "netcdf.oct")); Added: trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function datatype(self) + ncdatatype(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncatt/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncatt/name.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncatt/name.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function name(self) + ncname(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function isrecord(self) + ncisrecord(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncdim/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncdim/name.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncdim/name.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function name(self) + ncname(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/att.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/att.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/att.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function att(self) + ncatt(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/close.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/close.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/close.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function close (self) + ncclose (self) +end \ No newline at end of file Added: trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function dim(self) + ncdim(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/endef.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/endef.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/endef.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function endef(self) + ncendef(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/name.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/name.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function name(self) + ncname(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/redef.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/redef.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/redef.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function redef(self) + ncredef(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/sync.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/sync.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/sync.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function sync(self) + ncsync(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncfile/var.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/var.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/var.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function var(self) + ncvar(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/att.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/att.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/att.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function att(self) + ncatt(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function autonan(self) + ncautonan(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function autoscale(self) + ncautoscale(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function datatype(self) + ncdatatype(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function dim(self) + ncdim(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function fillval(self) + ncfillval(self) +end Added: trunk/octave-forge/main/octcdf/inst/@ncvar/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/name.m (rev 0) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/name.m 2012-01-06 12:33:41 UTC (rev 9498) @@ -0,0 +1,3 @@ +function name(self) + ncname(self) +end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aba...@us...> - 2012-02-17 12:41:19
|
Revision: 9634 http://octave.svn.sourceforge.net/octave/?rev=9634&view=rev Author: abarth93 Date: 2012-02-17 12:41:12 +0000 (Fri, 17 Feb 2012) Log Message: ----------- fix several bug in ncxxx methods Modified Paths: -------------- trunk/octave-forge/main/octcdf/DESCRIPTION trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m trunk/octave-forge/main/octcdf/inst/@ncatt/name.m trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m trunk/octave-forge/main/octcdf/inst/@ncdim/name.m trunk/octave-forge/main/octcdf/inst/@ncfile/att.m trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m trunk/octave-forge/main/octcdf/inst/@ncfile/name.m trunk/octave-forge/main/octcdf/inst/@ncfile/var.m trunk/octave-forge/main/octcdf/inst/@ncvar/att.m trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m trunk/octave-forge/main/octcdf/inst/@ncvar/name.m trunk/octave-forge/main/octcdf/inst/nctest.m Modified: trunk/octave-forge/main/octcdf/DESCRIPTION =================================================================== --- trunk/octave-forge/main/octcdf/DESCRIPTION 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/DESCRIPTION 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,6 +1,6 @@ Name: octcdf -Version: 1.1.3 -Date: 2012-02-06 +Version: 1.1.4 +Date: 2012-02-17 Author: Alexander Barth <bar...@gm...> Maintainer: Alexander Barth <bar...@gm...> Title: octcdf Modified: trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncatt/datatype.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function datatype(self) - ncdatatype(self) +function dt = datatype(self) + dt = ncdatatype(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncatt/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncatt/name.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncatt/name.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,7 @@ -function name(self) - ncname(self) +function n = name(self,varargin) + if nargin == 1 + n = ncname(self); + else + ncname(self,varargin{:}); + end end Modified: trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncdim/isrecord.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function isrecord(self) - ncisrecord(self) +function isr = isrecord(self) + isr = ncisrecord(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncdim/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncdim/name.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncdim/name.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,7 @@ -function name(self) - ncname(self) +function n = name(self,varargin) + if nargin == 1 + n = ncname(self); + else + ncname(self,varargin{:}); + end end Modified: trunk/octave-forge/main/octcdf/inst/@ncfile/att.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/att.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/att.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function att(self) - ncatt(self) +function a = att(self) + a = ncatt(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/dim.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function dim(self) - ncdim(self) +function d = dim(self) + d = ncdim(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncfile/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/name.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/name.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function name(self) - ncname(self) +function n = name(self) + n = ncname(self) end Modified: trunk/octave-forge/main/octcdf/inst/@ncfile/var.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncfile/var.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncfile/var.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function var(self) - ncvar(self) +function v = var(self) + v = ncvar(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/att.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/att.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/att.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function att(self) - ncatt(self) +function a = att(self) + a = ncatt(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/autonan.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function autonan(self) - ncautonan(self) +function nv = autonan(self,varargin) + nv = ncautonan(self,varargin{:}); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/autoscale.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function autoscale(self) - ncautoscale(self) +function nv = autoscale(self,varargin) + nv = ncautoscale(self,varargin{:}); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/datatype.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function datatype(self) - ncdatatype(self) +function dt = datatype(self) + dt = ncdatatype(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/dim.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,3 @@ -function dim(self) - ncdim(self) +function d = dim(self) + d = ncdim(self); end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/fillval.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,7 @@ -function fillval(self) - ncfillval(self) +function n = fillval(self,varargin) + if nargin == 1 + n = ncfillval(self); + else + ncfillval(self,varargin{:}); + end end Modified: trunk/octave-forge/main/octcdf/inst/@ncvar/name.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/@ncvar/name.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/@ncvar/name.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -1,3 +1,7 @@ -function name(self) - ncname(self) +function n = name(self,varargin) + if nargin == 1 + n = ncname(self); + else + ncname(self,varargin{:}); + end end Modified: trunk/octave-forge/main/octcdf/inst/nctest.m =================================================================== --- trunk/octave-forge/main/octcdf/inst/nctest.m 2012-02-16 07:43:22 UTC (rev 9633) +++ trunk/octave-forge/main/octcdf/inst/nctest.m 2012-02-17 12:41:12 UTC (rev 9634) @@ -37,6 +37,7 @@ %!test %! nc('time') = 5; %! nc('space') = 3; +%! nc('record') = 0; %! assert(length(nc('time')),5); %! assert(length(nc('space')),3); @@ -126,25 +127,33 @@ %!# Test ncdim %!test -%! dimlist = ncdim(nc); -%! assert(length(dimlist),2); +%! dimlist = dim(nc); +%! assert(length(dimlist),3); %! assert(dimlist{1}(:),5); %! assert(dimlist{2}(:),3); +%!# Test isrecord +%!test +%! assert(isrecord(nc('record')) == 1); + +%!# Test name on file +%!test +%! assert(name(nc),fname); + %!# Test ncatt %!test -%! attlist = ncatt(nc); +%! attlist = att(nc); %! assert(length(attlist),7); -%! assert(ncname(attlist{1}),'byte_att'); -%! assert(ncdatatype(attlist{1}),'byte'); +%! assert(name(attlist{1}),'byte_att'); +%! assert(datatype(attlist{1}),'byte'); %! assert(attlist{1}(:),123); %!# Test ncvar %!test -%! varlist = ncvar(nc); +%! varlist = var(nc); %! assert(length(varlist),7); -%! assert(ncname(varlist{1}),'byte_var'); -%! assert(ncdatatype(varlist{1}),'byte'); +%! assert(name(varlist{1}),'byte_var'); +%! assert(datatype(varlist{1}),'byte'); %!# Test to write a variable by slices %!test @@ -181,19 +190,22 @@ %! %! scaled = nc{'autoscale_var',1}(:); %! assert(var,scaled,1e-6); +%! +%! nf = autoscale(nc{'autoscale_var'},1); +%! assert(nf(:),scaled,1e-6); %!# Test autonan %!test %! nc{'variable_with_gaps'}=ncdouble('time'); %! nv = nc{'variable_with_gaps'}; -%! nv = ncautonan(nv,1); +%! nv = autonan(nv,1); %! nv.FillValue_ = 99; %! nv(:) = NaN; %! -%! nv = ncautonan(nv,0); +%! nv = autonan(nv,0); %! assert(all(nv(:) == 99)) %! -%! nv = ncautonan(nv,1); +%! nv = autonan(nv,1); %! assert(all(isnan(nv(:)))) %!# Test size of vector @@ -212,7 +224,7 @@ %!# Close file %!test -%! ncclose(nc); +%! close(nc); %! delete(fname); @@ -226,25 +238,25 @@ %! %! nf.old_name = 'example attribute'; %! -%! d = ncdim(nf){1}; -%! ncname(d,'new_name'); -%! assert(ncname(d),'new_name') +%! d = dim(nf){1}; +%! name(d,'new_name'); +%! assert(name(d),'new_name') %! -%! a = ncatt(nf){1}; -%! ncname(a,'new_name'); -%! assert(ncname(a),'new_name'); +%! a = att(nf){1}; +%! name(a,'new_name'); +%! assert(name(a),'new_name'); %! %! nf{'old_name'} = ncdouble('new_name','latitude'); %! v = nf{'old_name'}; -%! ncname(v,'new_name') -%! assert(ncname(v),'new_name'); -%! ncclose(nf); +%! name(v,'new_name') +%! assert(name(v),'new_name'); +%! close(nf); %! delete(filename); %!# Test 64bit-offset function %!test %! filename = [tmpnam '-octcdf.nc']; %! nf = netcdf(filename,'c','64bit-offset'); -%! ncclose(nf); +%! close(nf); %! delete(filename); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |