API Reference¶
Dataset downloads¶
Convenient wrappers for python APIs used to download climatological datasets.
|
Download CMIP5 model data. |
|
Retrieves ERA reanalysis data using the provided API. |
|
Download MERRA data. |
|
Download NCAR CFSL data. |
Download satellite data. |
Finite differences¶
Various finite difference schemes.
|
Return the integral approximation along an arbitrary axis. |
|
Return an estimate of the first derivative along an arbitrary axis using first order centered finite differencing. |
|
Return an estimate of the second derivative along an arbitrary axis using second order centered finite differencing. |
|
Return an estimate of the third derivative along an arbitrary axis using third order centered finite differencing. |
|
Return an arbitrary order finite difference approximation by taking successive half-level differences. |
|
Return an arbitrary order centered finite difference approximation for arbitrarily spaced coordinates using the [For88] method. |
Spectral analysis¶
Spectral analysis tools. Many of these are adapted from examples and course notes provided by Professors Elizabeth Barnes and Dennis Hartmann.
Note
The convention for this package is to use linear wave properties, i.e. the wavelength in <units> per \(2\pi\) radians, and wavenumber \(2\pi\) radians per <units>.
|
Applies Butterworth filter to data. |
|
Return the co-spectral decomposition and related quantities for two real-valued arrays along an arbitrary axis. |
|
Return the 2D spectral decomposition of two real-valued arrays with along an arbitrary time dimension and cyclic dimension. |
|
Apply scipy.signal.lfilter to data. |
|
Select the first Fourier harmonics of the time series. |
|
Select only the highest power frequencies. |
|
Returns coefficients for Lanczos high-pass filter with desired wavelength specified. |
|
Return the spectral decomposition of a real-valued array along an arbitrary axis. |
|
Return the spectral decomposition of a real-valued array along an arbitrary axis. |
|
Calculate the response function given the a and b coefficients for some analog filter. |
|
Apply running average to array. |
|
Compose array of sine waves. |
|
Retrieve the |
Variability analysis¶
Analyses of variance and trends. Many of these are adapted from examples and course notes provided by Professors Elizabeth Barnes and Dennis Hartmann.
|
Return the autocorrelation spectrum at successive lags. |
|
Return the autocovariance spectrum at successive lags. |
|
Return the correlation spectrum at successive lags. |
|
Return the covariance spectrum at successive lags. |
|
Calculate the first |
|
EOTs, whatever they are. |
|
Rotated EOFs, e.g. |
|
Returns sample points on Gaussian curve. |
|
Get the histogram along axis |
|
Get linear regression along axis, ignoring NaNs. |
|
Return one or more artificial red noise time series with prescribed mean and standard deviation. |
|
Return the \(e\)-folding autocorrelation timescale for the input autocorrelation spectra along an arbitrary axis. |
|
Return the precentile threshold from an array of percentiles that satisfies the given false discovery rate. |
Spherical coordinates¶
Mathematical operations on the surface of the sphere.
|
Return array padded circularly along longitude and over the poles for finite difference methods. |
|
Take area mean of data time series. |
|
Calculate gradient in spherical coordinates. |
|
Calculate Laplacian in spherical coordinates. |
|
Calculate the great circle distance between two points on Earth, specified in degrees. |
Wave diagnostics¶
Various diagnostics for quantifying wave activity, tracking wave packets, and detecting blocking patterns. Incorporates code developed by Clare Huang.
Warning
This codebase out of date and poorly tested. It will eventually be cleaned up. In the meantime, feel free to copy and modify it.
|
Get equivalent latitudes corresponding to PV levels evenly sampled from the distribution of sorted PVs. |
|
Return the finite-amplitude wave activity. |
|
Return the local finite-amplitude wave activity. |
Miscellaneous utilities¶
Includes miscellaneous mathematical functions.
|
Convert array of datetime64 to a calendar array of year, month, day, hour, minute, and seconds with these quantites indexed on the last axis. |
|
Find the (first) intersection point for two line segments. |
|
Track individual “lines” across lists of coordinates. |
|
Return the overlapping points for a group of 1D vectors. |
|
Find the location of the zero value for a given data array. |
Physical constants¶
A variety of physical constants.
Rule-of-thumb 7km atmospheric scale height |
|
Dry air molar mass |
|
Water vapor molar mass |
|
Earth rotation rate |
|
Earth mean radius |
|
Speed of light in a vacuum |
|
Specific heat capacity at constant pressure for dry air at \(0^{\circ}\mathrm{C}\) |
|
Specific heat capacity at constant volume for dry air at \(0^{\circ}\mathrm{C}\) |
|
Standard reference pressure |
|
Earth mean sea-level pressure |
|
\(\pi\) (3.14159…) |
|
\(\tau\) (6.28318…) |
|
Dry air gas constant |
|
Water vapor gas constant |
|
Poisson constant for dry air. |
|