我想简单地将一个数据集的经纬度值重新网格到另一个数据集上,它会因坐标不匹配错误而失败。有没有人有解决这个问题的任何提示?
我已将代码和多维数据集描述放在最后。
谢谢!
>>> esm_height = iris.load_cube('model_data/u-bl658/height.nc')
>>> ncepncar_clusters = iris.load('ncepncar/clusters.nc')
>>> foo = esm_height[0].regrid(ncepncar_clusters[0], iris.analysis.Linear())
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-40-c90265ebff43> in <module>
----> 1 foo = esm_height[0].regrid(ncepncar_clusters[0], iris.analysis.Linear())
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/kidson2/lib/python3.8/site-packages/iris/cube.py in regrid(self, grid, scheme)
3802 """
3803 regridder = scheme.regridder(self, grid)
-> 3804 return regridder(self)
3805
3806
/nesi/nobackup/niwa00013/williamsjh/miniconda3/envs/kidson2/lib/python3.8/site-packages/iris/analysis/_regrid.py in __call__(self, src)
943 "matching coordinate metadata.")
944 elif src_cs is None or grid_cs is None:
--> 945 raise ValueError("The rectilinear grid coordinates of the given "
946 "cube and target grid must either both have "
947 "coordinate systems or both have no coordinate "
ValueError: The rectilinear grid coordinates of the given cube and target grid must either both have coordinate systems or both have no coordinate system but with matching coordinate metadata.