爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 9329|回复: 13

底图区域不对 经纬度不显示

[复制链接]
回帖奖励 4 金钱 回复本帖可获得 2 金钱奖励! 每人限 2 次(中奖概率 50%)
发表于 2014-4-18 16:23:07 | 显示全部楼层 |阅读模式
GrADS
系统平台: linux
问题截图:
问题概况: ncl出图区域区域与wps中设置的区域(105E-132E,18N-45N)不同,并且经纬度不显示
我看过提问的智慧: 看过
自己思考时长(天): 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/wrf/WRFUserARW.ncl"
begin
a=addfile("/home/zssapr/WRF3.5.1/20110710/WRFV3/test/em_real/wrfout_d01_2011-07-10_00:00:00","r")
r =a->RAINNC
e =a->RAINC

lat =a->XLAT
lon =a->XLONG
;printVarSummary(lat)
print(lat)
dimll =dimsizes(lat)
nlat =dimll(0)
mlon =dimll(1)
wks =gsn_open_wks("ps","rain_contour2d02")
gsn_define_colormap(wks,"precip4_11lev")


res  =True
res@tiMainString      ="rain"
res@cnFillOn            = True          ; turn on color
res@cnLinesOn           = True
res@gsnAddCyclic          = False       ; regional data: not cyclic
res@tfDoNDCOverlay        = True        ; set True for native (direct) mapping
res@mpProjection          = "Mercator"  ;"LambertConformal"

res@mpLimitMode           = "Corners"
res@mpLeftCornerLatF      = lat
res@mpLeftCornerLonF      = lon

; res@mpRightCornerLatF     = lat(:,nlat-1,mlon-1)
; res@mpRightCornerLonF     = lon(:,nlat-1,mlon-1)
res@mpOutlineDrawOrder    = "PostDraw"  ; draw continental outline last
res@mpFillDrawOrder       = "PreDraw"
res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state boundaries
res@mpFillOn              = False       ; turn off map fill

rain =r(0,:,:)+r(1,:,:)+r(2,:,:)+r(3,:,:)+r(4,:,:)+r(5,:,:)+r(6,:,:)+r(7,:,:)+e(0,:,:)+e(1,:,:)+e(2,:,:)+e(3,:,:)+e(4,:,:)+e(5,:,:)+e(6,:,:)+e(7,:,:)plot = gsn_csm_contour_map(wks,rain,res)draw(plot)
end

密码修改失败请联系微信:mofangbao
发表于 2014-4-18 16:29:35 | 显示全部楼层

回帖奖励 +2 金钱

res@pmTickMarkDisplayMode = "Always"
密码修改失败请联系微信:mofangbao
发表于 2014-4-18 19:47:06 | 显示全部楼层
ncl为什么标题里要加上grads呢
密码修改失败请联系微信:mofangbao
发表于 2014-4-19 10:27:45 | 显示全部楼层

回帖奖励 +2 金钱

还在想跟楼主请教grads出图怎么这么好看……
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-4-19 15:13:35 | 显示全部楼层
river 发表于 2014-4-18 19:47
ncl为什么标题里要加上grads呢

不知道。。难道是在grads版发的。。。我记得我点的是ncl,请问这个脚本有错在何处呢?
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-4-19 15:15:19 | 显示全部楼层
freekiller 发表于 2014-4-18 16:29
res@pmTickMarkDisplayMode = "Always"

我明天拿我电脑试试。。
密码修改失败请联系微信:mofangbao
发表于 2014-4-19 16:37:01 | 显示全部楼层

回帖奖励 +2 金钱

追风的阳光 发表于 2014-4-19 15:13
不知道。。难道是在grads版发的。。。我记得我点的是ncl,请问这个脚本有错在何处呢?

我不用NCL所以不清楚哎······
密码修改失败请联系微信:mofangbao
发表于 2014-4-19 21:02:34 | 显示全部楼层
建议使用wrf_map_resources从文件中读取绘图区域信息。具体而言,注释掉下面的行:
res@mpProjection          = "Mercator"  ;"LambertConformal"
res@mpLimitMode           = "Corners"
res@mpLeftCornerLatF      = lat
res@mpLeftCornerLonF      = lon
res@mpRightCornerLatF     = lat(:,nlat-1,mlon-1)
res@mpRightCornerLonF     = lon(:,nlat-1,mlon-1)
用res = wrf_map_resources(a,res)这句替换!
密码修改失败请联系微信:mofangbao
 楼主| 发表于 2014-4-21 20:42:56 | 显示全部楼层
longlivehj 发表于 2014-4-19 21:02
建议使用wrf_map_resources从文件中读取绘图区域信息。具体而言,注释掉下面的行:
res@mpProjection      ...

最后用了http://www.ncl.ucar.edu/Applications/Scripts/WRF_pcp_1.ncl的这个脚本,成功出图了。后来发现wrf输出的U、V量是c网格的,计算散度等变量时需要把他们插值到一点上去,请问具体用哪一个脚本比较好呢?
linint2_points还是其他?谢谢!
密码修改失败请联系微信:mofangbao
发表于 2014-4-21 21:36:38 | 显示全部楼层
追风的阳光 发表于 2014-4-21 20:42
最后用了http://www.ncl.ucar.edu/Applications/Scripts/WRF_pcp_1.ncl的这个脚本,成功出图了。后来发现 ...

用wrf_user_unstagger来做插值
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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