source: PSPA/parmelaPSPA/trunk/file.f @ 476

Last change on this file since 476 was 80, checked in by lemeur, 12 years ago

prise en compte d'un path pour les fichiers

File size: 4.9 KB
Line 
1c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
2c     system dependant                                                 *
3c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
4      subroutine ouvrir(lonnom, work_path)
5
6C **********************************************
7C BUT :   glm
8C ----
9C       work_path: PATH des fichiers a ouvrir
10C       lonnom  : longueur de la chaine precedente
11C **********************************************
12
13
14
15c
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
25c
26c------------------------- open --------------------------------------
27c Partie transferee dans le main 14/09/00
28c      open(unit=nin,file='parmin',status='old',
29c     *     access='sequential',form='formatted')
30c      idebug=0
31c      if(idebug.eq.0) then
32c         open(unit=nnout,status='scratch',
33c     *        access='sequential',form='formatted')
34c      else
35c         open(unit=nnout,file='parmint',status='new',
36c     *        access='sequential',form='formatted')
37c      endif
38c-----------------------------------------------------------------------
39c open modifie le 14/11/2007 pour utilisation sous Linux
40c declaration des gros fichiers sur le disque tmp de la machine et non du
41c cluster
42c
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')
61c--------------------------------------------------------------------------
62      return
63      end
64c*********************************************************************
65c     vax version
66      subroutine orest1(i)
67c
68      include 'ucom.h'
69c
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
79c*********************************************************************
80c     vax version
81      subroutine orest2
82c
83      include 'ucom.h'
84c
85      open (unit=nsav,file='/tmp/savecor',access='sequential',
86     *      form='unformatted',status='old')
87      return
88      end
89c*********************************************************************
90c     vax version
91      subroutine osave1(i)
92c
93      include 'ucom.h'
94c
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
104c*********************************************************************
105c     vax version
106      subroutine inscgrid(fexist) !02/92
107      logical fexist
108      inquire(file='scgrid',exist=fexist)
109      return
110      end
111c*********************************************************************
112c     vax version
113c     file back pour le back bombardment
114      subroutine opeback(iope)
115c
116      include 'ucom.h'
117c
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
126c*********************************************************************
127c     vax version
128      subroutine appendparm
129c
130      include 'ucom.h'
131c
132      character*1 k(80)
133      integer bmout
134c---------------------------------------------------------------------
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
160c-----------------------------------------------------------------------
161      end
162c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
163
Note: See TracBrowser for help on using the repository browser.