source: LMDZ5/trunk/libf/phylmd/rrtm/su_aerw.F90 @ 4799

Last change on this file since 4799 was 1990, checked in by Laurent Fairhead, 11 years ago

Corrections à la version r1989 pour permettre la compilation avec RRTM
Inclusion de la licence CeCILL_V2 pour RRTM


Changes to revision r1989 to enable RRTM code compilation
RRTM part put under CeCILL_V2 licence

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 6.6 KB
Line 
1SUBROUTINE SU_AERW
2
3!**** *SU_AERW*   - DEFINES INDICES AND PARAMETERS FOR VARIOUS AEROSOL VARIABLES
4
5!     PURPOSE.
6!     --------
7!           INITIALIZE YOEAERATM, YOEAERSRC, YOEAERSNK, THE MODULES THAT CONTAINS INDICES
8!           ALLOWING TO GET THE AEROSOL PARAMETERS RELEVANT FOR THE PROGNOSTIC AEROSOL
9!           CONFIGURATION.
10
11!**   INTERFACE.
12!     ----------
13!        *CALL* *SU_AERW
14
15!        EXPLICIT ARGUMENTS :
16!        --------------------
17!        NONE
18
19!        IMPLICIT ARGUMENTS :
20!        --------------------
21!        YOEAERW
22
23!     METHOD.
24!     -------
25!        SEE DOCUMENTATION
26
27!     EXTERNALS.
28!     ----------
29
30!     REFERENCE.
31!     ----------
32!        ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE IFS
33
34!     AUTHOR.
35!     -------
36!        JEAN-JACQUES MORCRETTE *ECMWF*
37
38!     MODIFICATIONS.
39!     --------------
40!        ORIGINAL : 2005-07-08
41
42!     ------------------------------------------------------------------
43
44USE PARKIND1  ,ONLY : JPIM     ,JPRB
45USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
46
47USE YOEAERATM, ONLY : LAERGBUD, LAERSCAV ,LAERSEDIM, LAERSURF, LAER6SDIA, &
48 & LAERCLIMG, LAERCLIMZ, LAERCLIST, LAERDRYDP, LAERNGAT, LAERPRNT, &
49 & REPSCAER , INDBG
50
51USE YOEAERSRC, ONLY : JKBIN, JKTYP, LEPAERO  , &
52 & NBINAER, NINDAER , NMAXTAER, NTAER  , NTYPAER, RGELAV , RGEMUV , &
53 & RDGLAV , RDGMUV  , RCLONV  , RSLONV , RDCLONV, RDSLONV, LAEREXTR, &
54 & RSSFLX , RLATVOL , RLONVOL , NDDUST
55
56USE YOEPHY   , ONLY : LE4ALB
57
58USE YOEDBUG  , ONLY : KSTPDBG
59
60USE YOMCST   , ONLY : RPI
61USE YOMGC    , ONLY : GELAM
62USE YOMGEM   , ONLY : NGPTOT
63USE YOMLEG   , ONLY : RMU
64! Ce qui concerne NULNAM commente par MPL le 15.04.09
65!USE YOMLUN   , ONLY : NULNAM, NULOUT
66USE YOMLUN   , ONLY : NULOUT
67
68USE YOM_YGFL, ONLY : NAERO
69
70IMPLICIT NONE
71
72INTEGER(KIND=JPIM) :: IAER, ICAER, ITAER
73INTEGER(KIND=JPIM) :: J, JAER, JL
74
75REAL(KIND=JPRB) :: ZHOOK_HANDLE
76!     ----------------------------------------------------------------
77
78#include "posnam.intfb.h"
79
80#include "su_aerp.intfb.h"
81#include "su_aerop.intfb.h"
82!      ----------------------------------------------------------------
83
84#include "naeaer.h"
85
86!      ----------------------------------------------------------------
87IF (LHOOK) CALL DR_HOOK('SU_AERW',0,ZHOOK_HANDLE)
88
89!*         1.       DEFAULT VALUES OF PARAMETERS
90!                   ----------------------------
91
92print *,'DANS SU_AERW'
93NBINAER(:) = (/ 3, 3, 2, 2, 1, 1, 1, 1, 1 /)
94
95NMAXTAER=9
96NTYPAER(:) = 0
97JKBIN(:) = 0
98JKTYP(:) = 0
99
100LEPAERO=.FALSE.
101LAERCLIMG=.FALSE.
102LAERCLIMZ=.FALSE.
103LAERCLIST=.FALSE.
104LAERDRYDP=.FALSE.
105LAEREXTR=.FALSE.
106LAERGBUD=.FALSE.
107LAERNGAT=.FALSE.
108LAERPRNT=.FALSE.
109LAERSCAV=.FALSE.
110LAERSEDIM=.FALSE.
111LAERSURF=.FALSE.
112LAER6SDIA=.FALSE.
113INDBG=1
114NTAER  =0
115NDDUST =2
116
117! the 9 types and assumed number of bins are:
118!  NTYPAER    bins  type
119!     1       1- 3  sea-salt  0.03 - 0.5 -  5  - 20 microns
120!     2       4- 6  dust      0.03 - 0.5 - 0.9 - 20 microns
121!     3       7- 8  POM     hydrophilic, hydrophobic
122!     4       9-10  BC      hydrophilic, hydrophobic
123!     5      11     sulfate
124!     6      12     fly ash
125!     7      13     pseudo-prognostic stratospheric aerosols
126!     8      14     pseudo-prognostic volcanic aerosols
127!     9      15     prognostic stratospheric aerosols
128 
129DO JAER=1,NMAXTAER
130  NTYPAER(JAER)=0
131ENDDO
132
133RLATVOL=-999._JPRB
134RLONVOL=-999._JPRB
135RGELAV =-999._JPRB
136RGEMUV =-999._JPRB
137RDGLAV = 999._JPRB
138RDGMUV = 999._JPRB
139RCLONV =-999._JPRB
140RSLONV =-999._JPRB
141RDCLONV= 999._JPRB
142RDSLONV= 999._JPRB
143DO J=1,3
144  KSTPDBG(J)=-999
145ENDDO
146
147REPSCAER=1.E-15_JPRB
148
149!     ------------------------------------------------------------------
150
151!*         2.       READ VALUES OF PROGNOSTIC AEROSOL CONFIGURATION
152!                   -----------------------------------------------
153! Ce qui concerne NAEAER commente par MPL le 15.04.09
154!IF(NAERO > 0) THEN
155! CALL POSNAM(NULNAM,'NAEAER')
156! READ (NULNAM,NAEAER)
157!ENDIF
158
159IF (.NOT.LE4ALB) THEN
160  NDDUST=2
161ENDIF
162!     ------------------------------------------------------------------
163
164!*       3.    INITIALIZE PROGNOSTIC AEROSOL PHYSICAL AND OPTICAL PARAMETERS
165!              -------------------------------------------------------------
166
167  CALL SU_AERP
168print *,'SU_AERW: apres SU_AERP'
169  CALL SU_AEROP
170print *,'SU_AERW: apres SU_AEROP'
171
172IF (LEPAERO) THEN
173
174! define a composite index for each bin of each different aerosol type to be used
175! in source, sedimentation and deposition routines
176 
177  ICAER=0
178  DO JAER=1,NMAXTAER
179    IF (NTYPAER(JAER) /= 0) THEN
180      NTAER=NTAER+1
181      ITAER=NTYPAER(JAER)
182      DO IAER=1,ITAER
183        ICAER=ICAER+1
184        NINDAER(ICAER)=JAER*10+IAER
185        JKTYP(ICAER)=JAER
186        JKBIN(ICAER)=IAER
187      ENDDO
188    ENDIF
189  ENDDO
190
191!-- if volcanic aerosols, define the model coordinates
192
193  IF (NTYPAER(9) /= 0) THEN
194    RGEMUV=(RLATVOL+90._JPRB)*RPI/180._JPRB
195    RGELAV=RLONVOL*RPI/180._JPRB
196    RCLONV=COS(RGELAV)
197    RSLONV=SIN(RGELAV)
198    DO J=1,NGPTOT-1
199      IF (RGELAV > GELAM(J) .AND. RGELAV <= GELAM(J+1) .AND. &
200        & RGEMUV < RMU(JL) .AND. RGEMUV >= RMU(JL+1) ) THEN
201        RDGMUV=ABS( RMU(J+1) - RMU(J))
202        RDGLAV=ABS( GELAM(J+1)-GELAM(J) )
203        RDSLONV=ABS( SIN(GELAM(JL+1))-SIN(GELAM(JL)) )
204        RDCLONV=ABS( COS(GELAM(JL+1))-COS(GELAM(JL)) )
205      ENDIF
206    ENDDO
207  ENDIF 
208
209!      ----------------------------------------------------------------
210
211!*       4.    PRINT FINAL VALUES.
212!              -------------------
213
214  WRITE(UNIT=NULOUT,FMT='('' LEPAERO = '',L5 &
215   & ,'' NTAER   = '',I2 ,'' NDDUST = '',I1,/&
216   & ,'' NTYPAER = '',9I3,/ &
217   & ,'' NBINAER = '',9I3,/ &
218   & ,'' JKTYP   = '',15I3,/&
219   & ,'' JKBIN   = '',15I3  &
220   & )')&
221   & LEPAERO,NTAER,(NTYPAER(JAER),JAER=1,9),(NBINAER(JAER),JAER=1,9), &
222   & (JKTYP(JAER),JAER=1,15),(JKBIN(JAER),JAER=1,15)
223  WRITE(UNIT=NULOUT,FMT='('' LAERGBUD = '',L3 &
224   & ,'' LAERNGAT = '',L3 &
225   & ,'' LAERDRYDP= '',L3 &
226   & ,'' LAERSEDIM= '',L3 &
227   & ,'' LAERSCAV = '',L3 &
228   & ,'' LAER6SDIA= '',L3 &
229   & ,'' LAERCLIMZ= '',L3 &
230   & ,'' LAERCLIMG= '',L3 &
231   & ,'' LAERCLIST= '',L3 &
232   & )')&
233   & LAERGBUD,LAERNGAT, LAERDRYDP,LAERSEDIM,LAERSCAV,LAER6SDIA,LAERCLIMZ,LAERCLIMG,LAERCLIST
234  WRITE(UNIT=NULOUT,FMT='('' RSSFLX= '',10E10.3)') RSSFLX
235  IF (NTYPAER(9) /= 0) THEN
236    WRITE(UNIT=NULOUT,FMT='('' RLATVOL= '',F5.2 &
237     & ,'' RLONVOL= '',F6.2,'' RGEMUV= '',F6.4,'' RGELAV= '',F6.4 &
238     & ,'' RCLONV = '',F6.4,'' RSLONV= '',F6.4,'' RDGMUV= '',F6.4 &
239     & ,'' RDGLAV = '',F6.4,'' RDCLONV= '',F6.4,'' RDSLONV= '',F6.4 &
240     & )')&
241     & RLATVOL,RLONVOL,RGEMUV,RGELAV,RCLONV,RSLONV,RDGMUV,RDGLAV,RDCLONV,RDSLONV
242  ENDIF
243ENDIF
244
245!     ----------------------------------------------------------------
246IF (LHOOK) CALL DR_HOOK('SU_AERW',1,ZHOOK_HANDLE)
247END SUBROUTINE SU_AERW
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
Note: See TracBrowser for help on using the repository browser.