Skip to content

Releases: mjucker/aostools

aostools v2.6

19 Oct 02:32
Compare
Choose a tag to compare

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, SAM
  • FindCoordNames(): find longitude, latitude and vertical coordinate names
  • StandardGrid(): 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, plus coslat, sinlat, coriolis parameter f, stationary wavenumber kstar, beta, and some specific color schemes for selected variables
  • TotalColumnOzone(), GlobalMass(), ComputeOzoneHoleArea() - all related to stratospheric ozone
  • DetectEvents(): 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

02 Dec 02:27
Compare
Choose a tag to compare

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. Requires wrf-python. (d35de9d)
  • ComputeOzoneHoleArea(), TotalColumnOzone(), GlobalMass(), ComputeSurface() (47591ad)
  • Regress() (cce1e68)

New constants:

  • universal gas constant R, Avogadro's number Na (47591ad)
  • pre-defined color maps cmaps{} (b30b6ae)
  • beta(): computes total meridional vorticity gradient, including u_yy, if u is provided (8ca6bf6)
  • sinlat(): computes sinus of latitude, similar to coslat() (8ca6bf6)

Notable updates to existing funcitons:

  • eof() now takes xr.DataArray() as input. In this case, it also outputs xr.DataArrays. (ccd72d0)
  • StandardGrid() adds possibility to sort pressure top-down or bottom-up (40db2ac)
  • Anomaly() and Standardize() now allow to define a specific time period to compute the climatology from (d983742)

aostools v2.4

26 Apr 03:16
Compare
Choose a tag to compare

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 a xarray.Dataset or xarray.DataArray() (892b66f)
  • CheckSign() and StatTest(): 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

08 Mar 01:43
72c5104
Compare
Choose a tag to compare

Minor changes include:

  • Added ComputeEPfluxDivXr(), which computes the Eliassen-Palm fluxes and their divergence with xarray.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 use Projection(), you have to install Cartopy separately.

aostools v2.3.1

06 Mar 01:44
ff8abbc
Compare
Choose a tag to compare

This minor update fixes a bug where the PyPI distribution wouldn't install.

aostools v2.3

29 Nov 22:42
Compare
Choose a tag to compare

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() to StandardGrid() (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

03 Oct 02:38
Compare
Choose a tag to compare

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() Accepts ep1, ep2 computed from ComputeEPfluxDiv() and a figure and axes.
    • Projection() Creates a figure and axes with a world map projection from cartopy.
    • 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() and ComputeRelativeHumidity() 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 of basestring, which does not exist in python 3. This is fixed now (and the function was also unnecessarily complicated).
  • 71ec5a4: GetWaves() now uses y=None as default instead of earlier y=[]. There was also a bug when y was not empty and do_anomaly=False. This is now corrected.

aostools v2.1.6

06 Sep 22:47
Compare
Choose a tag to compare

This release concentrates on two bugfixes:

  • generally make the function more robust if working with the Southern Hemisphere (commit 87dfaae)
  • pressure units bug in ComputePsi (commit 3b5624a)

aostools v2.1.5

25 May 04:40
Compare
Choose a tag to compare

A few bugfixes, and extended functionality:

  • GetWaves() and ComputeEPDiv() can now receive a list of wave numbers
  • ComputeAnnularMode() now deals with both hemispheres - either explicitly with hemi or implicitly by looking at the sign of latitude inputs
  • eof() can now be calculated based on removing the mean (detrend='constant') or a linear trend (detrend='linear').

aostools v2.1.4

01 Apr 07:53
Compare
Choose a tag to compare

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)).