From: <aba...@us...> - 2012-07-05 13:12:27
|
Revision: 10728 http://octave.svn.sourceforge.net/octave/?rev=10728&view=rev Author: abarth93 Date: 2012-07-05 13:12:20 +0000 (Thu, 05 Jul 2012) Log Message: ----------- Modified Paths: -------------- trunk/octave-forge/extra/ncArray/INDEX trunk/octave-forge/extra/ncArray/inst/@ncArray/ncArray.m trunk/octave-forge/extra/ncArray/inst/cached_decompress.m trunk/octave-forge/extra/ncArray/inst/ncCatArray.m trunk/octave-forge/extra/ncArray/inst/nccoord.m trunk/octave-forge/extra/ncArray/inst/test_ncarray.m Modified: trunk/octave-forge/extra/ncArray/INDEX =================================================================== --- trunk/octave-forge/extra/ncArray/INDEX 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/INDEX 2012-07-05 13:12:20 UTC (rev 10728) @@ -1,5 +1,8 @@ ncarray >> ncArray ncArray + ncArray ncCatArray - ncArray - nccoord \ No newline at end of file + nccoord + cached_decompress +Test script + test_ncarray \ No newline at end of file Modified: trunk/octave-forge/extra/ncArray/inst/@ncArray/ncArray.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/@ncArray/ncArray.m 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/inst/@ncArray/ncArray.m 2012-07-05 13:12:20 UTC (rev 10728) @@ -1,7 +1,9 @@ -% V = ncBaseArray(filename,varname) -% V = ncBaseArray(filename,varname,'property',value,...) -% create a ncBaseArray that can be accessed as a normal matlab array. +% Create an array representing a NetCDF variable. % +% V = ncArray(filename,varname) +% V = ncArray(filename,varname,'property',value,...) +% create a ncArray that can be accessed as a normal array. +% % For read access filename can be compressed if it has the extensions % ".gz" or ".bz2". It use the function cache_decompress to cache to % decompressed files. @@ -32,7 +34,8 @@ % % V.('_someStrangeAttribute') = 123; % -% see also cache_decompress +% see also cache_decompress, ncCatArray +% Web: http://modb.oce.ulg.ac.be/mediawiki/index.php/ncArray % hidded constructor signature: % data = ncArray(filename,varname) Modified: trunk/octave-forge/extra/ncArray/inst/cached_decompress.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/cached_decompress.m 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/inst/cached_decompress.m 2012-07-05 13:12:20 UTC (rev 10728) @@ -1,4 +1,5 @@ % Decompress a file using a cache. +% % [fname,success]=cached_decompress(filename) % % Input: @@ -12,11 +13,11 @@ function [fname]=cached_decompress(url) -global CASHED_GUNZIP_DIR -global CASHED_GUNZIP_LOG_FID +global CACHED_DECOMPRESS_DIR +global CACHED_DECOMPRESS_LOG_FID -cache_dir = CASHED_GUNZIP_DIR; +cache_dir = CACHED_DECOMPRESS_DIR; if isempty(cache_dir) % cache_dir = fullfile(getenv('HOME'),'tmp','Cache'); cache_dir = fullfile(getenv('HOME'),'tmp','Cache'); @@ -27,7 +28,7 @@ if exist(cache_dir,'dir') ~= 7 error(['cache directory for compressed files does not exist. '... 'Please create the directory %s or change le value of the '... - 'global variable CASHED_GUNZIP_DIR'],cache_dir); + 'global variable CACHED_DECOMPRESS_DIR'],cache_dir); end else fname = url; @@ -36,7 +37,7 @@ % where to print logs? default to screen -fid=CASHED_GUNZIP_LOG_FID; +fid=CACHED_DECOMPRESS_LOG_FID; if (isempty(fid)) fid=1; Modified: trunk/octave-forge/extra/ncArray/inst/ncCatArray.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/ncCatArray.m 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/inst/ncCatArray.m 2012-07-05 13:12:20 UTC (rev 10728) @@ -26,6 +26,9 @@ % shell wildcard pattern, while in Matlab rdir is used. The function rdir % is available from Matlab exchange under BSD license % (http://www.mathworks.com/matlabcentral/fileexchange/19550). +% +% see also cache_decompress, ncArray +% Web: http://modb.oce.ulg.ac.be/mediawiki/index.php/ncArray % Author: Alexander Barth (bar...@gm...) % Modified: trunk/octave-forge/extra/ncArray/inst/nccoord.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/nccoord.m 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/inst/nccoord.m 2012-07-05 13:12:20 UTC (rev 10728) @@ -1,4 +1,5 @@ -% Coordinate of a NetCDF variable +% Coordinate of a NetCDF variable. +% % coord = nccoord(filename,varname) % get coordinates of the variable varname in the % netcdf file called filename. The netcdf is assumed to Modified: trunk/octave-forge/extra/ncArray/inst/test_ncarray.m =================================================================== --- trunk/octave-forge/extra/ncArray/inst/test_ncarray.m 2012-07-04 15:19:39 UTC (rev 10727) +++ trunk/octave-forge/extra/ncArray/inst/test_ncarray.m 2012-07-05 13:12:20 UTC (rev 10728) @@ -1,4 +1,4 @@ -% test ncBaseArray, ncCatArray and ncArray +% Test ncBaseArray, ncCatArray and ncArray. function test_ncarray() varname = 'SST'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |