1 function var=nclist(filename,q)
3 % var=nclist(filename,'q')
4 % return structure array with info on each netcdf variable in the file
7 quiet=exist('q','var');
8 fprintf('ncdump: file %s\n',filename);
9 ncid = netcdf.open(filename,'NC_NOWRITE');
10 [ndims,nvars,ngatts,unlimdim] = netcdf.inq(ncid);
11 for varid=1:nvars, % one variable at a time
12 var(varid)=ncvarinfo(ncid,varid-1);
15 dispvarinfo(var(varid));
18 for i=1:nvars % save the native netcdf variable order
21 [~,ix]=sort({var.varname});