[256] | 1 | SUBROUTINE vdif_cd(ngrid,nlay,pz0, |
---|
[268] | 2 | & pg,pz,pu,pv,wmax,pts,ph,pcdv,pcdh) |
---|
[38] | 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 |
---|
[256] | 10 | c Modified by : Arnaud Colaitis 03/08/11 |
---|
[38] | 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) |
---|
[256] | 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 |
---|
[38] | 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 | |
---|
[256] | 37 | #include "comcstfi.h" |
---|
[284] | 38 | #include "callkeys.h" |
---|
[256] | 39 | |
---|
[38] | 40 | c Arguments: |
---|
| 41 | c ---------- |
---|
| 42 | |
---|
[256] | 43 | INTEGER, INTENT(IN) :: ngrid,nlay |
---|
| 44 | REAL, INTENT(IN) :: pz0(ngrid) |
---|
| 45 | REAL, INTENT(IN) :: pg,pz(ngrid,nlay) |
---|
| 46 | REAL, INTENT(IN) :: pu(ngrid,nlay),pv(ngrid,nlay) |
---|
| 47 | REAL, INTENT(IN) :: pts(ngrid),ph(ngrid,nlay) |
---|
[268] | 48 | REAL, INTENT(IN) :: wmax(ngrid) |
---|
[256] | 49 | REAL, INTENT(OUT) :: pcdv(ngrid),pcdh(ngrid) ! momentum and heat drag coefficient |
---|
[38] | 50 | |
---|
| 51 | c Local: |
---|
| 52 | c ------ |
---|
| 53 | |
---|
| 54 | INTEGER ig |
---|
| 55 | |
---|
[267] | 56 | REAL karman,nu ! Von Karman constant and fluid kinematic viscosity |
---|
[38] | 57 | LOGICAL firstcal |
---|
[267] | 58 | DATA karman,nu/.41,0.001/ |
---|
[38] | 59 | DATA firstcal/.true./ |
---|
[267] | 60 | SAVE karman,nu |
---|
[38] | 61 | |
---|
[256] | 62 | c Local(2): |
---|
| 63 | c --------- |
---|
[276] | 64 | REAL z1,zcd0 |
---|
[256] | 65 | |
---|
| 66 | REAL rib(ngrid) ! Bulk Richardson number |
---|
[268] | 67 | REAL rig(ngrid) ! Gradient Richardson number |
---|
[256] | 68 | REAL fm(ngrid) ! stability function for momentum |
---|
| 69 | REAL fh(ngrid) ! stability function for heat |
---|
| 70 | REAL z1z0,z1z0t ! ratios z1/z0 and z1/z0T |
---|
| 71 | |
---|
| 72 | c phim = 1+betam*zeta or (1-bm*zeta)**am |
---|
| 73 | c phih = alphah + betah*zeta or alphah(1.-bh*zeta)**ah |
---|
| 74 | REAL betam, betah, alphah, bm, bh, lambda |
---|
| 75 | c ah and am are assumed to be -0.25 and -0.5 respectively |
---|
| 76 | |
---|
| 77 | REAL cdn(ngrid),chn(ngrid) ! neutral momentum and heat drag coefficient |
---|
| 78 | REAL pz0t ! initial thermal roughness length. (local) |
---|
| 79 | REAL ric ! critical richardson number |
---|
[265] | 80 | REAL reynolds(ngrid) ! reynolds number for UBL |
---|
[256] | 81 | REAL prandtl(ngrid) ! prandtl number for UBL |
---|
| 82 | REAL pz0tcomp(ngrid) ! computed z0t |
---|
| 83 | REAL ite |
---|
| 84 | REAL residual |
---|
[276] | 85 | REAL zu2(ngrid) |
---|
[38] | 86 | c----------------------------------------------------------------------- |
---|
| 87 | c couche de surface: |
---|
| 88 | c ------------------ |
---|
| 89 | |
---|
[256] | 90 | c Original formulation : |
---|
[38] | 91 | |
---|
[329] | 92 | if(.not.callrichsl) then |
---|
[284] | 93 | |
---|
| 94 | DO ig=1,ngrid |
---|
| 95 | z1=1.E+0 + pz(ig,1)/pz0(ig) |
---|
| 96 | zcd0=karman/log(z1) |
---|
| 97 | zcd0=zcd0*zcd0 |
---|
| 98 | pcdv(ig)=zcd0 |
---|
| 99 | pcdh(ig)=zcd0 |
---|
| 100 | ENDDO |
---|
[276] | 101 | |
---|
[256] | 102 | ! print*,'old : cd,ch; ',pcdv,pcdh |
---|
[284] | 103 | else |
---|
[256] | 104 | |
---|
[284] | 105 | reynolds(:)=0. |
---|
| 106 | |
---|
[256] | 107 | c New formulation (AC) : |
---|
| 108 | |
---|
| 109 | c phim = 1+betam*zeta or (1-bm*zeta)**am |
---|
| 110 | c phih = alphah + betah*zeta or alphah(1.-bh*zeta)**ah |
---|
[265] | 111 | c am=-0.25, ah=-0.5 |
---|
[256] | 112 | |
---|
| 113 | pz0t = 0. ! for the sake of simplicity |
---|
| 114 | pz0tcomp(:) = 0.1*pz0(:) |
---|
| 115 | rib(:)=0. |
---|
[276] | 116 | |
---|
[256] | 117 | pcdv(:)=0. |
---|
| 118 | pcdh(:)=0. |
---|
| 119 | |
---|
| 120 | c this formulation assumes alphah=1., implying betah=betam |
---|
| 121 | c We use Dyer et al. parameters, as they cover a broad range of Richardson numbers : |
---|
| 122 | bm=16. !UBL |
---|
| 123 | bh=16. !UBL |
---|
| 124 | alphah=1. |
---|
| 125 | betam=5. !SBL |
---|
| 126 | betah=5. !SBL |
---|
| 127 | lambda=(sqrt(bh/bm))/alphah |
---|
| 128 | ric=betah/(betam**2) |
---|
| 129 | |
---|
[38] | 130 | DO ig=1,ngrid |
---|
| 131 | |
---|
[256] | 132 | ite=0. |
---|
| 133 | residual=abs(pz0tcomp(ig)-pz0t) |
---|
| 134 | |
---|
| 135 | do while((residual .gt. 0.01*pz0(ig)) .and. (ite .lt. 10.)) |
---|
| 136 | |
---|
| 137 | pz0t=pz0tcomp(ig) |
---|
| 138 | |
---|
| 139 | if ((pu(ig,1) .ne. 0.) .or. (pv(ig,1) .ne. 0.)) then |
---|
| 140 | |
---|
| 141 | c Classical Richardson number formulation |
---|
| 142 | |
---|
| 143 | c rib(ig) = (pg/ph(ig,1))*pz(ig,1)*(ph(ig,1)-pts(ig)) |
---|
| 144 | c & /(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1)) |
---|
| 145 | |
---|
| 146 | c Richardson number formulation proposed by D.E. England et al. (1995) |
---|
| 147 | |
---|
[268] | 148 | ! zu2=MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),0.25*wmax(ig)**2) |
---|
| 149 | ! zu2=pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) |
---|
[496] | 150 | zu2(ig)=MAX(pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1),wmax(ig)**2) |
---|
| 151 | ! zu2(ig)=pu(ig,1)*pu(ig,1) + pv(ig,1)*pv(ig,1) + (0.5*wmax(ig))**2 |
---|
[268] | 152 | |
---|
| 153 | ! we add the wmax to simulate |
---|
| 154 | ! bulk Ri changes due to subgrid wind feeding the thermals |
---|
| 155 | |
---|
| 156 | ! rig(ig) = (pg/ph(ig,1))*((pz(ig,1)-pz0(ig))**2 |
---|
| 157 | ! & /(pz(ig,1)-pz0t))*(ph(ig,1)-pts(ig)) |
---|
| 158 | ! & /zu2 |
---|
| 159 | |
---|
[256] | 160 | rib(ig) = (pg/ph(ig,1)) |
---|
[268] | 161 | ! & *pz(ig,1)*pz0(ig)/sqrt(pz(ig,1)*pz0t) |
---|
| 162 | & *sqrt(pz(ig,1)*pz0(ig)) |
---|
[256] | 163 | & *(((log(pz(ig,1)/pz0(ig)))**2)/(log(pz(ig,1)/pz0t))) |
---|
| 164 | & *(ph(ig,1)-pts(ig)) |
---|
[276] | 165 | & /zu2(ig) |
---|
[256] | 166 | |
---|
| 167 | else |
---|
| 168 | print*,'warning, infinite Richardson at surface' |
---|
| 169 | print*,pu(ig,1),pv(ig,1) |
---|
| 170 | rib(ig) = ric ! traiter ce cas ! |
---|
| 171 | endif |
---|
| 172 | |
---|
| 173 | z1z0=pz(ig,1)/pz0(ig) |
---|
| 174 | z1z0t=pz(ig,1)/pz0t |
---|
| 175 | |
---|
| 176 | cdn(ig)=karman/log(z1z0) |
---|
| 177 | cdn(ig)=cdn(ig)*cdn(ig) |
---|
| 178 | chn(ig)=cdn(ig)*log(z1z0)/log(z1z0t) |
---|
| 179 | |
---|
| 180 | c Stable case : |
---|
| 181 | if (rib(ig) .gt. 0.) then |
---|
| 182 | c From D.E. England et al. (95) |
---|
| 183 | prandtl(ig)=1. |
---|
| 184 | if(rib(ig) .lt. ric) then |
---|
| 185 | c Assuming alphah=1. and bh=bm for stable conditions : |
---|
| 186 | fm(ig)=((ric-rib(ig))/ric)**2 |
---|
| 187 | fh(ig)=((ric-rib(ig))/ric)**2 |
---|
| 188 | else |
---|
[260] | 189 | c For Ri>Ric, we consider Ri->Infinity => no turbulent mixing at surface |
---|
[256] | 190 | fm(ig)=0. |
---|
| 191 | fh(ig)=0. |
---|
| 192 | endif |
---|
| 193 | c Unstable case : |
---|
| 194 | else |
---|
| 195 | c From D.E. England et al. (95) |
---|
| 196 | fm(ig)=sqrt(1.-lambda*bm*rib(ig)) |
---|
| 197 | fh(ig)=(1./alphah)*((1.-lambda*bh*rib(ig))**0.5)* |
---|
| 198 | & (1.-lambda*bm*rib(ig))**0.25 |
---|
| 199 | prandtl(ig)=alphah*((1.-lambda*bm*rib(ig))**0.25)/ |
---|
| 200 | & ((1.-lambda*bh*rib(ig))**0.5) |
---|
| 201 | endif |
---|
| 202 | |
---|
[276] | 203 | reynolds(ig)=karman*sqrt(fm(ig)) |
---|
| 204 | & *sqrt(zu2(ig)) |
---|
| 205 | c & *sqrt(pu(ig,1)**2 + pv(ig,1)**2) |
---|
[267] | 206 | & *pz0(ig)/(log(z1z0)*nu) |
---|
[256] | 207 | pz0tcomp(ig)=pz0(ig)*exp(-karman*7.3* |
---|
| 208 | & (reynolds(ig)**0.25)*(prandtl(ig)**0.5)) |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | residual = abs(pz0t-pz0tcomp(ig)) |
---|
| 212 | ite = ite+1 |
---|
| 213 | ! print*, "iteration nnumber, residual",ite,residual |
---|
| 214 | |
---|
| 215 | enddo ! of while |
---|
| 216 | |
---|
| 217 | pz0t=0. |
---|
| 218 | |
---|
| 219 | c Drag computation : |
---|
| 220 | |
---|
| 221 | pcdv(ig)=cdn(ig)*fm(ig) |
---|
| 222 | pcdh(ig)=chn(ig)*fh(ig) |
---|
[38] | 223 | |
---|
[256] | 224 | ENDDO |
---|
[265] | 225 | ! |
---|
[256] | 226 | ! print*,'new : cd,ch; ',pcdv,pcdh |
---|
[38] | 227 | |
---|
[256] | 228 | ! Some useful diagnostics : |
---|
[38] | 229 | |
---|
[284] | 230 | ! call WRITEDIAGFI(ngrid,'RiB', |
---|
[268] | 231 | ! & 'Bulk Richardson nb','no units', |
---|
[256] | 232 | ! & 2,rib) |
---|
[268] | 233 | ! call WRITEDIAGFI(ngrid,'RiG', |
---|
| 234 | ! & 'Grad Richardson nb','no units', |
---|
| 235 | ! & 2,rig) |
---|
[256] | 236 | ! call WRITEDIAGFI(ngrid,'Pr', |
---|
| 237 | ! & 'Prandtl nb','no units', |
---|
| 238 | ! & 0,prandtl) |
---|
[276] | 239 | ! call WRITEDIAGFI(ngrid,'Re', |
---|
[256] | 240 | ! & 'Reynolds nb','no units', |
---|
| 241 | ! & 0,reynolds) |
---|
| 242 | ! call WRITEDIAGFI(ngrid,'z0tcomp', |
---|
| 243 | ! & 'computed z0t','m', |
---|
| 244 | ! & 2,pz0tcomp) |
---|
| 245 | |
---|
[276] | 246 | |
---|
[284] | 247 | endif !of if call richardson surface layer |
---|
| 248 | |
---|
[38] | 249 | RETURN |
---|
| 250 | END |
---|