source: ether_geisa/trunk/pgm03/impanl.f @ 848

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

Geisa inital import

File size: 10.3 KB
Line 
1C
2C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
3C     IMPRESSIONS DES RESULTATS DU PROGRAMME  ** ANL **
4C     SUBROUTINES APPELEES : HISTOG
5C
6C
7C     IMPRESSIONS DES TABLEAUX DES FREQUENCES
8C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
9C
10      subroutine impanl(tab,anu1,anu2,impr,ymoyd,ymaxd,alf,qq,ibase)
11C
12      logical*1 jdh(75),qq(1)
13      integer   tab(1),hist(nbclas,1),msot(20),nsot(20),vers
14      real nu1,nu2,pas(2),alf(1 )
15CBB   passage en double precision
16      real*8 ymoyd(1 ),ymaxd(1 ),yymoyd
17      real ymoy(1 ),ymax(1 ),xmin,xmax
18      character*9 trs1,trs2
19      character*7 form,bin
20      character*4 tir,code,ctlg,mole,blanc
21      character*3 pgm,ianl,iext,itrs,ilst,icop,info,icre,
22     &            iinf,oui,liste,iopt,modif,trans
23      character*2 ikod,icod
24      character*1 ba,bl,ast,ch5,ch6
25C
26      common/p1/ nu1,nu2,dnu,nbclas,khist,kanal,vers,mode,liste
27      common/p2/ mole(75),isot(100),nbi(75),nbt(75),iopt,ctlg,trans,
28     &           trs1,trs2
29      common/p3/ imole,iran,ival,pgm,ianl,iext,itrs,ilst,icop,info,icre
30      common/p4/ nmol,knmol,ksot,kksot,ntab,nhist,kp,lre,form,bin,modif
31      common/p5/ code(75),nn(150),nq(150),ikod(18),icod(18),jdeb(75)
32      common/inteh/ incr,pas1,pmax
33      common/entsor/iuni,juni,kuni,ient,isor,iper,nresv,maxx,blanc,oui
34C
35      equivalence (jdh(1),msot(1))
36C
37      data bl,ast,tir /' ','*','----'/,icar/45/,iinf/'inf'/
38C
39      if(mode.eq.1) pgm=iinf
40      if(impr.eq.0) write(isor,902) vers,pgm,pgm
41902   format(1x,17('*'),98x,17('*')/1x,'* geisa   geisa *',34x,
42     &'      geisa',i2.2,'   contents     ',35x,'* geisa   geisa *'/1x,
43     &'*',6x,a3,6x,'*',98x,'*',6x,a3,6x,'*'/1x,
44     &'* geisa   geisa *',38x,'analysis per molecule',39x,
45     &'* geisa   geisa *'/1x,17('*'),98x,17('*')/)
46      if(impr.eq.0.and.dnu.gt.0.) write(isor,903) nu1,nu2,dnu
47903   format(37x,'nu1=',f10.3,' at nu2=',f10.3,' by step of dnu='
48     &,f12.6/)
49      molj=0
50      do 12 j=1,ntab
51      molj=molj+tab(j)
5212    continue
53      write(isor,1000) anu1,anu2,molj
541000  format(/' spectral  interval (cm-1) nu1=',  f09.3,2x,'nu2=',f10.3,
55     &'  transitions=',i7)
56      impr=impr+1
57      kk=1
58      knn=0
59      do 24 j=1,nmol
60      if(.not.qq(j)) go to 22
61C
62C     AJOUT DU 5EME CARACTERE DES MOLES CH3CL ET HCOOH  L(CODE 211)
63C                                                       H(CODE 200)
64      ch5=bl
65      ch6=bl
66      if(j.eq.34) ch5='l'
67      if(j.eq.37) ch5='h'
68      if(j.eq.42) ch5='o'
69      if(j.eq.42) ch6='2'
70      kn=nn(kk)
71      ki=kk+1
72      kf=kk+kn
73      kx=0
74C
75C     ELIMINATION DES ISOTOPES DE FREQUENCE NULLE
76C     MSOT ET NSOT TABLEAUX CONTENANT POUR UNE MOLECULE DONNEE
77C                  LES CODES ISOTOPES ET LES FREQUENCES DES ISOTOPES
78C                  ORDONNES ET A VALEURS NON NULLES
79C
80      molj=0
81      do 202 jk=ki,kf
82      nnt=tab(nn(jk))
83      nnsot=nn(jk)
84C
85C
86C     DANS LE TABLEAU TAB LES INDICES  951 A 990 SONT RESERVES POUR
87C     LES ISOTOPES DUPLIQUES
88C
89C BB 06.05.97 cas de C2H4 2 isotopes dupliques, le 2eme indice=ibase=950
90C
91C            H2O  CO2  O3   N2O  CO   CH4  O2   NO   SO2  NO2  NH3  PH3
92      go to (541, 541,541, 541, 541, 541, 541, 541, 509, 510, 541, 541,
93C            HNO3 OH   HF   HCL  HBR  HI   CLO  OCS  H2CO C2H6 CH3D C2H2
94     &       541, 541, 541, 541, 517, 518, 519, 541, 541, 541, 541, 541,
95C            C2H4 GEH4 HCN  C3H8 C2N2 C4H2 HC3N HOCL N2  CH3CL H2O2 H2S
96     &       525, 526, 541, 528, 541, 530, 531, 541, 541, 541, 541, 536,
97C            HCOOH COF2 SF6 C3H4  HO2 CLONO2
98     &       541,  541, 541, 541, 537, 541 ),j
99C
100C     SO2
101509   continue
102      if(nnsot.eq.626) nnt=tab(ibase+j)
103      go to 541
104C
105C     NO2
106510   continue
107      if(nnsot.eq.646) nnt=tab(ibase+j)
108      go to 541
109C
110C     HBR
111517   continue
112      if(nnsot.eq. 19) nnt=tab(ibase+j)
113      go to 541
114C
115C     HI
116518   continue
117      if(nnsot.eq. 17) nnt=tab(ibase+j)
118      go to 541
119C
120C     CLO
121519   continue
122      if(nnsot.eq. 56) nnt=tab(ibase+j)
123      go to 541
124C
125C     C2H4
126525   continue
127      if(nnsot.eq.211) nnt=tab(ibase+j)
128      if(nnsot.eq.311) nnt=tab(ibase)
129      go to 541
130C
131C     GEH4
132526   continue
133      if(nnsot.eq.411) nnt=tab(ibase+j)
134      go to 541
135C
136C     C3H8
137528   continue
138      if(nnsot.eq.221) nnt=tab(ibase+j)
139      go to 541
140C
141C     C4H2
142530   continue
143      if(nnsot.eq.211) nnt=tab(ibase+j)
144      go to 541
145C
146C     HC3N
147531   continue
148      if(nnsot.eq.124) nnt=tab(ibase+j)
149      go to 541
150C
151C     H2S
152536   continue
153      if(nnsot.eq.131) nnt=tab(ibase+j)
154      go to 541
155C
156C     HO2
157537   continue
158      if(nnsot.eq.166) nnt=tab(ibase+j)
159      go to 541
160C
161541   continue
162      if(nnt.eq.0) go to 202
163      kx=kx+1
164      msot(kx)=nn(jk)
165      nsot(kx)=nnt
166      molj=molj+nnt
167202   continue
168      if(molj.eq.0) go to 22
169      alfmoy=alf(j)/molj
170      if(alf(j).lt.0) alfmoy=0.
171CBB   yymoy=ymoy(j)/molj
172      yymoyd=ymoyd(j)/molj
173      kn=min0(11,kx)
174      kkn=max0(kn,knn)
175      write(isor,1001)(tir,jj=1,kkn)
1761001  format(1x,55(1h-),11(a4,3h---))
177      write(isor,1002) code(j),ch5,ch6,j,(msot(jj),jj=1,kn)
1781002  format(' |  moy.i  |  max.i  |alpha.moy| ',a4,a1,a1,'|(',i2,') iso
179     &topes  |',11(i5,' |'))
180      write(isor,1003) yymoyd,ymaxd(j),alfmoy,molj,(nsot(jj),jj=1,kn)
1811003  format(' |',1pd9.3,'|',1pd9.3,'|',1pe9.3,'|',i7,'|number of lines|
182     &',11(i6,'|'))
183      if(kx.le.11) go to 70
184C
185C     AJOUTER LES IMPRESSIONS SUIVANTES DANS LE CAS OU KX>11
186C
187      kn=kn+1
188      write(isor,1005)(nsot(jj),jj=kn,kx)
1891005  format(31x,'|',5(i6,1h|))
190      go to 75
19170    continue
19275    continue
193      knn=kn
19422    kk=kk+nn(kk)+1
19524    continue
196      write(isor,1001)(tir,jj=1,knn)
197      return
198C
199C
200C     IMPRESSIONS DES HISTOGRAMMES
201C
202      entry imph(hist,xmin,xmax,pas,anu1,anu2,impr)
203C
204      ch5=bl
205      ch6=bl
206      if(imole.eq.34) ch5='l'
207      if(imole.eq.37) ch5='h'
208      if(imole.eq.42) ch6='o'
209      if(imole.eq.42) ch6='2'
210      pas(1)=pas1
211      lk=nbclas
212      if(impr.ne.0) go to 31
213C     IF(IVAL.EQ.IMOLE) WRITE(ISOR,904) VERS,CODE(IMOLE)
214C    &'*     GEISA     *',98X,'*     GEISA     *'/1X,
215      if(ival.eq.imole) 
216     &write(isor,904) vers,pgm,pgm,code(imole),ch5,ch6
217904   format(1x,17('*'),98x,17('*')/1x,'* geisa   geisa *',34x,
218     &'geisa',i2.2,' cumulative frequencies  ',32x,'* geisa   geisa *'/
219     &1x,'*',6x,a3,6x,'*',98x,'*',6x,a3,6x,'*'/1x,
220     &'* geisa   geisa *',41x,'molecule /',a4,a1,a1,'/',40x,
221     &'* geisa   geisa *'/1x,17('*'),98x,17('*')/)
222C     IF(IVAL.NE.IMOLE) WRITE(ISOR,905) VERS,CODE(IMOLE),IVAL
223C    &'*     GEISA     *',98X,'*     GEISA     *'/1X,
224      if(ival.ne.imole)
225     &write(isor,905) vers,pgm,pgm,code(imole),ch5,ch6,ival
226905   format(1x,17('*'),98x,17('*')/1x,'* geisa   geisa *',34x,
227     &'geisa',i2.2,' cumulative frequencies  ',32x,'* geisa   geisa *'/
228     &1x,'*',6x,a3,6x,'*',98x,'*',6x,a3,6x,'*'/1x,
229     &'* geisa   geisa *',34x,'molecule /',a4,a1,a1,'/ isotope /',
230     &i3,'/',33x,'* geisa   geisa *'/1x,17('*'),98x,17('*')/)
231      if(dnu.gt.0.) write(isor,903) nu1,nu2,dnu
23231    continue
233      ki=1
234      kf=2
235      if(khist.eq.1) kf=1
236      if(khist.eq.2) ki=2
237      do 35 k=ki,kf
238      mm=0
239      do 26 j=1,lk
240      ijk=hist(j,k)
241      mm=max0(mm,ijk)
24226    continue
243      if(mm.ne.0) go to 27
244      impr=impr+1
245      if(imole.eq.ival)
246     & write(isor,900) anu1,anu2,code(imole),ch5,ch6
247      if(imole.ne.ival)
248     & write(isor,901) anu1,anu2,ival,code(imole),ch5,ch6
249900   format(///' *anl*   in the spectral interval   ',f10.3,'< nu <',
250     &f10.3,' the molecule ',a4,a1,a1,' does not exist'///)
251901   format(///' *anl*   in the spectral interval   ',f10.3,'< nu <',
252     &f10.3,' the isotope ',i4,' of ',a4,a1,a1,' does not exist'///)
253      return
25427    continue
255      ech=mm/float(icar)
256C
257C     CALCUL DES HAUTEURS DES CLASSES DE HIST
258C
259      do 30 j=1,lk
260      i=hist(j ,k)/ech
261      hist(j,k+2)=min0(i,icar)
26230    continue
26335    continue
264      lk1=lk+1
265      impr=impr+1
266      if(khist.eq.-1) go to 50
267      k=khist
268      v=xmax
269      if(k.eq.1) v=pmax
270      if(k.eq.1.and.ival.eq.imole) write(isor,906) anu1,anu2,code(imole)
271     &,ch5,ch6
272906   format(/' spectral  interval (cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
273     &1x,' classes   effectives     intensity - ',a4,a1,a1/)
274      if(k.eq.2.and.ival.eq.imole) write(isor,907) anu1,anu2,code(imole)
275     &,ch5,ch6
276907   format(/' spectral  interval (cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
277     &1x,' classes   effectives    ground level - ',a4,a1,a1/)
278      if(k.eq.1.and.ival.ne.imole)
279     &write(isor,9061) anu1,anu2,code(imole),ch5,ch6,ival
2809061  format(/' spectral  intarval (cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
281     &1x,' classes   effectives     intensity - ',a4,a1,a1,'/',i3/)
282      if(k.eq.2.and.ival.ne.imole)
283     &write(isor,9071) anu1,anu2,code(imole),ch5,ch6,ival
2849071  format(/' spectral interval l(cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
285     &1x,' classes   effectives    ground level - ',a4,a1,a1,'/',i3/)
286      if(k.eq.1) lk1=lk
287      do 40 j=1,lk1
288      call histog(hist,pas(k),xmin,k,lk,j,ih,ihh,v,vv,ba,bl,ast)
289      write(isor,2000) vv,ihh,(ba,jj=1,ih)
2902000  format(1h ,    1pd10.4,i7,3h|*|,45a1)
29140    continue
292      return
29350    continue
294      if(ival.eq.imole) write(isor,908)
295     &anu1,anu2,anu1,anu2,code(imole),ch5,ch6,code(imole),ch5,ch6
296908   format(/' intervalle spectral(cm-1)   nu1=',f10.3,5x,'nu2=',f10.3,
297     &6x,'spectral  interval (cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
298     &1x,' classes   effectives     intensity - ',a4,a1,a1,24x   ,' classes
299     &   effectives    ground level - ',a4,a1,a1/)
300      if(ival.ne.imole) write(isor,909)
301     &anu1,anu2,anu1,anu2,code(imole),ch5,ch6,ival,code(imole),ch5,ch6,
302     &ival
303909   format(/' intervalle spectral(cm-1)   nu1=',f10.3,5x,'nu2=',f10.3,
304     &6x,'spectral  interval (cm-1)   nu1=',f10.3,5x,'nu2=',f10.3/
305     &1x,' classes   effectives     intensity - ',a4,a1,a1,'/',i3,20x,
306     &' classes   effectives    ground level - ',a4,a1,a1,'/',i3/)
307      v=pmax
308      v1=xmax
309      do 60 j=1,lk
310      icon=1
311      call histog(hist,pas(1),xmin,icon,lk,j,ih,ihh,v,vv,ba,bl,ast)
312      write(isor,2000) vv,ihh,(ba,jj=1,ih)
313      icon=2
314      call histog(hist,pas(2),xmin,icon,lk,j,ih1,ihh1,v1,vv1,ba,bl,ast)
315      write(isor,2001) vv1,ihh1,(ba,jj=1,ih1)
3162001  format(1x,67x,1pd10.4,i7,3h|*|,45a1)
31760    continue
318      call histog(hist,pas(2),xmin,2,lk,lk+1,ih1,ihh1,v1,vv1,ba,bl,ast)
319      vv=vv*pas1
320      write(isor,2002) vv,vv1,ihh1,(ba,jj=1,ih1)
3212002  format(1x,1pd10.4,6x,4h0|*|,47x,1pd10.4,i7,3h|*|,45a1)
322      return
323      end
324
Note: See TracBrowser for help on using the repository browser.