source: LMDZ5/branches/IPSLCM6.0.8/libf/phymar/lwbv.F90 @ 3157

Last change on this file since 3157 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.1 KB
Line 
1SUBROUTINE LWBV &
2  &( KIDIA, KFDIA, KLON , KLEV  , KMODE &
3  &, PDT0 , PEMIS, PEMIW &
4  &, PTL  , PTAVE &
5  &, PEMIT, PFLUC &
6  &, PABCU, PBINT, PBSUI, PCNTRB &
7  &)
8
9!**** *LWBV*   - COMPUTE PLANCK FUNC., PERF. VERT. INTEGRATION
10
11!     PURPOSE.
12!     --------
13!           TO COMPUTE THE PLANCK FUNCTION AND PERFORM THE
14!           VERTICAL INTEGRATION. SPLIT OUT FROM LW FOR MEMORY
15!           SAVING
16
17!**   INTERFACE.
18!     ----------
19
20!        *LWVB* IS CALLED FROM *LW*
21
22!        EXPLICIT ARGUMENTS :
23!        --------------------
24! PDT0   : (KLON)            ; SURFACE TEMPERATURE DISCONTINUITY
25! PEMIS  : (KLON)            ; SURFACE LW EMISSIVITY
26! PEMIW  : (KLON)            ; SURFACE LW WINDOW EMISSIVITY
27! PTAVE  : (KLON,KLEV)       ; TEMPERATURE
28! PTL    : (KLON,KLEV+1)     ; HALF LEVEL TEMPERATURE
29!     ==== OUTPUTS ===
30! PABCU  :
31! PBINT  :
32! PBSUI  :
33! PCNTRB :
34! PCOLC  :
35! PEMIT  :
36! PFLUC  :
37
38!        IMPLICIT ARGUMENTS :   NONE
39!        --------------------
40
41!     METHOD.
42!     -------
43
44!          1. COMPUTES THE PLANCK FUNCTIONS ON THE INTERFACES AND THE
45!     GRADIENT OF PLANCK FUNCTIONS IN THE LAYERS.
46!          2. PERFORMS THE VERTICAL INTEGRATION DISTINGUISHING THE CON-
47!     TRIBUTIONS OF THE ADJACENT AND DISTANT LAYERS AND THOSE FROM THE
48!     BOUNDARIES.
49!          3. COMPUTES THE CLEAR-SKY COOLING RATES.
50
51!     EXTERNALS.
52!     ----------
53
54!          *LWB*, *LWV*
55
56!     REFERENCE.
57!     ----------
58
59!        SEE RADIATION'S PART OF THE MODEL'S DOCUMENTATION AND
60!        ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE IFS
61
62!     AUTHOR.
63!     -------
64!        JEAN-JACQUES MORCRETTE  *ECMWF*
65
66!     MODIFICATIONS.
67!     --------------
68!        ORIGINAL : 89-07-14
69!        MODIFICATION : 93-10-15 M.HAMRUD (SPLIT OUT FROM LW TO SAVE
70!                                          MEMORY)
71!-----------------------------------------------------------------------
72
73#include "tsmbkind.h"
74
75USE YOELW    , ONLY : NSIL     ,NIPD     ,NUA
76USE YOERDU   , ONLY : NUAER    ,NTRAER
77
78
79IMPLICIT NONE
80
81
82!     DUMMY INTEGER SCALARS
83INTEGER_M :: KFDIA
84INTEGER_M :: KIDIA
85INTEGER_M :: KLEV
86INTEGER_M :: KLON
87INTEGER_M :: KMODE
88
89
90
91!-----------------------------------------------------------------------
92
93!*       0.1   ARGUMENTS
94!              ---------
95
96REAL_B :: PDT0(KLON)&
97  &,  PEMIS(KLON)               , PEMIW(KLON)&
98  &,  PTL(KLON,KLEV+1)          , PTAVE(KLON,KLEV)
99
100REAL_B :: PABCU(KLON,NUA,3*KLEV+1)&
101  &,  PBINT(KLON,KLEV+1)        , PBSUI(KLON)&
102  &,  PCNTRB(KLON,KLEV+1,KLEV+1)&
103  &,  PEMIT(KLON)&
104  &,  PFLUC(KLON,2,KLEV+1)
105
106!-------------------------------------------------------------------------
107
108!*       0.2   LOCAL ARRAYS
109!              ------------
110REAL_B ::&
111     &ZB(KLON,NSIL,KLEV+1), ZBSUR(KLON,NSIL)   , ZBTOP(KLON,NSIL)&
112  &,  ZDBSL(KLON,NSIL,KLEV*2)&
113  &,  ZGA(KLON,NIPD,2,KLEV)  , ZGB(KLON,NIPD,2,KLEV)&
114  &,  ZGASUR(KLON,NIPD,2)    , ZGBSUR(KLON,NIPD,2)&
115  &,  ZGATOP(KLON,NIPD,2)    , ZGBTOP(KLON,NIPD,2)
116
117!     LOCAL INTEGER SCALARS
118INTEGER_M :: JL, JLW
119
120
121!     ------------------------------------------------------------------
122
123!*         2.    COMPUTES PLANCK FUNCTIONS
124!                -------------------------
125
126CALL LWB &
127 &( KIDIA, KFDIA, KLON  , KLEV  , KMODE &
128 &, PDT0 , PTAVE, PTL &
129 &, ZB   , PBINT, ZBSUR , ZBTOP , ZDBSL &
130 &, ZGA  , ZGB  , ZGASUR, ZGBSUR, ZGATOP, ZGBTOP    &
131 &)
132
133!     ------------------------------------------------------------------
134
135!*         3.    PERFORMS THE VERTICAL INTEGRATION
136!                ---------------------------------
137
138CALL LWV &
139 &( KIDIA , KFDIA, KLON  , KLEV &
140 &, NUAER , NTRAER &
141 &, PABCU , ZB   , PBINT , ZBSUR , ZBTOP , ZDBSL &
142 &, PEMIS , PEMIW &
143 &, ZGA   , ZGB  , ZGASUR, ZGBSUR, ZGATOP, ZGBTOP &
144 &, PCNTRB, PFLUC &
145 &)
146
147DO JL=KIDIA,KFDIA
148  PEMIT(JL)=_ZERO_
149  PBSUI(JL)=_ZERO_
150ENDDO
151DO JLW=1,NSIL
152  DO JL=KIDIA,KFDIA
153    PBSUI(JL)=PBSUI(JL)+ZBSUR(JL,JLW)
154    IF (JLW >= 3.AND. JLW <= 4) THEN
155      PEMIT(JL)=PEMIT(JL)+ZBSUR(JL,JLW)*PEMIW(JL)
156    ELSE
157      PEMIT(JL)=PEMIT(JL)+ZBSUR(JL,JLW)*PEMIS(JL)
158    ENDIF
159  ENDDO
160ENDDO
161DO JL=KIDIA,KFDIA
162  PEMIT(JL)=PEMIT(JL)/PBSUI(JL)
163ENDDO
164
165!     ------------------------------------------------------------------
166
167RETURN
168END SUBROUTINE LWBV
Note: See TracBrowser for help on using the repository browser.