爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
楼主: 尽头的尽头

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

    [复制链接]

新浪微博达人勋

发表于 2013-7-17 12:34:39 | 显示全部楼层
好有用,之前老师说NCL画的中国地图国内刊物可能不承认,特别是现在领土主权问题这么严肃的时候,这个真的是太有用了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-7-17 12:54:51 | 显示全部楼层
赞一个,厉害厉害!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-7-17 13:09:27 | 显示全部楼层

嗯,科学没有国界,搞科研的人有自己的国家,支持领土和主权的完整
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-7-24 10:58:17 | 显示全部楼层
您好,好东西,感谢。但是我运用的时候也出现错误了。
ncl obs.ncl
Copyright (C) 1995-2010 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.2.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:syntax error: line 86 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 103 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl

fatal:syntax error: line 204 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 226 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl

fatal:syntax error: line 313 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl before or near [
           delete([
------------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 331 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl

fatal:syntax error: line 425 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 473 in file $NCARG_ROOT/lib/ncarg/nclscripts/cnmap/shp_Function.ncl

fatal:syntax error: function gsn_csm_contour_map expects 3 arguments, got 2
fatal:error at line 110 in file obs.ncl

fatal:Syntax Error in block, block not executed
fatal:error at line 138 in file obs.ncl

所以想请问下,是什么原因,改怎么修改啊?  谢谢。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-7-24 10:59:53 | 显示全部楼层
您好,我单独运行后报的错误为:
ncl shp_Function.ncl
Copyright (C) 1995-2010 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.2.1
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
fatal:syntax error: line 86 in file shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 103 in file shp_Function.ncl

fatal:syntax error: line 204 in file shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 226 in file shp_Function.ncl

fatal:syntax error: line 313 in file shp_Function.ncl before or near [
           delete([
------------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 331 in file shp_Function.ncl

fatal:syntax error: line 425 in file shp_Function.ncl before or near [
          delete([
-----------------^

fatal:error in statement
fatal:Syntax Error in block, block not executed
fatal:error at line 473 in file shp_Function.ncl
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-7-24 15:08:09 | 显示全部楼层
lvchabj 发表于 2013-7-24 10:58
您好,好东西,感谢。但是我运用的时候也出现错误了。
ncl obs.ncl
Copyright (C) 1995-2010 - All Ri ...

把你的代码贴上来看看
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-7-24 17:49:57 | 显示全部楼层
好的,下面是代码哈
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/cnmap/cnmap.ncl"

begin



lines = asciiread("/public/users/chjchen/wrf/ncl/data/obs/13071808.000",-1,"string")

;read from line 11(means: 11+1)

station = stringtofloat(str_get_field(lines(14::),1," "))
lon = stringtofloat(str_get_field(lines(14::),2," "))
lat = stringtofloat(str_get_field(lines(14::),3," "))
height = stringtofloat(str_get_field(lines(14::),4," "))
R  = stringtofloat(str_get_field(lines(14::),5," "))
;cj print(R)

  olon = new(351,"float");
  olat = new(201,"float");
  data1 = new((/201,351/),"float")
  do i=0,350
     olon(i) = 70.0+0.2*(i)
  end do
  do l=0,200
     olat(l) = 15.0+0.2*(l)
  end do

     olon!0          = "lon"
     olon@long_name  = "lon"
     olon@units      = "degrees-east"
     olon&lon        = olon

     olat!0          = "lat"
     olat@long_name  = "lat"
     olat@units      = "degrees_north"
     olat&lat        = olat

  R@_FillValue = 9999.0
;  rscan = (/10,7,4,2,1/)
;  rscan = (/5,4,3,2,1,0.5/)
  rscan = (/3,2,1,0.5,0.25/)
  data1 = obj_anal_ic_deprecated(lon,lat,R,olon,olat,rscan,True)  

  wks_type = "x11"  
  wks = gsn_open_wks(wks_type,13071808.000)   
  gsn_define_colormap(wks,"precip4_11lev")
;  gsn_draw_colormap(wks)
       
  res = True
  res@gsnAddCyclic  = False      
  res@mpDataSetName         = "Earth..4"  
  res@mpDataBaseVersion     = "MediumRes"  
  res@mpOutlineOn           = True      
  res@mpOutlineSpecifiers   = (/"China:states","Taiwan"/)     

  res@mpMinLatF             =  17          ; Asia limits
  res@mpMaxLatF             =  53
  res@mpMinLonF             =  75
  res@mpMaxLonF             = 135

  
  res@mpGeophysicalLineThicknessF= 1.   
  res@mpNationalLineThicknessF= 1.         

  res@mpProjection = "LambertConformal"   ;兰伯特投影
  res@mpLambertMeridianF = 105
  res@mpLimitMode = "LatLon"
  res@mpLambertParallel1F = 29   
  res@mpLambertParallel2F = 29

  
  res@mpAreaMaskingOn = True
  res@mpMaskAreaSpecifiers = (/"China:states","Taiwan"/)  
  res@mpOceanFillColor = 0   
  res@mpInlandWaterFillColor = 0
  

  res@cnLevelSelectionMode = "ExplicitLevels"   
  
  res@cnLevels   =  (/0.1, 10.0, 25., 50.0, 100.0 ,250.0/)

   res@lbLabelBarOn = True      
   res@lbLabelStrings = (/"0.1","10","25","50","100","250"/)
   res@lbOrientation =   "vertical"          ; vertical label bar
   
   res@tiMainFont            = "helvetica"
  res@tiMainOffsetYF        = 0.02  ;set place for main title along Y,offset
  res@tiMainFontHeightF     = 0.02   ;set main title font size

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
cnres = True
cnres@china = True
cnres@river = True
cnres@province = True
cnres@nanhai = True
cnres@diqu = False
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  plot = gsn_csm_contour_map(wks,data1,res)
  plot = gsn_csm_contour_map(wks,data1,cnres)

      
      draw(plot)
      frame(wks)


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

新浪微博达人勋

发表于 2013-7-24 17:51:24 | 显示全部楼层
shp_Function.ncl 这个里面是原来的代码,没有改动过
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2013-7-24 18:51:51 | 显示全部楼层
lvchabj 发表于 2013-7-24 17:51
shp_Function.ncl 这个里面是原来的代码,没有改动过

最后plot两次有问题,你自己看看我们那个压缩包的示例脚本,还有可能是ncl版本的问题
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-7-25 08:33:15 | 显示全部楼层
哦,好的。你们这个应该是要6.1.0以上版本才可以用吧
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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