- 积分
- 25858
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-8-28
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2017-3-20 21:41:37
|
显示全部楼层
你好,还有一个小问题:
begin
f=addfile("pres.mon.ltm.nc","r")
pres= f->pres(0,:,:)
;---------------------------------------------------------------
wks = gsn_open_wks("png","jiangsu")
gsn_define_colormap( wks ,"gui_default")
res = True
res@gsnMaximize = True
res@gsnDraw = False
res@gsnFrame = False
;---------------------------------------------------------------
; Mask Beijing plot
; set for the map
res@mpMinLatF = 30
res@mpMaxLatF = 36
res@mpMinLonF = 115
res@mpMaxLonF = 125
res@mpFillOn = True
res@mpDataSetName = "Earth..4"
res@mpDataBaseVersion = "MediumRes" ; or "Ncarg4_1"
res@mpAreaMaskingOn = True
res@mpOutlineSpecifiers = "Jiangsu"
res@mpMaskAreaSpecifiers = "Jiangsu"
res@mpLandFillColor = "white"
res@mpOceanFillColor = "white"
res@mpProvincialLineColor = "red"
res@mpProvincialLineThicknessF = 2.
res@mpShapeMode = "FreeAspect"
res@mpFillDrawOrder = "PostDraw"
;---------------------------------------------------------------
; set for the plot
res@cnFillOn = True
res@cnFillDrawOrder = "PreDraw"
res@cnLinesOn = False
res@cnLevelSpacingF = 20.
res@gsnSpreadColors = True
res@lbLabelAutoStride = True
res@pmTickMarkDisplayMode = "Always"
res@gsnRightString = "hPa"
res@gsnLeftString = "Surface pressure in Beijing with NCL Mask"
map4 = gsn_csm_contour_map(wks,pres,res)
;--- add shp file boundaries to test whether the border overlap---
ShpDir = "C:/cygwin/usr/local/ncl/lib/ncarg/nclscripts/cnmap/" ;"$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/"
cnres = True
cnres@gsLineThicknessF = 1.5
cnres@gsLineColor = "blue"
getvalues map4
"mpMinLatF" : cnres@minlat
"mpMaxLatF" : cnres@maxlat
"mpMinLonF" : cnres@minlon
"mpMaxLonF" : cnres@maxlon
end getvalues
plotshp = gsn_add_shapefile_polylines(wks,map4,ShpDir+"county_2004.shp",cnres)
;---------------------------------------------------------------
draw(map4)
frame(wks)
end
怎么把江苏以外的中国轮廓线去掉呢?
谢谢!
|
-
|