source: trunk/LMDZ.TITAN/libf/phytitan/gasses.F @ 1242

Last change on this file since 1242 was 1072, checked in by slebonnois, 11 years ago

SL: toujours des corrections oubliees pour 1056

File size: 1.8 KB
Line 
1      SUBROUTINE GASSES(IPRINT)
2C THIS SUBROUTINE SETS UP THE MASS MIXING RATIOS OF THE
3C OPTICALLY ACTIVE GASES: CH4, C2H2, AND C2H6
4#include "dimensions.h"
5      PARAMETER(NLAYER=llm,NLEVEL=NLAYER+1)
6      COMMON /ATM/ Z(NLEVEL),PRESS(NLEVEL),DEN(NLEVEL),TEMP(NLEVEL)
7      COMMON /GASS/ CH4(NLEVEL),XN2(NLEVEL),H2(NLEVEL),AR(NLEVEL)
8     & ,XMU(NLEVEL),GAS1(NLAYER),COLDEN(NLAYER)
9      COMMON /STRATO/ C2H2(NLAYER),C2H6(NLAYER)
10      COMMON /ADJUST/ RHCH4,FH2,FHAZE,FHVIS,FHIR,TAUFAC,RCLOUD,FARGON
11      COMMON /CONST/RGAS,RHOP,PI,SIGMA
12C*
13C NOW CALCULATE THE LAYER AVERAGE GAS MIXING RATIOS.
14C OF THE ABSORBING GAS IN UNITS OF GRAMS PER GRAM
15C AND THE TOTAL LAYER COLUMN MASS GRAMS CM-2.
16      DO 159 J=1,NLAYER
17      EMU=(XMU(J+1)+XMU(J))*0.5
18c attention ici, Z en km doit etre passe en m
19      COLDEN(J)=RHOP*(PRESS(J+1)-PRESS(J))/EFFG(Z(J)*1000.)
20      GAS1(J)=(16./EMU)*AVERGE(CH4(J+1),CH4(J))
21159   CONTINUE
22C WE NOW ALSO CALCULTE THE MASS MIXING RATIOS OF THE
23C STRATOSPHERIC GASES USED IN THE IR WITHIN EACH LAYER.
24      J=1
25      FC2H2=1.8E-6 ! NEW FROM ATHENA OLD= 2.E-6
26      FC2H6=1.2E-5 ! NEW FORM ATHENA OLD= 2.E-5
27      C2H2(J) = MIN(FC2H2,PC2H2(TEMP(J))/PRESS(J))
28      C2H6(J) = MIN(FC2H6,PC2H6(TEMP(J))/PRESS(J))
29      DO 101 J=2,NLAYER
30      C2H2(J) = MIN(FC2H2,PC2H2(TEMP(J))/PRESS(J),C2H2(J-1))
31      C2H6(J) = MIN(FC2H6,PC2H6(TEMP(J))/PRESS(J),C2H6(J-1))
32101   CONTINUE
33C NOW CONVERT TO MASS MIXING RATIO
34      DO 102 J=1,NLAYER
35      EMU=(XMU(J+1)+XMU(J))*0.5
36      C2H2(J)=C2H2(J)*26.0/EMU
37      C2H6(J)=C2H6(J)*30.0/EMU
38102   CONTINUE
39C
40      IF (IPRINT .LT. 1) RETURN
41      WRITE (6,9)
42  9   FORMAT(///' ALT   CH4      C2H2        C2H6: MASS MIXING RATIOS')
43      DO 103 J=1,NLAYER
44      WRITE (6,*)Z(J),GAS1(J),C2H2(J),C2H6(J)
45c     WRITE (6,10)Z(J),GAS1(J),C2H2(J),C2H6(J)
46103   CONTINUE
47 10   FORMAT(1X,F6.2,1P3E9.1)
48      RETURN
49      END
Note: See TracBrowser for help on using the repository browser.