Global Index (short | long) | Local contents | Local Index (short | long)
cd /home/disk/tao/data/coads/coads1a filin = 'sst.mean.8095.nc'; nc = netcdf(filin, 'nowrite'); ts2 = nc{'sst'}(:,:,:); add_offset = nc{'sst'}.add_offset(:); scale_factor = nc{'sst'}.scale_factor(:); mv2 = nc{'sst'}.missing_value(:); nc = close(nc); ts2 = ts2 * scale_factor; ts2 = ts2 + add_offset; mv2 = mv2 * scale_factor; mv2 = mv2 + add_offset;
This script calls | |
---|---|
clean cd /home/disk/tao/data/coads/coads1 filin = 'sst.mean.nc'; [latnmc, lonnmc, lev] = getll(filin); nc = netcdf(filin, 'nowrite'); ts = nc{'sst'}(1153:1512,:,:); add_offset = nc{'sst'}.add_offset(:); scale_factor = nc{'sst'}.scale_factor(:); mv = nc{'sst'}.missing_value(:); nc = close(nc) ts = ts * scale_factor; ts = ts + add_offset; mv = mv * scale_factor; mv = mv + add_offset; %ts2(find(ts2 == mv2)) = mv * ones(size(find(ts2 == mv2))); %ts = [ts; ts2]; %clear ts2 nlat = length(latnmc); nlon = length(lonnmc); ntim = 12; ts(find(ts == mv)) = NaN * ones(size(find(ts == mv))); [ts, clim] = annave(ts); clear ts; clim = reshape(clim, ntim, nlat, nlon); cd /home/disk/hayes/dvimont/ccm3.6/data filin = 'T42M5079.nc'; sst = getnc(filin, 'SST'); [clat, clon] = getll(filin); filin = 'NOV1.T42.1998.nc' oro = getnc(filin, 'ORO'); lndpt = find(oro == 1); sst2 = zeros(size(sst)); for i = 1:ntim; tem = squeeze(clim(i,:,:)); sst2(i,:,:) = interp2(lonnmc, latnmc, tem, clon, clat'); sst2(i,lndpt) = NaN*ones(size(lndpt)); sst(i,lndpt) = NaN*ones(size(lndpt)); end lat = clat; lon = clon; default_global num = 1; tem = squeeze(sst2(num, :, :) - sst(num, :, :)); figure(1) sp(1) gcont(tem, [-5:.25:5]); dc