- 积分
- 14512
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-4-30
- 最后登录
- 1970-1-1
|
NCL
系统平台: |
NCL |
问题截图: |
- |
问题概况: |
ncl运行老出现同坐标设置的问题,用到的插值函数(反距离插值),已查阅了大量帖子,还是没解决,希望大家帮忙看看,感激不尽。 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
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"
begin
fname1="163zhan-yearlyrain-qushixishu.txt"
lines1 = asciiread(fname1,(/163,4/),"float")
station=lines1(:,0)
lat = lines1(:,2)
lon = lines1(:,1)
pwv1 = lines1(:,3)
; print(pwv1)
olat=new((/15/),float)
olon=new((/45/),float)
loninc=1.0/44
latinc=1.0/14
ii=fspan(0.0,44.0,45)
ll=fspan(0.0,14.0,15)
olat=latinc*ll
olon=loninc*ii
olon!0 = "lon"
olon@long_name ="lon"
olon@units = "degrees-east"
olon&lon = olon
olat!0 = "lat"
olat@long_name ="lat"
olat@units = "degrees_north"
olat&lat = olat
dssetp("exp",0.5)
opwv1=dsgrid2(lon,lat,pwv1,olon,olat)
opwv1!0 = "lon"
opwv1!1 = "lat"
opwv1&lat = olat
opwv1&lon = olon
print(opwv1)
printVarSummary(opwv1)
;---Plotting section
wks = gsn_open_wks("pdf","163zhan-qushixishu-spatial-distribution")
gsn_define_colormap(wks,"GMT_gray")
res = True
res@gsnAddCyclic =False
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes"
res@mpOutlineOn =True
res@mpOutlineSpecifiers =(/"China:states","Taiwan"/)
res@mpMinLatF = 30 ; Asia limits
res@mpMaxLatF = 50
res@mpMinLonF = 74
res@mpMaxLonF = 121
res@mpProjection ="LambertConformal"
res@mpLambertMeridianF =110.0
res@mpLimitMode = "LatLon"
res@mpLambertParallel1F =.001 ;Default:.001
res@mpLambertParallel2F =89.999 ;Default: 89.999
res@cnFillOn = True
res@cnLinesOn =False
res@cnLineLabelsOn = False
res@cnFillDrawOrder ="PreDraw" ; draw contoursfirst
res@cnLevelSelectionMode ="ExplicitLevels" ; setexplicit contour levels
res@cnLevels = (/-1.,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1./) ; set levels
res@cnFillColors =(/1,2,3,4,5,6,7,8,9,10,11/) ; set the colors to beused
map = gsn_csm_contour_map(wks,opwv1,res)
end
问题:
(0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
|
|