爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 6279|回复: 3

[作图] 处理3a12数据,怎么提取不出来经纬度?

[复制链接]
发表于 2015-5-9 20:15:53 | 显示全部楼层 |阅读模式

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

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

x
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
fil=addfile(/3A12.19980101.7.HDF","r")
pr=fil->surfacePrecipitation(499:619,79:159)
lon=fil->surfacePrecipitation&nlon(499:619)
lat=fil->surfacePrecipitation&nlat(79:159)
wks=gsn_open_wks("x11","dengzhixian")
res=True

res@mpLimitMode       = "Corners"
res@mpLeftCornerLonF  = lon(0)
res@mpRightCornerLonF = lon(dimsizes(lon)-1)
res@mpLeftCornerLatF  = lat(0)
res@mpRightCornerLatF = lat(dimsizes(lat)-1)

res@mpOutlineBoundarySets       = "National"         
res@mpGridAndLimbOn             = True     
res@pmTickMarkDisplayMode  = "Always"         

res@sfXArray         = lon
res@sfYArray         = lat

plot = gsn_contour_map(wks,pr,res)

end

fatal:(nlon) is no  a coordinate variable for file (3A12.19980101.7)
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 7 in file Precipitation.ncl

密码修改失败请联系微信:mofangbao
发表于 2015-5-10 11:00:30 | 显示全部楼层
那就是没有咯
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2015-5-10 13:58:47 | 显示全部楼层

dimensions里有nlon,变量里,surfaceprecipitation(nlon,nlat)
密码修改失败请联系微信:mofangbao
发表于 2015-5-10 20:44:28 | 显示全部楼层
要在Coordinates里有才能读取出来
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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