source: trunk/pgm03/sgeisa.f @ 1

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

Geisa inital import

File size: 8.4 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
13CBB fin des modifs 29/10/96     
14      logical*1 jdh(75),qqq
15      integer   vers,p(300000),stime,tarray(9)
16      integer*2 qmot
17      real nu1,nu2
18      real*8 tod1,cput1,reste,tod2,cput2
19      character*132 fnt
20      character*112 fml
21      character*80  fmc
22c     character*8  C,clock_,D,date
23      character*24 cdatedeb,cdatefin,ctime
24      integer      tempsdeb,tempsfin,time
25      character*44  fmt
26      character*9   trs1,trs2,tabday(7),tabmonth(12)
27      character*7   form,bin,format
28      character*6   fff
29      character*4   inte,base,deux,ctlg,code,mole,histo,blanc
30      character*3   pgm,ianl,iext,itrs,ilst,icop,info,icre,
31     &              iopt,liste,modif,anal,iini,iuti,itri,trans,
32     &              iasr,remp,supp,ajou,oui,mpgx
33      character*2   ikod,icod
34      character*1   bl,cara(100)
35C       
36      equivalence (p(1),cara(1))
37C       
38      common/p1/ nu1,nu2,dnu,nbclas,khist,kanal,vers,mode,liste
39      common/p2/ mole(75),isot(100),nbi(75),nbt(75),iopt,ctlg,trans,
40     &           trs1,trs2
41      common/p3/ imole,iran,ival,pgm,ianl,iext,itrs,ilst,icop,info,icre
42      common/p4/ nmol,knmol,ksot,kksot,ntab,nhist,kp,lre,form,bin,modif
43      common/p5/ code(75),nn(150),nq(150),ikod(18),icod(18),jdeb(75)
44      common/p6/ iasr,remp,supp,ajou,imp8,imp9,in40,in41,in42,in43,n97
45      common/p7/ iremp,isupp,iajou
46      common/p8/ npgx,nfff,mpgx,qqq(75)
47      common/ffff/ fml,fmc,fmt,fnt,fff
48      common/inteh/ incr,pas1,pmax
49      common/entsor/iuni,juni,kuni,ient,isor,iper,nresv,maxx,blanc,oui
50C       
51      data inte,base,deux/'inte','base','deux'/
52      data iini,iuti/'ini','uti'/,itri/'tri'/,bl/' '/
53      data tabday/'Sunday   ','Monday   ','Tuesday  ','Wednesday',
54     $'Thursday ','Friday   ','Saturday '/
55      data tabmonth/'January  ','February ','March    ','April    ',
56     $'May      ','June     ','July     ','August   ','September',
57     $'October  ','November ','December '/
58      include 'geisafile.h'
59C       
60      len=ltrim(racine_data)
61      filename_asc=racine_data(1:len)//'/line_GEISA2003_asc_gs_v1.0'
62      filename_bin=racine_data(1:len)//'/line_GEISA2003_bin_gs_v1.0'
63
64      write(isor,5)
655     format(/51x,'input instructions supplied to GEISA software',
66     &//26x,82('*'))
67      i=0
6810    continue
69      read (ient,11,end=15)(p(j),j=1,20)
7011    format(20a4)
71      if(cara(1).ne.bl) i=1
72      write(isor,12  )(p(j),j=1,20)
7312    format(26x,'*',20a4,'*')
74      go to 10
7515    continue
76      write(isor,16)
7716    format(26x,82('*'))
78      if(i.eq.0) go to 6
79      write(isor,1010)
801010  format(///' the parameter list begins in column 2',
81     &/' verify this parameter list')
82      go to 200
836     continue
84      rewind ient
85C
86C   MODIFICATION DE RAYMOND
87C
8825    continue
89C     INITIALISATION DES PARAMETRES
90      vers=03
91      nmol=42
92      copy =0.
93      juni=0
94      format='       '
95      npgx=0
96      mpgx='   '
97      nfff=0
98      nu1=-1.
99      nu2=-1.
100      dnu=0.
101      nbclas=10
102      anal='   '
103      histo='    '
104      kanal=0
105      ival=0
106      mode=-1
107      modif='   '
108      trs1='         '
109      trs2='         '
110      trans='   '
111      liste='   '
112      do 30 j=1,nmol
11330    mole(j)=blanc
114      do 31 j=1,ksot
11531    isot(j)=0
116      read (ient,geisa,end=200)
117      jdeb(1)=1
118      kk=1
119      do 20  i=2,nmol
120      kk=kk+nn(kk)+1
121      jdeb(i)=kk
12220    continue
123      do 21 j=1,nmol
124      qqq(j)=.false.
12521    continue
126C       
127C     LA BANQUE COMPLETE EST TOUJOURS STOCKEES SUR JUNGLE
128C       
129      mpgx=pgm
130CBB initialisation de iuni,kuni
131c     print *, 'sgeisa iuni=',iuni
132      if(iuni.eq.0) iuni=1
133      if(kuni.eq.0) kuni=2
134c     print *, 'sgeisa2 iuni=',iuni
135CBB fin modif 29/10/96
136      if(juni.eq.0) juni=10
137      if(format.eq.bin) open(unit=juni,form='unformatted')
138      if(format.eq.form) then
139         len=ltrim(filename_asc)
140         open(unit=juni,form='formatted',
141     &file=filename_asc(1:len)) 
142      endif
143c      i1 = mclock()
144      tempsdeb=time()
145      if(pgm.ne.iini) go to 35
146      if(iarr.eq.1) go to 150
147      call init(iuni,isor,pgm,vers)
148      go to 150
14935    continue
150      if(pgm.ne.iuti) go to 36
151      if(iarr.eq.1) go to 150
152      call utili(p,pgm)
153      go to 150
15436    continue
155      lpgm=10
156c     print *,'pgm=',pgm
157      if(pgm.eq.ianl) lpgm=1
158      if(pgm.eq.iext) lpgm=2
159      if(pgm.eq.ilst) lpgm=3
160      if(pgm.eq.itrs) lpgm=4
161      if(pgm.eq.icop) lpgm=5
162      if(pgm.eq.icre) lpgm=6
163      if(pgm.eq.info) lpgm=7
164      if(pgm.eq.itri) lpgm=8
165      npgx=lpgm
166C            ANL  EXT  LST  TRS  COP  CRE INF  TRI
167      go to (40  ,42  ,42  ,42  ,43  ,42  ,75 , 42  ,140),lpgm
168C     OPTION  *** ANL ***
16940    continue
170c     print *,'format=',format,' anal=',anal
171      if(format.eq.bin) anal=oui
172      if(anal.eq.oui) kanal=1
173      khist=0
174c     print *,'histo=',histo
175      if(histo.eq.inte) khist=1
176      if(histo.eq.base) khist=2
177      if(histo.eq.deux) khist=-1
178      if(histo.eq.inte.or.histo.eq.deux) nbclas=13
179c     print *,'kanal =',kanal,' anal=',anal,' khist=',khist
180      if(kanal.eq.0.and.khist.eq.0) go to 140
181c     print *,'kanal2=',kanal,' khist=',khist
18242    continue
183      if(format.eq.bin) mode=0
184      if(format.eq.form) mode=1
185      if(pgm.eq.itri) go to 133
186c     print *,'modif=',modif
187      if(pgm.eq.icre.or.modif.eq.oui) go to 100
18843    continue
189c     print *,'nu1  =',nu1, 'nu2 =',nu2
190      if(nu1.ge.0..and.nu2.gt.0..and.nu1.lt.nu2) go to 100
191      write(isor,1000) pgm
1921000  format(///' *',a3,'* you must initialize parameter nu1 or nu2'///)
193      go to 150
194C       
195C     OPTION  *** INF ***
196C       
19775    continue
198      mode=1
199      if(anal.eq.oui) pgm=ianl
200      if(trans.eq.oui) pgm=itrs
201      if(pgm.eq.ianl.or.pgm.eq.itrs) go to 100
202      mode=-1
203      if(liste.eq.ctlg.and.nu1.gt.nu2) go to 42
204100   continue
205c     print *,'format=',format
206      if(format.eq.oui) mode=0
207      knmol=0
208      do 105 i=1,nmol
209      if(mole(i).ne.blanc) knmol=knmol+1
210105   continue
211c     print *,'knmol  =',knmol
212      kksot=0
213      if(lpgm.gt.3) go to 107
214      do 106 j=1,ksot
215      if(isot(j).ne.0) kksot=kksot+1
216106   continue
217c     print *,'kksot  =',kksot
218107   continue
219      go to 130
220      if(dnu.eq.0.) dnu=5.
221      do 110 i=1,nmol
222      do 109 j=1,nmol
223      if(mole(i).eq.code(j)) jdh(j)=.true.
224109   continue
225110   continue
226c       print *,'sgeisa=',(mole(kl),kl=1,nmol)
227      iuni=kuni
228      call infor(p,p)
229      if(liste.eq.oui) stop 1111
230      go to 150
231130   continue
232c     print *,'appel MOLIS'
233C       
234      call molis(p,jdh,*150)
235C       
236c     print *,'retour MOLIS'
237      do 132 j=1,nmol
238      qqq(j)=jdh(j)
239132   continue
240133   continue
241C       
242c     print *,'pgm=',pgm
243      if(pgm.eq.info) call infor(p,p(1+ntab))
244      if(pgm.eq.icop) call copie(p,*150)
245      if(pgm.eq.ianl)
246     &call analy(p,p(1+ntab),p(1+2*ntab),p(1+3*ntab),p(1+4*ntab),
247     &p(1+5*ntab+nmol),p(1+5*ntab+2*nmol),jdh,*150)
248      if(pgm.eq.iext)  call extr(p,jdh,*150)
249      if(pgm.eq.ilst)  call list(p,jdh,*150)
250      if(pgm.eq.itrs)  call trsi(p,p,p,jdh,*150)
251      if(pgm.eq.icre ) call creat(p,*150)
252      if(pgm.eq.itri)  call trif(juni,isor,pgm,mode,vers,*150)
253      go to 150
254140   continue
255      write(isor,3000) pgm
2563000  format(///' *',a3,
257     &'*  invalid order &geisa given. program continue'///)
258150   continue
259c     print *,' retour:',pgm
260c     i2 = mclock()
261      tempsfin=time()
262c     ktt=i2-i1
263c     call ltime_(stime,tarray)
264      ktt=tempsfin-tempsdeb
265c     D = date()
266c     C = clock_()
267      cdatedeb=ctime(tempsdeb)
268      cdatefin=ctime(tempsfin)
269      write(isor,4000) cdatedeb,cdatefin,ktt
270 4000 format(//20x,
271     &'Laboratoire de Meteorologie Dynamique  : start : ',a24
272     &,/63x,'end : ',a24,/62x,'(Real time =',i6,' seconds)')
273c     write(isor,4000) D,C,ktt 
274c4000 format(//20x,'Laboratoire de Meteorologie Dynamique  le ',a8,
275c    & '   a  ' ,a8,3x,'/',i6,' csecondes/'/20x,37('*') )
276C     IMPRESSIONS DE LA LISTE DES OPTIONS DISPONIBLES
277      if(pgm.eq.info.and.liste.eq.iopt) go to 75
278c     if(pgm.ne.iasr) go to 25
279200   continue
280      stop
281      end
Note: See TracBrowser for help on using the repository browser.