- 积分
- 76
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2018-1-8
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 郑锦文 于 2020-4-15 16:21 编辑
想利用shapefile处理掉轮廓外的数据,但程序一直报错。
程序如下:
load "$NCARG_ROOT/shapefile_utils.ncl"
begin
f=addfile("/home/Administrator/1958-2019Q1Q2.nc", "r") ;打开NC文件
q1w=f->q1w ;读取数据
shapefile="/home/Administrator/qing3.shp"
print(shapefile)
print_shapefile_info(shapefile)
plot_shapefile(shapefile)
opt = True
opt@return_mask = True
opt@shape_var = "W1102WB0_1"
opt@shape_names = "青藏高原"
land_mask=shapefile_mask_data(q1w,"shapefile",opt)q1w_mask=where(land_mask.eq.1,q1w,q1w@_FillValue)
copy_VarMeta(q1w,q1w_mask)
pcp=prcp_land_mask
print(pcp)
end
报错信息为:
shapefile_mask_data : Error: The given variable name to use does not exist on the given shapefile.
我反复检查过了,但还是找不出问题所在,各位大佬帮帮忙吧
|
|