Table Of Contents

Previous topic

ENSOIndicator

This Page

ClimateSeries

class ClimateSeries

Bases: scikits.hydroclimpy.core.base.ReferencedSeries, object

TimeSeries objects with ENSO information.

Parameters:

data : array-like

Data

dates : {None, sequence}, optional

Corresponding dates

mask : {nomask, sequence}, optional

Mask

ensoindicator : {None, ENSOIndicator}, optional

ENSO Indicator.

refperiod : {None, tuple}, optional

Reference period, as a tuple (starting date, ending date). If None, the reference period is set to the whole range of dates.

freq : {None, string or integer}, optional

A valid frequency specification

start_date : {None, Date}, optional

Starting date of the series. This parameter is only useful if dates is None.

dtype : {None, dtype}, optional

Datatype of the series. If None, the dtype of data is used.

copy : {False, True}, optional

Whether copy the data (True) or just link to it (False).

See also

ENSOIndicator
Class to manipulate ENSO information.

Methods

adjust_endpoints
all
anom
any
argmax
argmin
argsort
asfreq
astype
byteswap
choose
clip
compress
compressed
conj
conjugate
convert
copy
count
cumprod
cumsum
date_to_index
diagonal
dump
dumps
fill
fill_missing_dates
filled
flatten
get_fill_value
get_imag
get_real
get_steps
getfield
harden_mask
has_duplicated_dates
has_missing_dates
ids
is_chronological
is_full
is_valid
iscontiguous
isfull
isvalid
item
itemset
max
mean
min
mini
newbyteorder
nonzero
pct
pct_log
pct_symmetric
period_anomalies
period_average
period_mean
period_standardize
period_std
period_var
prod
product
ptp
put
ravel
raw_data
repeat
reshape
resize
round
searchsorted
set_ensoindicator
set_ensoindices
set_fill_value
setfield
setflags
shrink_mask
soften_mask
sort
sort_chronologically
split
squeeze
std
sum
swapaxes
take
tofile
toflex
tolist
torecords
tostring
trace
transpose
tshift
unshare_mask
var
view

Attributes

As a subclass of ReferencedSeries, a ClimateSeries instance inherits all the attributes of its parents. In addition, it has the following specific attributes.

ensoindicator
Indicator of the ENSO phases, as a ENSOIndicator object.
ensoindices

Shortcut to the ENSOIndicator.ensoindices attribute of the ensoindicator. This attribute is a TimeSeries object, with values:

  • +1 for El Niño (warm) phases;
  • 0 for Neutral phases;
  • -1 for La Niña (cold) phases.
cold
Returns a copy of the series where values that do not fall during a cold (La Niña) episode are masked.
neutral
Returns a copy of the series where values that do not fall during a Neutral episode are masked.
warm
Returns a copy of the series where values that do not fall during a warm (El Niño) episode are masked.

Methods

As a subclass of ReferencedSeries, a ClimateSeries instance inherits all the methods of its parents.

Construction

To create a new ClimateSeries object, the class can be directly called with the adequate input parameters. However, it is also possible to use the constructor function climate_series, which accepts the same input parameters.

climate_series()

TimeSeries objects with ENSO information.

Parameters:

data : array-like

Data

dates : {None, sequence}, optional

Corresponding dates

mask : {nomask, sequence}, optional

Mask

ensoindicator : {None, ENSOIndicator}, optional

ENSO Indicator.

refperiod : {None, tuple}, optional

Reference period, as a tuple (starting date, ending date). If None, the reference period is set to the whole range of dates.

freq : {None, string or integer}, optional

A valid frequency specification

start_date : {None, Date}, optional

Starting date of the series. This parameter is only useful if dates is None.

dtype : {None, dtype}, optional

Datatype of the series. If None, the dtype of data is used.

copy : {False, True}, optional

Whether copy the data (True) or just link to it (False).

See also

ENSOIndicator
Class to manipulate ENSO information.

Another possibility is to transform a standard TimeSeries or ReferencedSeries into a ClimateSeries with the set_ensoindicator function.

set_ensoindicator(series, indicator)

Transforms a TimeSeries into a ClimateSeries, by setting an ENSO indicator.

Parameters:

series : TimeSeries

The TimeSeries object to transform.

indicator : ENSOIndicator

The ENSOIndicator object we want to set.

Returns:

climateseries :

A ClimateSeries object.

Raises:

TypeError :

If series is not a TimeSeries, or indicator not an ENSOIndicator.

Manipulating ENSO information

group_indices
grouped_indices_limits
apply_on_phase