爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: 尽头的尽头

[作图] (更新)最最最准确的中国地图(附带南海,精确到市界)

    [复制链接]

新浪微博达人勋

 楼主| 发表于 2018-7-11 20:46:51 | 显示全部楼层
我看路曼曼 发表于 2018-7-11 20:21
为什么我画出的南海区域 一直在图的中间, 请问各位大神如何改变他的位置?

可以自己调整一下
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-11 21:54:46 | 显示全部楼层

不好意思,再次请问,我画出的小图里面怎么没有南海九段线啊
1531317226(1).png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-11 21:59:18 | 显示全部楼层

; Set some map information ; line and text information
  mpres = True
  mpres@mpFillOn = True
  mpres@mpFillColors  = (/"background","DeepSkyBlue","ForestGreen","DeepSkyBlue", "transparent"/)
  mpres@mpDataBaseVersion="MediumRes"
  mpres@mpDataSetName="/nuist/p/work/syq1010/database/Earth..4"
  mpres@mpAreaMaskingOn            = True
;  mpres@mpMaskAreaSpecifiers       = (/"China"/)
  mpres@mpOutlineSpecifiers        = (/"China","China:Provinces"/)
  mpres@mpOutlineBoundarySets     = "NoBoundaries"
  mpres@mpInlandWaterFillColor     = "white"
  mpres@mpLandFillColor            = "ForestGreen"
  mpres@mpGeophysicalLineColor      = "Black"
   mpres@mpNationalLineColor         = "Black"
   mpres@mpProvincialLineColor      = "black"
   mpres@mpUSStateLineColor          = "Black"
;   mpres@mpGridLineColor             = "Black"
   mpres@mpLimbLineColor             = "Black"
   mpres@mpPerimLineColor            = "Black"
     mpres@mpGeophysicalLineThicknessF = 1
   mpres@mpGridLineThicknessF        = 1
   mpres@mpLimbLineThicknessF        = 1
   mpres@mpNationalLineThicknessF    = 1
   mpres@mpUSStateLineThicknessF     = 1
   mpres@mpProvincialLineThicknessF = 1
;  mpres@NoHeaderFooter =True
   mpres@Footer = False  


;--- add South China Sea ---
  res=True
  nhres                          = res
  nhres@gsnMaximize              = False
  nhres@gsnFrame                 = False
  nhres@gsnDraw                  = False

  nhres@vpHeightF                = 0.17   
  nhres@vpWidthF                 = 0.17

  nhres@mpMinLatF                =   2.0   
  nhres@mpMaxLatF                =  23.0
  nhres@mpMinLonF                = 105.0
  nhres@mpMaxLonF                = 123.0

    getvalues mp
    "mpDataSetName"              : nhres@mpDataSetName
    "mpDataBaseVersion"          : nhres@mpDataBaseVersion
    "mpFillOn"                   : nhres@mpFillOn
    "mpAreaMaskingOn"            : nhres@mpAreaMaskingOn
    "mpOutlineSpecifiers"        : nhres@mpOutlineSpecifiers
    "mpOutlineBoundarySets"      : nhres@mpOutlineBoundarySets  
    "mpLandFillColor"            : nhres@mpLandFillColor          
    "mpInlandWaterFillColor"     : nhres@mpInlandWaterFillColor
    "mpNationalLineColor"        : nhres@mpNationalLineColor   
    "mpProvincialLineColor"      : nhres@mpProvincialLineColor
  end getvalues

;  nhres@lbLabelBarOn             = False
  nhres@tmXBOn                   = False
  nhres@tmXTOn                   = False
  nhres@tmYLOn                   = False
  nhres@tmYROn                   = False
  nhres@gsnLeftString            = ""
  nhres@gsnRightString           = ""

  map_nanhai = gsn_csm_map(wks,nhres)

  amres                          = True
  amres@amParallelPosF           = 0.34 ; -0.5 is the left edge of the plot. from roughly -0.5 to 0.5
  amres@amOrthogonalPosF         = 0.49  ; -0.5 is the top edge of the plot.
  amres@amJust                   = "BottomRight"   

  plotnh = gsn_add_annotation(mp,map_nanhai,amres)

密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-7-12 08:17:36 | 显示全部楼层
我看路曼曼 发表于 2018-7-11 21:59
; Set some map information ; line and text information
  mpres = True
  mpres@mpFillOn = True

NCL自带的地图肯定没有九段线啊
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-12 09:45:56 | 显示全部楼层
尽头的尽头 发表于 2018-7-12 08:17
NCL自带的地图肯定没有九段线啊

感谢您的回复,问题解决了。
非常感谢
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-21 22:16:51 | 显示全部楼层
超级超级感谢大神们的无私奉献
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-24 16:30:58 | 显示全部楼层
hzwjy 发表于 2012-12-20 20:46
这个不错。
如果用NCL 6.1,用shapefile来添加中国国境线、省界什么的都是很简单的。

您好,这个shapefile可以分享下吗 谢谢 我把站点插值到格点上出现数值超出边界怎么改 123.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-24 16:53:14 | 显示全部楼层
感谢大神的分享 我用这个cnmap画出了中国地图如下图,我想问怎么只显示中国的地图,旁边的那些怎么去掉? 1.png
我的脚本如下:
res=True
res@gsnDraw                        = False
res@gsnFrame                       = False
res@mpMinLatF         = min_lat
res@mpMaxLatF         = max_lat
res@mpMinLonF         = min_lon
res@mpMaxLonF         = max_lon
res@pmTickMarkDisplayMode="Always"

res@mpDataSetName               = "Earth..4"
res@mpDataBaseVersion           = "Ncarg4_1"
res@mpFillDrawOrder             = "PreDraw"
res@mpFillOn                    = True
res@mpLandFillColor             = "white"
res@gsnLeftString="station"
res@mpAreaMaskingOn=True
res@mpOutlineOn=True
map=gsn_csm_map(wks,res)
;;;;;;;;;绘制站点
mkres=True
mkres@gsMarkerColor="green"
mkres@gsMarkerSizeF=0.003
mkres@gsMarkerIndex=16
  dum=gsn_add_polymarker(wks,map,lon,lat,mkres)
;;;;添加中国地图和河流
cnres           = True
cnres@china     = True       ;draw china map or not
cnres@river     = True       ;draw changjiang&huanghe or not
cnres@province  = False     ;draw province boundary or not
cnres@nanhai    = False     ;draw nanhai or not
cnres@diqu      = False       ; draw diqujie or not
chinamap = add_china_map(wks,map,cnres)
draw(map)
frame(wks)
end

谢谢您了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2018-7-24 17:48:10 | 显示全部楼层
subtropical 发表于 2018-7-24 16:53
感谢大神的分享 我用这个cnmap画出了中国地图如下图,我想问怎么只显示中国的地图,旁边的那些怎么去掉?
...

res@mpOutlineOn=True这个设置成False试试
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-7-24 18:29:30 | 显示全部楼层
尽头的尽头 发表于 2018-7-24 17:48
res@mpOutlineOn=True这个设置成False试试

哇哦 大神果然厉害 谢谢,还想请教一个问题,我把站点降水资料插值成格点画图,结果如图所示,我要怎么把超出边界的去掉?谢谢您 1.png
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表