climate.coupled_tsonis¶
Provides classes for generating and analyzing complex coupled climate networks.
- class pyunicorn.climate.coupled_tsonis.CoupledTsonisClimateNetwork(data_1, data_2, threshold=None, link_density=None, non_local=False, node_weight_type='surface', selected_months=None, silence_level=0)[source]¶
Bases:
CoupledClimateNetwork
Encapsulates a coupled similarity network embedded on a spherical surface.
Particularly provides functionality to generate a complex network from the Pearson correlation matrix of time series from two different observables (temperature, pressure), vertical levels etc.
Construct a static climate network following Tsonis et al. from the Pearson correlation matrix at zero lag [Tsonis2004].
Hence, coupled Tsonis climate networks are undirected due to the symmetry of the correlation matrix.
The idea of coupled climate networks is based on the concept of coupled patterns, for a review refer to [Bretherton1992].
Note
The two observables (layers) need to have the same time grid (temporal sampling points).
- __init__(data_1, data_2, threshold=None, link_density=None, non_local=False, node_weight_type='surface', selected_months=None, silence_level=0)[source]¶
Initialize an instance of
CoupledTsonisClimateNetwork
.Note
Either threshold OR link_density have to be given!
- Possible choices for
node_weight_type
: None
(constant unit weights)"surface"
(cos lat)"irrigation"
(cos**2 lat)
- Parameters:
data_1 (
ClimateData
) – The climate data for the first layer.data_2 (
ClimateData
) – The climate data for the second layer.threshold (float) – The threshold of similarity measure, above which two nodes are linked in the network.
link_density (float) – The networks’s desired link density.
non_local (bool) – Determines, whether links between spatially close nodes should be suppressed.
node_weight_type (str) – The type of geographical node weight to be used.
]selected_months ([int) – The months for which to calculate the correlation matrix. The full time series are used for default value None.
silence_level (int) – The inverse level of verbosity of the object.
- Possible choices for
- _calculate_correlation(anomaly_1, anomaly_2)[source]¶
Return the correlation matrix at zero lag.
- Parameters:
anomaly_1 (2D Numpy array (time, index_1)) – the first set of anomaly time series from which to calculate the correlation matrix at zero lag.
anomaly_2 (2D Numpy array (time, index_2)) – the second set of anomaly time series from which to calculate the correlation matrix at zero lag.
- Return type:
2D Numpy array (index, index)
- Returns:
the correlation matrix at zero lag.
- calculate_similarity_measure(anomaly_1, anomaly_2)[source]¶
Encapsulate the calculation of the correlation matrix at zero lag.
- Parameters:
anomaly_1 (2D Numpy array (time, index_1)) – the first set of anomaly time series from which to calculate the correlation matrix at zero lag.
anomaly_2 (2D Numpy array (time, index_2)) – the second set of anomaly time series from which to calculate the correlation matrix at zero lag.
- Return type:
2D Numpy array (index, index)
- Returns:
the correlation matrix at zero lag.
- correlation()[source]¶
Return the coupled correlation matrix at zero lag.
- Return type:
2D Numpy array (index, index)
- Returns:
the correlation matrix at zero lag.
- silence_level: int¶
(string) - The inverse level of verbosity of the object.