This module supports the following analysis:
enso_skewness(), enso_duration(), enso_transition2() , find_enso_percentile() are rewritten from the Matlab code used in Choi et al (2013). find_en_pattern() is used in Choi et al (2015). A few of these functions require the GeoDAT library.
Same as enso_duration
Same as enso_skewness
Same as enso_transition
Same as enso_transition2
Same as enso_transition_prob
Same as persistence_check
Same as seasonal_locking
Same as seasonal_locking_from_nino34
Compute the duration of events counting from the event peak (locations given by locs) until the termination of events (given by the first occurrence of operator(nino34,evt_end)).
Parameters: |
|
---|---|
Returns: | list of int (same length as locs) |
Compute the duration of the warm and cold events
Parameters: |
|
---|---|
Returns: | with keys “warm” and “cold” each contains a list of integers which are the duration of the events |
Return type: | dict |
Shortcut for calculating skewness using scipy.stats. Choose scipy.stats.mstats.skew if nino34 is a masked array (as it often is)
Parameters: | nino34 (numpy 1d array) – ENSO SST anomaly index |
---|---|
Returns: | scalar |
Compute the number of transitions However, it does not eliminate double counting due to reintensification. Therefore the results are different from those of enso_transition2()
Parameters: |
|
---|---|
Returns: | transition – number of warm-to-cold transition, “warm_warm”: number of warm-to-warm transition, “cold_warm”:..., “cold_cold”:...,} |
Return type: | dict |
Compute the transition probabilities. Word for word copy from the Matlab code, which was used in. See Choi et al (2013)
Parameters: |
|
---|---|
Returns: | transition (dict), indices(dict), warm_indices(list), cold_indices(list) transition= {“warm_cold”: probability of warm-to-cold transition,
warm_indices (list) is the list of warm event peak locations; cold_indices (list) is the list of cold event peak locations |
Compute the transition probability from the results given by enso_transition()
All arguments and keyword arguments are fed to enso_transition()
Same as find_enso_percentile
Same as find_enso_threshold
Same as find_events
Same as find_en_pattern
Given a field and Nino3.4 index monthly time series, extract the time at which nino34_mid-nino34_tole < peak nino34 < nino34_mid+nino34_tole; then compute the climatology for these snap shots
Parameters: |
|
---|---|
Returns: | pattern (geodat.nc.Variable) |
This function requires the library GeoDAT
Find ENSO events using percentiles (i.e. insensitive to time mean)
Parameters: |
|
---|
args and kwargs are fed to find_events()
Returns: | (dict, dict) each has keys “locs” and “peaks”. “locs” contains the index where an event peaks. “peaks” contains the corresponding peak values |
---|
Example:
>>> warm,cold = find_enso_percentile(nino34,15.)
Similar to find_enso_percentile but uses threshold to find ENSO events :param index: ENSO SST anomaly monthly index. Masked array
is supported
Parameters: |
|
---|
args and kwargs are fed to find_events()
Returns: | (dict, dict) each has keys “locs” and “peaks”. “locs” contains the index where an event peaks. “peaks” contains the corresponding peak values |
---|
Return the locations of ENSO warm/cold event peaks for a given index.
Parameters: |
|
---|---|
Returns: | (pklocs, pks) = (location in the input array, values of extrema) |
Filter is_selected where True indicating an active, persistent event
Parameters: |
|
---|---|
Returns: | numpy boolean array same shape as is_selected |
Given the indices of the peak and a list of months, return the count of events in a particular month (Jan-Dec).
Parameters: |
|
---|---|
Returns: | list of int = [number of events peaked in Jan, number of events peaked in Feb,...] |
Shortcut for applying seasonal_locking() manually for warm and cold events.
Parameters: |
|
---|---|
Returns: | list of int = [number of events peaked in Jan, number of events peaked in Feb,...] |