source: ether_geisa/trunk/pgm97/sgeisa97.f @ 492

Last change on this file since 492 was 1, checked in by cbipsl, 18 years ago

Geisa inital import

File size: 8.2 KB
Line 
1C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
2C       
3C LAST MODIF : 07.05.1991 PASSAGE DE 40 MOLECULES A 75 DANS LES COMMON
4C       
5C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
6C       
7      program sgeisa
8CBB ajout de iuni pour lecture d un autre base que GEISA  29/10/1996
9CBB   namelist/geisa/ pgm,nu1,nu2,dnu,liste,format,mole,isot,nfff,
10CBB  &          modif,nbclas,trans,trs1,trs2,juni,vers,histo,anal
11      namelist/geisa/ pgm,nu1,nu2,dnu,liste,format,mole,isot,nfff,
12     &kuni,iuni,modif,nbclas,trans,trs1,trs2,juni,vers,histo,anal
13C        Modification from 10.02.2000 by A. Chursin     
14     &,inmin,inmax
15CBB fin des modifs 29/10/96     
16      logical*1 jdh(75),qqq
17      integer   vers,p(300000),stime,tarray(9)
18      integer*2 qmot
19      real nu1,nu2
20      real*8 tod1,cput1,reste,tod2,cput2
21      character*132 fnt
22      character*112 fml
23      character*80  fmc
24c     character*8  C,clock_,D,date
25      character*24 cdatedeb,cdatefin,ctime
26      integer      tempsdeb,tempsfin,time
27      character*44  fmt
28      character*9   trs1,trs2,tabday(7),tabmonth(12)
29      character*7   form,bin,format
30      character*6   fff
31      character*4   inte,base,deux,ctlg,code,mole,histo,blanc
32      character*3   pgm,ianl,iext,itrs,ilst,icop,info,icre,
33     &              iopt,liste,modif,anal,iini,iuti,itri,trans,
34     &              iasr,remp,supp,ajou,oui,mpgx
35      character*2   ikod,icod
36      character*1   bl,cara(100)
37C       
38      equivalence (p(1),cara(1))
39C       
40      common/p1/ nu1,nu2,dnu,nbclas,khist,kanal,vers,mode,liste
41      common/p2/ mole(75),isot(100),nbi(75),nbt(75),iopt,ctlg,trans,
42     &           trs1,trs2
43      common/p3/ imole,iran,ival,pgm,ianl,iext,itrs,ilst,icop,info,icre
44      common/p4/ nmol,knmol,ksot,kksot,ntab,nhist,kp,lre,form,bin,modif
45      common/p5/ code(75),nn(150),nq(150),ikod(18),icod(18),jdeb(75)
46      common/p6/ iasr,remp,supp,ajou,imp8,imp9,in40,in41,in42,in43,n97
47      common/p7/ iremp,isupp,iajou
48      common/p8/ npgx,nfff,mpgx,qqq(75)
49      common/ffff/ fml,fmc,fmt,fnt,fff
50      common/inteh/ incr,pas1,pmax
51      common/entsor/iuni,juni,kuni,ient,isor,iper,nresv,maxx,blanc,oui
52C       
53      data inte,base,deux/'inte','base','deux'/
54      data iini,iuti/'ini','uti'/,itri/'tri'/,bl/' '/
55      data tabday/'Sunday   ','Monday   ','Tuesday  ','Wednesday',
56     $'Thursday ','Friday   ','Saturday '/
57      data tabmonth/'January  ','February ','March    ','April    ',
58     $'May      ','June     ','July     ','August   ','September',
59     $'October  ','November ','December '/
60C       
61      write(isor,5)
625     format(/51x,'input instructions supplied to GEISA software',
63     &//26x,82('*'))
64      i=0
6510    continue
66      read (ient,11,end=15)(p(j),j=1,20)
6711    format(20a4)
68      if(cara(1).ne.bl) i=1
69      write(isor,12  )(p(j),j=1,20)
7012    format(26x,'*',20a4,'*')
71      go to 10
7215    continue
73      write(isor,16)
7416    format(26x,82('*'))
75      if(i.eq.0) go to 6
76      write(isor,1010)
771010  format(///' the parameter list begins in column 2',
78     &/' verify this parameter list')
79      go to 200
806     continue
81      rewind ient
82C
83C   MODIFICATION DE RAYMOND
84C
8525    continue
86C     INITIALISATION DES PARAMETRES
87      vers=97
88      nmol=42
89      copy =0.
90      juni=0
91      format='       '
92      npgx=0
93      mpgx='   '
94      nfff=0
95      nu1=-1.
96      nu2=-1.
97      dnu=0.
98      nbclas=10
99      anal='   '
100      histo='    '
101      kanal=0
102      ival=0
103      mode=-1
104      modif='   '
105      trs1='         '
106      trs2='         '
107      trans='   '
108      liste='   '
109      do 30 j=1,nmol
11030    mole(j)=blanc
111      do 31 j=1,ksot
11231    isot(j)=0
113      read (ient,geisa,end=200)
114      jdeb(1)=1
115      kk=1
116      do 20  i=2,nmol
117      kk=kk+nn(kk)+1
118      jdeb(i)=kk
11920    continue
120      do 21 j=1,nmol
121      qqq(j)=.false.
12221    continue
123C       
124C     LA BANQUE COMPLETE EST TOUJOURS STOCKEES SUR JUNGLE
125C       
126      mpgx=pgm
127CBB initialisation de iuni,kuni
128c     print *, 'sgeisa iuni=',iuni
129      if(iuni.eq.0) iuni=1
130      if(kuni.eq.0) kuni=2
131c     print *, 'sgeisa2 iuni=',iuni
132CBB fin modif 29/10/96
133      if(juni.eq.0) juni=10
134      if(format.eq.bin) open(unit=juni,form='unformatted')
135      if(format.eq.form) open(unit=juni,form='formatted') 
136c      i1 = mclock()
137      tempsdeb=time()
138      if(pgm.ne.iini) go to 35
139      if(iarr.eq.1) go to 150
140      call init(iuni,isor,pgm,vers)
141      go to 150
14235    continue
143      if(pgm.ne.iuti) go to 36
144      if(iarr.eq.1) go to 150
145      call utili(p,pgm)
146      go to 150
14736    continue
148      lpgm=10
149c     print *,'pgm=',pgm
150      if(pgm.eq.ianl) lpgm=1
151      if(pgm.eq.iext) lpgm=2
152      if(pgm.eq.ilst) lpgm=3
153      if(pgm.eq.itrs) lpgm=4
154      if(pgm.eq.icop) lpgm=5
155      if(pgm.eq.icre) lpgm=6
156      if(pgm.eq.info) lpgm=7
157      if(pgm.eq.itri) lpgm=8
158      npgx=lpgm
159C            ANL  EXT  LST  TRS  COP  CRE INF  TRI
160      go to (40  ,42  ,42  ,42  ,43  ,42  ,75 , 42  ,140),lpgm
161C     OPTION  *** ANL ***
16240    continue
163c     print *,'format=',format,' anal=',anal
164      if(format.eq.bin) anal=oui
165      if(anal.eq.oui) kanal=1
166      khist=0
167c     print *,'histo=',histo
168      if(histo.eq.inte) khist=1
169      if(histo.eq.base) khist=2
170      if(histo.eq.deux) khist=-1
171      if(histo.eq.inte.or.histo.eq.deux) nbclas=13
172c     print *,'kanal =',kanal,' anal=',anal,' khist=',khist
173      if(kanal.eq.0.and.khist.eq.0) go to 140
174c     print *,'kanal2=',kanal,' khist=',khist
17542    continue
176      if(format.eq.bin) mode=0
177      if(format.eq.form) mode=1
178      if(pgm.eq.itri) go to 133
179c     print *,'modif=',modif
180      if(pgm.eq.icre.or.modif.eq.oui) go to 100
18143    continue
182c     print *,'nu1  =',nu1, 'nu2 =',nu2
183      if(nu1.ge.0..and.nu2.gt.0..and.nu1.lt.nu2) go to 100
184      write(isor,1000) pgm
1851000  format(///' *',a3,'* you must initialize parameter nu1 or nu2'///)
186      go to 150
187C       
188C     OPTION  *** INF ***
189C       
19075    continue
191      mode=1
192      if(anal.eq.oui) pgm=ianl
193      if(trans.eq.oui) pgm=itrs
194      if(pgm.eq.ianl.or.pgm.eq.itrs) go to 100
195      mode=-1
196      if(liste.eq.ctlg.and.nu1.gt.nu2) go to 42
197100   continue
198c     print *,'format=',format
199      if(format.eq.oui) mode=0
200      knmol=0
201      do 105 i=1,nmol
202      if(mole(i).ne.blanc) knmol=knmol+1
203105   continue
204c     print *,'knmol  =',knmol
205      kksot=0
206      if(lpgm.gt.3) go to 107
207      do 106 j=1,ksot
208      if(isot(j).ne.0) kksot=kksot+1
209106   continue
210c     print *,'kksot  =',kksot
211107   continue
212      go to 130
213      if(dnu.eq.0.) dnu=5.
214      do 110 i=1,nmol
215      do 109 j=1,nmol
216      if(mole(i).eq.code(j)) jdh(j)=.true.
217109   continue
218110   continue
219c       print *,'sgeisa=',(mole(kl),kl=1,nmol)
220      iuni=kuni
221      call infor(p,p)
222      if(liste.eq.oui) stop 1111
223      go to 150
224130   continue
225c     print *,'appel MOLIS'
226C       
227      call molis(p,jdh,*150)
228C       
229c     print *,'retour MOLIS'
230      do 132 j=1,nmol
231      qqq(j)=jdh(j)
232132   continue
233133   continue
234C       
235c     print *,'pgm=',pgm
236      if(pgm.eq.info) call infor(p,p(1+ntab))
237      if(pgm.eq.icop) call copie(p,*150)
238      if(pgm.eq.ianl)
239     &call analy(p,p(1+ntab),p(1+2*ntab),p(1+3*ntab),p(1+4*ntab),
240     &p(1+5*ntab+nmol),p(1+5*ntab+2*nmol),jdh,*150)
241      if(pgm.eq.iext)  call extr(p,jdh,*150)
242      if(pgm.eq.ilst)  call list(p,jdh,*150)
243      if(pgm.eq.itrs)  call trsi(p,p,p,jdh,*150)
244      if(pgm.eq.icre ) call creat(p,*150)
245      if(pgm.eq.itri)  call trif(juni,isor,pgm,mode,vers,*150)
246      go to 150
247140   continue
248      write(isor,3000) pgm
2493000  format(///' *',a3,
250     &'*  invalid order &geisa given. program continue'///)
251150   continue
252c     print *,' retour:',pgm
253c     i2 = mclock()
254      tempsfin=time()
255c     ktt=i2-i1
256c     call ltime_(stime,tarray)
257      ktt=tempsfin-tempsdeb
258c     D = date()
259c     C = clock_()
260      cdatedeb=ctime(tempsdeb)
261      cdatefin=ctime(tempsfin)
262      write(isor,4000) cdatedeb,cdatefin,ktt
263 4000 format(//20x,
264     &'Laboratoire de Meteorologie Dynamique  : start : ',a24
265     &,/63x,'end : ',a24,/62x,'(Real time =',i6,' seconds)')
266c     write(isor,4000) D,C,ktt 
267c4000 format(//20x,'Laboratoire de Meteorologie Dynamique  le ',a8,
268c    & '   a  ' ,a8,3x,'/',i6,' csecondes/'/20x,37('*') )
269C     IMPRESSIONS DE LA LISTE DES OPTIONS DISPONIBLES
270      if(pgm.eq.info.and.liste.eq.iopt) go to 75
271c     if(pgm.ne.iasr) go to 25
272200   continue
273      stop
274      end
Note: See TracBrowser for help on using the repository browser.