1 | SUBROUTINE vdif_cd(ngrid,nlay,pz0, |
---|
2 | & pg,pz,pu,pv,pts,ph,pcdv,pcdh) |
---|
3 | IMPLICIT NONE |
---|
4 | c======================================================================= |
---|
5 | c |
---|
6 | c Subject: computation of the surface drag coefficient using the |
---|
7 | c ------- approch developed by Loui for ECMWF. |
---|
8 | c |
---|
9 | c Author: Frederic Hourdin 15 /10 /93 |
---|
10 | c Modified by : Arnaud Colaitis 03/08/11 |
---|
11 | c ------- |
---|
12 | c |
---|
13 | c Arguments: |
---|
14 | c ---------- |
---|
15 | c |
---|
16 | c inputs: |
---|
17 | c ------ |
---|
18 | c ngrid size of the horizontal grid |
---|
19 | c pg gravity (m s -2) |
---|
20 | c pz(ngrid,nlay) height of layers |
---|
21 | c pu(ngrid,nlay) u component of the wind |
---|
22 | c pv(ngrid,nlay) v component of the wind |
---|
23 | c pts(ngrid) surface temperature |
---|
24 | c ph(ngrid) potential temperature T*(p/ps)^kappa |
---|
25 | c |
---|
26 | c outputs: |
---|
27 | c -------- |
---|
28 | c pcdv(ngrid) Cd for the wind |
---|
29 | c pcdh(ngrid) Cd for potential temperature |
---|
30 | c |
---|
31 | c======================================================================= |
---|
32 | c |
---|
33 | c----------------------------------------------------------------------- |
---|
34 | c Declarations: |
---|
35 | c ------------- |
---|
36 | |
---|
37 | #include "comcstfi.h" |
---|
38 | |
---|
39 | c Arguments: |
---|
40 | c ---------- |
---|
41 | |
---|
42 | INTEGER, INTENT(IN) :: ngrid,nlay |
---|
43 | REAL, INTENT(IN) :: pz0(ngrid) |
---|
44 | REAL, INTENT(IN) :: pg,pz(ngrid,nlay) |
---|
45 | REAL, INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay) |
---|
46 | REAL, INTENT(IN) :: pts(ngrid),ph(ngrid,nlay) |
---|
47 | REAL, INTENT(OUT) :: pcdv(ngrid),pcdh(ngrid) ! momentum and heat drag coefficient |
---|
48 | |
---|
49 | c Local: |
---|
50 | c ------ |
---|
51 | |
---|
52 | INTEGER ig |
---|
53 | |
---|
54 | REAL karman,nu ! Von Karman constant and fluid kinematic viscosity |
---|
55 | LOGICAL firstcal |
---|
56 | DATA karman,nu/.41,0.001/ |
---|
57 | DATA firstcal/.true./ |
---|
58 | SAVE karman,nu |
---|
59 | |
---|
60 | c Local(2): |
---|
61 | c --------- |
---|
62 | |
---|
63 | REAL rib(ngrid) ! Bulk Richardson number |
---|
64 | REAL fm(ngrid) ! stability function for momentum |
---|
65 | REAL fh(ngrid) ! stability function for heat |
---|
66 | REAL z1z0,z1z0t ! ratios z1/z0 and z1/z0T |
---|
67 | |
---|
68 | c phim = 1+betam*zeta or (1-bm*zeta)**am |
---|
69 | c phih = alphah + betah*zeta or alphah(1.-bh*zeta)**ah |
---|
70 | REAL betam, betah, alphah, bm, bh, lambda |
---|
71 | c ah and am are assumed to be -0.25 and -0.5 respectively |
---|
72 | |
---|
73 | REAL cdn(ngrid),chn(ngrid) ! neutral momentum and heat drag coefficient |
---|
74 | REAL pz0t ! initial thermal roughness length. (local) |
---|
75 | REAL ric ! critical richardson number |
---|
76 | REAL reynolds(ngrid) ! reynolds number for UBL |
---|
77 | REAL prandtl(ngrid) ! prandtl number for UBL |
---|
78 | REAL pz0tcomp(ngrid) ! computed z0t |
---|
79 | REAL ite |
---|
80 | REAL residual |
---|
81 | c----------------------------------------------------------------------- |
---|
82 | c couche de surface: |
---|
83 | c ------------------ |
---|
84 | |
---|
85 | reynolds(:)=0. |
---|
86 | |
---|
87 | c Original formulation : |
---|
88 | |
---|
89 | ! DO ig=1,ngrid |
---|
90 | ! z1=1.E+0 + pz(ig,1)/pz0(ig) |
---|
91 | ! zcd0=karman/log(z1) |
---|
92 | ! zcd0=zcd0*zcd0 |
---|
93 | ! pcdv(ig)=zcd0 |
---|
94 | ! pcdh(ig)=zcd0 |
---|
95 | ! ENDDO |
---|
96 | |
---|
97 | ! print*,'old : cd,ch; ',pcdv,pcdh |
---|
98 | |
---|
99 | c New formulation (AC) : |
---|
100 | |
---|
101 | c phim = 1+betam*zeta or (1-bm*zeta)**am |
---|
102 | c phih = alphah + betah*zeta or alphah(1.-bh*zeta)**ah |
---|
103 | c am=-0.25, ah=-0.5 |
---|
104 | |
---|
105 | pz0t = 0. ! for the sake of simplicity |
---|
106 | pz0tcomp(:) = 0.1*pz0(:) |
---|
107 | rib(:)=0. |
---|
108 | pcdv(:)=0. |
---|
109 | pcdh(:)=0. |
---|
110 | |
---|
111 | c this formulation assumes alphah=1., implying betah=betam |
---|
112 | c We use Dyer et al. parameters, as they cover a broad range of Richardson numbers : |
---|
113 | bm=16. !UBL |
---|
114 | bh=16. !UBL |
---|
115 | alphah=1. |
---|
116 | betam=5. !SBL |
---|
117 | betah=5. !SBL |
---|
118 | lambda=(sqrt(bh/bm))/alphah |
---|
119 | ric=betah/(betam**2) |
---|
120 | |
---|
121 | DO ig=1,ngrid |
---|
122 | |
---|
123 | ite=0. |
---|
124 | residual=abs(pz0tcomp(ig)-pz0t) |
---|
125 | |
---|
126 | do while((residual .gt. 0.01*pz0(ig)) .and. (ite .lt. 10.)) |
---|
127 | |
---|
128 | pz0t=pz0tcomp(ig) |
---|
129 | |
---|
130 | if ((pu(ig,1) .ne. 0.) .or. (pv(ig,1) .ne. 0.)) then |
---|
131 | |
---|
132 | c Classical Richardson number formulation |
---|
133 | |
---|
134 | c rib(ig) = (pg/ph(ig,1))*pz(ig,1)*(ph(ig,1)-pts(ig)) |
---|
135 | c & /(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1)) |
---|
136 | |
---|
137 | c Richardson number formulation proposed by D.E. England et al. (1995) |
---|
138 | |
---|
139 | rib(ig) = (pg/ph(ig,1)) |
---|
140 | & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t) |
---|
141 | & *(((log(pz(ig,1)/pz0(ig)))**2)/(log(pz(ig,1)/pz0t))) |
---|
142 | & *(ph(ig,1)-pts(ig)) |
---|
143 | & /(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1)) |
---|
144 | |
---|
145 | else |
---|
146 | print*,'warning, infinite Richardson at surface' |
---|
147 | print*,pu(ig,1),pv(ig,1) |
---|
148 | rib(ig) = ric ! traiter ce cas ! |
---|
149 | endif |
---|
150 | |
---|
151 | z1z0=pz(ig,1)/pz0(ig) |
---|
152 | z1z0t=pz(ig,1)/pz0t |
---|
153 | |
---|
154 | cdn(ig)=karman/log(z1z0) |
---|
155 | cdn(ig)=cdn(ig)*cdn(ig) |
---|
156 | chn(ig)=cdn(ig)*log(z1z0)/log(z1z0t) |
---|
157 | |
---|
158 | c Stable case : |
---|
159 | if (rib(ig) .gt. 0.) then |
---|
160 | c From D.E. England et al. (95) |
---|
161 | prandtl(ig)=1. |
---|
162 | if(rib(ig) .lt. ric) then |
---|
163 | c Assuming alphah=1. and bh=bm for stable conditions : |
---|
164 | fm(ig)=((ric-rib(ig))/ric)**2 |
---|
165 | fh(ig)=((ric-rib(ig))/ric)**2 |
---|
166 | else |
---|
167 | c For Ri>Ric, we consider Ri->Infinity => no turbulent mixing at surface |
---|
168 | fm(ig)=0. |
---|
169 | fh(ig)=0. |
---|
170 | endif |
---|
171 | c Unstable case : |
---|
172 | else |
---|
173 | c From D.E. England et al. (95) |
---|
174 | fm(ig)=sqrt(1.-lambda*bm*rib(ig)) |
---|
175 | fh(ig)=(1./alphah)*((1.-lambda*bh*rib(ig))**0.5)* |
---|
176 | & (1.-lambda*bm*rib(ig))**0.25 |
---|
177 | prandtl(ig)=alphah*((1.-lambda*bm*rib(ig))**0.25)/ |
---|
178 | & ((1.-lambda*bh*rib(ig))**0.5) |
---|
179 | endif |
---|
180 | |
---|
181 | reynolds(ig)=karman*sqrt(fm(ig))*sqrt(pu(ig,1)**2 + pv(ig,1)**2) |
---|
182 | & *pz0(ig)/(log(z1z0)*nu) |
---|
183 | pz0tcomp(ig)=pz0(ig)*exp(-karman*7.3* |
---|
184 | & (reynolds(ig)**0.25)*(prandtl(ig)**0.5)) |
---|
185 | |
---|
186 | |
---|
187 | residual = abs(pz0t-pz0tcomp(ig)) |
---|
188 | ite = ite+1 |
---|
189 | ! print*, "iteration nnumber, residual",ite,residual |
---|
190 | |
---|
191 | enddo ! of while |
---|
192 | |
---|
193 | pz0t=0. |
---|
194 | |
---|
195 | c Drag computation : |
---|
196 | |
---|
197 | pcdv(ig)=cdn(ig)*fm(ig) |
---|
198 | pcdh(ig)=chn(ig)*fh(ig) |
---|
199 | |
---|
200 | ENDDO |
---|
201 | ! |
---|
202 | ! print*,'new : cd,ch; ',pcdv,pcdh |
---|
203 | |
---|
204 | ! Some useful diagnostics : |
---|
205 | |
---|
206 | ! call WRITEDIAGFI(ngrid,'Ri', |
---|
207 | ! & 'Richardson nb','no units', |
---|
208 | ! & 2,rib) |
---|
209 | ! call WRITEDIAGFI(ngrid,'Pr', |
---|
210 | ! & 'Prandtl nb','no units', |
---|
211 | ! & 0,prandtl) |
---|
212 | ! call WRITEDIAGFI(ngrid,'Re', |
---|
213 | ! & 'Reynolds nb','no units', |
---|
214 | ! & 0,reynolds) |
---|
215 | ! call WRITEDIAGFI(ngrid,'z0tcomp', |
---|
216 | ! & 'computed z0t','m', |
---|
217 | ! & 2,pz0tcomp) |
---|
218 | |
---|
219 | RETURN |
---|
220 | END |
---|