爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 303|回复: 3

ncl绘制wrfout数据错位

[复制链接]

新浪微博达人勋

发表于 2024-3-24 16:11:11 | 显示全部楼层 |阅读模式
GrADS
系统平台: ncl
问题截图:
问题概况: 在绘制wrfout输出变量地形高度时,设置res@mpMinLatF = 21 ; pamir limits
res@mpMaxLatF = 35
res@mpMinLonF = 97
res@mpMaxLonF = 113
只是绘图框减小了,内部图案并未正确绘制,只有不设置这几个参数才能像第一幅图一样准确绘制,想求问各位大神这是什么问题
我看过提问的智慧: 看过
自己思考时长(天): 30

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

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

x
本帖最后由 zyj1210 于 2024-3-24 16:27 编辑


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

新浪微博达人勋

 楼主| 发表于 2024-3-24 16:15:03 | 显示全部楼层
而且只在绘制wrfout数据时出现这样的问题,绘制其他数据可以随意变换绘图范围并且正确绘图
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2024-3-24 16:17:19 | 显示全部楼层
elev@description = "Terrain Height"
  elev@units = "m"
  wks = gsn_open_wks("png","dem")

;---Set some basic plot options
  ;mkres = True
  ;mkres@gsMarkerIndex = 16 ;标记的种类,16号为填色圆圈
  ;mk2res@gsMarkerSizeF = 5 ;设定标记的大小
  ;mk2res@gsMarkerColor = "red" ;设定标记颜色为colormap的第231个颜色

  res                   = True
  res@pmTickMarkDisplayMode = "Always"
  res@lbOrientation        = "Vertical"

  res@tiMainString         = "Southeast"
  ;res@mpOutlineSpecifiers = outline_areas
  res@gsnMaximize       = True   ; maximize plot in frame
  res@cnFillOn          = True
  res@cnLineLabelsOn     = False    ; turn off line labels
  res@cnInfoLabelOn      = False    ; turn off info label
  res@lbBoxLinesOn       = False    ; turn off labelbar box lines
  res@cnLevelSelectionMode = "ExplicitLevels"
  res@cnFillPalette        = "OceanLakeLandSnow"
  res@mpMinLatF            = 21         ; pamir limits
  res@mpMaxLatF            = 35
  res@mpMinLonF            = 97
  res@mpMaxLonF            = 113
  res@gsnAddCyclic        = False         ;
  res@mpOutlineOn         = True          ;
  res@mpGeophysicalLineColor = "black"    ;
  res@mpGeophysicalLineThicknessF = 2     ;
  res@mpOutlineBoundarySets  = "National" ;
  res@mpNationalLineColor = "black"        ;
  res@mpNationalLineThicknessF = 2.       ;
  res@mpDataBaseVersion = "MediumRes"
  res@mpOutlineOn       = True
  res@mpMaskAreaSpecifiers        = (/"Land"/)
  res@mpOutlineSpecifiers = outline_areas
  res@mpFillDrawOrder            = "PostDraw"
  res@cnConstFEnableFill  = True          ;
  ;res@cnLabelBarEndLabelsOn = True        ;
  ;res@cnConstFLabelOn     =  False        ;
  ;res@cnLabelBarEndStyle  = "ExcludeOuterBoxes" ;
  ;res@gsnSpreadColorStart = 2             ;
  ;res@gsnSpreadColorEnd   = 10            ;
  ;res@cnSpanFillPalette = True
  res@lbLabelAutoStride   = True          ;
  res@lbLabelStride       = 2             ;
  res@mpProvincialLineThicknessF    = 2   ;
  res@mpProvincialLineColor         = 1   ;
  res@tmYLLabelFontHeightF          = 0.02    ;set the size of y-Axis w
ords  ;res = wrf_map_resources(a,res)
;---Generate contour plot then overlay on map
  ;gsn_define_colormap(wks,"OceanLakeLandSnow");
  plot = gsn_csm_contour_map(wks,elev,res)
以上是代码主要部分
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2024-3-24 16:39:21 | 显示全部楼层
已解决:res@tfDoNDCOverlay      = False          ; Tell NCL you are doing a
native plot 这一句要设置为False
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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