- 积分
- 62
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-6-11
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2013-5-31 22:00:10
|
显示全部楼层
本帖最后由 chengjiuq 于 2013-5-31 22:05 编辑
谢谢liutaoz21 和kongfeng0824 ,我基础不是很好,现把代码贴上,能在这基础上修改代码来描述你们所说的方法吗?
下面是按照言深深 的方法把那两行用字符串代替,来实现跳过该两行的目的(有些小错误,comment1,comment2
都表示; )。
program s2
integer typ,typm,typke
character*100 comment1,comment2
double precision tsky_v(3),tsky_h(3)
open(unit=1,file="s.txt",status='old')!11-13-1300.txt
! add three line below on 2013.5.31
read(1,*) typ ! name of soil emission model,1:AIEM, 2=QP, 3=Wegmuller
read(1,*) typm ! single or multilayer model,seperately 1 and 2
read(1,*) typke ! extinction model,1:Hallikainen et,al.(1987), 2:Roy et,al.(2004)
read(1,*) comment1
read(1,*) comment2
read(1,*) (tsky_v(i),i=1,3)
read(1,*) (tsky_h(i),i=1,3)
write(*,*) typ
write(*,*) typm
write(*,*) typke
write(*,*) comment1
write(*,*) comment2
write(*,*) tsky_v
write(*,*) tsky_h
end
以下是s.txt文档的内容。
3 ; 1:AIEM, 2=QP, 3=Wegmuller
1 ; 1:single layer model, 2:multilayer model
1 ; 1:Hallikainen et,al.(1987), 2:Roy et,al.(2004)
; parameter
; sky parameter
8,13,45 ;sky downward radiation v
7,12,52 ;sky downward radiation h
|
|