爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 5681|回复: 2

[脚本编辑] ctl文件一直报错怎么回事啊

[复制链接]

新浪微博达人勋

发表于 2019-4-23 09:13:54 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 hgsndg 于 2019-4-23 09:19 编辑

我用gs文件提取NC文件中的数据,然后为其写CTL文件但是一直报错
这是原本nc文件的数据描述文件:
dset E:\aa\uwnd.1987.nc
title mean daily NMC reanalysis u wind (1987)
undef -9.96921e+36
dtype netcdf
xdef 144 linear 0 2.5
ydef 73 linear -90 2.5
zdef 17 levels 1000 925 850 700 600 500 400 300
250 200 150 100 70 50 30 20 10
tdef 365 linear 00Z01JAN1987 1440mn
vars 1
uwnd=>uwnd  17  t,z,y,x  daily mean u-wind
endvars

这是我的gs文件:
'reinit'
'sdfopen E:\aa\uwnd.1987.nc'
'set gxout fwrite'
'set fwrite E:\aa\uwnd1987.grd'
'set lon 105 120'
'set lat 5 20'
'set lev 850'
i=1
while(i<=365)
'set t 'i''
'd uwnd'
i=i+1
endwhile
'disable fwrite'
'reinit'
;

这是CTL文件:
dset E:\aa\uwnd.1987.grd
title mean daily NMC reanalysis u wind (1987)
undef -9.96921e+36
dtype netcdf
xdef 7 linear 105.0 2.5
ydef 7 linear 5.0 2.5
zdef 1 levels 850
tdef 365 linear 00Z01JAN1987 1440mn
vars 1
uwnd=>uwnd  17  t,z,y,x  daily mean u-wind
endvars

这是GRADS报错:
ga-> E:\aa\uwnd1987.ctl
Syntax Error
  Error occurred on line 1
  In file E:\aa\uwnd1987.ctl

求助大神帮帮忙,救救孩子!!!感激不尽
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2019-4-23 09:28:37 | 显示全部楼层
感觉刚刚的GS文件好像不太对,我又换了一种写法:
'reinit'
'sdfopen E:\aa\uwnd.1987.nc'
'set gxout fwrite'
'set fwrite E:\aa\uwnd1987.grd'
'set x 43 49'
'set y 39 45'
'set z 3'
i=1
while(i<=365)
'set t 'i''
'd uwnd'
i=i+1
endwhile
'disable fwrite'
'reinit'
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

新浪微博达人勋

发表于 2022-10-27 15:13:25 | 显示全部楼层
楼主解决了吗,我写完的ctl也出现第一行错误的提示
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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