source: LMDZ5/trunk/libf/phymar/lwtt.F90 @ 3623

Last change on this file since 3623 was 2089, checked in by Laurent Fairhead, 10 years ago

Inclusion de la physique de MAR


Integration of MAR physics

File size: 5.6 KB
Line 
1!OPTIONS XOPT(HSFUN)
2SUBROUTINE LWTT ( KIDIA, KFDIA, KLON, PGA  , PGB, PUU  , PTT             )
3
4!**** *LWTT* - LONGWAVE TRANSMISSION FUNCTIONS
5
6!     PURPOSE.
7!     --------
8!           THIS ROUTINE COMPUTES THE TRANSMISSION FUNCTIONS FOR ALL THE
9!     ABSORBERS (H2O, UNIFORMLY MIXED GASES, AND O3) IN ALL SIX SPECTRAL
10!     INTERVALS.
11
12!**   INTERFACE.
13!     ----------
14!          *LWTT* IS CALLED FROM *LWVN*, *LWVD*, *LWVB*
15
16
17!        EXPLICIT ARGUMENTS :
18!        --------------------
19!     ==== INPUTS ===
20! KND    :                    ; WEIGHTING INDEX
21! PUU    : (KLON,NUA)         ; ABSORBER AMOUNTS
22!     ==== OUTPUTS ===
23! PTT    : (KLON,NTRA)        ; TRANSMISSION FUNCTIONS
24
25!        IMPLICIT ARGUMENTS :   NONE
26!        --------------------
27
28!     METHOD.
29!     -------
30
31!          1. TRANSMISSION FUNCTION BY H2O AND UNIFORMLY MIXED GASES ARE
32!     COMPUTED USING PADE APPROXIMANTS AND HORNER'S ALGORITHM.
33!          2. TRANSMISSION BY O3 IS EVALUATED WITH MALKMUS'S BAND MODEL.
34!          3. TRANSMISSION BY H2O CONTINUUM AND AEROSOLS FOLLOW AN
35!     A SIMPLE EXPONENTIAL DECREASE WITH ABSORBER AMOUNT.
36
37!     EXTERNALS.
38!     ----------
39
40!          NONE
41
42!     REFERENCE.
43!     ----------
44
45!        SEE RADIATION'S PART OF THE MODEL'S DOCUMENTATION AND
46!        ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE IFS
47
48!     AUTHOR.
49!     -------
50!        JEAN-JACQUES MORCRETTE  *ECMWF*
51
52!     MODIFICATIONS.
53!     --------------
54!        ORIGINAL : 88-12-15
55!        97-04-18  JJ Morcrette        Revised continuum
56   
57!-----------------------------------------------------------------------
58
59#include "tsmbkind.h"
60
61USE YOELW    , ONLY : NTRA     ,NUA      ,RPTYPE   ,RETYPE   ,&
62            &RO1H     ,RO2H     ,RPIALF0
63
64
65IMPLICIT NONE
66
67
68!     DUMMY INTEGER SCALARS
69INTEGER_M :: KFDIA
70INTEGER_M :: KIDIA
71INTEGER_M :: KLON
72
73
74
75!     ------------------------------------------------------------------
76
77!*        0.1   ARGUMENTS
78!               ---------
79
80REAL_B :: PUU(KLON,NUA), PTT(KLON,NTRA),  PGA(KLON,8,2), PGB(KLON,8,2)
81
82!     LOCAL INTEGER SCALARS
83INTEGER_M :: JA, JL
84
85!     LOCAL REAL SCALARS
86REAL_B :: ZA11, ZA12, ZAERCN, ZEU10, ZEU11, ZEU12,&
87          &ZEU13, ZODH41, ZODH42, ZODN21, ZODN22, ZPU10, &
88          &ZPU11, ZPU12, ZPU13, ZSQ1, ZSQ2, ZSQH41, &
89          &ZSQH42, ZSQN21, ZSQN22, ZTO1, ZTO2, ZTTF11, &
90          &ZTTF12, ZUU11, ZUU12, ZUXY, ZVXY, ZX, ZXCH4, &
91          &ZXD, ZXN, ZXN2O, ZY, ZYCH4, ZYN2O, ZZ
92
93
94!     ------------------------------------------------------------------
95
96!*        0.2   LOCAL ARRAYS
97!               ------------
98
99!     ------------------------------------------------------------------
100!DIR$ VFUNCTION SQRTHF
101
102!*         1.     HORNER'S ALGORITHM FOR H2O AND CO2 TRANSMISSION
103!                 -----------------------------------------------
104
105DO JA = 1 , 8
106  DO JL = KIDIA,KFDIA
107    ZZ  = SQRT(PUU(JL,JA))
108    ZXD = PGB( JL,JA,1) + ZZ* (PGB( JL,JA,2) + ZZ )
109    ZXN = PGA( JL,JA,1) + ZZ* (PGA( JL,JA,2)      )
110    PTT(JL,JA) = ZXN / ZXD
111  ENDDO
112ENDDO
113
114DO JL = KIDIA,KFDIA
115  PTT(JL,3)=MAX(PTT(JL,3),_ZERO_)
116ENDDO
117!     ------------------------------------------------------------------
118
119!*         2.     CONTINUUM, OZONE AND AEROSOL TRANSMISSION FUNCTIONS
120!                 ---------------------------------------------------
121
122DO JL = KIDIA,KFDIA
123  PTT(JL, 9) = PTT(JL, 8)
124
125!-  CONTINUUM ABSORPTION: E- AND P-TYPE (from Giorgetta and Wild, 1997)
126
127  ZPU10 = RPTYPE(1) * PUU(JL,10)
128  ZPU11 = RPTYPE(2) * PUU(JL,10)
129  ZPU12 = RPTYPE(3) * PUU(JL,10)
130  ZPU13 = RPTYPE(4) * PUU(JL,10)
131  ZEU10 = RETYPE(1) * PUU(JL,11)
132  ZEU11 = RETYPE(2) * PUU(JL,11)
133  ZEU12 = RETYPE(3) * PUU(JL,11)
134  ZEU13 = RETYPE(4) * PUU(JL,11)
135
136!-  OZONE ABSORPTION
137
138  ZX = PUU(JL,12)
139  ZY = PUU(JL,13)
140  ZUXY = 4._JPRB * ZX * ZX / (RPIALF0 * ZY)
141  ZSQ1 = SQRT(_ONE_ + RO1H * ZUXY ) - _ONE_
142  ZSQ2 = SQRT(_ONE_ + RO2H * ZUXY ) - _ONE_
143  ZVXY = RPIALF0 * ZY / (_TWO_ * ZX)
144  ZAERCN = PUU(JL,17) + ZEU12 + ZPU12
145  ZTO1 = EXP( - ZVXY * ZSQ1 - ZAERCN )
146  ZTO2 = EXP( - ZVXY * ZSQ2 - ZAERCN )
147
148!-- TRACE GASES (CH4, N2O, CFC-11, CFC-12)
149
150!* CH4 IN INTERVAL 800-970 + 1110-1250 CM-1
151
152  ZXCH4 = PUU(JL,19)
153  ZYCH4 = PUU(JL,20)
154  ZUXY = 4._JPRB * ZXCH4*ZXCH4/(0.103_JPRB*ZYCH4)
155  ZSQH41 = SQRT(_ONE_ + 33.7_JPRB * ZUXY) - _ONE_
156  ZVXY = 0.103_JPRB * ZYCH4 / (_TWO_ * ZXCH4)
157  ZODH41 = ZVXY * ZSQH41
158
159!* N2O IN INTERVAL 800-970 + 1110-1250 CM-1
160
161  ZXN2O = PUU(JL,21)
162  ZYN2O = PUU(JL,22)
163  ZUXY = 4._JPRB * ZXN2O*ZXN2O/(0.416_JPRB*ZYN2O)
164  ZSQN21 = SQRT(_ONE_ + 21.3_JPRB * ZUXY) - _ONE_
165  ZVXY = 0.416_JPRB * ZYN2O / (_TWO_ * ZXN2O)
166  ZODN21 = ZVXY * ZSQN21
167
168!* CH4 IN INTERVAL 1250-1450 + 1880-2820 CM-1
169
170  ZUXY = 4._JPRB * ZXCH4*ZXCH4/(0.113_JPRB*ZYCH4)
171  ZSQH42 = SQRT(_ONE_ + 400._JPRB * ZUXY) - _ONE_
172  ZVXY = 0.113_JPRB * ZYCH4 / (_TWO_ * ZXCH4)
173  ZODH42 = ZVXY * ZSQH42
174
175!* N2O IN INTERVAL 1250-1450 + 1880-2820 CM-1
176
177  ZUXY = 4._JPRB * ZXN2O*ZXN2O/(0.197_JPRB*ZYN2O)
178  ZSQN22 = SQRT(_ONE_ + 2000._JPRB * ZUXY) - _ONE_
179  ZVXY = 0.197_JPRB * ZYN2O / (_TWO_ * ZXN2O)
180  ZODN22 = ZVXY * ZSQN22
181
182!* CFC-11 IN INTERVAL 800-970 + 1110-1250 CM-1
183
184  ZA11 = _TWO_ * PUU(JL,23) * 4.404E+05_JPRB
185  ZTTF11 = _ONE_ - ZA11 * 0.003225_JPRB
186
187!* CFC-12 IN INTERVAL 800-970 + 1110-1250 CM-1
188
189  ZA12 = _TWO_ * PUU(JL,24) * 6.7435E+05_JPRB
190  ZTTF12 = _ONE_ - ZA12 * 0.003225_JPRB
191
192  ZUU11 = - PUU(JL,15) - ZEU10 - ZPU10
193  ZUU12 = - PUU(JL,16) - ZEU11 - ZPU11 - ZODH41 - ZODN21
194  PTT(JL,10) = EXP( - PUU(JL,14) )
195  PTT(JL,11) = EXP( ZUU11 )
196  PTT(JL,12) = EXP( ZUU12 ) * ZTTF11 * ZTTF12
197  PTT(JL,13) = 0.7554_JPRB * ZTO1 + 0.2446_JPRB * ZTO2
198  PTT(JL,14) = PTT(JL,10) * EXP( - ZEU13 - ZPU13 )
199  PTT(JL,15) = EXP ( - PUU(JL,14) - ZODH42 - ZODN22 )
200
201ENDDO
202
203RETURN
204END SUBROUTINE LWTT
Note: See TracBrowser for help on using the repository browser.