Contributing

This section will be expanded later. For now it lists docstrings for a number of internal variables, classes and functions.

Variables

cf_xarray.accessor._AXIS_NAMES = ('X', 'Y', 'Z', 'T')

axis names understood by cf_xarray

cf_xarray.accessor._CELL_MEASURES = ('area', 'volume')

Cell measures understood by cf_xarray.

cf_xarray.accessor._COORD_NAMES = ('longitude', 'latitude', 'vertical', 'time')

coordinate types understood by cf_xarray.

cf_xarray.accessor._WRAPPED_CLASSES = (<class 'xarray.core.resample.Resample'>, <class 'xarray.core.groupby.GroupBy'>, <class 'xarray.core.rolling.Rolling'>, <class 'xarray.core.rolling.Coarsen'>, <class 'xarray.core.weighted.Weighted'>)

Classes wrapped by cf_xarray.

Attribute parsing

This dictionary contains criteria for identifying axis and coords using CF attributes. It was copied from MetPy

_CoordinateAxisType

axis

cartesian_axis

grads_dim

long_name

positive

standard_name

units

T

Time

T

T

t

time

time

X

GeoX

X

X

x

cell index along first dimension, grid_longitude, projection_x_angular_coordinate, projection_x_coordinate

grid_longitude, projection_x_angular_coordinate, projection_x_coordinate

Y

GeoY

Y

Y

y

cell index along second dimension, grid_latitude, projection_y_angular_coordinate, projection_y_coordinate

grid_latitude, projection_y_angular_coordinate, projection_y_coordinate

Z

GeoZ, Height, Pressure

Z

Z

z

atmosphere_hybrid_height_coordinate, atmosphere_hybrid_sigma_pressure_coordinate, atmosphere_ln_pressure_coordinate, atmosphere_sigma_coordinate, atmosphere_sleve_coordinate, model_level_number, ocean_double_sigma_coordinate, ocean_s_coordinate, ocean_s_coordinate_g1, ocean_s_coordinate_g2, ocean_sigma_coordinate, ocean_sigma_z_coordinate

atmosphere_hybrid_height_coordinate, atmosphere_hybrid_sigma_pressure_coordinate, atmosphere_ln_pressure_coordinate, atmosphere_sigma_coordinate, atmosphere_sleve_coordinate, model_level_number, ocean_double_sigma_coordinate, ocean_s_coordinate, ocean_s_coordinate_g1, ocean_s_coordinate_g2, ocean_sigma_coordinate, ocean_sigma_z_coordinate

latitude

Lat

latitude

latitude

degreeN, degree_N, degree_north, degreesN, degrees_N, degrees_north

longitude

Lon

longitude

longitude

degreeE, degree_E, degree_east, degreesE, degrees_E, degrees_east

time

Time

T

T

t

time

time

vertical

air_pressure, altitude, depth, geopotential_height, height, height_above_geopotential_datum, height_above_mean_sea_level, height_above_reference_ellipsoid

down, up

air_pressure, altitude, depth, geopotential_height, height, height_above_geopotential_datum, height_above_mean_sea_level, height_above_reference_ellipsoid

Classes

CFAccessor(obj)

Common Dataset and DataArray accessor functionality.

_CFWrappedClass(towrap, accessor)

This class is used to wrap any class in _WRAPPED_CLASSES.

_CFWrappedPlotMethods(obj, accessor)

This class wraps DataArray.plot

Functions

Primarily for developer reference. Some of these could become public API if necessary.

_getattr(obj, attr, accessor, key_mappers[, ...])

Common getattr functionality.

_getitem()

Index into obj using key.

_get_all(obj, key)

One or more of ('X', 'Y', 'Z', 'T', 'longitude', 'latitude', 'vertical', 'time', 'area', 'volume'), or arbitrary measures, or standard names

_get_axis_coord(obj, key)

Translate from axis or coord name to variable name.

_get_bounds(obj, key)

Translate from key (either CF key or variable name) to its bounds' variable names.

_get_coords(obj, key)

One or more of ('X', 'Y', 'Z', 'T', 'longitude', 'latitude', 'vertical', 'time', 'area', 'volume'), or arbitrary measures, or standard names present in .coords

_get_custom_criteria(obj, key[, criteria])

Translate from axis, coord, or custom name to variable name.

_get_dims(obj, key)

One or more of ('X', 'Y', 'Z', 'T', 'longitude', 'latitude', 'vertical', 'time', 'area', 'volume'), or arbitrary measures, or standard names present in .dims

_get_groupby_time_accessor(obj, key)

Time variable accessor e.g. 'T.month'.

_get_indexes(obj, key)

One or more of ('X', 'Y', 'Z', 'T', 'longitude', 'latitude', 'vertical', 'time', 'area', 'volume'), or arbitrary measures, or standard names present in .indexes

_get_measure(obj, key)

Translate from cell measures to appropriate variable name.

_get_with_standard_name(obj, name)

Get list of variable names with standard name == name.