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