1 |
|
|
! |
2 |
|
|
! $Header$ |
3 |
|
|
! |
4 |
|
|
subroutine inigrads(if,im |
5 |
|
|
s ,x,fx,xmin,xmax,jm,y,ymin,ymax,fy,lm,z,fz |
6 |
|
|
s ,dt,file,titlel) |
7 |
|
|
|
8 |
|
|
|
9 |
|
|
implicit none |
10 |
|
|
|
11 |
|
|
integer if,im,jm,lm,i,j,l |
12 |
|
|
real x(im),y(jm),z(lm),fx,fy,fz,dt |
13 |
|
|
real xmin,xmax,ymin,ymax |
14 |
|
|
|
15 |
|
|
character(len=*),intent(in) :: file |
16 |
|
|
character(len=*),intent(in) :: titlel |
17 |
|
|
|
18 |
|
|
INCLUDE "gradsdef.h" |
19 |
|
|
|
20 |
|
|
c data unit/66,32,34,36,38,40,42,44,46,48/ |
21 |
|
|
integer nf |
22 |
|
|
save nf |
23 |
|
|
data nf/0/ |
24 |
|
|
|
25 |
|
|
unit(1)=66 |
26 |
|
|
unit(2)=32 |
27 |
|
|
unit(3)=34 |
28 |
|
|
unit(4)=36 |
29 |
|
|
unit(5)=38 |
30 |
|
|
unit(6)=40 |
31 |
|
|
unit(7)=42 |
32 |
|
|
unit(8)=44 |
33 |
|
|
unit(9)=46 |
34 |
|
|
|
35 |
|
|
if (if.le.nf) stop'verifier les appels a inigrads' |
36 |
|
|
|
37 |
|
|
print*,'Entree dans inigrads' |
38 |
|
|
|
39 |
|
|
nf=if |
40 |
|
|
title(if)=titlel |
41 |
|
|
ivar(if)=0 |
42 |
|
|
|
43 |
|
|
fichier(if)=trim(file) |
44 |
|
|
|
45 |
|
|
firsttime(if)=.true. |
46 |
|
|
dtime(if)=dt |
47 |
|
|
|
48 |
|
|
iid(if)=1 |
49 |
|
|
ifd(if)=im |
50 |
|
|
imd(if)=im |
51 |
|
|
do i=1,im |
52 |
|
|
xd(i,if)=x(i)*fx |
53 |
|
|
if(xd(i,if).lt.xmin) iid(if)=i+1 |
54 |
|
|
if(xd(i,if).le.xmax) ifd(if)=i |
55 |
|
|
enddo |
56 |
|
|
print*,'On stoke du point ',iid(if),' a ',ifd(if),' en x' |
57 |
|
|
|
58 |
|
|
jid(if)=1 |
59 |
|
|
jfd(if)=jm |
60 |
|
|
jmd(if)=jm |
61 |
|
|
do j=1,jm |
62 |
|
|
yd(j,if)=y(j)*fy |
63 |
|
|
if(yd(j,if).gt.ymax) jid(if)=j+1 |
64 |
|
|
if(yd(j,if).ge.ymin) jfd(if)=j |
65 |
|
|
enddo |
66 |
|
|
print*,'On stoke du point ',jid(if),' a ',jfd(if),' en y' |
67 |
|
|
|
68 |
|
|
print*,'Open de dat' |
69 |
|
|
print*,'file=',file |
70 |
|
|
print*,'fichier(if)=',fichier(if) |
71 |
|
|
|
72 |
|
|
print*,4*(ifd(if)-iid(if))*(jfd(if)-jid(if)) |
73 |
|
|
print*,trim(file)//'.dat' |
74 |
|
|
|
75 |
|
|
OPEN (unit(if)+1,FILE=trim(file)//'.dat' |
76 |
|
|
s ,FORM='unformatted', |
77 |
|
|
s ACCESS='direct' |
78 |
|
|
s ,RECL=4*(ifd(if)-iid(if)+1)*(jfd(if)-jid(if)+1)) |
79 |
|
|
|
80 |
|
|
print*,'Open de dat ok' |
81 |
|
|
|
82 |
|
|
lmd(if)=lm |
83 |
|
|
do l=1,lm |
84 |
|
|
zd(l,if)=z(l)*fz |
85 |
|
|
enddo |
86 |
|
|
|
87 |
|
|
irec(if)=0 |
88 |
|
|
|
89 |
|
|
print*,if,imd(if),jmd(if),lmd(if) |
90 |
|
|
print*,'if,imd(if),jmd(if),lmd(if)' |
91 |
|
|
|
92 |
|
|
return |
93 |
|
|
end |