- 积分
- 3625
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-11-7
- 最后登录
- 1970-1-1
![未绑定新浪微博用户 新浪微博达人勋](source/plugin/sina_login/img/gray.png)
|
GrADS
系统平台: |
cygwins |
问题截图: |
|
问题概况: |
用ESMF_regrid插值,用小范围的数据插值是成功了,但范围放大到省,显示"EMSF_RegridWeightGEN was not successful“。。是什么原因 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
1 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用ESMF_regrid插值,之前用市的小范围的数据插值没问题,但数据范围放大到省,显示"EMSF_RegridWeightGEN was not successful“。。是什么原因
我检查了两个数据的格式。也没有差别啊。。左边为市范围的数据,右边为省范围的数据
最后是我的程序。。希望各位大神帮忙看看是什么原因啦
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/shapefile_mask_data.ncl"
begin
f1 = "E:/cygwin/home/fsxjh/prg/r8_gd.csv"
resWKS= "png"
if(resWKS.eq."png") then
resWKS@wkHeight=1240
resWKS@wkWidth=1754
end if
wks=gsn_open_wks(resWKS,"gd_d_rain")
gsn_define_colormap(wks,"WhiteBlue")
lines = asciiread(f1,-1,"string")
delim = ";"
lon = tofloat(str_get_field(lines,2,delim))
lat = tofloat(str_get_field(lines,3,delim))
data = tofloat(str_get_field(lines,4,delim))
data@_FillValue = -9999
lon!0 = "lon"
lon@long_name = "lon"
lon@units = "degrees-east"
lon&lon = lon
lat!0 = "lat"
lat@long_name = "lat"
lat@units = "degrees_north"
lat&lat = lat
minlat = min(lat)
maxlat = max(lat)
minlon = min(lon)
maxlon = max(lon)
Opt = True
Opt@SrcGridLat = lat
Opt@SrcGridLon = lon
Opt@DstLLCorner = (/floor(minlat*100)/100.0,floor(minlon*100)/100.0/)
Opt@DstURCorner = (/floor(maxlat*100)/100.0,floor(maxlon*100)/100.0/)
Opt@DstGridType = "0.002deg" ; destination grid
Opt@ForceOverwrite = True
Opt@Debug = True
Opt@InterpMethod = "patch"
data_regrid = ESMF_regrid(data,Opt)
shp_filename = "gis/guangdong/guangdong.shp"
data_mask = shapefile_mask_data(data_regrid,shp_filename,True)
res = True
res@gsnDraw = False
res@gsnFrame = False
res@gsnMaximize = True
res@gsnAddCyclic = False
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes"
res@mpOutlineOn = False
res@mpMinLatF = 20.1
res@mpMaxLatF = 25.7
res@mpMinLonF = 109.2
res@mpMaxLonF = 117.5
res@mpLandFillColor ="White"
res@tmXBOn = False
res@tmYLOn = False
res@mpGeophysicalLineThicknessF= 2.
res@mpNationalLineThicknessF= 2.
;res@mpLimitMode = "LatLon"
;res@mpLambertParallel1F = .001
;res@mpLambertParallel2F = 89.999
res@cnFillOn = True
res@cnLinesOn = True
res@cnLineLabelInterval =1
res@cnLevelSelectionMode = "ExplicitLevels"
res@cnLevels = (/0,1,10,25,50,75,100,150,200,250/)
res@gsnSpreadColors = True ; use full range of colormap
res@lbBoxLinesOn = False
res@lbOrientation = "vertical"
res@pmTickMarkDisplayMode = "Always"
res@cnSmoothingOn = True
res@cnSmoothingDistanceF = 0.001
res@cnSmoothingTensionF = -2.5
res@lbBoxLinesOn = False
res@lbOrientation = "vertical"
map_mask = gsn_csm_contour_map(wks,data_mask,res)
lnres = True
lnres@gsLineColor = "Black"
lnres@gsLineThicknessF = 3.0
line_mask = gsn_add_shapefile_polylines(wks, map_mask, shp_filename, lnres)
draw(map_mask)
frame(wks)
end
|
|