爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5030|回复: 0

ncl坐标设置的问题

[复制链接]

新浪微博达人勋

发表于 2015-10-24 15:11:18 | 显示全部楼层 |阅读模式
NCL
系统平台: NCL
问题截图: -
问题概况: ncl运行老出现同坐标设置的问题,用到的插值函数(反距离插值),已查阅了大量帖子,还是没解决,希望大家帮忙看看,感激不尽。
我看过提问的智慧: 看过
自己思考时长(天): 2

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
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/esmf/ESMF_regridding.ncl"

begin
  fname1="163zhan-yearlyrain-qushixishu.txt"
  lines1 = asciiread(fname1,(/163,4/),"float")
  station=lines1(:,0)
  lat    = lines1(:,2)
  lon    = lines1(:,1)
  pwv1    = lines1(:,3)
; print(pwv1)

olat=new((/15/),float)
olon=new((/45/),float)

loninc=1.0/44
latinc=1.0/14
ii=fspan(0.0,44.0,45)
ll=fspan(0.0,14.0,15)
olat=latinc*ll
olon=loninc*ii

    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

  dssetp("exp",0.5)
  opwv1=dsgrid2(lon,lat,pwv1,olon,olat)



  opwv1!0       = "lon"
  opwv1!1       = "lat"
  opwv1&lat     = olat
  opwv1&lon     = olon

  print(opwv1)
  printVarSummary(opwv1)

;---Plotting section
  wks = gsn_open_wks("pdf","163zhan-qushixishu-spatial-distribution")
  gsn_define_colormap(wks,"GMT_gray")


  res                             = True
  res@gsnAddCyclic  =False
  res@mpDataSetName        = "Earth..4"
  res@mpDataBaseVersion    = "MediumRes"
  res@mpOutlineOn          =True
  res@mpOutlineSpecifiers  =(/"China:states","Taiwan"/)

  res@mpMinLatF            = 30         ; Asia limits
  res@mpMaxLatF            = 50
  res@mpMinLonF            = 74
  res@mpMaxLonF            = 121


  res@mpProjection ="LambertConformal"
  res@mpLambertMeridianF =110.0
  res@mpLimitMode = "LatLon"
  res@mpLambertParallel1F =.001      ;Default:.001
  res@mpLambertParallel2F =89.999   ;Default: 89.999


  res@cnFillOn     = True
  res@cnLinesOn    =False
  res@cnLineLabelsOn = False
  res@cnFillDrawOrder ="PreDraw"        ; draw contoursfirst


  res@cnLevelSelectionMode ="ExplicitLevels"      ; setexplicit contour levels
  res@cnLevels   = (/-1.,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1./) ; set levels
  res@cnFillColors =(/1,2,3,4,5,6,7,8,9,10,11/) ; set the colors to beused



  map = gsn_csm_contour_map(wks,opwv1,res)

  end

问题:

(0)        check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
(0)        A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)            'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
(0)        check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
(0)        A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
(0)            'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'


密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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