-
Notifications
You must be signed in to change notification settings - Fork 2
/
SEM_read.f90
66 lines (50 loc) · 2.81 KB
/
SEM_read.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
!------------------------------------------------------------------------------!
! !
! PROGRAM : SEM_read.f90 !
! !
! PURPOSE : Reading datas from another simulations including mean flow and !
! Reynolds stress. !
! !
! 2017.03.02 K.Noh !
! !
!------------------------------------------------------------------------------!
SUBROUTINE READ_DATA
USE SEM_module, &
ONLY : N, Ny, Nz, SIGMA, V_b, file_name, dir_name, path_name
USE SEM_module, &
ONLY : Y, Z, U, V, W, T, RS, THS
IMPLICIT NONE
INTEGER :: j,k
REAL(KIND=8) :: time_sta, time_end, tmp_y, tmp_z, S
CHARACTER(20) :: header
WRITE(*,*) '----------------------------------------------------'
WRITE(*,*) ' READING PROCESS STARTED '
CALL CPU_TIME(time_sta)
dir_name = 'DATA'
file_name = 'Slice_temp.plt'
path_name = TRIM(dir_name)//'/'//TRIM(file_name)
OPEN(100,FILE=path_name,FORM='FORMATTED',STATUS='OLD')
READ(100,*) header
READ(100,*) header
!--------------------------------------------------------------------!
! Main loop of reading SLICE datas !
!--------------------------------------------------------------------!
DO j = 1,Ny
DO k = 1,Nz
READ(100,*) tmp_z, tmp_y, U(j,k), V(j,k), W(j,k), T(j,k), &
RS(1,j,k), RS(2,j,k), RS(3,j,k), RS(4,j,k), &
RS(5,j,k), RS(6,j,k), &
THS(1,j,k), THS(2,j,k), THS(3,j,k), THS(4,j,k)
IF (k==1) Y(j) = tmp_y
IF (j==1) Z(k) = tmp_z
END DO
END DO
CLOSE(100)
S = ( Y(Ny) - Y(1) + 2*SIGMA ) * ( Z(Nz) - Z(1) + 2*SIGMA )
V_b = S*2*SIGMA
CALL CPU_TIME(time_end)
WRITE(*,*) ' READING PROCESS IS COMPLETED '
WRITE(*,*) ' Total Reading time : ',time_end - time_sta,' s'
WRITE(*,*) '----------------------------------------------------'
WRITE(*,*) ''
END SUBROUTINE READ_DATA