-
Notifications
You must be signed in to change notification settings - Fork 3
/
innerBCtransfer.f03
165 lines (165 loc) · 11.4 KB
/
innerBCtransfer.f03
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
Subroutine innerBCtransfer
use COM
implicit none
integer i,j,l
DO l=1,block
DO j=1,Jg(l)
if(topos(l)%topol(j)=='r') then
Boundatas(l)%hbcl(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%hbcll(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%bbcl(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%bbcll(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%Qp1bcl(j)=Fluxs(topos(l)%nbl(j))%Qp1(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%dQp1bcl(j)=Fluxs(topos(l)%nbl(j))%dQp1(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
else if(topos(l)%topol(j)=='d') then
Boundatas(l)%hbcl(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%hbcll(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%bbcl(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%bbcll(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%Qp1bcl(j)=Fluxs(topos(l)%nbl(j))%Qp2(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%dQp1bcl(j)=Fluxs(topos(l)%nbl(j))%dQp2(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
else if(topos(l)%topol(j)=='l') then
Boundatas(l)%hbcl(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%hbcll(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%bbcl(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%bbcll(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%Qp1bcl(j)=-Fluxs(topos(l)%nbl(j))%Qp1(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%dQp1bcl(j)=-Fluxs(topos(l)%nbl(j))%dQp1(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
else if(topos(l)%topol(j)=='u') then
Boundatas(l)%hbcl(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%hbcll(j)=Icecoordinates(topos(l)%nbl(j))%h(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%bbcl(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%bbcll(j)=Icecoordinates(topos(l)%nbl(j))%b(topos(l)%Iindexll(j),topos(l)%Jindexll(j))
Boundatas(l)%Qp1bcl(j)=-Fluxs(topos(l)%nbl(j))%Qp2(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
Boundatas(l)%dQp1bcl(j)=-Fluxs(topos(l)%nbl(j))%dQp2(topos(l)%Iindexl(j),topos(l)%Jindexl(j))
else
Boundatas(l)%hbcl(j)=Icecoordinates(l)%h(1,j)
Boundatas(l)%hbcll(j)=Icecoordinates(l)%h(1,j)
Boundatas(l)%bbcl(j)=Icecoordinates(l)%b(1,j)
Boundatas(l)%bbcll(j)=Icecoordinates(l)%b(1,j)
Boundatas(l)%Qp1bcl(j)=-Fluxs(l)%Qp1(1,j)
Boundatas(l)%dQp1bcl(j)=-Fluxs(l)%dQp1(1,j)
end if
end DO
end DO
DO l=1,block
DO j=1,Jg(l)
if(topos(l)%topor(j)=='l') then
Boundatas(l)%hbcr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%hbcrr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%bbcr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%bbcrr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%Qp1bcr(j)=Fluxs(topos(l)%nbr(j))%Qp1(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%dQp1bcr(j)=Fluxs(topos(l)%nbr(j))%dQp1(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
else if(topos(l)%topor(j)=='u') then
Boundatas(l)%hbcr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%hbcrr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%bbcr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%bbcrr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%Qp1bcr(j)=Fluxs(topos(l)%nbr(j))%Qp2(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%dQp1bcr(j)=Fluxs(topos(l)%nbr(j))%dQp2(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
else if(topos(l)%topor(j)=='r') then
Boundatas(l)%hbcr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%hbcrr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%bbcr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%bbcrr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%Qp1bcr(j)=-Fluxs(topos(l)%nbr(j))%Qp1(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%dQp1bcr(j)=-Fluxs(topos(l)%nbr(j))%dQp1(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
else if(topos(l)%topor(j)=='d') then
Boundatas(l)%hbcr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%hbcrr(j)=Icecoordinates(topos(l)%nbr(j))%h(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%bbcr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%bbcrr(j)=Icecoordinates(topos(l)%nbr(j))%b(topos(l)%Iindexrr(j),topos(l)%Jindexrr(j))
Boundatas(l)%Qp1bcr(j)=-Fluxs(topos(l)%nbr(j))%Qp2(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
Boundatas(l)%dQp1bcr(j)=-Fluxs(topos(l)%nbr(j))%dQp2(topos(l)%Iindexr(j),topos(l)%Jindexr(j))
else
Boundatas(l)%hbcr(j)=Icecoordinates(l)%h(Ig(l),j)
Boundatas(l)%hbcrr(j)=Icecoordinates(l)%h(Ig(l),j)
Boundatas(l)%bbcr(j)=Icecoordinates(l)%b(Ig(l),j)
Boundatas(l)%bbcrr(j)=Icecoordinates(l)%b(Ig(l),j)
Boundatas(l)%Qp1bcr(j)=-Fluxs(l)%Qp1(Ig(l),j)
Boundatas(l)%dQp1bcr(j)=-Fluxs(l)%dQp1(Ig(l),j)
end if
end DO
end DO
DO l=1,block
DO i=1,Ig(l)
if(topos(l)%topou(i)=='r') then
Boundatas(l)%hbcu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%hbcuu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%bbcu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%bbcuu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%Qp2bcu(i)=Fluxs(topos(l)%nbu(i))%Qp1(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%dQp2bcu(i)=Fluxs(topos(l)%nbu(i))%dQp1(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
else if(topos(l)%topou(i)=='d') then
Boundatas(l)%hbcu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%hbcuu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%bbcu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%bbcuu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%Qp2bcu(i)=Fluxs(topos(l)%nbu(i))%Qp2(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%dQp2bcu(i)=Fluxs(topos(l)%nbu(i))%dQp2(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
else if(topos(l)%topou(i)=='l') then
Boundatas(l)%hbcu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%hbcuu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%bbcu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%bbcuu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%Qp2bcu(i)=-Fluxs(topos(l)%nbu(i))%Qp1(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%dQp2bcu(i)=-Fluxs(topos(l)%nbu(i))%dQp1(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
else if(topos(l)%topou(i)=='u') then
Boundatas(l)%hbcu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%hbcuu(i)=Icecoordinates(topos(l)%nbu(i))%h(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%bbcu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%bbcuu(i)=Icecoordinates(topos(l)%nbu(i))%b(topos(l)%Iindexuu(i),topos(l)%Jindexuu(i))
Boundatas(l)%Qp2bcu(i)=-Fluxs(topos(l)%nbu(i))%Qp2(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
Boundatas(l)%dQp2bcu(i)=-Fluxs(topos(l)%nbu(i))%dQp2(topos(l)%Iindexu(i),topos(l)%Jindexu(i))
else
Boundatas(l)%hbcu(i)=Icecoordinates(l)%h(i,1)
Boundatas(l)%hbcuu(i)=Icecoordinates(l)%h(i,1)
Boundatas(l)%bbcu(i)=Icecoordinates(l)%b(i,1)
Boundatas(l)%bbcuu(i)=Icecoordinates(l)%b(i,1)
Boundatas(l)%Qp2bcu(i)=-Fluxs(l)%Qp2(i,1)
Boundatas(l)%dQp2bcu(i)=-Fluxs(l)%dQp2(i,1)
end if
end DO
end DO
DO l=1,block
DO i=1,Ig(l)
if(topos(l)%topod(i)=='l') then
Boundatas(l)%hbcd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%hbcdd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%bbcd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%bbcdd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%Qp2bcd(i)=Fluxs(topos(l)%nbd(i))%Qp1(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%dQp2bcd(i)=Fluxs(topos(l)%nbd(i))%dQp1(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
else if(topos(l)%topod(i)=='u') then
Boundatas(l)%hbcd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%hbcdd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%bbcd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%bbcdd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%Qp2bcd(i)=Fluxs(topos(l)%nbd(i))%Qp2(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%dQp2bcd(i)=Fluxs(topos(l)%nbd(i))%dQp2(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
else if(topos(l)%topod(i)=='r') then
Boundatas(l)%hbcd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%hbcdd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%bbcd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%bbcdd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%Qp2bcd(i)=-Fluxs(topos(l)%nbd(i))%Qp1(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%dQp2bcd(i)=-Fluxs(topos(l)%nbd(i))%dQp1(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
else if(topos(l)%topod(i)=='d') then
Boundatas(l)%hbcd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%hbcdd(i)=Icecoordinates(topos(l)%nbd(i))%h(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%bbcd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%bbcdd(i)=Icecoordinates(topos(l)%nbd(i))%b(topos(l)%Iindexdd(i),topos(l)%Jindexdd(i))
Boundatas(l)%Qp2bcd(i)=-Fluxs(topos(l)%nbd(i))%Qp2(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
Boundatas(l)%dQp2bcd(i)=-Fluxs(topos(l)%nbd(i))%dQp2(topos(l)%Iindexd(i),topos(l)%Jindexd(i))
else
Boundatas(l)%hbcd(i)=Icecoordinates(l)%h(i,Jg(l))
Boundatas(l)%hbcdd(i)=Icecoordinates(l)%h(i,Jg(l))
Boundatas(l)%bbcd(i)=Icecoordinates(l)%b(i,Jg(l))
Boundatas(l)%bbcdd(i)=Icecoordinates(l)%b(i,Jg(l))
Boundatas(l)%Qp2bcd(i)=-Fluxs(l)%Qp2(i,Jg(l))
Boundatas(l)%dQp2bcd(i)=-Fluxs(l)%dQp2(i,Jg(l))
end if
end DO
end DO
end Subroutine innerBCtransfer