- 积分
- 2173
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-5-16
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我是刚开始学的ncl,小白一个。绘制地图出现下面的错误不知道该怎么解决,求各位大神帮帮忙啊!!
ncl 0> ; ------------------------------------------
ncl 1> ; Script : NCLproject1.ncl
ncl 2> ; Created on : 2016-10-16 22:48:41
ncl 3> ; Author : la
ncl 4> ; ------------------------------------------
ncl 5> ; Description:
ncl 6> ; Purpose of the script follows.
ncl 7> ; ------------------------------------------
ncl 8> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
ncl 9> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
ncl 10> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
ncl 11> ;load "$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnmap.ncl"
ncl 12> begin
ncl 13> f=addfile("pres.mon.ltm.nc","r")
ncl 14>
ncl 15> pres= f->pres(0,:,:)
ncl 16>
ncl 17> ;>=========================================================<
ncl 18> wks = gsn_open_wks("png","china_boundary")
ncl 19> gsn_define_colormap( wks ,"gui_default")
ncl 20>
ncl 21>
ncl 22> res = True
ncl 23> res@tiMainString ="china_map"
ncl 24> res@gsnMaximize = True
ncl 25> res@gsnDraw = False
ncl 26> res@gsnFrame = False
res@mpLandFillColor = "white"
res@mpInlandWaterFillColor = "white"
res@mpOceanFillColor = "wncl 27> hite"
ncl 28> ;>--------------------------------------------<
ncl 29> ; set for the map
ncl 30> ;>--------------------------------------------<
ncl 31> res@mpMinLatF = 17.
ncl 32> res@mpMaxLatF = 55.
ncl 33> res@mpMinLonF = 72.
ncl 34> res@mpMaxLonF = 136.
ncl 35>
ncl 36> res@mpFillOn = True
ncl 37> res@mpOutlineOn = False ; Use outlines from shapefile
ncl 38> res@cnFillDrawOrder = "PreDraw"
ncl 39> res@mpDataBaseVersion = "MediumRes"
ncl 40> res@mpDataSetName = "Earth..4"
ncl 41> res@mpAreaMaskingOn = True
ncl 42> res@mpMaskAreaSpecifiers = (/"China","Taiwan","Disputed area between India and China","India:Arunachal Pradesh"/)
ncl 43> res@mpLandFillColor = "white"
ncl 44> res@mpInlandWaterFillColor = "white"
ncl 45> res@mpOceanFillColor = "white"
ncl 46> res@mpOutlineBoundarySets = "NoBoundaries"
ncl 47> ;>--------------------------------------------<
ncl 48> ;set for the plot
ncl 49>
ncl 50> res@cnFillOn = True
ncl 51>
ncl 52> res@cnLinesOn = False
ncl 53>
ncl 54> res@cnLevelSpacingF = 20.
ncl 55>
ncl 56> res@gsnSpreadColors = True
ncl 57>
ncl 58> res@lbLabelAutoStride = True
ncl 59> map=gsn_csm_contour_map(wks,pres,res)
ncl 60> ;>============================================================<
ncl 61> ; add China map
ncl 62> ;>------------------------------------------------------------<
ncl 63>
ncl 64> cnres = True
ncl 65> cnres@china = True ;draw china map or not
ncl 66> cnres@river = True ;draw changjiang&huanghe or not
ncl 67> cnres@province = True ;draw province boundary or not
ncl 68> cnres@nanhai = True ;draw nanhai or not
ncl 69>
ncl 70> cnres@diqu = False ; draw diqujie or not
ncl 71>
ncl 72> chinamap = add_china_map(wks,map,cnres)
ncl 73> ;>============================================================<
ncl 74>
ncl 75>
ncl 76> draw(map)
ncl 77> frame(wks)
ncl 78> end
fatal:Undefined identifier: (add_china_map) is undefined, can't continue
fatal:["Execute.c":8576]:Execute: Error occurred at or near line 72
|
|