%* extract interesting model output from netCDF file % % requires netcdf.m in active directory or Matlab path % clear test=netcdf('gland-500-1.100.nc'); outname='gland-500-1-100.mat'; t=test.VarArray(1).Data; % time step values, years zeta=test.VarArray(3).Data; x1=test.VarArray(6).Data; % x grid coordinates for thickness, temperature, etc. y1=test.VarArray(8).Data; b=test.VarArray(20).Data; % bed elevation, meters T=test.VarArray(18).Data; % ice temperature, degrees C h=test.VarArray(19).Data; % ice thickness, meters bdot=test.VarArray(12).Data; % basal melt rate, meters/year ux=test.VarArray(22).Data; % x-component of velocity (horizontal) uy=test.VarArray(23).Data; % y-component of velocity (horizontal) uz=test.VarArray(25).Data; % z-component of velocity N=size(h)*[1 0 0]'-1; % nmber of intervals in time domain save(outname, 't', 'zeta', 'x1', 'y1', 'b', 'T', 'h', 'bdot', 'ux', 'uy', 'uz', 'N')