- 积分
- 32399
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-11
- 最后登录
- 1970-1-1
|
GrADS
系统平台: |
|
问题截图: |
|
问题概况: |
ncl学习还是不够系统,有些问题不知如何解决!想画这样的效果,但是海岸线会画两次!并且会出两张图 |
我看过提问的智慧: |
看过 |
自己思考时长(天): |
2 |
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
具体的脚本
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
filename = "2001-2010.nc"
a = addfile(filename,"r")
mbl = a->MBL(0,:,:) ; read in example data [2D only here]
copy_VarCoords(dstsfmbl,mbl)
type = "ps" ; "pdf" , "ncgm"
wks = gsn_open_wks(type, "china") ; open a file
gsn_define_colormap(wks,"MPL_YlOrBr") ; choose colormap
; Set some basic resources
res = True
res@cnFillOn = True ; turn on color fill
res@mpLandFillColor = "white"
res@gsnSpreadColors = True ; use full range of colors
res@gsnRightString = "t/km~S~2~N~";
res@gsnLeftString ="mbl"
; =================================================;
res@mpMinLatF = 17
res@mpMaxLatF = 55
res@mpMinLonF = 72
res@mpMaxLonF = 136
; =================================================;
res@pmTickMarkDisplayMode = "Always" ;
res@cnLevelSelectionMode = "ExplicitLevels" ; set explicit contour levels
res@cnLevels = (/10,20,50,100,200,500,1000/)
plot = gsn_csm_contour_map_ce(wks,mbl,res) ; Create contour plot
;>============================================================<
; add China map
;>------------------------------------------------------------<
;---Attach the shapefile polylines using files read off gadm.org/country.
china_shp_name=/data/map/bou1_4l.shp"
province_shp_name=/data/map/bou2_4p.shp"
river1_shp_name="/data/map/hyd1_4l.shp"
lnres = True
lnres@gsLineColor = "gray25"
lnres@gsLineThicknessF = 0.5
chi_id = gsn_add_shapefile_polylines(wks,plot,china_shp_name,lnres)
pro_id = gsn_add_shapefile_polylines(wks,plot,province_shp_name,lnres)
ri1_id = gsn_add_shapefile_polylines(wks,plot,river1_shp_name,lnres)
draw(plot) ; This will draw the map and the shapefile outlines.
frame(wks) ; Advance the frame
end
先画了一张没有地形文件的图
|
-
|