爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 21999|回复: 13

[图形美化] 逐日资料挑出指定年份风场

[复制链接]

新浪微博达人勋

发表于 2017-8-22 17:27:39 | 显示全部楼层 |阅读模式

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

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

x
自己编译想挑选指定年份的夏季平均资料,但是编译一直出错显示如图所示的错误,想问下大神错在哪里,比较急
'reinit'
*从逐日nc原始数据的u、v风场资料里提取夏季风强年的数据,写入新grd文件(单层,7月)
*1000 925 850 700 600 500 400 300 250 200 150 100 70
*t:  271   319   331   391   439   475   523 (783,1mo,1948,nc)
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.1999.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2001.nc'
*'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2002.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2005.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2006.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2009.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2012.nc'
'set gxout fwrite'
'set lat 0 50'
'set lon 60 160'
'set t 1 366'
'set lev 600'
'set fwrite D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\stronguwnd.grd'
'define have1=ave(uwnd.1,t=152,t=243)'
'd uwnd'
'define have2=ave(uwnd.2,t=152,t=243)'
'd uwnd'
'define have3=ave(uwnd.3,t=152,t=243)'
'd uwnd'
'define have4=ave(uwnd.4,t=152,t=243)'
'd uwnd'
'define have5=ave(uwnd.5,t=152,t=243)'
'd uwnd'
'define have6=ave(uwnd.6,t=152,t=243)'
'd uwnd'
'define have7=ave(uwnd.7,t=152,t=244)'
'd uwnd'
'disable fwrite'
;

C02VKU8@E_T)[T`X6LS6MLB.png
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-8-22 20:28:04 | 显示全部楼层
{:lxm_20:}{:lxm_20:}
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

新浪微博达人勋

发表于 2017-8-22 21:29:01 | 显示全部楼层
你define的是have1\have2,但是却d uwind,要改吧
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-8-22 21:31:29 | 显示全部楼层
还有貌似define和d之间也要set t,
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-8-23 08:56:40 | 显示全部楼层
咕噜 发表于 2017-8-22 21:29
你define的是have1\have2,但是却d uwind,要改吧

好的,我试试。太感谢您的解答,也想冒昧的问问:gs里面可以同时打开多个nc数据吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-8-23 08:58:41 | 显示全部楼层
咕噜 发表于 2017-8-22 21:31
还有貌似define和d之间也要set t,

我在ave里面已经做了时间之间的计算还需要再set t了吗
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-8-23 09:02:40 | 显示全部楼层
咕噜 发表于 2017-8-22 21:29
你define的是have1\have2,但是却d uwind,要改吧

试了一下还是不行
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2017-8-23 09:05:20 | 显示全部楼层
咕噜 发表于 2017-8-22 21:31
还有貌似define和d之间也要set t,

'reinit'
*从逐日nc原始数据的u、v风场资料里提取夏季风强年的数据,写入新grd文件(单层,7月)
*1000 925 850 700 600 500 400 300 250 200 150 100 70
*t:  271   319   331   391   439   475   523 (783,1mo,1948,nc)
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.1999.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2001.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2002.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2005.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2006.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2009.nc'
'sdfopen D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\uwnd.2012.nc'
'set gxout fwrite'
'set lat 0 50'
'set lon 60 160'
'set t 1 366'
'set lev 600'
'set fwrite D:\studing\dipin\1979-2015\step6-reason\600hpawind\strongwind\1\stronguwnd.grd'
'define have1=ave(uwnd.1,t=152,t=243)'
'set t 1'
'd have1'
'define have2=ave(uwnd.2,t=152,t=243)'
'set t 1'
'd have2'
'define have3=ave(uwnd.3,t=152,t=243)'
'set t 1'
'd have3'
'define have4=ave(uwnd.4,t=152,t=243)'
'set t 1'
'd have4'
'define have5=ave(uwnd.5,t=152,t=243)'
'set t 1'
'd have5'
'define have6=ave(uwnd.6,t=152,t=243)'
'set t 1'
'd have6'
'define have7=ave(uwnd.7,t=152,t=244)'
'set t 1'
'd have7'
还是说数组越界
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-8-23 10:49:53 | 显示全部楼层
自由行 发表于 2017-8-23 09:05
'reinit'
*从逐日nc原始数据的u、v风场资料里提取夏季风强年的数据,写入新grd文件(单层,7月)
*1000  ...

所有的set t 1去掉,把你的set  t  1  366 改成set t 1
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2017-8-27 09:29:10 | 显示全部楼层
本帖最后由 咕噜 于 2017-8-27 09:34 编辑
自由行 发表于 2017-8-23 08:56
好的,我试试。太感谢您的解答,也想冒昧的问问:gs里面可以同时打开多个nc数据吗

可以打开多个的,不过我也最多就打开过2个,看样子不知道是不是7个超了,你先把程序简写一下,只打开一个nc试试,运行没问题之后再逐个添加文件,比较好找问题
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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