爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 13613|回复: 5

[其他] ncl中用了month_to_annual后怎么把使时间纬度重新定义

[复制链接]

新浪微博达人勋

发表于 2018-5-15 10:02:11 | 显示全部楼层 |阅读模式

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

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

x
Number of Dimensions: 3
Dimensions and sizes:        [year | 2000] x [lat | 48] x [lon | 96]
Coordinates:
            lat: [-87.15909455586285..87.15909455586285]
            lon: [   0..356.25]
Number Of Attributes: 5
  cell_methods :        time: mean




prect = prectannual({year|1:20},{lat|:},{lon|:})这个之后
Dimension (year) of (prectannual) does not have an associated coordinate variable
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2018-5-15 14:59:13 | 显示全部楼层
手动增加时间维坐标属性:
year = ispan(起始年份,结束年份,1)
变量名!0 = “year
变量名&year = year
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

发表于 2020-2-24 23:04:28 | 显示全部楼层
怎么解决呢

密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-2-4 16:37:17 | 显示全部楼层
逝风丝痕 发表于 2018-5-15 14:59
手动增加时间维坐标属性:
year = ispan(起始年份,结束年份,1)
变量名!0 = “year


anom=dtrend_msg_n(sst1&time,sst1,True,True,0)
copy_VarMeta(sst1,anom)
printVarSummary(anom)
  year=ispan(1990,2020,1)
nyrs=dimsizes(year)
  Anom=month_to_annual(anom, 1)
我这个一直报错nyrs未定义,请问您知道怎么解决吗
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-2-17 14:20:12 | 显示全部楼层
niuyingli 发表于 2021-2-4 16:37
anom=dtrend_msg_n(sst1&time,sst1,True,True,0)
copy_VarMeta(sst1,anom)
printVarSummary(anom) ...

不清楚具体是哪里的问题,就这一段看着是没有问题的
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2021-4-9 21:01:23 | 显示全部楼层
a = addfile("d:/lianxi/ceshi/example/heat/isshf.nc","r")
sshf=a->ganre
sshf!0="time"
annual_mean = month_to_annual(sshf, 1)

提示Assignment type mismatch, right hand side can't be coerced to type of left hand side
楼主知道为什么嘛?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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