爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 4411|回复: 7

[脚本编辑] 求助一个关于距平场的问题

[复制链接]

新浪微博达人勋

发表于 2014-9-6 22:45:28 | 显示全部楼层 |阅读模式

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

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

x
下载了2012年一日4次和daily的资料,想画6月份某点的距平场的图,
'reinit'
'sdfopen d:\4.nc'
'set grid off'
'set lon 125'
'set lat 50'
'set t 1'
'have=ave(hgt,t=725,t=848,1)'
'modify have diurnal'
'set t 725 848'
'define hano=hgt-have'
'd hano',

grads提示modify error:time not varying for this defined variable。请问问题出在哪里?另外问一下大概的gs文件应该是啥样?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-7 07:30:14 | 显示全部楼层
看一下官方的例子吧
modify

modify varname type
This command defines a climatological variable, which is year-independent. varname is a defined grid. There are two options for type:

seasonal    - For creating monthly or multi-monthly climatologies
diurnal     - For creating climatologies over a time period less than a day
Usage Notes

Example

Say you have a 50-year timeseries of monthly mean sea surface temperatures (a variable named sst with 600 time steps) and you want to create a climatology and then look at the monthly anomalies. First, set the time range for 1 to 12, to span a complete year. Second, define the variable "sstclim" which will contain the January mean in the first time step, the February mean in the second time set, etc. Then use 'modify' to turn 'sstclim' into a climatological variable. This means that the calendar year associated with 'sstclim' (the first year in the original sst data set) becomes a wild card. Then you can define the anomaly by subtracting the climatology from the original time series. The commands are as follows:

'set t 1 12'
'define sstclim = ave(sst, t+0, t=600, 12)'
'modify sstclim seasonal'
'set t 1 last'
'define anom = sst - sstclim'
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-7 08:13:05 | 显示全部楼层
学习了!!!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-9-7 08:48:46 | 显示全部楼层
river 发表于 2014-9-7 07:30
看一下官方的例子吧
modify

我的资料是逐日资料,不是逐月资料。请问该怎么改?
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-7 10:58:36 | 显示全部楼层
764859472 发表于 2014-9-7 08:48
我的资料是逐日资料,不是逐月资料。请问该怎么改?

其实我也不知道怎么改,你说你的资料是逐日资料,那是有多少年的,还是只有很多年六月份的?你说求六月份的距平,是求多年平均后的6月份平均?问题描述不清,没有人能帮你的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-7 10:59:52 | 显示全部楼层
764859472 发表于 2014-9-7 08:48
我的资料是逐日资料,不是逐月资料。请问该怎么改?

1 have那一句少了个define吧
2 如果是想画距平的时间序列,根本不用modify,去掉那一句就好了
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2014-9-7 11:09:30 | 显示全部楼层
river 发表于 2014-9-7 10:58
其实我也不知道怎么改,你说你的资料是逐日资料,那是有多少年的,还是只有很多年六月份的?你说求六月份 ...

是2012年一整年逐日的资料。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2014-9-7 19:19:44 | 显示全部楼层
764859472 发表于 2014-9-7 11:09
是2012年一整年逐日的资料。

就是你想求六月份每个时次的距平?那就按6楼的改
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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