爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 5886|回复: 1

[作图] ncl脚本并未报错,但是结果并没有输出到文件中

[复制链接]
发表于 2015-4-13 17:15:04 | 显示全部楼层 |阅读模式

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

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

x
脚本贴上,请大神帮忙指导
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
begin
fileout="avg1jtwc.txt"
;system("rm -f "+fileout)
system(fileout)
filein="cutdata1_8013_all_jtwc.txt"
nline=numAsciiCol(filein)
print (nline)
in=asciiread(filein,(/nline/),"string")
tc_time=stringtoint(str_get_field(in,1," "))
tc_lat=stringtofloat(str_get_field(in,3," "))
tc_lon=stringtofloat(str_get_field(in,4," "))
tc_wind=stringtofloat(str_get_field(in,5," "))
tc_name=str_get_field(in,8," ")
index=ind(tc_time.ne."")
n=dimsizes(index)
do i=0,n-1
t1=index(i)
if(tc_wind(t1).gt.33.4)then
cutlat=tc_lat(ind(tc_wind(t1)))
cutlon=tc_lon(ind(tc_wind(t1)))
if(cutlat.ge.0)then
system("echo '"+sprinti("%10i",tc_time(t1)) \
       +sprintf("%9.1f",cutlat) \
       +sprintf("%9.1f",cutlon) \
       +"' >> "+fileout)
end if
end if
end do
end
密码修改失败请联系微信:mofangbao
发表于 2016-3-17 21:30:20 | 显示全部楼层
密码修改失败请联系微信:mofangbao
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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