Releases: mjucker/aostools
aostools v2.6
As a general note, I have gradually shifted to xarray
as the basis to everything I do. As a consequence, expect all new development to be based on xarray.Dataset
or xarray.DataArray
. There are still multiple functions which exists as FunctionName()
and FunctionNameXr()
: In this case, expect the FunctionName()
to work but not receive further updates. So to take advantage of new developments and bugfixes, I encourage the use of xarray
and the FunctionNameXr()
versions where available. I plan to re-structure this for >= v3 and move the non-xarray function to a legacy folder.
New Functions
I have been lazy with releases and there are now a lot of new functions. I realize this is unprofessional and try to do better in the future. Here a list of what I think might be the most important new functions.
ComputeRossbyWaveSource()
OceanIndex()
: ENSO, IOD, SAMFindCoordNames()
: find longitude, latitude and vertical coordinate namesStandardGrid()
: Reset grid to longitude in [0,360], latitude from -90 to +90. Optionally rename coordinates to ['lon','lat','pres']- new file
constants.py
: access all kinds of relevant constants, pluscoslat
,sinlat
, coriolis parameterf
, stationary wavenumberkstar
,beta
, and some specific color schemes for selected variables TotalColumnOzone()
,GlobalMass()
,ComputeOzoneHoleArea()
- all related to stratospheric ozoneDetectEvents()
: find events of any array reaching a threshold for a given time period- many bugfixes in other functions
New Contributors
Full Changelog: v2.5...v2.6
aostools v2.5
This is a major update with several new functions and bugfixes.
New functions:
DetectEvents()
: Threshold-based event detection from time-dependent data (c0a6272)Vorticity()
,PotentialVorticity()
,PotentialTemperature()
(d35de9d)IPV()
: Potential vorticity on isentropic (potential temperature) levels. Requireswrf-python
. (d35de9d)ComputeOzoneHoleArea()
,TotalColumnOzone()
,GlobalMass()
,ComputeSurface()
(47591ad)Regress()
(cce1e68)
New constants:
- universal gas constant
R
, Avogadro's numberNa
(47591ad) - pre-defined color maps
cmaps{}
(b30b6ae) beta()
: computes total meridional vorticity gradient, includingu_yy
, ifu
is provided (8ca6bf6)sinlat()
: computes sinus of latitude, similar tocoslat()
(8ca6bf6)
Notable updates to existing funcitons:
aostools v2.4
New capabilities:
AddColorbar()
: Add a common color bar to existing Facet Plot (8d1bc12)LogPlot()
: Invert y-axis, make it logarithmic, and change the label format ()Anomaly()
: Compute anomaly for axarray.Dataset
orxarray.DataArray()
(892b66f)CheckSign()
andStatTest()
: Perform statistical testing along a given dimension (5efbb58)OceanIndex()
adds 'modiki' option (70cbab3)GlobalAvgXr()
: Compute meridional average, using any power of weighted by cosine of latitude. Does not compute zonal mean. (394a96b)FindCoordNames()
: Goes through a list of possible coordinate names to determine the names of pressure, latitude and longitude within a given dataset or dataarray. (0085e3f)- Added more stats tests to
StatTest()
. constants
now includes vorticity parameter and cosine of latitude. (d4fab6c)
Many more bugfixes. Thanks for all users providing feedback and allowing aostools
to become better.
aostools v2.3.2
Minor changes include:
- Added
ComputeEPfluxDivXr()
, which computes the Eliassen-Palm fluxes and their divergence withxarray.DataArrays
. This follows Jucker, ASL (2021. - Internal use of
constants
module instead of defining the constants in each function. - Changed PyPI dependencies: Removed Cartopy for easier install via
pip
. Note that this means if you want to useProjection()
, you have to install Cartopy separately.
aostools v2.3.1
This minor update fixes a bug where the PyPI distribution wouldn't install.
aostools v2.3
Version used for M. Jucker (2020): Scaling of Eliassen-Palm Flux Vectors, Atmospheric Science Letters, DOI 10.1002/asl.1020.
Started transition to xarray
data:
ComputePsiXr()
,ComputeVertEddyXr()
(a9519d4)ComputeWstarXr()
(28c46d2)ComputeRefractiveIndexXr()
(3f22071)- New function
ComputeRossbyWaveSource()
(3a53884) - New function
Nino()
: Accepts SSTs and computes nino1+2, 3, 4, 3.4, ONI and TNI. (3a53884)
Minor additions and bugfixes.
- Changed function name
ERA2Model()
toStandardGrid()
(cee2900) - Add divergence calculation for
ComputeWaveActivityFlux()
. - Add possibility to use EOF as input to
eof()
: The function then projects data onto the input EOF and computes the corresponding PC (c192080) - Add
ComputeStreamfunction()
(f0deda4) - Bugfixes in
ComputeWaveActivityFlux()
- Add
Cart2Sphere()
which takes arrow components and transforms them for plotting on a sphere. (607a048) constants.py
now contains often used constants. Will be expanded in the future.- Multi-axes projection figure with
Projection()
(58ee720) - Converted spaces to tabs for python3 compatibility.
aostools v2.2
Due to the rapid development of xarray
's capabilities, many of the aostools
functions based on numpy
arrays are now much easier to perform. The aim is for future v3 to fully use xarray
DataArrays. This release is therefore the first to require xarray
, as some of the added functionality makes use of the much simpler way to manipulate arrays.
New Features:
- 545acc1:
ComputeWaveActivityFlux()
computes Takaya & Nakamura 3D wave fluxes. These are equivalent to EP flux (ComputeEPfluxDiv()
) if reference state is zonally symmetric and then zonal mean of fluxes is taken. - f484415:
PlotEPfluxArrows()
Acceptsep1, ep2
computed fromComputeEPfluxDiv()
and afigure
andaxes
.Projection()
Creates a figure and axes with a world map projection fromcartopy
.ERA2Model()
Swaps longitude from -180,180 to 0,360 degrees and inverts the direction of latitude to plot EP flux arrows with correct scaling.
- 320f3fa:
eof()
now accepts multi-dimensional arrays instead of only 1 time and 1 space dimensions. It assumes the first dimension to be time.
Bugfixes: - 1d2fffd:
ComputeSaturationMixingRatio()
andComputeRelativeHumidity()
are now compatible in terms of input arguments. - 01368d1:
AxRoll()
and therefore all functions depending on it were not python 3 compatible due to the use ofbasestring
, which does not exist in python 3. This is fixed now (and the function was also unnecessarily complicated). - 71ec5a4:
GetWaves()
now usesy=None
as default instead of earliery=[]
. There was also a bug wheny
was not empty anddo_anomaly=False
. This is now corrected.
aostools v2.1.6
aostools v2.1.5
A few bugfixes, and extended functionality:
GetWaves()
andComputeEPDiv()
can now receive a list of wave numbersComputeAnnularMode()
now deals with both hemispheres - either explicitly withhemi
or implicitly by looking at the sign of latitude inputseof()
can now be calculated based on removing the mean (detrend='constant'
) or a linear trend (detrend='linear'
).
aostools v2.1.4
Found a bug with the use of numpy.gradient() in climate.py. It seems that with the more recent versions of numpy, gradient() only allows for scalars as dx,dy,etc, and not arrays. Thus, any gradient computations are now gradient(y)/gradient(x) instead of gradient(y,gradient(x)).