I am attempting to create a four dimensional NetCDF structure of integers using matlab. This is my code so far…
mode = netcdf.getConstant('NETCDF4');
mode = bitor(mode,netcdf.getConstant('CLASSIC_MODEL'));
ncid = netcdf.create('USTEC_01_01_2010.nc',mode);
latDimId = netcdf.defDim(ncid,'latitude',51);
longDimId = netcdf.defDim(ncid,'longitude',101);
satDimId = netcdf.defDim(ncid,'satellite',33);
timeDimId = netcdf.defDim(ncid,'time',96);
varid = netcdf.defVar(ncid,'TECgrid','int',[latDimId longDimId satDimId timeDimId]);
My question is…How do I go about using putVar to insert values at specific four dimensional positions? FYI, this is my first time using NetCDF. Thanks in advance! -Dom
Which version do you have?
If you have a later version, look at these functions: nccreate and ncwrite.
Or: