- 积分
- 25857
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-8-28
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
用站点数据插值后,如何把中国范围外的等值线去掉??
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
fn = "station.txt"
ncols = numAsciiCol(fn)
nrows = numAsciiRow(fn)
station = asciiread(fn ,(/nrows,ncols/),"float")
lon = new(160,"float")
lat = new(160,"float")
lon = station(:,1)
lat = station(:,0)
bn = "len.txt"
ncols1 = numAsciiCol(bn)
nrows1 = numAsciiRow(bn)
data = asciiread(bn ,(/nrows1,ncols1/),"float")
len = new(160,"float")
len = data
olon = new(66,"float")
olat = new(40,"float")
data1 = new((/40,66/),"float")
do i=0,65
olon(i) =72+i
end do
do l=0,39
olat(l) = 17+l
end do
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
len@_FillValue = 999999.000000
rscan = (/10,5,3/) ;连续的有效半径大小,最大为10,依次递减
data1 = obj_anal_ic_deprecated(lon,lat,len,olon,olat,rscan, False)
wks = gsn_open_wks ("png","len")
gsn_define_colormap(wks,"BlAqGrYeOrRe")
res = True
res@gsnMaximize = True
res@gsnDraw = False
res@gsnFrame = False
res@mpFillOn = True ; turn on color fill
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes"
;res@mpAreaMaskingOn = True
res@mpMaskAreaSpecifiers = (/"China"/)
res@mpOutlineSpecifiers = (/"China"/)
res@mpLandFillColor = "white"
res@mpInlandWaterFillColor = "white"
res@mpOceanFillColor = "white"
res@mpFillBoundarySets = "NoBoundaries"
res@mpOutlineBoundarySets = "NoBoundaries"
res@mpNationalLineColor = "black"
res@mpProvincialLineColor = "black"
res@mpGeophysicalLineColor = "black"
res@mpNationalLineThicknessF = 2
res@mpProvincialLineThicknessF = 1
res@cnFillOn = True
res@cnFillDrawOrder = "PreDraw"
res@cnLineLabelsOn = False
res@cnLinesOn = True ; turn of contour lines
res@cnLevelSpacingF = 0.5 ; contour spacing
res@lbLabelAutoStride = True
res@pmTickMarkDisplayMode = "Always"
res@lbBoxLinesOn =False
res@gsnAddCyclic =False
res@mpMinLatF=15.
res@mpMaxLatF=55.
res@mpMinLonF=70.
res@mpMaxLonF=140.
map = gsn_csm_contour_map(wks,data1,res)
draw(map)
frame(wks)
end
|
-
|