爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: 尽头的尽头

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

    [复制链接]

新浪微博达人勋

发表于 2020-3-12 16:31:54 | 显示全部楼层
尽头的尽头 发表于 2013-5-21 10:58
单个省的很简单,NCL自带的有每个省的底图,调用就可以了,做这个的原因是因为他们把我们国家和印度的争 ...

你好,那我想提取青藏高原的话,需要怎么做呢
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-3-12 17:47:03 | 显示全部楼层
弗兰人 发表于 2020-3-12 16:31
你好,那我想提取青藏高原的话,需要怎么做呢

家园里面有青藏高原的底图,可以搜一下
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-12 18:45:01 | 显示全部楼层
尽头的尽头 发表于 2020-3-12 17:47
家园里面有青藏高原的底图,可以搜一下

刚刚看到啦。我可以再问你个问题吗,就是ncl怎么生成格点分布图呢
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-15 17:37:46 | 显示全部楼层
谢谢楼主,下载了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-16 17:33:12 | 显示全部楼层
本帖最后由 puyiliang 于 2020-3-16 17:42 编辑

楼主,你好。我之前有用过您这个方法,实在linux系统的ncl完全没有问题。但是现在在windows下6.6.2版本采用您这个方法出现错误。您能帮忙看看嘛?这是我把文件放入的地方,
111.png
运行您的例子会报错:shp文件格式出错??
warning:_NclOpenFile: Can not open file </usr/local/lib/ncarg/nclscripts/cnmap/cnmap.shp>; file format not supported or file is corrupted
(0)     Error: gsn_add_shapefile_polylines: Can't open shapefile '$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnmap.shp'
(0)            No shapefile information will be added.
warning:_NclOpenFile: Can not open file </usr/local/lib/ncarg/nclscripts/cnmap/river.shp>; file format not supported or file is corrupted
(0)     Error: gsn_add_shapefile_polylines: Can't open shapefile '$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/river.shp'
(0)            No shapefile information will be added.
warning:_NclOpenFile: Can not open file </usr/local/lib/ncarg/nclscripts/cnmap/cnhimap.shp>; file format not supported or file is corrupted
(0)     Error: gsn_add_shapefile_polylines: Can't open shapefile '$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnhimap.shp'
(0)            No shapefile information will be added.
warning:_NclOpenFile: Can not open file </usr/local/lib/ncarg/nclscripts/cnmap/cnmap.shp>; file format not supported or file is corrupted
(0)     Error: gsn_add_shapefile_polylines: Can't open shapefile '$NCARG_ROOT/lib/ncarg/nclscripts/cnmap/cnmap.shp'
(0)            No shapefile information will be added.
warning:New: Could not coerce missing value parameter into appropriate type, using default
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
warning:New: Could not coerce missing value parameter into appropriate type, using default
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
warning:New: Could not coerce missing value parameter into appropriate type, using default
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
warning:New: Could not coerce missing value parameter into appropriate type, using default
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.
(0)     totype: warning: cannot convert input variable type <graphic> to type: <graphic>
(0)        The original type: <graphic> will be returned.


密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-3-16 19:50:51 | 显示全部楼层
puyiliang 发表于 2020-3-16 17:33
楼主,你好。我之前有用过您这个方法,实在linux系统的ncl完全没有问题。但是现在在windows下6.6.2版本采用 ...

SHP,DBF几个文件都必须有,你复制其中一个过去当然不行
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-18 08:25:25 | 显示全部楼层
尽头的尽头 发表于 2020-3-16 19:50
SHP,DBF几个文件都必须有,你复制其中一个过去当然不行

你好。楼主,我可能没说清楚,我是整个文件夹复制的,shp,dbf和shx,prj都在指定文件夹的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2020-3-18 09:23:07 | 显示全部楼层
puyiliang 发表于 2020-3-18 08:25
你好。楼主,我可能没说清楚,我是整个文件夹复制的,shp,dbf和shx,prj都在指定文件夹的

检查一下路径啥的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-21 22:01:15 | 显示全部楼层
这个内测数据在哪里下载呀
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2020-3-22 10:59:43 | 显示全部楼层
楼主求助,我按照这个来编写了一段程序,但是都会有警告
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
  load "$NCARG_ROOT/lib/ncarg/nclscripts/cnmap.ncl"
  begin
  ;================read
f1= addfile("d:/changshui/1800.pressure.nc","r")
f2= addfile("d:/changshui/1800uv.nc","r")
f3= addfile("d:/changshui/1800.2m.t.nc","r")

sp=short2flt(f1->sp(28,:,:))
sp1=sp
sp1=sp/100
t2m=short2flt(f3->t2m(28,:,:))
t2m_1=t2m
t2m_1=t2m-273.15
u10=short2flt(f2->u10(28,:,:))
v10=short2flt(f2->v10(28,:,:))
;printVarSummary(t2m)
time=f1->time
tim= cd_calendar(time,-1)
;print(tim)
;printVarSummary(hgt)
;exit
;printMinMax (t2m, False)
;=================================================================plot
wks = gsn_open_wks("eps","dimian")
res0                   = True
res0@tiMainString     = " dimian"
;res0@gsnLeftString     = "sp"
res0@gsnRightString    = "Wind"
res0@gsnDraw            =False
res0@gsnFrame          =False  
res0@mpFillOn     = False
res0@mpOutlineOn  = True
res0@mpMinLonF         = 80
res0@mpMaxLonF         = 119.8
res0@mpMinLatF         =10
res0@mpMaxLatF         = 44.75
res0@gsnAddCyclic      =False
res0@cnLineThicknessF  =3
;res0@cnFillOn           = True
res0@cnLevelSelectionMode = "ManualLevels"
;res0@cnLineLabelInterval   = 1
res0@cnLevelSpacingF     =20

res0@china     = True       ;draw china map or not
res0@river     = True       ;draw changjiang&huanghe or not
res0@province  = True       ;draw province boundary or not
;res0@nanhai    = True       ;draw nanhai or not
res0@diqu      = False       ; draw diqujie or no

plot=gsn_csm_contour_map_ce(wks,sp1,res0)

;===============================================================res
res                      = True               ; plot mods desired
res@gsnDraw            =False
res@gsnFrame          =False
res@vcRefMagnitudeF           = 6.5             ; define vector ref mag
res@vcRefLengthF              =  0.035   ; define length of vec
res@vcRefAnnoOrthogonalPosF   = -1.2  
res@vcRefAnnoArrowLineColor   = "purple"         ; change ref vector color
res@vcRefAnnoArrowUseVecColor = False           ; don't use vec color for ref
res@vcMinDistanceF           = 0.03          ; thin vectors
res@vcLineArrowColor        = "purple"           ; change vector color
res@vcLineArrowThicknessF   =2.0              ; change vector thickness
res@vcLineArrowHeadMaxSizeF=0.01
res@vcRefAnnoString2On     =True
res@vcRefAnnoString2       ="m/s"

res@gsnLeftString     = ""
res@gsnRightString    = ""
plot1=gsn_csm_vector(wks,u10,v10,res)
overlay(plot,plot1)

res2     =True
res2@gsnDraw  =False
res2@gsnFrame  =False
res2@cnFillOn =True
res2@cnLineThicknessF  =1.5
res2@gsnRightString  ="~F35~J~F~C"
res2@cnLevelSelectionMode = "ManualLevels"
res2@cnLevelSpacingF     = 4
res2@cnFillColor ="red"
plot2=gsn_csm_contour(wks, t2m_1, res2)
overlay(plot, plot2)

draw(plot)    ; This will draw everything
frame(wks)

               
end


我也不知道怎么回事,求助大佬!我这个风速风向图也出不来了,不知道为啥
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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