attributes - 整合xarray的属性

标签 attributes python-xarray integrate

我是 xarray 的新手,需要它来处理更大的 netcdf 文件。我有一个维度为“时间”、“水平”、“纬度”和“经度”的维度。我尝试沿着下面的“级别”维度进行集成,并收到错误消息“DataArray”对象没有属性“集成”。来自 this page我明白确实如此。下面的代码非常简单。感谢您的帮助。

dataDIR = basedir + 'vt_' + str(yr) + monstr + '_sub.nc'
DS = xr.open_dataset(dataDIR)
vt = DS.v
ivt = vt.integrate('level')

最佳答案

Xarray v0.12 中添加了 integrate 方法。升级到(至少)该版本应该可以解决您的问题。

pip install -U xarray

conda update -c conda-forge xarray

关于attributes - 整合xarray的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58905249/

相关文章:

c# ambiguous 属性

C#:TypeDescriptor.GetAttributes() 和 GetType().GetCustomAttributes 之间有什么区别?

c# - jQuery如何在删除属性之前检查属性是否存在

python - 取 pandas groupby 中不同大小的组之间的差异

wolfram-mathematica - Wolfram-Mathematica 中符号积分的解决方案

python - Python 中的属性访问 : first slots, 然后 __dict__?

python-xarray - 在时间维度中对 xarray 数据集或数据数组进行子集化

python - xarray : Larger than memory array using map_blocks dumping results into . zarr 商店

matlab - 关于在 MATLAB 中使用四元组

javascript - 在同一个 php 文件中使用 js 加载