GithubHelp home page GithubHelp logo

fda.oce's Introduction

Functional Data Analysis of oceanographic profiles (fda.oce)

Functional Data Analysis is a set of tools to study curves or functions. Here we see vertical profiles of temperature (T) and salinity (S) as curves and apply a functional principal component analysis (FPCA) in the multivaraite case (T and S) to reduce the dimensionality of the system. It can be used for front detection, water mass identification, unsupervised or supervised classification, model comparison, data calibration ...

References:

  • Pauthenet et al. (2018) Seasonal meandering of the Polar Front upstream of the Kerguelen Plateau. Geophysical Research Letters, 10.1029/2018GL079614
  • Pauthenet et al. (2017) A linear decomposition of the Southern Ocean thermohaline structure. Journal of Physical Oceanography, 10.1175/JPO-D-16-0083.1
  • Ramsay, J. O., and B. W. Silverman, 2005: Functional Data Analysis. 2nd Edition Springer, 426 pp., Isbn : 038740080X.

Installation of the package using devtools :

install.packages("devtools")
devtools::install_github("Epauthenet/fda.oce")
help(package = fda.oce)

Demo

Here is an example of how to use these functions. We compute the modes for a subsample (given here in a RData) of the reanalysis GLORYS in the Southern Ocean for December of 2015.

First we load the data and fit the Bsplines on the 1691 profiles of the example, between 5 and 1000m with 20 Bsplines :

load("GLORYS_2015-12_SO_sub10.RData")
fda.oce::bspl(temp,sal,depth,range = c(5,1000),mybn = 20)

Then we apply the PCA on these Bsplines :

fda.oce::fpca(temp.fd,sal.fd)

The profiles can then be reconstructed with less PCs than the total number, removing the small variability :

fda.oce::reco(pca,te)

And we can project any other profile on the modes computed with a climatology (here a subset of GLORYS 12-2015). For example we fitted Bsplines on the WOCE section i06s and store it in a RData. Now we load it and project it on the GLORYS modes :

load("i06s_1000m40BS.RData")
fda.oce::proj(ti06.fd,si06.fd,pca)

Visual representation

We can plot the effects of the vertical modes on temperature and salinity mean profiles :

for (te in 1:4){
  fda.oce::eigenf(pca,te)
}

drawing drawing drawing drawing

We can plot the PC in space, here are the 4 first :

par(mfrow = c(2,2),mar = c(1,3,3,3))
for (te in 1:4){
  fda.oce::map_pc(lon,lat,pca,mask,te)
}

drawing

We can also make a kernel density estimation (KDE) of the PC, here PC1 against PC2, with the section WOCE i06s in red :

fda.oce::kde_pc(pca, te = c(1, 2))
points(Npc[,1:2],col = 2,pch = "+")
legend("topright",legend = "section WOCE i06s",pch = "+",col = 2)

drawing

Data Validation

Here is an example of data validation on a subset of ARGO floats in the Southern Ocean. Any profiles that is not located in the main cloud of points can be easily flagged as of low quality.

drawing

fda.oce's People

Contributors

epauthenet avatar

Stargazers

Fabien Roquet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.