source: LMDZ5/branches/testing/libf/phymar/lwv.F90 @ 3946

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

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

File size: 4.9 KB
RevLine 
[2089]1SUBROUTINE LWV &
2 &( KIDIA, KFDIA, KLON , KLEV , KUAER , KTRAER &
3 &, PABCU, PB   , PBINT, PBSUR, PBTOP , PDBSL &
4 &, PEMIS, PEMIW &
5 &, PGA  , PGB  , PGASUR,PGBSUR,PGATOP, PGBTOP &
6 &, PCNTRB,PFLUC &
7 &)
8
9!**** *LWV*   - LONGWAVE RADIATION, VERTICAL INTEGRATION
10
11!     PURPOSE.
12!     --------
13!           CARRIES OUT THE VERTICAL INTEGRATION TO GIVE LONGWAVE
14!           FLUXES OR RADIANCES
15
16!**   INTERFACE.
17!     ----------
18
19!        EXPLICIT ARGUMENTS :
20!        --------------------
21!     ==== INPUTS ===
22! PABCU : (KLON,NUA,3*KLEV+1); ABSORBER AMOUNTS
23! PB     : (KLON,NSIL,KLEV+1); SPECTRAL HALF-LEVEL PLANCK FUNCTIONS
24! PBINT  : (KLON,KLEV+1)     ; HALF-LEVEL PLANCK FUNCTIONS
25! PBSUR  : (KLON,NSIL)       ; SURFACE SPECTRAL PLANCK FUNCTION
26! PBTOP  : (KLON,NSIL)       ; T.O.A. SPECTRAL PLANCK FUNCTION
27! PDBSL  : (KLON,KLEV*2)     ; SUB-LAYER PLANCK FUNCTION GRADIENT
28! PEMIS  : (KLON)            ; SURFACE LW EMISSIVITY
29! PEMIW  : (KLON)            ; SURFACE LW WINDOW EMISSIVITY
30! PGA, PGB                   ; PADE APPROXIMANTS
31! PGASUR, PGBSUR             ; SURFACE PADE APPROXIMANTS
32! PGATOP, PGBTOP             ; T.O.A. PADE APPROXIMANTS
33!     ==== OUTPUTS ===
34! PCNTRB : (KLON,KLEV+1,KLEV+1); CLEAR-SKY ENERGY EXCHANGE MATRIX
35! PFLUC(KLON,2,KLEV)           ; RADIATIVE FLUXES CLEAR-SKY
36
37!        IMPLICIT ARGUMENTS :   NONE
38!        --------------------
39
40!     METHOD.
41!     -------
42
43!          1. PERFORMS THE VERTICAL INTEGRATION DISTINGUISHING BETWEEN
44!     CONTRIBUTIONS BY -  THE NEARBY LAYERS
45!                      -  THE DISTANT LAYERS
46!                      -  THE BOUNDARY TERMS
47!          2. COMPUTES THE CLEAR-SKY DOWNWARD AND UPWARD EMISSIVITIES.
48
49!     EXTERNALS.
50!     ----------
51
52!          *LWVN*, *LWVD*, *LWVB*
53
54!     REFERENCE.
55!     ----------
56
57!        SEE RADIATION'S PART OF THE MODEL'S DOCUMENTATION AND
58!        ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE IFS
59
60!     AUTHOR.
61!     -------
62!        JEAN-JACQUES MORCRETTE  *ECMWF*
63
64!     MODIFICATIONS.
65!     --------------
66!        ORIGINAL : 89-07-14
67!        JJ Morcrette 96-06-07 Surface LW window emissivity
68!-----------------------------------------------------------------------
69
70#include "tsmbkind.h"
71
72USE YOELW    , ONLY : NSIL     ,NIPD     ,NUA
73
74
75IMPLICIT NONE
76
77
78!     DUMMY INTEGER SCALARS
79INTEGER_M :: KFDIA
80INTEGER_M :: KIDIA
81INTEGER_M :: KLEV
82INTEGER_M :: KLON
83INTEGER_M :: KTRAER
84INTEGER_M :: KUAER
85
86
87
88!-----------------------------------------------------------------------
89
90!*       0.1   ARGUMENTS
91!              ---------
92
93
94REAL_B :: PABCU(KLON,NUA,3*KLEV+1)&
95  &,  PB(KLON,NSIL,KLEV+1)   , PBINT(KLON,KLEV+1)&
96  &,  PBSUR(KLON,NSIL)       , PBTOP(KLON,NSIL)&
97  &,  PDBSL(KLON,NSIL,KLEV*2)&
98  &,  PEMIS(KLON)            , PEMIW(KLON)&
99  &,  PGA(KLON,NIPD,2,KLEV)  , PGB(KLON,NIPD,2,KLEV)&
100  &,  PGASUR(KLON,NIPD,2)    , PGBSUR(KLON,NIPD,2)&
101  &,  PGATOP(KLON,NIPD,2)    , PGBTOP(KLON,NIPD,2)
102
103REAL_B :: PCNTRB(KLON,KLEV+1,KLEV+1),  PFLUC(KLON,2,KLEV+1)
104
105!-----------------------------------------------------------------------
106
107!*       0.2   LOCAL ARRAYS
108!              ------------
109
110REAL_B :: ZADJD(KLON,KLEV+1)  , ZADJU(KLON,KLEV+1)&
111  &,  ZDBDT(KLON,NSIL,KLEV)&
112  &,  ZDISD(KLON,KLEV+1)  , ZDISU(KLON,KLEV+1)&
113  &,  ZDWFSU(KLON,NSIL)
114
115!     LOCAL INTEGER SCALARS
116INTEGER_M :: JA, JK, JL
117
118
119!-----------------------------------------------------------------------
120
121!*         1.    INITIALIZATION
122!                --------------
123
124!*         1.1     INITIALIZE LAYER CONTRIBUTIONS
125!                  ------------------------------
126
127DO JK=1,KLEV+1
128  DO JL=KIDIA,KFDIA
129    ZADJD(JL,JK)=_ZERO_
130    ZADJU(JL,JK)=_ZERO_
131    ZDISD(JL,JK)=_ZERO_
132    ZDISU(JL,JK)=_ZERO_
133  ENDDO
134ENDDO
135DO JA=1,NSIL
136  DO JL=KIDIA,KFDIA
137    ZDWFSU(JL,JA)=_ZERO_
138  ENDDO
139ENDDO
140
141!     ------------------------------------------------------------------
142
143!*         2.      VERTICAL INTEGRATION
144!                  --------------------
145
146!     ------------------------------------------------------------------
147
148!*         2.1     CONTRIBUTION FROM ADJACENT LAYERS
149!                  ---------------------------------
150
151CALL LWVN &
152  &( KIDIA, KFDIA, KLON  , KLEV , KUAER &
153  &, PABCU, PDBSL, PGA   , PGB &
154  &, ZADJD, ZADJU, PCNTRB, ZDBDT, ZDWFSU  &
155  &)
156
157!     ------------------------------------------------------------------
158
159!*         2.2     CONTRIBUTION FROM DISTANT LAYERS
160!                  ---------------------------------
161
162CALL LWVD &
163  &( KIDIA , KFDIA, KLON , KLEV  , KTRAER &
164  &, PABCU , ZDBDT, PGA  , PGB &
165  &, PCNTRB, ZDISD, ZDISU, ZDWFSU &
166  &)
167
168!     ------------------------------------------------------------------
169
170!*         2.3     EXCHANGE WITH THE BOUNDARIES
171!                  ----------------------------
172
173CALL LWVB &
174  &( KIDIA , KFDIA , KLON  , KLEV  , KUAER &
175  &, PABCU , ZADJD , ZADJU &
176  &, PB    , PBINT , PBSUR , PBTOP &
177  &, ZDISD , ZDISU , PEMIS , PEMIW &
178  &, PGASUR, PGBSUR, PGATOP, PGBTOP &
179  &, ZDWFSU,PFLUC  &
180  &)
181
182!-----------------------------------------------------------------------
183
184RETURN
185END SUBROUTINE LWV
Note: See TracBrowser for help on using the repository browser.