LMDZ
sutoph.F90
Go to the documentation of this file.
1 !OPTIONS XOPT(NOEVAL)
2 SUBROUTINE sutoph(KULOUT)
3 
4 !**** *SUTOPH* - Initialize common YOMTOPH top parameterization
5 
6 ! Purpose.
7 ! --------
8 ! Initialize YOMTOPH, the common that contains the top pressure
9 ! and the first level of parameterization
10 ! it also contains mesospheric drag vertical profil
11 
12 !** Interface.
13 ! ----------
14 ! *CALL* *SUTOPH(KULOUT)
15 
16 ! Explicit arguments :
17 ! --------------------
18 ! KULOUT : Logical unit for the output
19 
20 ! Implicit arguments :
21 ! --------------------
22 ! COMMON YOMTOPH, YOMSTA
23 
24 ! Method.
25 ! -------
26 ! See documentation
27 
28 ! Externals.
29 ! ----------
30 
31 ! Reference.
32 ! ----------
33 ! Documentation ARPEGE
34 
35 ! Author.
36 ! -------
37 ! A. Lasserre-Bigorry
38 
39 ! Modifications.
40 ! --------------
41 ! Original : 91-06-10
42 ! Modified 92-02-22 by M. Deque (test of consistency between phys. para.)
43 ! Modified by R. EL Khatib : 93-04-02 Set-up defaults controled by LECMWF
44 ! Modified 93-11-17 by Ph. Dandin : FMR scheme with MF physics
45 ! Modified 97-05-17 by M. Deque : frozen FMR
46 ! M.Hamrud 01-Oct-2003 CY28 Cleaning
47 ! F.Bouyssel 04-11-22 : NTCOET,ETCOET
48 ! P. Marquet 05-09-12 : NTAJUC
49 ! M. Deque 05-09-12 : default RCLX
50 ! M. Deque 05-09-12 : default TPSCLIM
51 ! ------------------------------------------------------------------
52 
53 USE parkind1 ,ONLY : jpim ,jprb
54 USE yomhook ,ONLY : lhook, dr_hook
55 
56 USE yomdim , ONLY : nflevg
57 ! Ce qui concerne NULNAM commente par MPL le 15.04.09
58 !USE YOMLUN , ONLY : NULNAM
59 USE yomct0b , ONLY : lecmwf
60 USE yomsta , ONLY : stpre
61 USE yomtoph , ONLY : rmesou ,rmesot ,ntqsat ,ntdifu ,&
69 USE yomphy , ONLY : lray ,lrayfm ,lrayfm15 ,lrrmes
70 USE yoephy , ONLY : lagphy
71 
72 ! ------------------------------------------------------------------
73 
74 IMPLICIT NONE
75 
76 INTEGER(KIND=JPIM),INTENT(IN) :: KULOUT
77 
78 ! ------------------------------------------------------------------
79 
80 INTEGER(KIND=JPIM) :: JLEV
81 
82 REAL(KIND=JPRB) :: PAP, PAPX, ZMEST, ZMESU, ZMESQ
83 
84 REAL(KIND=JPRB) :: PMESQF
85 REAL(KIND=JPRB) :: PMESTF
86 REAL(KIND=JPRB) :: PMESUF
87 REAL(KIND=JPRB) :: ZHOOK_HANDLE
88 
89 ! ------------------------------------------------------------------
90 
91 #include "namtoph.h"
92 
93 ! ------------------------------------------------------------------
94 
95 !* Mesospheric drag shape function
96 
97 ! PMESUF(PAP,PAPX) = MAX( (PAPX-PAP)/MAX(PAP**1.5,1.E-10),0. )
98 pmesuf(pap,papx) = max( (papx-pap)/max(pap,1.e-10_jprb),0.0_jprb )
99 pmestf(pap,papx) = max( (papx-pap)/max(pap,1.e-10_jprb),0.0_jprb )
100 pmesqf(pap,papx) = max( (papx-pap)/max(pap,1.e-10_jprb),0.0_jprb )
101 
102 ! ------------------------------------------------------------------
103 
104 #include "abor1.intfb.h"
105 #include "posnam.intfb.h"
106 #include "seapre.intfb.h"
107 
108 ! ------------------------------------------------------------------
109 
110 IF (lhook) CALL dr_hook('SUTOPH',0,zhook_handle)
111 
112 ! ------------------------------------------------------------------
113 
114 !* 1. Set default values.
115 ! -------------------
116 
117 ! 1.1 Set implicit default values
118 
119 etqsat=0._jprb
120 etdifu=0._jprb
121 etcoef=0._jprb
122 etdrag=0._jprb
123 etcvim=0._jprb
124 etplui=0._jprb
125 etradi=0._jprb
126 etnebu=0._jprb
127 etozon=0._jprb
128 etdrme=0._jprb
129 etcoet=0._jprb
130 etajuc=0._jprb
131 ntqsat=1
132 ntdifu=1
133 ntcoef=1
134 ntdrag=1
135 ntcvim=1
136 ntplui=1
137 ntradi=1
138 ntnebu=1
139 ntozon=1
140 ntdrme=1
141 ntcoet=1
142 ntajuc=1
143 
144 xdrmuk=0._jprb
145 xdrmux=0._jprb
146 xdrmup=0._jprb
147 xdrmtk=0._jprb
148 xdrmtx=0._jprb
149 xdrmtp=0._jprb
150 xdrmqk=0._jprb
151 xdrmqp=0._jprb
152 
153 rfmesoq=3.725e-06_jprb
154 rclx=0.0_jprb
155 tpsclim=197._jprb
156 
157 ! 1.2 Modify default values according to LECMWF
158 
159 IF (lecmwf) THEN
160 ELSE
161 ENDIF
162 
163 ! ------------------------------------------------------------------
164 
165 !* 2. Modify default values.
166 ! ----------------------
167 
168 ! Ce qui concerne NAMTOPH commente par MPL le 15.04.09
169 !CALL POSNAM(NULNAM,'NAMTOPH')
170 !READ(NULNAM,NAMTOPH)
171 
172 !* 2.1 Search corresponding level, to pressure in NAMTOPH
173 ! for each parameterization
174 
175 IF(etqsat /= 0.0_jprb) CALL seapre (etqsat,ntqsat,stpre,nflevg)
176 IF(etdifu /= 0.0_jprb) CALL seapre (etdifu,ntdifu,stpre,nflevg)
177 IF(etcoef /= 0.0_jprb) CALL seapre (etcoef,ntcoef,stpre,nflevg)
178 IF(etdrag /= 0.0_jprb) CALL seapre (etdrag,ntdrag,stpre,nflevg)
179 IF(etcvim /= 0.0_jprb) CALL seapre (etcvim,ntcvim,stpre,nflevg)
180 IF(etplui /= 0.0_jprb) CALL seapre (etplui,ntplui,stpre,nflevg)
181 IF(etradi /= 0.0_jprb) THEN
182  IF (lray) THEN
184  ENDIF
185  IF (lrayfm.OR.lrayfm15) THEN
186  etradi=0._jprb
187  ntradi=1
188  ENDIF
189 ENDIF
190 IF(etnebu /= 0.0_jprb) CALL seapre (etnebu,ntnebu,stpre,nflevg)
191 IF(etozon /= 0.0_jprb) CALL seapre (etozon,ntozon,stpre,nflevg)
192 IF(etdrme /= 0.0_jprb) CALL seapre (etdrme,ntdrme,stpre,nflevg)
193 IF(etcoet /= 0.0_jprb) CALL seapre (etcoet,ntcoet,stpre,nflevg)
194 IF(etajuc /= 0.0_jprb) CALL seapre (etajuc,ntajuc,stpre,nflevg)
195 ! ------------------------------------------------------------------
196 
197 !* 3. Print final values.
198 ! -------------------
199 
200 WRITE(unit=kulout,fmt='('' COMMON YOMTOPH '')')
201 WRITE(unit=kulout,fmt='('' ETQSAT = '',E10.4,'' NTQSAT = '',I10 &
202  & ,'' ETDIFU = '',E10.4,'' NTDIFU = '',I10 &
203  & ,/,'' ETCOEF = '',E10.4,'' NTCOEF = '',I10 &
204  & ,'' ETDRAG = '',E10.4,'' NTDRAG = '',I10 &
205  & ,/,'' ETCVIM = '',E10.4,'' NTCVIM = '',I10 &
206  & ,'' ETPLUI = '',E10.4,'' NTPLUI = '',I10 &
207  & ,/,'' ETRADI = '',E10.4,'' NTRADI = '',I10 &
208  & ,'' ETNEBU = '',E10.4,'' NTNEBU = '',I10 &
209  & ,/,'' ETOZON = '',E10.4,'' NTOZON = '',I10 &
210  & ,'' ETDRME = '',E10.4,'' NTDRME = '',I10 &
211  & ,/,'' ETCOET = '',E10.4,'' NTCOET = '',I10 &
212  & ,/,'' ETAJUC = '',E10.4,'' NTAJUC = '',I10 &
213  & ,/,'' XDRMUK = '',E10.4,'' XDRMUP = '',E10.4 &
214  & ,'' XDRMUX = '',E10.4,'' XDRMTK = '',E10.4 &
215  & ,'' XDRMTP = '',E10.4,'' XDRMTX = '',E10.4 &
216  & ,'' XDRMQK = '',E11.4,'' XDRMQP = '',E11.4 &
217  & ,/,'' RFMESOQ= '',E11.4,'' RCLX = '',E11.4 &
218  & )')&
224  & ,etcoet,ntcoet &
225  & ,etajuc,ntajuc &
228 
229 ! VERIFICATION OF CONSISTENCY BETWEEN PHYSICAL PARAMETERIZATION
230 
231 IF (etcoef > etdifu.OR.etcoef > etdrag)THEN
232  WRITE(unit=kulout,fmt='('' ETCOEF TOO LOW '')')
233  CALL abor1('SUTOPH')
234 ENDIF
235 IF (etqsat > etnebu.OR.etqsat > etplui.OR.etqsat > etcvim)THEN
236  WRITE(unit=kulout,fmt='('' ETQSAT TOO LOW '')')
237  CALL abor1('SUTOPH')
238 ENDIF
239 IF (etcvim > etnebu)THEN
240  WRITE(unit=kulout,fmt='('' ETCVIM TOO LOW '')')
241  CALL abor1('SUTOPH')
242 ENDIF
243 
244 ! ------------------------------------------------------------------
245 
246 !* 4. INITIALIZE MESOSPHERIC DRAG FOR U,V AND T
247 ! -----------------------------------------
248 
249 IF (lrrmes.AND..NOT.lagphy) THEN
250  WRITE (unit=kulout,fmt='('' PROFIL VERTICAL DE DRAG MESO'',/&
251  & ,'' LEV'',T15,''VITESSE'',T45,''TEMPERATURE'' &
252  & , T65, ''HUMIDITE'' )')
253  DO jlev=1,nflevg
254  rmesou(jlev)=xdrmuk*pmesuf(stpre(jlev),xdrmup)
255  rmesot(jlev)=xdrmtk*pmestf(stpre(jlev),xdrmtp)
256  rmesoq(jlev)=xdrmqk*pmesqf(stpre(jlev),xdrmqp)
257  IF (xdrmux /= 0.0_jprb) rmesou(jlev)=min(rmesou(jlev),xdrmux)
258  IF (xdrmtx /= 0.0_jprb) rmesot(jlev)=min(rmesot(jlev),xdrmtx)
259  zmesu=1.0_jprb/max(1.e-8_jprb,rmesou(jlev)*3600._jprb*24._jprb)
260  zmest=1.0_jprb/max(1.e-8_jprb,rmesot(jlev)*3600._jprb*24._jprb)
261  zmesq=1.0_jprb/max(1.e-8_jprb,rmesoq(jlev)*3600._jprb*24._jprb)
262  WRITE (unit=kulout,fmt='(I3,T10,E9.3,T20,G9.3,T40,E9.3,T50 &
263  & ,G9.3, T70,E9.3, T80,G9.3)') jlev,rmesou(jlev),zmesu, &
264  & rmesot(jlev),zmest, &
265  & rmesoq(jlev),zmesq
266  ENDDO
267 ENDIF
268 
269 ! ------------------------------------------------------------------
270 
271 IF (lhook) CALL dr_hook('SUTOPH',1,zhook_handle)
272 END SUBROUTINE sutoph
Definition: yoephy.F90:1
real(kind=jprb) etozon
Definition: yomtoph.F90:70
real(kind=jprb) xdrmtp
Definition: yomtoph.F90:80
integer(kind=jpim) ntozon
Definition: yomtoph.F90:57
real(kind=jprb) etcvim
Definition: yomtoph.F90:66
integer(kind=jpim) ntdifu
Definition: yomtoph.F90:50
logical lrrmes
Definition: yomphy.F90:372
real(kind=jprb) etajuc
Definition: yomtoph.F90:74
logical lrayfm
Definition: yomphy.F90:370
real(kind=jprb), dimension(:), allocatable stpre
Definition: yomsta.F90:44
real(kind=jprb) etnebu
Definition: yomtoph.F90:69
real(kind=jprb), dimension(:), allocatable rmesot
Definition: yomtoph.F90:44
logical lrayfm15
Definition: yomphy.F90:371
real(kind=jprb) etdrag
Definition: yomtoph.F90:65
subroutine sutoph(KULOUT)
Definition: sutoph.F90:3
integer(kind=jpim) ntcoef
Definition: yomtoph.F90:51
logical lray
Definition: yomphy.F90:369
real(kind=jprb) etqsat
Definition: yomtoph.F90:62
real(kind=jprb) etplui
Definition: yomtoph.F90:67
real(kind=jprb) tpsclim
Definition: yomtoph.F90:86
real(kind=jprb) etcoet
Definition: yomtoph.F90:73
subroutine abor1(CDTEXT)
Definition: abor1.F90:2
real(kind=jprb) xdrmqp
Definition: yomtoph.F90:82
integer(kind=jpim) nflevg
Definition: yomdim.F90:112
integer(kind=jpim) ntnebu
Definition: yomtoph.F90:56
logical lagphy
Definition: yoephy.F90:29
logical lecmwf
Definition: yomct0b.F90:15
Definition: yomsta.F90:1
integer(kind=jpim) ntdrag
Definition: yomtoph.F90:52
integer, parameter jprb
Definition: parkind1.F90:31
integer(kind=jpim) ntcvim
Definition: yomtoph.F90:53
integer(kind=jpim) ntajuc
Definition: yomtoph.F90:61
integer(kind=jpim) ntdrme
Definition: yomtoph.F90:58
real(kind=jprb) rclx
Definition: yomtoph.F90:84
real(kind=jprb) etradi
Definition: yomtoph.F90:68
real(kind=jprb) etcoef
Definition: yomtoph.F90:64
Definition: yomdim.F90:1
integer(kind=jpim) ntplui
Definition: yomtoph.F90:54
real(kind=jprb) xdrmuk
Definition: yomtoph.F90:75
real(kind=jprb) xdrmtx
Definition: yomtoph.F90:79
logical lhook
Definition: yomhook.F90:12
real(kind=jprb) etdrme
Definition: yomtoph.F90:71
real(kind=jprb) xdrmqk
Definition: yomtoph.F90:81
integer(kind=jpim) ntqsat
Definition: yomtoph.F90:49
integer(kind=jpim) ntradi
Definition: yomtoph.F90:55
subroutine dr_hook(CDNAME, KSWITCH, PKEY)
Definition: yomhook.F90:17
integer(kind=jpim) ntcoet
Definition: yomtoph.F90:60
Definition: yomphy.F90:1
real(kind=jprb) xdrmux
Definition: yomtoph.F90:76
subroutine seapre(PARA, KPARA, PSTPRE, KLEV)
Definition: seapre.F90:2
integer, parameter jpim
Definition: parkind1.F90:13
real(kind=jprb), dimension(:), allocatable rmesou
Definition: yomtoph.F90:43
real(kind=jprb) xdrmup
Definition: yomtoph.F90:77
!$Header!integer nvarmx s s unit
Definition: gradsdef.h:20
real(kind=jprb) xdrmtk
Definition: yomtoph.F90:78
real(kind=jprb) rfmesoq
Definition: yomtoph.F90:47
real(kind=jprb), dimension(:), allocatable rmesoq
Definition: yomtoph.F90:45
real(kind=jprb) etdifu
Definition: yomtoph.F90:63