爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6789|回复: 2

[作图] 绘图总提示Warning,多次调试仍未解决,求助

[复制链接]

新浪微博达人勋

发表于 2022-3-13 22:02:22 | 显示全部楼层 |阅读模式
10金钱
本帖最后由 稀饭 于 2022-3-13 22:14 编辑

报错如下,如果我将删除变量的lon坐标变量,报错就会消失,但是画的图就不对了,多次调试仍然没有解决

(0)        gsn_add_cyclic: Warning: The range of your longitude data is not 360.
(0)        You may want to set the gsnAddCyclic resource to False to avoid a
(0)        warning message from the spline function.
warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value
warning:IrTransInitialize: error creating spline approximation for trXCoordPoints; defaulting to linear
warning:gsnAddCyClic is not a valid resource in EPfluxCli_contour at this time


变量属性如下
Variable: DivEPCli
Type: float
Total Size: 7056828 bytes
            1764207 values
Number of Dimensions: 3
Dimensions and sizes:        [level | 27] x [lat | 181] x [lon | 361]
Coordinates:
            level: [10000..100000]
            lat: [ 0..90]
            lon: [60..240]
Number Of Attributes: 1
  _FillValue :        9.96921e+36

我的绘图参数如下
    ctf_res1                             = True
    ctf_res1@gsnDraw                     = False
    ctf_res1@gsnFrame                    = False
    ctf_res1@gsnMaximize                 = False
    ctf_res1@gsnAddCyClic                = False
    ctf_res1@gsnCenterString             = ""
    ctf_res1@gsnLeftString               = ""
    ctf_res1@gsnRightString              = ""
    ctf_res1@mpCenterLonF                = 180.
    ctf_res1@mpMinLatF                   = 0.
    ctf_res1@mpMaxLatF                   = 60.
    ctf_res1@mpMinLonF                   = 120.
    ctf_res1@mpMaxLonF                   = 240.
    ctf_res1@cnFillOn                    = True ;颜色填充
    ctf_res1@cnLinesOn                   = False ;关闭轮廓线
    ctf_res1@cnInfoLabelOn               = False
    ctf_res1@cnLineLabelsOn              = False
    ctf_res1@cnFillPalette               = "BlueDarkRed18"
    ctf_res1@cnLevelSelectionMode        = "ManualLevels"
    ctf_res1@cnMaxLevelValF              = 5.0
    ctf_res1@cnMinLevelValF              = -5.0
    ctf_res1@cnLevelSpacingF             = 1.0
    ctf_res1@pmLabelBarHeightF           = 0.06
    ctf_res1@pmLabelBarOrthogonalPosF    = 0.15
    ctf_res1@lbLabelBarOn                = True


    plot1 = gsn_csm_contour_map(wks, DivEPCli({30000},:,:), ctf_res1)
    draw(plot1)
    frame(wks)







最佳答案

查看完整内容

gsn_add_cyclic这个你写错了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2022-3-13 22:02:23 | 显示全部楼层
gsn_add_cyclic这个你写错了
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2022-3-13 22:42:42 | 显示全部楼层
andrewsoong 发表于 2022-3-13 22:32
gsn_add_cyclic这个你写错了

是的,感谢版主,小错误画了我好长时间,一定铭记这次教训!
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

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

本版积分规则

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

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

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