爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 6280|回复: 3

[分享资料] 请问在WIN下用GRADS和在LINUX下用GRADS有什么不同?

[复制链接]

新浪微博达人勋

发表于 2012-7-18 16:32:52 | 显示全部楼层 |阅读模式

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

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

x
想把原来在WIN下运行的GS脚本挪到LINX下,但是发现有问题,很奇怪。还请高手指点一二。要画图的数据是从ARWpost出来的,CTL文件就不全部贴出来了,只把开始描述的贴出来:
set ^wrfout_d01.dat

改写的rain.gs文件如下:
'reinit'
'open ^test.ctl'
t2=25
while(it2<74)
t1=t2-24

'define r1=RAINC(t='t1')+RAINNC(t='t1')'
'define r2=RAINC(t='t2')+RAINNC(t='t2')'
'define r24=(r2-r1)'
'set t 't2
'q time'
rt=subwrd(result,3)
'set grid off'
'set grads off'
'set gxout shaded'
'set xlint 3'
'set ylint 3'
'set mpdset cnworld '
'set lon 80 132'
'set lat 15 50'
'set clevs 0 10 25 50 100 150 200 250 300'
'set clab forced'
'set gxout shaded'
'run color.gs'
'set rbrange -10 10'
'set csmooth on'
'd r24'
'draw title  1-hour Total Precipitation:'rt''
'cbarn 0.9 1 10.5'
'printim rain_24h_'t2'.gif white y768 x1024'
'disable print'
'c'
it2=it2+1
endwhile
'reinit'

运行的命令是grads -blc "run rain.gs"
提示信息如下:
Grid Analysis and Display System (GrADS) Version 2.0.1
Copyright (c) 1988-2011 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v2.0.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 opendap-grids,stn geotiff shapefile
Issue 'q config' command for more detailed configuration information
GX Package Initialization: Size = 11 8.5
Running in Batch mode
No hardcopy metafile open
All files closed; all defined objects released;
All GrADS attributes have been reinitialized
Notice: Implied interpolation for file test.ctl
Interpolation will be performed on any data displayed from this file
No hardcopy metafile open
All files closed; all defined objects released;
All GrADS attributes have been reinitialized

给我的感觉是没有打开描述的文件。但是我进入的就是该文件所在的目录,test.ctl  wrfout_d01.dat rain.gs 都在一个目录下,我在这个目录下运行的grads,没出结果。很奇怪。
如果只运行grads 然后open ctl文件,是可以打开的。就是不能转gs文件。请高手帮忙看看,谢谢了。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2012-7-18 22:42:25 | 显示全部楼层
建议楼主加上绝对路径试试i吧,还是路径的问题
密码修改失败请联系微信:mofangbao

新浪微博达人勋

0
早起挑战累计收入
发表于 2012-7-19 09:02:54 | 显示全部楼层
先不要计算,在gs中打开ctl后,d一个变量试试看,看能否出来图,如果这都不行,就是你路径的问题了,WIN下面要这样写路径的话得把GrADS的exe文件所在目录加到path环境变量里面,或者干脆写绝对路径
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2012-12-15 17:15:59 | 显示全部楼层
我用ARWpost处理wrf输出的数据,然后用grads显示,发现只有fields中list出的诊断变量( fields = 'height,pressure,tk,tc')可以正常显示,其他变量均不正常。这是什么原因?
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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