easyclimate.field.air_sea_interaction

Submodules

Functions

calc_index_nino1and2(, lat_dim, lon_dim, time_dim, ...)

Calculate the Niño 1+2 index.

calc_index_nino3(, lat_dim, lon_dim, time_dim, normalized)

Calculate the Niño 3 index.

calc_index_nino34(, lat_dim, lon_dim[, running_mean])

Calculate the Niño 3.4 index.

calc_index_OMI(, lat_dim, lon_dim[, running_mean])

Calculate the ONI (Oceanic Niño Index) index.

calc_index_nino4(, lat_dim, lon_dim, time_dim, normalized)

Calculate the Niño 4 index.

calc_index_IOD_Saji_1999(, lon_dim, lat_dim, time_dim, ...)

The calculation of monthly mean Indian Ocean Dipole (IOD) index (i.e., Dipole Mode Index; DMI) is constructed by following method:

sort_ascending_latlon_coordinates(...)

Sort the dimensions lat, lon in ascending order.

transfer_xarray_lon_from180TO360(...)

Longitude conversion -180-180 to 0-360.

remove_seasonal_cycle_mean() → xarray.DataArray)

Remove of the seasonal cycle means over the entire time range.

calc_index_ATL3(, lat_dim, lon_dim, time_dim, normalized)

Calculate ATL3 index.

calc_index_AMM_Doi_2009(, lon_dim, lat_dim, time_dim, ...)

The calculation of monthly mean Atlantic Meridional Mode (AMM) index is constructed by following method:

calc_index_IOBM_1point(, lon_range, lon_dim, lat_dim, ...)

The calculation of monthly mean Indian Ocean Basin mode (IOBM) index is constructed by following method:

calc_index_IOBM_EOF1(, lon_range, lon_dim, lat_dim, ...)

The calculation of monthly mean PNA index using rotated empirical orthogonal functions (REOFs) method over the entire Northern Hemisphere:

calc_index_PDO_EOF1(, lon_dim, lat_dim, time_dim, ...)

The calculation of monthly mean Pacific Decadal Oscillation (PDO) index using empirical orthogonal functions (EOFs) method over the North Pacific basin.

Package Contents

easyclimate.field.air_sea_interaction.calc_index_nino1and2(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate the Niño 1+2 index.

The Niño 1+2 region (0°-10°S, 90°W-80°W) is the smallest and eastern-most of the Niño SST regions, and corresponds with the region of coastal South America where El Niño was first recognized by the local populations. This index tends to have the largest variance of the Niño SST indices.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

Niño 1+2 index.

Reference

easyclimate.field.air_sea_interaction.calc_index_nino3(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate the Niño 3 index.

This region (5°N-5°S, 150°W-90°W) was once the primary focus for monitoring and predicting El Niño, but researchers later learned that the key region for coupled ocean-atmosphere interactions for ENSO lies further west (Trenberth, 1997). Hence, the Niño 3.4 and ONI became favored for defining El Niño and La Niña events.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

Niño 3 index.

Reference

easyclimate.field.air_sea_interaction.calc_index_nino34(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', running_mean=5, time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate the Niño 3.4 index.

The Niño 3.4 (5°N-5°S, 170°W-120°W) anomalies may be thought of as representing the average equatorial SSTs across the Pacific from about the dateline to the South American coast. The Niño 3.4 index typically uses a 5-month running mean, and El Niño or La Niña events are defined when the Niño 3.4 SSTs exceed +/- 0.4℃ for a period of six months or more.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

running_mean: int, default: 5.

Running mean value. If running_mean is None or 0, it will not perform running average operation.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

Niño 3.4 index.

Reference

easyclimate.field.air_sea_interaction.calc_index_OMI(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', running_mean=3, time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate the ONI (Oceanic Niño Index) index.

The ONI (5°N-5°S, 170°W-120°W) uses the same region as the Niño 3.4 index. The ONI uses a 3-month running mean, and to be classified as a full-fledged El Niño or La Niña, the anomalies must exceed +0.5℃ or -0.5℃ for at least five consecutive months. This is the operational definition used by NOAA.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

running_mean: int, default: 3.

Running mean value. If running_mean is None or 0, it will not perform running average operation.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

ONI index.

Reference

easyclimate.field.air_sea_interaction.calc_index_nino4(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate the Niño 4 index.

The Niño 4 index (5°N-5°S, 160°E-150°W) captures SST anomalies in the central equatorial Pacific. This region tends to have less variance than the other Niño regions.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

Niño 4 index.

Reference

easyclimate.field.air_sea_interaction.calc_index_IOD_Saji_1999(sst_monthly_data: xarray.DataArray, time_range: slice = slice(None, None), lon_dim: str = 'lon', lat_dim: str = 'lat', time_dim: str = 'time', normalized: bool = False) xarray.DataArray

The calculation of monthly mean Indian Ocean Dipole (IOD) index (i.e., Dipole Mode Index; DMI) is constructed by following method:

The difference in SST anomaly between the tropical western Indian Ocean (50°E-70°E, 10°S-10°N) and the tropical south-eastern Indian Ocean (90°E-110°E, 10°S-Equator).

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default True, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

The monthly mean IOD index (xarray.DataArray).

Reference

easyclimate.field.air_sea_interaction.sort_ascending_latlon_coordinates(data: xarray.DataArray | xarray.Dataset, lat_dim: str = 'lat', lon_dim: str = 'lon') xarray.DataArray | xarray.Dataset

Sort the dimensions lat, lon in ascending order.

easyclimate.field.air_sea_interaction.transfer_xarray_lon_from180TO360(data_input: xarray.DataArray | xarray.Dataset, lon_dim: str = 'lon') xarray.DataArray | xarray.Dataset

Longitude conversion -180-180 to 0-360.

Parameters

data_inputxarray.DataArray or xarray.Dataset

The spatio-temporal data to be calculated.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

Returns

xarray.DataArray or xarray.Dataset.

See also

transfer_xarray_lon_from360TO180

easyclimate.field.air_sea_interaction.remove_seasonal_cycle_mean(data_input: xarray.DataArray | xarray.Dataset, dim: str = 'time', time_range: slice = slice(None, None)) xarray.DataArray

Remove of the seasonal cycle means over the entire time range.

Parameters

data_inputxarray.DataArray or xarray.Dataset.

The data of xarray.DataArray to be calculated.

Caution

data_input must be monthly data.

dim: str.

Dimension(s) over which to apply extracting. By default extracting is applied over the time dimension.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

Returns

xarray.DataArray.

easyclimate.field.air_sea_interaction.calc_index_ATL3(sst_monthly_data: xarray.DataArray | xarray.Dataset, time_range: slice = slice(None, None), lat_dim: str = 'lat', lon_dim: str = 'lon', time_dim: str = 'time', normalized: bool = False) xarray.DataArray | xarray.Dataset

Calculate ATL3 index.

In some years, the cold tongue formation in summer is weak, leading to warm SST anomalies in the cold tongue region. This is what is called an Atlantic Niño. One way to gauge the strength of these events is to calculate the area average of SST in the cold tongue region, defined as 20°W to 0° and 3°S to 3°N. This is called the ATL3 index.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default False, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

ATL3 index.

Reference

easyclimate.field.air_sea_interaction.calc_index_AMM_Doi_2009(sst_monthly_data: xarray.DataArray, time_range: slice = slice(None, None), lon_dim: str = 'lon', lat_dim: str = 'lat', time_dim: str = 'time', normalized: bool = False) xarray.DataArray

The calculation of monthly mean Atlantic Meridional Mode (AMM) index is constructed by following method:

The difference difference between the northern index (SSTA in 5–15°N, 50–20°W) and the southern index (SSTA in 5–15°S, 20°W–10°E). See Fig. 7 in Doi et al. 2009.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default True, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

The monthly mean AMM index (xarray.DataArray).

Reference

easyclimate.field.air_sea_interaction.calc_index_IOBM_1point(sst_monthly_data: xarray.DataArray, time_range: slice = slice(None, None), lon_range: slice = slice(40, 110), lon_dim: str = 'lon', lat_dim: str = 'lat', time_dim: str = 'time', normalized: bool = False) xarray.DataArray

The calculation of monthly mean Indian Ocean Basin mode (IOBM) index is constructed by following method:

The SSTA averaged over the tropical Indian Ocean (40°E-100°E, 20°S-20°N) or (40°E-110°E, 20°S-20°N).

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lon_range: slice, default: slice(40, 110).

The range of longitude to calculate the IOBM index. Common choices include slice(40, 110) and slice(40, 100).

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

time_dim: str, default: time.

The time coordinate dimension name.

normalized: bool, default True, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

The monthly mean IOBM index (xarray.DataArray).

Reference

easyclimate.field.air_sea_interaction.calc_index_IOBM_EOF1(sst_monthly_data: xarray.DataArray, time_range: slice = slice(None, None), lon_range: slice = slice(40, 110), lon_dim: str = 'lon', lat_dim: str = 'lat', time_dim: str = 'time', random_state: int | None = None, solver: Literal['auto', 'full', 'randomized'] = 'auto', solver_kwargs: dict = {}, normalized: bool = True) xarray.DataArray

The calculation of monthly mean PNA index using rotated empirical orthogonal functions (REOFs) method over the entire Northern Hemisphere:

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lon_range: slice, default: slice(40, 110).

The range of longitude to calculate the IOBM index. Common choices include slice(40, 110) and slice(40, 100).

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

time_dim: str, default: time.

The time coordinate dimension name.

random_state: int, default None.

Seed for the random number generator.

solver: {“auto”, “full”, “randomized”}, default: “auto”.

Solver to use for the EOFs computation.

solver_kwargs: dict, default {}.

Additional keyword arguments to be passed to the EOFs solver.

normalized: bool, default True, optional.

Whether to standardize the index based on standard deviation over time_range.

Returns

The monthly mean IOBM index (xarray.DataArray).

Reference

See also

get_EOF_model

easyclimate.field.air_sea_interaction.calc_index_PDO_EOF1(sst_monthly_data: xarray.DataArray, time_range: slice = slice(None, None), lon_dim: str = 'lon', lat_dim: str = 'lat', time_dim: str = 'time', random_state: int | None = None, solver: Literal['auto', 'full', 'randomized'] = 'auto', solver_kwargs: dict = {}, normalized: bool = True, detrend_spatial: bool = True) xarray.DataArray

The calculation of monthly mean Pacific Decadal Oscillation (PDO) index using empirical orthogonal functions (EOFs) method over the North Pacific basin.

Parameters

sst_monthly_data: xarray.DataArray.

The monthly sea surface temperature (SST) dataset.

time_range: slice, default: slice(None, None).

The time range of seasonal cycle means to be calculated. The default value is the entire time range.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

time_dim: str, default: time.

The time coordinate dimension name.

random_state: int, default None.

Seed for the random number generator.

solver: {“auto”, “full”, “randomized”}, default: “auto”.

Solver to use for the EOFs computation.

solver_kwargs: dict, default {}.

Additional keyword arguments to be passed to the EOFs solver.

normalized: bool, default True, optional.

Whether to standardize the index based on standard deviation over time_range.

normalized: bool, default True, optional.

Remove linear trend along time coordinate dimension from data.

Returns

The monthly mean PDO index (xarray.DataArray).

Reference

See also

get_EOF_model