1 | SUBROUTINE vdif_cd( ngrid,nlay,pz0,pg,pz,pu,pv,pts,ph,pcdv,pcdh) |
---|
2 | IMPLICIT NONE |
---|
3 | c======================================================================= |
---|
4 | c |
---|
5 | c Subject: computation of the surface drag coefficient using the |
---|
6 | c ------- approch developed by Loui for ECMWF. |
---|
7 | c |
---|
8 | c Author: Frederic Hourdin 15 /10 /93 |
---|
9 | c ------- |
---|
10 | c |
---|
11 | c Arguments: |
---|
12 | c ---------- |
---|
13 | c |
---|
14 | c inputs: |
---|
15 | c ------ |
---|
16 | c ngrid size of the horizontal grid |
---|
17 | c pg gravity (m s -2) |
---|
18 | c pz(ngrid) height of the first atmospheric layer |
---|
19 | c pu(ngrid) u component of the wind in that layer |
---|
20 | c pv(ngrid) v component of the wind in that layer |
---|
21 | c pts(ngrid) surfacte temperature |
---|
22 | c ph(ngrid) potential temperature T*(p/ps)^kappa |
---|
23 | c |
---|
24 | c outputs: |
---|
25 | c -------- |
---|
26 | c pcdv(ngrid) Cd for the wind |
---|
27 | c pcdh(ngrid) Cd for potential temperature |
---|
28 | c |
---|
29 | c======================================================================= |
---|
30 | c |
---|
31 | c----------------------------------------------------------------------- |
---|
32 | c Declarations: |
---|
33 | c ------------- |
---|
34 | |
---|
35 | c Arguments: |
---|
36 | c ---------- |
---|
37 | |
---|
38 | INTEGER ngrid,nlay |
---|
39 | REAL pz0 |
---|
40 | REAL pg,pz(ngrid,nlay) |
---|
41 | REAL pu(ngrid,nlay),pv(ngrid,nlay) |
---|
42 | REAL pts(ngrid,nlay),ph(ngrid,nlay) |
---|
43 | REAL pcdv(ngrid),pcdh(ngrid) |
---|
44 | |
---|
45 | c Local: |
---|
46 | c ------ |
---|
47 | |
---|
48 | INTEGER ig |
---|
49 | |
---|
50 | REAL zu2,z1,zri,zcd0,zz |
---|
51 | |
---|
52 | REAL karman,b,c,d,c2b,c3bc,c3b,umin2 |
---|
53 | LOGICAL firstcal |
---|
54 | DATA karman,b,c,d,umin2/.4,5.,5.,5.,1.e-12/ |
---|
55 | DATA firstcal/.true./ |
---|
56 | SAVE b,c,d,karman,c2b,c3bc,c3b,firstcal,umin2 |
---|
57 | |
---|
58 | c----------------------------------------------------------------------- |
---|
59 | c couche de surface: |
---|
60 | c ------------------ |
---|
61 | |
---|
62 | c DO ig=1,ngrid |
---|
63 | c zu2=pu(ig)*pu(ig)+pv(ig)*pv(ig)+umin2 |
---|
64 | c pcdv(ig)=pz0*(1.+sqrt(zu2)) |
---|
65 | c pcdh(ig)=pcdv(ig) |
---|
66 | c ENDDO |
---|
67 | c RETURN |
---|
68 | c |
---|
69 | c IF (firstcal) THEN |
---|
70 | c c2b=2.*b |
---|
71 | c c3bc=3.*b*c |
---|
72 | c c3b=3.*b |
---|
73 | c firstcal=.false. |
---|
74 | c ENDIF |
---|
75 | c |
---|
76 | c!!!! WARNING, verifier la formule originale de Louis! |
---|
77 | c DO ig=1,ngrid |
---|
78 | c zu2=pu(ig)*pu(ig)+pv(ig)*pv(ig)+umin2 |
---|
79 | c zri=pg*pz(ig)*(ph(ig)-pts(ig))/(ph(ig)*zu2) |
---|
80 | c._. |
---|
81 | c zri=0.E+0 |
---|
82 | c._. |
---|
83 | c z1=1.+pz(ig)/pz0 |
---|
84 | c zcd0=karman/log(z1) |
---|
85 | c._. zcd0=zcd0*zcd0*sqrt(zu2) |
---|
86 | c zcd0=zcd0*zcd0 |
---|
87 | c IF(zri.LT.0.) THEN |
---|
88 | c._. z1=b*zri/(1.+c3bc*zcd0*sqrt(-z1*zri)) |
---|
89 | c z1=b*zri/(1.+c3bc*zcd0*sqrt(-z1*zri*zu2)) |
---|
90 | c pcdv(ig)=zcd0*(1.-2.*z1) |
---|
91 | c pcdh(ig)=zcd0*(1.-3.*z1) |
---|
92 | c ELSE |
---|
93 | c zz=sqrt(1.+d*zri) |
---|
94 | c pcdv(ig)=zcd0/(1.+c2b*zri/zz) |
---|
95 | c pcdh(ig)=zcd0/(1.+c3b*zri*zz) |
---|
96 | c ENDIF |
---|
97 | c ENDDO |
---|
98 | |
---|
99 | |
---|
100 | c On calcule un VRAI cdrag tout bete |
---|
101 | |
---|
102 | DO ig=1,ngrid |
---|
103 | z1=1.E+0 + pz(ig,1)/pz0 |
---|
104 | zcd0=karman/log(z1) |
---|
105 | zcd0=zcd0*zcd0 |
---|
106 | pcdv(ig)=zcd0 |
---|
107 | pcdh(ig)=zcd0 |
---|
108 | ENDDO |
---|
109 | |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | c----------------------------------------------------------------------- |
---|
114 | |
---|
115 | RETURN |
---|
116 | END |
---|