


MCDINQ Inquire about a NetCDF dimension.
['NAME',SIZE]=MCDINQ('CDF',DIM) returns the
'NAME' and SIZE if the dimension DIM (id or
name) in NetCDF file 'CDF'.
Example:
[name, size] = mcdinq('foo.cdf', 'm')

0001 function [name, size] = mcdinq(cdf, dim) 0002 0003 % MCDINQ Inquire about a NetCDF dimension. 0004 % ['NAME',SIZE]=MCDINQ('CDF',DIM) returns the 0005 % 'NAME' and SIZE if the dimension DIM (id or 0006 % name) in NetCDF file 'CDF'. 0007 % 0008 % Example: 0009 % [name, size] = mcdinq('foo.cdf', 'm') 0010 0011 % Copyright (C) 1991 Charles R. Denham, Zydeco. 0012 0013 if nargin < 2 0014 help mcdinq 0015 return 0016 end 0017 0018 if ~isstr(dim), dim = int2str(dim); end 0019 0020 cdfid=mexcdf('open', cdf, 'NOWRITE'); 0021 [name,size]=mexcdf('diminq',cdfid,dim); 0022 mexcdf('close',cdfid); 0023