爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 2920|回复: 6

[求助] 批量处理文件的问题,希望各位能抽一分钟帮我解答,万分感谢!

[复制链接]

新浪微博达人勋

发表于 2015-11-4 11:30:38 | 显示全部楼层 |阅读模式

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

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

x
下面是我的程序
请问读取批量文件数据出了什么问题,加入这个批量读取后,程序就没有执行,不知道问题出在哪里了,也不理解批量处理的每一行是什么意思,请各位高手帮忙解决一下,这个批量的处理程序也是我从网上搜到的,稀里糊涂的贴进去发现行不通。

渴求答案,希望各位能抽一分钟帮我解答。

program l_bound2015
implicit none
real::date4=650.0
integer,parameter::N=5282,nfile=100
real*8 upar_temp(N,12)
integer x,y,l
real Hr,hra,hrn

!!!!!!!!!!!!!批量读取文件!!!!!!!!!!!!!!!
integer ::stat1
character(11) ::filename

open(13,file="input.list")  !The name of input file
open(14,file="output.list",status="replace") !The name of output file

do
read(13,iostat=stat1) filename

if(stat1/=0) exit
open(15,file=filename)

print*,2015
read(15,*)
read(15,*)
read(15,*)
read(15,*)
read(15,*)
read(15,*)
read (15,*) ((upar_temp(x,y),y=1,12),x=7,N)

do x=7,N

!1
if(upar_temp(x,12).lt.1000)then

if(upar_temp(x,4).GE.86.and.upar_temp(x,4).le.94)then
write(14,"(1x,F8.4,1x,F9.3,1x,F7.3)") upar_temp(x,4),upar_temp(x,7)+upar_temp(x,12)
endif


print*,"1"

!2
elseif (upar_temp(x,12).ge.1000.and.upar_temp(x,12).lt.2000)then
Hr=-6.416*(upar_temp(x,12)/1000.0)+97.0
print*,Hr
hra=Hr+3.0
hrn=Hr-5.0
print*,'000'

if(upar_temp(x,4).GE.hrn.and.upar_temp(x,4).le.hra)then
print*,'111'
write(14,"(1x,F8.4,1x,F9.3,1x,F7.3)") upar_temp(x,4),upar_temp(x,7)+upar_temp(x,12)
endif
print*,"2"


!3
elseif(upar_temp(x,12).ge.2000.and.upar_temp(x,12).lt.7562)then
Hr=-1.223*(upar_temp(x,12)/1000)+87
hra=Hr+3.0
hrn=Hr-5.0

if(upar_temp(x,4).GE.hrn.and.upar_temp(x,4).le.hra)then
write(14,"(1x,F8.4,1x,F9.3,1x,F7.3)") upar_temp(x,4),upar_temp(x,7)+upar_temp(x,12)
endif
print*,"3"


!4
elseif(upar_temp(x,12).ge.7562.and.upar_temp(x,12).le.10000)then
Hr=-4.0*(upar_temp(x,12)/1000)+108
hra=Hr+3.0
hrn=Hr-5.0

if(upar_temp(x,4).GE.hrn.and.upar_temp(x,4).le.hra)then
write(14,"(1x,F8.4,1x,F9.3,1x,F7.3)") upar_temp(x,4),upar_temp(x,7)+upar_temp(x,12)
endif
print*,"4"

!5
else
if(upar_temp(x,4).GE.63.and.upar_temp(x,4).le.71)then
write(14,"(1x,F8.4,1x,F9.3,1x,F7.3)") upar_temp(x,4),upar_temp(x,7)+upar_temp(x,12)
endif
print*,"5"

endif
enddo



close(15)
enddo
end

密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-4 14:03:50 | 显示全部楼层
唉,一分钟根本读不完这个程序。
不知道楼主讲的程序没有执行是什么意思,能截图最好截图,不能截图就手抄上完整的提示信息。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-4 16:13:38 | 显示全部楼层
请采取层主的建议,给出具体的错误信息,方便他人对错误定位,也方便自己尽早找出解决方法
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-11-6 09:10:32 | 显示全部楼层
lqouc 发表于 2015-11-4 14:03
唉,一分钟根本读不完这个程序。
不知道楼主讲的程序没有执行是什么意思,能截图最好截图,不能截图就手抄 ...

解决了,我指的不执行是没出结果,结果文件里是空的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

 楼主| 发表于 2015-11-6 09:10:43 | 显示全部楼层
风之精灵 发表于 2015-11-4 16:13
请采取层主的建议,给出具体的错误信息,方便他人对错误定位,也方便自己尽早找出解决方法

解决了,我指的不执行是没出结果,结果文件里是空的
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-6 09:34:44 | 显示全部楼层
yesyesnotion 发表于 2015-11-6 09:10
解决了,我指的不执行是没出结果,结果文件里是空的

额,好吧,楼主有空的话更新一下帖子给大家分享下是怎么修改的。
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2015-11-6 10:00:24 | 显示全部楼层
看不懂要做什么~~~~
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

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

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

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