1 function [varargout]=ncload(f)
3 % load all variables from a netcdf file f to base namespace
4 % put their names in lowercase
7 % create structure with values of arrays in file f
9 % Jan Mandel, September 2008/December 2008
12 p=ncdump(f,'-q'); % get info on all variables
17 assignin('caller',lower(v),ncread(f,v));
23 a=setfield(a,lower(v),ncread(f,v));