application of pca in matlab - university of british …vradic/eosc510/tutorial4.pdf · application...

18
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

Upload: vuongkhuong

Post on 22-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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

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);

Example 1: SLP data

About first 10 modes explain the bulk of the variance

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

Example 1: SLP data

% plot data in the space of first two PCs

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.

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

Here the domain is illustrated (SST in deg C)

Example 2: SST data

Example 2: SST data

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

Example 2: SST data

Example 2: SST data

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);

Example 2: SST data

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

Example 2: SST data% comparison of PC1 and ONI