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 | implicit none |
---|
55 | C |
---|
56 | |
---|
57 | C |
---|
58 | |
---|
59 | #include "dimensions.h" |
---|
60 | #include "dimphys.h" |
---|
61 | #include "dimradmars.h" |
---|
62 | integer klon,klev,kidia,kfdia |
---|
63 | #include "yoegwd.h" |
---|
64 | |
---|
65 | C----------------------------------------------------------------------- |
---|
66 | C |
---|
67 | C* 0.1 ARGUMENTS |
---|
68 | C --------- |
---|
69 | C |
---|
70 | integer kgwd |
---|
71 | INTEGER KKCRIT(NDLO2),KKCRITH(NDLO2),KCRIT(NDLO2) |
---|
72 | * ,kdx(NDLO2),ktest(NDLO2) |
---|
73 | * ,kkenvh(NDLO2),kknu(NDLO2),kknu2(NDLO2) |
---|
74 | C |
---|
75 | REAL PAPHM1(NDLO2,klev+1), PSTAB(NDLO2,klev+1), |
---|
76 | * PRHO (NDLO2,klev+1), PVPH (NDLO2,klev+1), |
---|
77 | * PRI (NDLO2,klev+1), PTFR (NDLO2), PTAU(NDLO2,klev+1), |
---|
78 | * ptauf (NDLO2,klev+1) |
---|
79 | |
---|
80 | REAL pdmod (NDLO2) , pnu (NDLO2) , psig(NDLO2), |
---|
81 | * pgamma(NDLO2) , pvar(NDLO2) |
---|
82 | |
---|
83 | C----------------------------------------------------------------------- |
---|
84 | C |
---|
85 | C* 0.2 LOCAL ARRAYS |
---|
86 | C ------------ |
---|
87 | C |
---|
88 | c declarations pour 'implicit none" |
---|
89 | real zsqr,zalfa,zriw,zalpha,zb,zdel,zdz2n,zdelp,zdelpt |
---|
90 | |
---|
91 | integer ji,jk,jl,ilevh |
---|
92 | REAL ZDZ2 (NDLO2,nlayermx) , ZNORM(NDLO2) , zoro(NDLO2) |
---|
93 | REAL ZTAU (NDLO2,nlayermx+1) |
---|
94 | C |
---|
95 | C----------------------------------------------------------------------- |
---|
96 | C |
---|
97 | C* 1. INITIALIZATION |
---|
98 | C -------------- |
---|
99 | |
---|
100 | |
---|
101 | kidia=1 |
---|
102 | kfdia=klon |
---|
103 | |
---|
104 | 100 CONTINUE |
---|
105 | C |
---|
106 | C |
---|
107 | C* COMPUTATIONAL CONSTANTS. |
---|
108 | C ------------- ---------- |
---|
109 | C |
---|
110 | ilevh=KLEV/3 |
---|
111 | C |
---|
112 | DO 400 ji=1,kgwd |
---|
113 | jl=kdx(ji) |
---|
114 | Zoro(JL)=Psig(JL)*Pdmod(JL)/4./max(pvar(jl),1.0) |
---|
115 | ZTAU(JL,KKNU(JL)+1)=PTAU(JL,KKNU(JL)+1) |
---|
116 | ZTAU(JL,KLEV+1)=PTAU(JL,KLEV+1) |
---|
117 | 400 CONTINUE |
---|
118 | C |
---|
119 | DO 430 JK=KLEV,2,-1 |
---|
120 | C |
---|
121 | C |
---|
122 | C* 4.1 CONSTANT WAVE STRESS UNTIL TOP OF THE |
---|
123 | C BLOCKING LAYER. |
---|
124 | 410 CONTINUE |
---|
125 | C |
---|
126 | DO 411 ji=1,kgwd |
---|
127 | jl=kdx(ji) |
---|
128 | IF(JK.GE.KKNU2(JL)) THEN |
---|
129 | PTAU(JL,JK)=ZTAU(JL,KLEV+1) |
---|
130 | ENDIF |
---|
131 | 411 CONTINUE |
---|
132 | C |
---|
133 | C* 4.15 CONSTANT SHEAR STRESS UNTIL THE TOP OF THE |
---|
134 | C LOW LEVEL FLOW LAYER. |
---|
135 | 415 CONTINUE |
---|
136 | C |
---|
137 | C |
---|
138 | C* 4.2 WAVE DISPLACEMENT AT NEXT LEVEL. |
---|
139 | C |
---|
140 | 420 CONTINUE |
---|
141 | C |
---|
142 | DO 421 ji=1,kgwd |
---|
143 | jl=kdx(ji) |
---|
144 | IF(JK.LT.KKNU2(JL)) THEN |
---|
145 | ZNORM(JL)=gkdrag*PRHO(JL,JK)*SQRT(PSTAB(JL,JK))*PVPH(JL,JK) |
---|
146 | * *zoro(jl) |
---|
147 | ZDZ2(JL,JK)=PTAU(JL,JK+1)/max(ZNORM(JL),gssec) |
---|
148 | ENDIF |
---|
149 | 421 CONTINUE |
---|
150 | C |
---|
151 | C* 4.3 WAVE RICHARDSON NUMBER, NEW WAVE DISPLACEMENT |
---|
152 | C* AND STRESS: BREAKING EVALUATION AND CRITICAL |
---|
153 | C LEVEL |
---|
154 | C |
---|
155 | DO 431 ji=1,kgwd |
---|
156 | jl=kdx(ji) |
---|
157 | IF(JK.LT.KKNU2(JL)) THEN |
---|
158 | IF((PTAU(JL,JK+1).LT.GTSEC).OR.(JK.LE.KCRIT(JL))) THEN |
---|
159 | PTAU(JL,JK)=0.0 |
---|
160 | ELSE |
---|
161 | ZSQR=SQRT(PRI(JL,JK)) |
---|
162 | ZALFA=SQRT(PSTAB(JL,JK)*ZDZ2(JL,JK))/PVPH(JL,JK) |
---|
163 | ZRIW=PRI(JL,JK)*(1.-ZALFA)/(1+ZALFA*ZSQR)**2 |
---|
164 | IF(ZRIW.LT.GRCRIT) THEN |
---|
165 | ZDEL=4./ZSQR/GRCRIT+1./GRCRIT**2+4./GRCRIT |
---|
166 | ZB=1./GRCRIT+2./ZSQR |
---|
167 | ZALPHA=0.5*(-ZB+SQRT(ZDEL)) |
---|
168 | ZDZ2N=(PVPH(JL,JK)*ZALPHA)**2/PSTAB(JL,JK) |
---|
169 | PTAU(JL,JK)=ZNORM(JL)*ZDZ2N |
---|
170 | ELSE |
---|
171 | PTAU(JL,JK)=ZNORM(JL)*ZDZ2(JL,JK) |
---|
172 | ENDIF |
---|
173 | PTAU(JL,JK)=MIN(PTAU(JL,JK),PTAU(JL,JK+1)) |
---|
174 | ENDIF |
---|
175 | ENDIF |
---|
176 | 431 CONTINUE |
---|
177 | |
---|
178 | 430 CONTINUE |
---|
179 | 440 CONTINUE |
---|
180 | |
---|
181 | c write(*,*) 'ptau' |
---|
182 | c write(*,99) ((ji,ilevh,ptau(ji,ilevh),ji=1,NDLO2), |
---|
183 | c . ilevh=1,nlayermx+1) |
---|
184 | 99 FORMAT(i3,i3,f15.5) |
---|
185 | |
---|
186 | |
---|
187 | C REORGANISATION OF THE STRESS PROFILE |
---|
188 | C IF BREAKING OCCURS AT LOW LEVEL: |
---|
189 | |
---|
190 | DO 530 ji=1,kgwd |
---|
191 | jl=kdx(ji) |
---|
192 | ZTAU(JL,KKENVH(JL))=PTAU(JL,KKENVH(JL)) |
---|
193 | ZTAU(JL,KKCRITH(JL))=PTAU(JL,KKCRITH(JL)) |
---|
194 | 530 CONTINUE |
---|
195 | |
---|
196 | DO 531 JK=1,KLEV |
---|
197 | |
---|
198 | DO 532 ji=1,kgwd |
---|
199 | jl=kdx(ji) |
---|
200 | |
---|
201 | IF(JK.GT.KKCRITH(JL).AND.JK.LT.KKENVH(JL))THEN |
---|
202 | |
---|
203 | ZDELP=PAPHM1(JL,JK)-PAPHM1(JL,KKENVH(JL)) |
---|
204 | ZDELPT=PAPHM1(JL,KKCRITH(JL))-PAPHM1(JL,KKENVH(JL)) |
---|
205 | PTAU(JL,JK)=ZTAU(JL,KKENVH(JL)) + |
---|
206 | . (ZTAU(JL,KKCRITH(JL))-ZTAU(JL,KKENVH(JL)) )* |
---|
207 | . ZDELP/ZDELPT |
---|
208 | |
---|
209 | ENDIF |
---|
210 | |
---|
211 | 532 CONTINUE |
---|
212 | |
---|
213 | 531 CONTINUE |
---|
214 | |
---|
215 | RETURN |
---|
216 | END |
---|