Xarray provides pandas-level convenience for working with ultidimensional data. Xarray has two fundamental data structure: a DataArray, which holds a single multi-dimensional variable and its coordinates;
a Dataset, which holds multiple variables that potentially share the same coordinates.
Moreover, a DataArray has four attributes:
- values: a numpy.ndarray holding the array’s values (矩阵数值,例如地表温度具体数值)
- dims: dimension names for each axis (e.g., (‘x’, ‘y’, ‘z’)) (维度名称,如经度、纬度、垂直分层、时间等)
- coords: a dict-like container of arrays (coordinates) that label each * point (e.g., 1-dimensional arrays of numbers, datetime objects or strings) (各维度坐标体系,如时间序列)
- attrs: an OrderedDict to hold arbitrary metadata (attributes) (对各属性的描述)