1 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
2 | c system dependant * |
---|
3 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
4 | subroutine ouvrir(lonnom, work_path) |
---|
5 | |
---|
6 | C ********************************************** |
---|
7 | C BUT : glm |
---|
8 | C ---- |
---|
9 | C work_path: PATH des fichiers a ouvrir |
---|
10 | C lonnom : longueur de la chaine precedente |
---|
11 | C ********************************************** |
---|
12 | |
---|
13 | |
---|
14 | |
---|
15 | c |
---|
16 | include 'ucom.h' |
---|
17 | include 'debug.h' |
---|
18 | include 'flagcom.h' |
---|
19 | |
---|
20 | character*256 nomfic |
---|
21 | character*256 work_path |
---|
22 | character*256 nomf |
---|
23 | integer lonnom |
---|
24 | |
---|
25 | c |
---|
26 | c------------------------- open -------------------------------------- |
---|
27 | c Partie transferee dans le main 14/09/00 |
---|
28 | c open(unit=nin,file='parmin',status='old', |
---|
29 | c * access='sequential',form='formatted') |
---|
30 | c idebug=0 |
---|
31 | c if(idebug.eq.0) then |
---|
32 | c open(unit=nnout,status='scratch', |
---|
33 | c * access='sequential',form='formatted') |
---|
34 | c else |
---|
35 | c open(unit=nnout,file='parmint',status='new', |
---|
36 | c * access='sequential',form='formatted') |
---|
37 | c endif |
---|
38 | c----------------------------------------------------------------------- |
---|
39 | c open modifie le 14/11/2007 pour utilisation sous Linux |
---|
40 | c declaration des gros fichiers sur le disque tmp de la machine et non du |
---|
41 | c cluster |
---|
42 | c |
---|
43 | open(unit=nav,access='sequential', |
---|
44 | * form='formatted',status='scratch') |
---|
45 | |
---|
46 | nomf = nomfic(work_path(1:lonnom),'parmdesz') |
---|
47 | print *, ' parmela file : fichier desz : ', nomf |
---|
48 | |
---|
49 | |
---|
50 | open(unit=ndes1,file=nomf,form='formatted', |
---|
51 | * status='unknown') |
---|
52 | open(unit=ndes2,file='/tmp/parmdest',form='unformatted', |
---|
53 | * status='unknown') |
---|
54 | open(unit=nemit,access='sequential', |
---|
55 | * form='formatted',status='scratch') |
---|
56 | open(unit=ndiag,form='formatted',status='scratch') |
---|
57 | open(unit=nsemit,file='/tmp/parmemit2',form='unformatted', |
---|
58 | * status='unknown') |
---|
59 | open(unit=nsnap,file='/tmp/parmsnap',form='unformatted', |
---|
60 | * status='unknown') |
---|
61 | c-------------------------------------------------------------------------- |
---|
62 | return |
---|
63 | end |
---|
64 | c********************************************************************* |
---|
65 | c vax version |
---|
66 | subroutine orest1(i) |
---|
67 | c |
---|
68 | include 'ucom.h' |
---|
69 | c |
---|
70 | character*1 kfic1 |
---|
71 | character*36 bmnom1 |
---|
72 | write(kfic1,8337)i |
---|
73 | 8337 format(i1) |
---|
74 | bmnom1='savecor'//kfic1 |
---|
75 | open (unit=nsav,file=bmnom1,access='sequential', |
---|
76 | * form='unformatted',status='old') |
---|
77 | return |
---|
78 | end |
---|
79 | c********************************************************************* |
---|
80 | c vax version |
---|
81 | subroutine orest2 |
---|
82 | c |
---|
83 | include 'ucom.h' |
---|
84 | c |
---|
85 | open (unit=nsav,file='/tmp/savecor',access='sequential', |
---|
86 | * form='unformatted',status='old') |
---|
87 | return |
---|
88 | end |
---|
89 | c********************************************************************* |
---|
90 | c vax version |
---|
91 | subroutine osave1(i) |
---|
92 | c |
---|
93 | include 'ucom.h' |
---|
94 | c |
---|
95 | character*1 kfic2 |
---|
96 | character*36 bmnom2 |
---|
97 | write(kfic2,8338)i |
---|
98 | 8338 format(i1) |
---|
99 | bmnom2='savecor'//kfic2 |
---|
100 | open (unit=nsav,file='/tmp/bmnom2',access='sequential', |
---|
101 | * form='unformatted',status='new') |
---|
102 | return |
---|
103 | end |
---|
104 | c********************************************************************* |
---|
105 | c vax version |
---|
106 | subroutine inscgrid(fexist) !02/92 |
---|
107 | logical fexist |
---|
108 | inquire(file='scgrid',exist=fexist) |
---|
109 | return |
---|
110 | end |
---|
111 | c********************************************************************* |
---|
112 | c vax version |
---|
113 | c file back pour le back bombardment |
---|
114 | subroutine opeback(iope) |
---|
115 | c |
---|
116 | include 'ucom.h' |
---|
117 | c |
---|
118 | if(iope.eq.1) then |
---|
119 | open(unit=nback,file='parmback',status='new',form='unformatted') |
---|
120 | open(unit=nback1,file='parmback1',status='new',form='unformatted') |
---|
121 | else |
---|
122 | open(unit=nback1,file='parmback1',status='new',form='unformatted') |
---|
123 | endif |
---|
124 | return |
---|
125 | end |
---|
126 | c********************************************************************* |
---|
127 | c vax version |
---|
128 | subroutine appendparm |
---|
129 | c |
---|
130 | include 'ucom.h' |
---|
131 | c |
---|
132 | character*1 k(80) |
---|
133 | integer bmout |
---|
134 | c--------------------------------------------------------------------- |
---|
135 | bmout=90 |
---|
136 | open(unit=bmout,file='parmout',access='sequential', |
---|
137 | * status='unknown',form='formatted') |
---|
138 | rewind(nnout) |
---|
139 | rewind(nemit) |
---|
140 | rewind(nav) |
---|
141 | rewind(ndiag) |
---|
142 | 100 format(80a1) |
---|
143 | 10 continue |
---|
144 | read(nnout,100,end=20) (k(i),i=1,80) |
---|
145 | write(bmout,100) (k(i),i=1,80) |
---|
146 | go to 10 |
---|
147 | 20 continue |
---|
148 | read(nemit,100,end=30) (k(i),i=1,80) |
---|
149 | write(bmout,100) (k(i),i=1,80) |
---|
150 | go to 20 |
---|
151 | 30 continue |
---|
152 | read(nav,100,end=40) (k(i),i=1,80) |
---|
153 | write(bmout,100) (k(i),i=1,80) |
---|
154 | go to 30 |
---|
155 | 40 continue |
---|
156 | read(ndiag,100,end=50) (k(i),i=1,80) |
---|
157 | write(bmout,100) (k(i),i=1,80) |
---|
158 | go to 40 |
---|
159 | 50 continue |
---|
160 | c----------------------------------------------------------------------- |
---|
161 | end |
---|
162 | c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* |
---|
163 | |
---|