1 |
|
2 |
subroutine lswri( isize, phniter, NN, xx, gg, lphprint ) |
3 |
|
4 |
c ================================================================== |
5 |
c SUBROUTINE lswri |
6 |
c ================================================================== |
7 |
c |
8 |
c o writes formatted output of updated controls and |
9 |
c adjoint variables |
10 |
c |
11 |
c o started: Patrick Heimbach, MIT/EAPS |
12 |
c 01-Apr-1999 |
13 |
c |
14 |
c ================================================================== |
15 |
c SUBROUTINE lswri |
16 |
c ================================================================== |
17 |
|
18 |
implicit none |
19 |
|
20 |
C ========= Routine arguments ====================================== |
21 |
|
22 |
INTEGER isize, phniter, NN |
23 |
real*4 xx(NN), gg(NN) |
24 |
cph DOUBLE PRECISION xx(NN), gg(NN) |
25 |
LOGICAL lphprint |
26 |
|
27 |
cph CHARACTER yitnum*3 |
28 |
c |
29 |
|
30 |
C ========= Local variables ======================================== |
31 |
|
32 |
|
33 |
C======================================================================= |
34 |
|
35 |
if (lphprint) |
36 |
& print *, 'pathei: formatted output of xx, gg, in lswri: ', |
37 |
& phniter |
38 |
c |
39 |
open(95, |
40 |
& FILE='PH_X.dat', |
41 |
& FORM='UNFORMATTED', |
42 |
& ACCESS='DIRECT', |
43 |
& RECL=NN*isize) |
44 |
write(95,REC=phniter+1) xx |
45 |
close(95) |
46 |
c |
47 |
open(95, |
48 |
& FILE='PH_G.dat', |
49 |
& FORM='UNFORMATTED', |
50 |
& ACCESS='DIRECT', |
51 |
& RECL=NN*isize) |
52 |
write(95,REC=phniter+1) gg |
53 |
close(95) |
54 |
|
55 |
end |