forked from fukipa/afid-channel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReadInputFile.F90
74 lines (66 loc) · 2.38 KB
/
ReadInputFile.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! !
! FILE: ReadInputFile.F90 !
! CONTAINS: subroutine ReadInputFile !
! !
! PURPOSE: Read parameters from bou.in file !
! !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine ReadInputFile
use param
implicit none
character(len=4) :: dummy
integer flagstat,flagbal,stst3flag
logical fexist
open(unit=15,file='bou.in',status='old')
read(15,301) dummy
read(15,*) nxm,nym,nzm,nsst,nread
read(15,301) dummy
read(15,*) ntst,walltimemax,tout,tmax,ireset
read(15,301) dummy
read(15,*) alx3,istr3,str3
read(15,301) dummy
read(15,*) ylen,zlen
read(15,301) dummy
read(15,*) ReTau,pra,dt,resid,limitCFL
read(15,301) dummy
read(15,*) flagstat,flagbal,tsta,starea
read(15,301) dummy
read(15,*) inslws,inslwn
read(15,301) dummy
read(15,*) idtv,dtmin,dtmax,limitVel
read(15,301) dummy
read(15,*) stst3flag
301 format(a4)
close(15)
nx=nxm+1
ny=nym+1
nz=nzm+1
!m============================================
!
! DEFINITIONS FOR THE CHANNEL FLOW
!
ren = ReTau !dsqrt(ray/pra)
pec = ReTau*pra !dsqrt(pra*ray)
pi=2.d0*dasin(1.d0)
!
!
if(flagstat.ne.0) statcal = .true.
if(idtv.eq.0) variabletstep = .false.
if(flagbal.ne.0) disscal = .true.
if(nread.ne.0) readflow = .true.
if(ireset.ne.0) resetlogstime = .true.
if(stst3flag.ne.0) then
inquire(file='./stst3.in', exist=fexist)
if(fexist) then
dumpslabs = .true.
else
write(6,*) "stst3.in not found, turning off slab dump"
end if
endif
if(starea.ne.0) then
readstats = .true.
if (.not. readflow) write(6,*) 'Warning: Restarting flowfield with statistics read'
endif
return
end