Skip to contents

synoptclas allows to perform several types of synoptic classification approaches based on one or several atmospheric variables (i.e. mean sea level pressure, geoptential height at 500 hPa, etc.)

Usage

synoptclas(x, ncomp, norm = TRUE, matrix_mode = "S-mode", extreme_scores = 2)

Arguments

x

data.frame. A data.frame with the following variables: lon, lat, time, value, var, units. See tidy_nc.

ncomp

Integer. Number of components to be retained.

norm

logical. Default TRUE. norm = TRUE is recommended for classifying two ore more variables.

matrix_mode

character. The mode of matrix to use. Choose between S-mode and T-mode

extreme_scores

Integer. Definition of extreme score threshold (Esteban et al., 2005). Default is 2. Only applicable for a matrix_mode = "S-mode"

Value

A list with:

  • A data.frame containing the dates and the weather types. If "T-mode" is selected, two classifications are returned (absolute and positive/negative classification).

  • A data frame containing the gridded data grouped by circulation types.If "T-mode" is selected, 3 classifications are returned (absolute correlation,maximum positive correlation, and positive/negative classification). In addition, p-values of a t-test computed to the anomalies, comparing them to 0 with a conf.level = 0.95, are returned

Details

The matrix_mode argument allows to conduct different types of synoptic classifications depending on the user's objective. If the user wants to perform a synoptic classification of a long and continuous series, he must set the matrix_mode = "S-mode". When we apply the PCA to a matrix in S-mode, the variables are the grid points (x,y) and the observations are the days (time series), so the linear relationships that the PCA establishes are between the time series of the grid points. One of the results we obtain from the PCA are the "scores", which indicate the degree of representativeness of each day for each of the principal components. However, the scores do not allow us to directly obtain the weather types (WT) classification, since one day can be represented by several principal components. For this reason, a clustering method is required to group each day to an specific WT based on the multivariate coordinates provided by the "scores". Before using a clustering method, a VARIMAX rotation is performed on the principal Components retained, with the aim of redistributing the variance of such components. With the rotated components, the scores are used to apply the extreme scores method (Esteban et al., 2005). The scores show the degree of representativeness associated with the variation modes of each principal component, i.e., the classification of each day to its more representative centroid. Thus, the extreme scores method uses the scores > 2 and < -2, establishing a positive and negative phase for each principal component. The extreme scores procedure establishes the number of groups and their centroids in order to apply the K-means method without iterations. Conversely, if the user wants to perform a synoptic classification of specific events (i.e. flood events, extreme temperatures events,etc.), he must set the matrix_mode = "T-mode". In this case, the variables are the days (time series) and the observations are the grid points. The relationships established in this case are between each daily gridded map. For this reason, the eigenvalues (correlations) allow to allow us to associate each day to a WT without using a clustering method as in the case of the S-mode matrix.

References

Esteban, P. , Jones, P. D., Martin.Vide, J. Atmospheric circulation patterns related to heavy snowfall days in Andorra, Pyrenees Int. J. Climatol. 25: 319-329. doi:10.1002/joc.1103

See also

Examples

# Load data
data(msl)
data(z500)

# Joining both variables
atmos_data <- dplyr::bind_rows(msl,z500)

# S-mode classification
smode_cl <- synoptclas(atmos_data, ncomp = 6, norm = TRUE)

# Time subset using a vector of dates of interest
dates_int <- c("2000-01-25","2000-04-01","2000-07-14","2001-05-08","2002-12-20")
dates_int <- lubridate::as_date(dates_int)
atmos_data2 <- dplyr::filter(atmos_data, time %in% dates_int)

# T-mode classification
tmode_cl <- synoptclas(atmos_data2, ncomp = 2, matrix_mode = "T-mode")
#> Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
#> `.name_repair` is omitted as of tibble 2.0.0.
#>  Using compatibility `.name_repair`.
#>  The deprecated feature was likely used in the synoptReg package.
#>   Please report the issue at
#>   <https://github.com/lemuscanovas/synoptReg/issues>.