1 | SUBROUTINE GWPROFIL |
---|
2 | * ( klon, klev |
---|
3 | * , kgwd ,kdx , ktest |
---|
4 | * , KKCRIT, KKCRITH, KCRIT , kkenvh, kknu,kknu2 |
---|
5 | * , PAPHM1, PRHO , PSTAB , PTFR , PVPH , PRI , PTAU |
---|
6 | * , ptauf ,pdmod , pnu , psig ,pgamma, pvar ) |
---|
7 | |
---|
8 | C**** *GWPROFIL* |
---|
9 | C |
---|
10 | C PURPOSE. |
---|
11 | C -------- |
---|
12 | C |
---|
13 | C** INTERFACE. |
---|
14 | C ---------- |
---|
15 | C FROM *GWDRAG* |
---|
16 | C |
---|
17 | C EXPLICIT ARGUMENTS : |
---|
18 | C -------------------- |
---|
19 | C ==== INPUTS === |
---|
20 | C ==== OUTPUTS === |
---|
21 | C |
---|
22 | C IMPLICIT ARGUMENTS : NONE |
---|
23 | C -------------------- |
---|
24 | C |
---|
25 | C METHOD: |
---|
26 | C ------- |
---|
27 | C THE STRESS PROFILE FOR GRAVITY WAVES IS COMPUTED AS FOLLOWS: |
---|
28 | C IT IS CONSTANT (NO GWD) AT THE LEVELS BETWEEN THE GROUND |
---|
29 | C AND THE TOP OF THE BLOCKED LAYER (KKENVH). |
---|
30 | C IT DECREASES LINEARLY WITH HEIGHTS FROM THE TOP OF THE |
---|
31 | C BLOCKED LAYER TO 3*VAROR (kKNU), TO SIMULATES LEE WAVES OR |
---|
32 | C NONLINEAR GRAVITY WAVE BREAKING. |
---|
33 | C ABOVE IT IS CONSTANT, EXCEPT WHEN THE WAVE ENCOUNTERS A CRITICAL |
---|
34 | C LEVEL (KCRIT) OR WHEN IT BREAKS. |
---|
35 | C |
---|
36 | C |
---|
37 | C |
---|
38 | C EXTERNALS. |
---|
39 | C ---------- |
---|
40 | C |
---|
41 | C |
---|
42 | C REFERENCE. |
---|
43 | C ---------- |
---|
44 | C |
---|
45 | C SEE ECMWF RESEARCH DEPARTMENT DOCUMENTATION OF THE "I.F.S." |
---|
46 | C |
---|
47 | C AUTHOR. |
---|
48 | C ------- |
---|
49 | C |
---|
50 | C MODIFICATIONS. |
---|
51 | C -------------- |
---|
52 | C PASSAGE OF THE NEW GWDRAG TO I.F.S. (F. LOTT, 22/11/93) |
---|
53 | C----------------------------------------------------------------------- |
---|
54 | use dimradmars_mod, only: ndlo2 |
---|
55 | implicit none |
---|
56 | C |
---|
57 | |
---|
58 | C |
---|
59 | |
---|
60 | integer klon,klev,kidia,kfdia |
---|
61 | #include "yoegwd.h" |
---|
62 | |
---|
63 | C----------------------------------------------------------------------- |
---|
64 | C |
---|
65 | C* 0.1 ARGUMENTS |
---|
66 | C --------- |
---|
67 | C |
---|
68 | integer kgwd |
---|
69 | INTEGER KKCRIT(NDLO2),KKCRITH(NDLO2),KCRIT(NDLO2) |
---|
70 | * ,kdx(NDLO2),ktest(NDLO2) |
---|
71 | * ,kkenvh(NDLO2),kknu(NDLO2),kknu2(NDLO2) |
---|
72 | C |
---|
73 | REAL PAPHM1(NDLO2,klev+1), PSTAB(NDLO2,klev+1), |
---|
74 | * PRHO (NDLO2,klev+1), PVPH (NDLO2,klev+1), |
---|
75 | * PRI (NDLO2,klev+1), PTFR (NDLO2), PTAU(NDLO2,klev+1), |
---|
76 | * ptauf (NDLO2,klev+1) |
---|
77 | |
---|
78 | REAL pdmod (NDLO2) , pnu (NDLO2) , psig(NDLO2), |
---|
79 | * pgamma(NDLO2) , pvar(NDLO2) |
---|
80 | |
---|
81 | C----------------------------------------------------------------------- |
---|
82 | C |
---|
83 | C* 0.2 LOCAL ARRAYS |
---|
84 | C ------------ |
---|
85 | C |
---|
86 | c declarations pour 'implicit none" |
---|
87 | real zsqr,zalfa,zriw,zalpha,zb,zdel,zdz2n,zdelp,zdelpt |
---|
88 | |
---|
89 | integer ji,jk,jl,ilevh |
---|
90 | REAL ZDZ2 (NDLO2,klev) , ZNORM(NDLO2) , zoro(NDLO2) |
---|
91 | REAL ZTAU (NDLO2,klev+1) |
---|
92 | C |
---|
93 | C----------------------------------------------------------------------- |
---|
94 | C |
---|
95 | C* 1. INITIALIZATION |
---|
96 | C -------------- |
---|
97 | |
---|
98 | |
---|
99 | kidia=1 |
---|
100 | kfdia=klon |
---|
101 | |
---|
102 | 100 CONTINUE |
---|
103 | C |
---|
104 | C |
---|
105 | C* COMPUTATIONAL CONSTANTS. |
---|
106 | C ------------- ---------- |
---|
107 | C |
---|
108 | ilevh=KLEV/3 |
---|
109 | C |
---|
110 | DO 400 ji=1,kgwd |
---|
111 | jl=kdx(ji) |
---|
112 | Zoro(JL)=Psig(JL)*Pdmod(JL)/4./max(pvar(jl),1.0) |
---|
113 | ZTAU(JL,KKNU(JL)+1)=PTAU(JL,KKNU(JL)+1) |
---|
114 | ZTAU(JL,KLEV+1)=PTAU(JL,KLEV+1) |
---|
115 | 400 CONTINUE |
---|
116 | C |
---|
117 | DO 430 JK=KLEV,2,-1 |
---|
118 | C |
---|
119 | C |
---|
120 | C* 4.1 CONSTANT WAVE STRESS UNTIL TOP OF THE |
---|
121 | C BLOCKING LAYER. |
---|
122 | 410 CONTINUE |
---|
123 | C |
---|
124 | DO 411 ji=1,kgwd |
---|
125 | jl=kdx(ji) |
---|
126 | IF(JK.GE.KKNU2(JL)) THEN |
---|
127 | PTAU(JL,JK)=ZTAU(JL,KLEV+1) |
---|
128 | ENDIF |
---|
129 | 411 CONTINUE |
---|
130 | C |
---|
131 | C* 4.15 CONSTANT SHEAR STRESS UNTIL THE TOP OF THE |
---|
132 | C LOW LEVEL FLOW LAYER. |
---|
133 | 415 CONTINUE |
---|
134 | C |
---|
135 | C |
---|
136 | C* 4.2 WAVE DISPLACEMENT AT NEXT LEVEL. |
---|
137 | C |
---|
138 | 420 CONTINUE |
---|
139 | C |
---|
140 | DO 421 ji=1,kgwd |
---|
141 | jl=kdx(ji) |
---|
142 | IF(JK.LT.KKNU2(JL)) THEN |
---|
143 | ZNORM(JL)=gkdrag*PRHO(JL,JK)*SQRT(PSTAB(JL,JK))*PVPH(JL,JK) |
---|
144 | * *zoro(jl) |
---|
145 | ZDZ2(JL,JK)=PTAU(JL,JK+1)/max(ZNORM(JL),gssec) |
---|
146 | ENDIF |
---|
147 | 421 CONTINUE |
---|
148 | C |
---|
149 | C* 4.3 WAVE RICHARDSON NUMBER, NEW WAVE DISPLACEMENT |
---|
150 | C* AND STRESS: BREAKING EVALUATION AND CRITICAL |
---|
151 | C LEVEL |
---|
152 | C |
---|
153 | DO 431 ji=1,kgwd |
---|
154 | jl=kdx(ji) |
---|
155 | IF(JK.LT.KKNU2(JL)) THEN |
---|
156 | IF((PTAU(JL,JK+1).LT.GTSEC).OR.(JK.LE.KCRIT(JL))) THEN |
---|
157 | PTAU(JL,JK)=0.0 |
---|
158 | ELSE |
---|
159 | ZSQR=SQRT(PRI(JL,JK)) |
---|
160 | ZALFA=SQRT(PSTAB(JL,JK)*ZDZ2(JL,JK))/PVPH(JL,JK) |
---|
161 | ZRIW=PRI(JL,JK)*(1.-ZALFA)/(1+ZALFA*ZSQR)**2 |
---|
162 | IF(ZRIW.LT.GRCRIT) THEN |
---|
163 | ZDEL=4./ZSQR/GRCRIT+1./GRCRIT**2+4./GRCRIT |
---|
164 | ZB=1./GRCRIT+2./ZSQR |
---|
165 | ZALPHA=0.5*(-ZB+SQRT(ZDEL)) |
---|
166 | ZDZ2N=(PVPH(JL,JK)*ZALPHA)**2/PSTAB(JL,JK) |
---|
167 | PTAU(JL,JK)=ZNORM(JL)*ZDZ2N |
---|
168 | ELSE |
---|
169 | PTAU(JL,JK)=ZNORM(JL)*ZDZ2(JL,JK) |
---|
170 | ENDIF |
---|
171 | PTAU(JL,JK)=MIN(PTAU(JL,JK),PTAU(JL,JK+1)) |
---|
172 | ENDIF |
---|
173 | ENDIF |
---|
174 | 431 CONTINUE |
---|
175 | |
---|
176 | 430 CONTINUE |
---|
177 | 440 CONTINUE |
---|
178 | |
---|
179 | c write(*,*) 'ptau' |
---|
180 | c write(*,99) ((ji,ilevh,ptau(ji,ilevh),ji=1,NDLO2), |
---|
181 | c . ilevh=1,klev+1) |
---|
182 | 99 FORMAT(i3,i3,f15.5) |
---|
183 | |
---|
184 | |
---|
185 | C REORGANISATION OF THE STRESS PROFILE |
---|
186 | C IF BREAKING OCCURS AT LOW LEVEL: |
---|
187 | |
---|
188 | DO 530 ji=1,kgwd |
---|
189 | jl=kdx(ji) |
---|
190 | ZTAU(JL,KKENVH(JL))=PTAU(JL,KKENVH(JL)) |
---|
191 | ZTAU(JL,KKCRITH(JL))=PTAU(JL,KKCRITH(JL)) |
---|
192 | 530 CONTINUE |
---|
193 | |
---|
194 | DO 531 JK=1,KLEV |
---|
195 | |
---|
196 | DO 532 ji=1,kgwd |
---|
197 | jl=kdx(ji) |
---|
198 | |
---|
199 | IF(JK.GT.KKCRITH(JL).AND.JK.LT.KKENVH(JL))THEN |
---|
200 | |
---|
201 | ZDELP=PAPHM1(JL,JK)-PAPHM1(JL,KKENVH(JL)) |
---|
202 | ZDELPT=PAPHM1(JL,KKCRITH(JL))-PAPHM1(JL,KKENVH(JL)) |
---|
203 | PTAU(JL,JK)=ZTAU(JL,KKENVH(JL)) + |
---|
204 | . (ZTAU(JL,KKCRITH(JL))-ZTAU(JL,KKENVH(JL)) )* |
---|
205 | . ZDELP/ZDELPT |
---|
206 | |
---|
207 | ENDIF |
---|
208 | |
---|
209 | 532 CONTINUE |
---|
210 | |
---|
211 | 531 CONTINUE |
---|
212 | |
---|
213 | RETURN |
---|
214 | END |
---|