Global Index (short | long) | Local contents | Local Index (short | long)
Define dimensions
This script calls | |
---|---|
clear cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data load LP10_detrend_L1-7_yr101-1000.mat; pcsl = -1*pcs; load HP10_detrend_L1-7_EOF_yr101-1000.mat; pcsh = -1*pcs; lims = [100 300 -65 65]; tim = 101:1000; lev = 1; sst = getnc('temp', lims, lev, tim); [lat, lon] = getll('temp', lims); lags = -20:20; cd /home/disk/hayes2/dvimont/csiro/matlab_data/Netcdf f = netcdf('treg.nc', 'clobber'); f('lags') = length(lags); f('depth') = 1; f('lat') = length(lat); f('lon') = length(lon); f{'lags'} = ncdouble('lags'); f{'depth'} = ncdouble('depth'); f{'lat'} = ncdouble('lat'); f{'lon'} = ncdouble('lon'); f{'lp_treg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_tcoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_treg'}.missing_value = ncdouble(9999); f{'lp_tcoef'}.missing_value = ncdouble(9999); f{'lp_treg'}.units = ncchar('K/std'); f{'lp_tcoef'}.units = ncchar('std**-1'); f{'lp_treg'}.long_name =... ncchar('Regression of 12.5m Temp on LP10 PC1'); f{'lp_tcoef'}.long_name =... ncchar('Correlation between 12.5m Temp and LP10 PC1'); f{'hp_treg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_tcoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_treg'}.missing_value = ncdouble(9999); f{'hp_tcoef'}.missing_value = ncdouble(9999); f{'hp_treg'}.units = ncchar('K/std'); f{'hp_tcoef'}.units = ncchar('std**-1'); f{'hp_treg'}.long_name =... ncchar('Regression of 12.5m Temp on HP10 PC1'); f{'hp_tcoef'}.long_name =... ncchar('Correlation between 12.5m Temp and HP10 PC1'); f{'lags'}(:) = lags; f{'depth'}(:) = 12.5; f{'lon'}(:) = lon; f{'lat'}(:) = lat; [treg, tcoef] = regress_eof(sst, pcsh, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'hp_treg'}(:) = treg; f{'hp_tcoef'}(:) = tcoef; [treg, tcoef] = regress_eof(sst, pcsl, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'lp_treg'}(:) = treg; f{'lp_tcoef'}(:) = tcoef; f = close(f); clear cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data load LP10_detrend_L1-7_yr101-1000.mat; pcsl = -1*pcs; load HP10_detrend_L1-7_EOF_yr101-1000.mat; pcsh = -1*pcs; lims = [100 300 -65 65]; tim = 101:1000; lev = 1; hc = getheat(lims, 4:7, tim); [lat, lon] = getll('temp', lims); lags = -20:20; cd /home/disk/hayes2/dvimont/csiro/matlab_data/Netcdf f = netcdf('hreg.nc', 'clobber'); % Define dimensions f('lags') = length(lags); f('depth') = 1; f('lat') = length(lat); f('lon') = length(lon); f{'lags'} = ncdouble('lags'); f{'depth'} = ncdouble('depth'); f{'lat'} = ncdouble('lat'); f{'lon'} = ncdouble('lon'); f{'lp_hcreg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_hccoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_hcreg'}.missing_value = ncdouble(9999); f{'lp_hccoef'}.missing_value = ncdouble(9999); f{'lp_hcreg'}.units = ncchar('K/std'); f{'lp_hccoef'}.units = ncchar('std**-1'); f{'lp_hcreg'}.long_name =... ncchar('Regression of 12.5m Temp on LP10 PC1'); f{'lp_hccoef'}.long_name =... ncchar('Correlation between 12.5m Temp and LP10 PC1'); f{'hp_hcreg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_hccoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_hcreg'}.missing_value = ncdouble(9999); f{'hp_hccoef'}.missing_value = ncdouble(9999); f{'hp_hcreg'}.units = ncchar('K/std'); f{'hp_hccoef'}.units = ncchar('std**-1'); f{'hp_hcreg'}.long_name =... ncchar('Regression of 12.5m Temp on HP10 PC1'); f{'hp_hccoef'}.long_name =... ncchar('Correlation between 12.5m Temp and HP10 PC1'); f{'lags'}(:) = lags; f{'depth'}(:) = 12.5; f{'lon'}(:) = lon; f{'lat'}(:) = lat; [treg, tcoef] = regress_eof(hc, pcsh, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'hp_hcreg'}(:) = treg; f{'hp_hccoef'}(:) = tcoef; [treg, tcoef] = regress_eof(hc, pcsl, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'lp_hcreg'}(:) = treg; f{'lp_hccoef'}(:) = tcoef; f = close(f); clear cd /home/disk/tao/dvimont/matlab/CSIRO/Thesis/Data load LP10_detrend_L1-7_yr101-1000.mat; pcsl = -1*pcs; load HP10_detrend_L1-7_EOF_yr101-1000.mat; pcsh = -1*pcs; lims = [100 300 -65 65]; tim = 101:1000; lev = 1; sst = getnc('taux', lims, lev, tim); [lat, lon] = getll('temp', lims); lags = -20:20; cd /home/disk/hayes2/dvimont/csiro/matlab_data/Netcdf f = netcdf('xreg.nc', 'clobber'); % Define dimensions f('lags') = length(lags); f('depth') = 1; f('lat') = length(lat); f('lon') = length(lon); f{'lags'} = ncdouble('lags'); f{'depth'} = ncdouble('depth'); f{'lat'} = ncdouble('lat'); f{'lon'} = ncdouble('lon'); f{'lp_xreg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_xcoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'lp_xreg'}.missing_value = ncdouble(9999); f{'lp_xcoef'}.missing_value = ncdouble(9999); f{'lp_xreg'}.units = ncchar('K/std'); f{'lp_xcoef'}.units = ncchar('std**-1'); f{'lp_xreg'}.long_name =... ncchar('Regression of 12.5m Temp on LP10 PC1'); f{'lp_xcoef'}.long_name =... ncchar('Correlation between 12.5m Temp and LP10 PC1'); f{'hp_xreg'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_xcoef'} = ncdouble('lags', 'depth', 'lat', 'lon'); f{'hp_xreg'}.missing_value = ncdouble(9999); f{'hp_xcoef'}.missing_value = ncdouble(9999); f{'hp_xreg'}.units = ncchar('K/std'); f{'hp_xcoef'}.units = ncchar('std**-1'); f{'hp_xreg'}.long_name =... ncchar('Regression of 12.5m Temp on HP10 PC1'); f{'hp_xcoef'}.long_name =... ncchar('Correlation between 12.5m Temp and HP10 PC1'); f{'lags'}(:) = lags; f{'depth'}(:) = 12.5; f{'lon'}(:) = lon; f{'lat'}(:) = lat; [treg, tcoef] = regress_eof(sst, pcsh, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'hp_xreg'}(:) = treg; f{'hp_xcoef'}(:) = tcoef; [treg, tcoef] = regress_eof(sst, pcsl, lags); treg(isnan(treg)) = 9999; tcoef(isnan(tcoef)) = 9999; treg = reshape(treg, size(treg, 1), 1, size(treg, 2), size(treg, 3)); tcoef = reshape(tcoef, size(tcoef, 1), 1, size(tcoef, 2), size(tcoef, 3)); f{'lp_xreg'}(:) = treg; f{'lp_xcoef'}(:) = tcoef; f = close(f);