What’s New#
v0.8.1 (May 9, 2023)#
Stop bundling the standard name table and use
pooch
(new optional dependency) to download when needed. By Deepak Cherian.Major performance improvements. By Deepak Cherian.
Fix bug where code was looking for
T
axis in SGRID info. By Kristen Thyng.Support
X
,Y
for rotated pole grids. By Lars Buntemeyer.
v0.8.0 (Feb 8, 2023)#
Support interpreting SGRID Conventions to identify X, Y, Z axes. By Deepak Cherian.
Add a rich repr. (GH#409). Use
rich.print(ds.cf)
or%load_ext rich
in a Jupyter session to view a much richer representation of the.cf
accessor. By Deepak Cherian.Support interpreting the
grid_mapping
attribute: (GH#391). SeeDataset.cf.grid_mapping_names()
andDataset.cf["grid_mapping"]
,DataArray.cf["grid_mapping"]
. By Lars Buntemeyer and Deepak Cherian.
v0.7.9 (Jan 31, 2023)#
Fix packaging of v0.7.8. That release was yanked off PyPI.
v0.7.8 (Jan 31, 2023)#
Optionally use the regex package to continue supporting global flags in regular expressions that are not at start of pattern (GH#408). By Kristen Thyng
Added link to docs for a new example “COSIMA ocean-sea ice model demo” (GH#397). By Aidan Heerdegen
v0.7.7 (Jan 14, 2023)#
Fix to
geometry.points_to_cf
to support shapely 2.0. (GH#386). By Pascal Bourgault
v0.7.6 (Dec 07, 2022)#
Fix to
cf.add_bounds
to support all types of curved grids (GH#376). By Pascal BourgaultAllow custom criteria to match the variable name of DataArray objects (GH#379). By Mathias Hauser
Support new Xarray indexes API when creating MultiIndex for “compression by gathering” datasets. (GH#381). By Deepak Cherian
v0.7.5 (Nov 15, 2022)#
cf.add_bounds
can estimate 2D bounds using an approximate linear interpolation (GH#370). By Pascal Bourgault.Improve detection of bounds order by rellaxing check a bit (GH#361). By Lars Buntemeyer.
Performance improvements. (GH#358). By Luke Davis
Fix coordinate/axis detection (GH#359). By Martin Schupfner
v0.7.4 (July 14, 2022)#
Major performance improvement for
__getitem_
(GH#349). By Deepak Cherian.Raise warning instead of error with malformed
cell_measures
attributes. Warnings now print names of variables with malformed attributes (GH#350). By Deepak Cherian.
v0.7.3 (June 30, 2022)#
Dataset.cf.guess_coord_axis()
now skips known axes/coordinates and only returns a single guess per variable. Additional attributes such as units must be added to known axes/coordinates usingDataset.cf.add_canonical_attributes()
. By Mattia Almansi.Increased support for
cf_role
variables. AddedDataset.cf.cf_roles
By Deepak Cherian.
v0.7.2 (April 5, 2022)#
added encoder and decoder for writing pandas MultiIndex-es to file using “compression by gathering”. See Encoding and decoding for more. By Deepak Cherian.
added another type of vertical coordinate to decode:
ocean_sigma_coordinate
. By Kristen Thyng.
v0.7.0 (January 24, 2022)#
Many improvements to autoguessing for plotting. By Deepak Cherian
Fix detection of datetime-like variables. By Romain Caneill
Integrate more unit aliases from
xclim
(Thanks!). By Deepak CherianSignificantly expanded and improved documention. By Deepak Cherian.
integrate
xclim
’s CF-compliant unit formatter. GH#278. By Justus Magin.
v0.6.3 (December 16, 2021)#
Packaging improvements. By Filipe Fernandes.
cf_xarray now works with Datasets created using
_to_temp_dataset
. By Pascal Bourgault.
v0.6.2 (December 7, 2021)#
Various bug fixes.
New
cf_xarray.geometry
submodule with functionsshapely_to_cf`()
andcf_to_shapely()
to convert between CF-compliant geometry datasets and DataArrays storing shapely geometries (new optional dependency). By Pascal Bourgault.
v0.6.1 (August 16, 2021)#
Support detecting pint-backed Variables with units-based criteria. By Deepak Cherian.
Support reshaping nD bounds arrays to (n-1)D vertex arrays. By Deepak Cherian.
Support rich comparisons with
DataArray.cf
andDataArray.cf.isin()
for flag variables. By Deepak Cherian and Julius Busecke
v0.6.0 (June 29, 2021)#
Support indexing by
cf_role
attribute. By Deepak Cherian.Implemented
Dataset.cf.add_canonical_attributes()
andDataArray.cf.add_canonical_attributes()
to add CF canonical attributes. By Mattia Almansi.Begin adding support for units with a unit registry for pint arrays. GH#197. By Jon Thielen and Justus Magin.
Dataset.cf.rename_like()
also updates thebounds
andcell_measures
attributes. By Mattia Almansi.Support of custom vocabularies/criteria: user can input criteria for identifying variables by their name and attributes to be able to refer to them by custom names like ds.cf[“ssh”]. GH#234. By Kristen Thyng and Deepak Cherian.
v0.5.2 (May 11, 2021)#
Add some explicit support for CMIP6 output. By Deepak Cherian.
Replace the
dims
argument ofDataset.cf.add_bounds()
withkeys
, allowing to use CF keys. By Mattia Almansi.Added
DataArray.cf.formula_terms
andDataset.cf.formula_terms
. By Deepak Cherian.Added
Dataset.cf.bounds
to return a dictionary mapping valid keys to the variable names of their bounds. By Mattia Almansi.DataArray.cf.differentiate()
andDataset.cf.differentiate()
can optionally correct sign of the derivative by interpreting the"positive"
attribute. By Deepak Cherian.
v0.5.1 (Feb 24, 2021)#
Minor bugfix release, thanks to Pascal Bourgault.
v0.5.0 (Feb 24, 2021)#
Replace
cf.describe()
withDataset.cf.__repr__()
. By Mattia Almansi.Automatically set
x
ory
forDataArray.cf.plot
. By Deepak Cherian.Added scripts to document coordinate and axes criteria with tables. By Mattia Almansi.
Support for
.drop_vars()
,.drop_sel()
,.drop_dims()
,.set_coords()
,.reset_coords()
. By Mattia Almansi.Support for using
standard_name
in more functions. (GH#128) By Deepak CherianAllow
DataArray.cf.__getitem__()
with standard names. By Deepak CherianRewrite the
values
ofDataset.coords
andDataset.data_vars
with objects returned byDataset.cf.__getitem__()
. This allows extraction of DataArrays when there are clashes between DataArray names and “special” CF names likeT
. (GH#129, GH#130). By Deepak CherianRetrieve bounds dimension name with
Dataset.cf.get_bounds_dim_name()
. By Pascal Bourgault.Fix iteration and arithmetic with
GroupBy
objects. By Deepak Cherian.
v0.4.0 (Jan 22, 2021)#
Support for arbitrary cell measures indexing. By Mattia Almansi.
Avoid using
grid_latitude
andgrid_longitude
for detecting latitude and longitude variables. By Pascal Bourgault.
v0.3.1 (Nov 25, 2020)#
Support
Dataset.cf.cell_measures
. By Deepak Cherian.Added
Dataset.cf.axes
to return a dictionary mapping available Axis standard names to variable names of an xarray object,Dataset.cf.coordinates
for Coordinates,Dataset.cf.cell_measures
for Cell Measures, andDataset.cf.standard_names
for all variables. Kristen Thyng and Mattia Almansi.Changed
Dataset.cf.get_valid_keys()
toDataset.cf.keys()
. Kristen Thyng.Added
Dataset.cf.decode_vertical_coords()
for decoding of parameterized vertical coordinate variables. (GH#34, GH#103). Deepak Cherian.Added top-level
bounds_to_vertices()
andvertices_to_bounds()
as well asDataset.cf.bounds_to_vertices()
to convert from coordinate bounds in a CF format (shape (nx, 2)) to a vertices format (shape (nx+1)). (GH#108). Pascal Bourgault.
v0.3.0 (Sep 27, 2020)#
This release brings changes necessary to make cf_xarray
more useful with the ROMS
model in particular. Thanks to Kristen Thyng for opening many issues.
vertical
andZ
are not synonyms any more. In particular, the attributepositive: up
now will only matchvertical
and notZ
. Deepak Cherian.Fixed tests that would only pass if ran in a specific order. Julia Kent.
v0.2.1 (Aug 06, 2020)#
Support for the
bounds
attribute. (GH#68, GH#32). Deepak Cherian.Add
Dataset.cf.guess_coord_axis()
to automagically guess axis and coord names, and add appropriate attributes. (GH#67, GH#46). Deepak Cherian.
v0.2.0 (Jul 28, 2020)#
cf_xarray
is now available on conda-forge. Thanks to Anderson Banihirwe and Filipe FernandesRemap datetime accessor syntax for groupby. E.g.
.cf.groupby("T.month")
→.cf.groupby("ocean_time.month")
. (GH#64, GH#6). Julia Kent.Added
Dataset.cf.rename_like()
to rename matching variables. Only coordinate variables i.e. those that match the criteria for("latitude", "longitude", "vertical", "time")
are renamed for now. (GH#55) Deepak Cherian.Added
Dataset.cf.add_bounds()
to add guessed bounds for 1D coordinates. (GH#53) Deepak Cherian.
v0.1.5#
Begin documenting things for contributors in Contributing.
Parse
ancillary_variables
attribute. These variables are converted to coordinate variables.Support
Dataset.reset_index()
Wrap
.sizes
and.chunks
. (GH#42) Deepak Cherian.>>> ds.cf.sizes {'X': 53, 'Y': 25, 'T': 2920, 'longitude': 53, 'latitude': 25, 'time': 2920}
v0.1.4#
Support indexing by
standard_name
Set default
xincrease
andyincrease
by interpreting thepositive
attribute.
v0.1.3#
Support expanding key to multiple dimension names.