Global Index (short | long) | Local contents | Local Index (short | long)
nino_oi.m
This script calls | |
---|---|
% Load reanalysis SST (1 degree resolution) (Note that lims is % 5 degrees larger than necessary in order to get good interpolation) clear file_in = ['/tmp_mnt/home/disk/tao/dvimont/model/data/sstoi8298.nc']; lims = [110 280 -35 35]; nc = netcdf(file_in, 'nowrite'); lat = nc{'lat'}(:); lon = nc{'lon'}(:); limlat = find(lat >= lims(3) & lat <= lims(4));lat = lat(limlat); limlon = find(lon >= lims(1) & lon <= lims(2));lon = lon(limlon); sst = nc{'data'}(:,limlat,limlon); nc = close(nc) scale = 0.01; add_offset = 20; % Rescale SST sst = sst(1:192,:,:)*scale + add_offset; [ntm, ny, nx] = size(sst); sst = reshape(sst, ntm, ny*nx); % Do various climatologies [dum, clim1] = climave(sst);clear dum; [dum, clim2] = climave(sst(97:ntm,:,:));clear dum; clim1 = reshape(clim1, 12, ny, nx); clim2 = reshape(clim2, 12, ny, nx); % Get CCM SST file_in = ['/tmp_mnt/home/disk/tao/dvimont/model/data/T42M5079.nc']; lims = [110 280 -35 35]; nc = netcdf(file_in, 'nowrite'); latccm = nc{'lat'}(:); lonccm = nc{'lon'}(:); limlatccm = find(latccm >= lims(3) & latccm <= lims(4));latccm = latccm(limlatccm); limlonccm = find(lonccm >= lims(1) & lonccm <= lims(2));lonccm = lonccm(limlonccm); sstccm = nc{'SST'}(:,limlatccm,limlonccm); nc = close(nc) % Interpolate clims to new grid latnew = -30:2:30; lonnew = 120:2:270; clim1 = interpn(1:12, lat, lon, clim1, 1:12, latnew', lonnew); clim2 = interpn(1:12, lat, lon, clim2, 1:12, latnew', lonnew); climc = interpn(1:12, latccm, lonccm, sstccm, 1:12, latnew', lonnew); % Find climatology differences: clim21 = clim2 - clim1; clim2c = clim2 - climc; clim1c = clim1 - climc;