我想找到一个NCL函数的等效函数(如果存在的话),它返回最接近用户指定的纬度/经度坐标对的二维纬度/经度数组的索引。二维经纬度数据的指数
这是我希望在python中有相当于NCL函数的链接。我怀疑在这一点上不存在,那么如何获得从经/纬度指数的任何提示坐标表示赞赏
https://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml
现在,我有我的坐标值保存到一个文件.NC并阅读:
coords='coords.nc'
fh = Dataset(coords, mode='r')
lons = fh.variables['g5_lon_1'][:,:]
lats = fh.variables['g5_lat_0'][:,:]
rot = fh.variables['g5_rot_2'][:,:]
fh.close()
我想知道一些非常相似的东西。 – CRogers
[NetCDF和Python:找到最接近的lon/lat索引给出实际的lon/lat值]可能的副本(https://stackoverflow.com/questions/33789379/netcdf-and-python-finding-the-closest-lon- LAT-指数给出的-实际-LON-LAT-值) –