
ncid = netcdf.create('CCNETHSS5.cdf','NC_WRITE');
dimt = netcdf.defDim(ncid,'tdim',9915);

varz = netcdf.defVar(ncid,'date','double',dimt);
vart = netcdf.defVar(ncid,'nccn','double',dimt);
varr = netcdf.defVar(ncid,'actratio','double',dimt);
varm = netcdf.defVar(ncid,'flag','double',dimt);

netcdf.endDef(ncid);
netcdf.putVar(ncid,varz,CCNETHSS5(:,1));
netcdf.putVar(ncid,vart,CCNETHSS5(:,2));
netcdf.putVar(ncid,varr,CCNETHSS5(:,3));
netcdf.putVar(ncid,varm,CCNETHSS5(:,4));

netcdf.close(ncid);