1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "FLT_CPPOPTIONS.h" |
5 |
|
6 |
|
7 |
subroutine flt_restart ( |
8 |
I myCurrentIter, |
9 |
I myCurrentTime, |
10 |
I myThid |
11 |
& ) |
12 |
|
13 |
c ================================================================== |
14 |
c SUBROUTINE flt_restart |
15 |
c ================================================================== |
16 |
c |
17 |
c o This routine writes the actual float positions to a local files |
18 |
c that can used as restarts |
19 |
c |
20 |
c ================================================================== |
21 |
c SUBROUTINE flt_restart |
22 |
c ================================================================== |
23 |
|
24 |
c == global variables == |
25 |
|
26 |
#include "EEPARAMS.h" |
27 |
#include "SIZE.h" |
28 |
#include "PARAMS.h" |
29 |
#include "FLT.h" |
30 |
|
31 |
c == routine arguments == |
32 |
|
33 |
INTEGER myCurrentIter, myThid |
34 |
_RL myCurrentTime |
35 |
INTEGER bi, bj, imax |
36 |
parameter(imax=9) |
37 |
|
38 |
c == local variables == |
39 |
|
40 |
integer ip |
41 |
_RL tmp(imax) |
42 |
_RL npart_dist |
43 |
|
44 |
c == end of interface == |
45 |
|
46 |
DO bj=myByLo(myThid),myByHi(myThid) |
47 |
DO bi=myBxLo(myThid),myBxHi(myThid) |
48 |
|
49 |
c |
50 |
c the standard routine mdswritevector can be used here |
51 |
c (1) write actual number floats and time into file |
52 |
c |
53 |
tmp(1) = DBLE(npart_tile(bi,bj)) |
54 |
tmp(2) = DBLE(myCurrentIter) |
55 |
tmp(3) = myCurrentTime |
56 |
tmp(4) = 0. |
57 |
tmp(5) = 0. |
58 |
tmp(6) = max_npart |
59 |
tmp(7) = 0. |
60 |
call mdswritevector(flt_file,64,.false.,'RL',imax,tmp, |
61 |
* bi,bj,1,myCurrentIter,mythid) |
62 |
|
63 |
do ip=1,npart_tile(bi,bj) |
64 |
|
65 |
tmp(1) = npart(ip,bi,bj) |
66 |
tmp(2) = tstart(ip,bi,bj) |
67 |
tmp(3) = xpart(ip,bi,bj) |
68 |
tmp(4) = ypart(ip,bi,bj) |
69 |
tmp(5) = kpart(ip,bi,bj) |
70 |
tmp(6) = kfloat(ip,bi,bj) |
71 |
tmp(7) = iup(ip,bi,bj) |
72 |
tmp(8) = itop(ip,bi,bj) |
73 |
tmp(9) = tend(ip,bi,bj) |
74 |
|
75 |
c |
76 |
c the standard routine mdswritevector can be used here |
77 |
c (2) write float positions into file |
78 |
|
79 |
call mdswritevector(flt_file,64,.false.,'RL',imax,tmp, |
80 |
& bi,bj,ip+1,myCurrentIter,mythid) |
81 |
|
82 |
enddo |
83 |
|
84 |
npart_dist = DBLE(npart_tile(bi,bj)) |
85 |
|
86 |
|
87 |
_GLOBAL_SUM_R8( npart_dist, myThid ) |
88 |
_BARRIER |
89 |
_BEGIN_MASTER( myThid ) |
90 |
if (myProcId .eq. 0) then |
91 |
write(errormessageunit,*) npart_dist,' floats written' |
92 |
endif |
93 |
_END_MASTER( myThid ) |
94 |
_BARRIER |
95 |
|
96 |
ENDDO |
97 |
ENDDO |
98 |
c |
99 |
return |
100 |
end |