Top Banner
Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for North Pacific (1979-2010) -> Tutorial4_SLP_data.m 2) Apply PCA on monthly sea surface temperature data for Tropical Pacific (1979-2015), looking for ENSO modes -> Tutorial4_SST_data.m
18

Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Jul 22, 2018

Download

Documents

vuongkhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Application of PCA in MATLAB

● Objectives:

1) Apply PCA on daily sea level pressure data for North Pacific (1979-2010)-> Tutorial4_SLP_data.m

2) Apply PCA on monthly sea surface temperature data for Tropical Pacific (1979-2015), looking for ENSO modes

-> Tutorial4_SST_data.m

Page 2: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP daily data Data from CFSR climate reanalysis, 1979-2010, on Euclidean conical map

Page 3: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP data Remember from the last time: propagating spatial waves...

Page 4: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP dataPCA objective: we would like to capture the essence of the spatial SLP patterns

In MATLAB:% PCA:[eigenvectors,PCs,eigenvalues]=princomp(y);

% contribution of each mode to total variance:variance=eigenvalues./sum(eigenvalues);

Page 5: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP data

About first 10 modes explain the bulk of the variance

Page 6: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP data% plot the first four modes (eigenvectors and PCs)

Page 7: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 1: SLP data

% plot data in the space of first two PCs

Page 8: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST monthly data Data from ERA Interim climate reanalysis, Jan 1979- Jun 2015

The Oceanic Niño Index (ONI) has become the de-facto standard that NOAA uses for identifying El Niño (warm) and La Niña (cool) events in the tropical Pacific. It is the running 3-month mean SST anomaly for the Niño 3.4 region (i.e., 5oN-5oS, 120o-170oW).

Events are defined as 5 consecutive overlapping 3-month periods at or above the +0.5o anomaly for warm (El Niño) events and at or below the -0.5 anomaly for cold (La Niña) events.

Page 9: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST dataData from ERA Interim climate reanalysis, Jan 1979- Jun 2015

Here the domain is illustrated (SST in deg C)

Page 10: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data

Page 11: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data

Page 12: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data% some pre-processing1) remove the average seasonal cycle, 2) take the 3-mean running average

Page 13: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data

Page 14: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data

Page 15: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST dataPCA objective: we would like to capture the essence of the spatial SST patterns (3-month running mean data)

In MATLAB:% PCA:[eigenvectors,PCs,eigenvalues]=princomp(y);

% contribution of each mode to total variance:variance=eigenvalues./sum(eigenvalues);

Page 16: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data

Page 17: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data% plot the first four modes (eigenvectors and PCs)

Page 18: Application of PCA in MATLAB - University of British …vradic/EOSC510/Tutorial4.pdf · Application of PCA in MATLAB Objectives: 1) Apply PCA on daily sea level pressure data for

Example 2: SST data% comparison of PC1 and ONI