| 1 | SUBROUTINE vdif_cd( ngrid,pz0,pg,pz,pu,pv,pts,ph,pcdv,pcdh) |
|---|
| 2 | USE planet, ONLY : karman |
|---|
| 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 ------- |
|---|
| 11 | c |
|---|
| 12 | c Arguments: |
|---|
| 13 | c ---------- |
|---|
| 14 | c |
|---|
| 15 | c inputs: |
|---|
| 16 | c ------ |
|---|
| 17 | c ngrid size of the horizontal grid |
|---|
| 18 | c pg gravity (m s -2) |
|---|
| 19 | c pz(ngrid) height of the first atmospheric layer |
|---|
| 20 | c pu(ngrid) u component of the wind in that layer |
|---|
| 21 | c pv(ngrid) v component of the wind in that layer |
|---|
| 22 | c pts(ngrid) surfacte temperature |
|---|
| 23 | c ph(ngrid) potential temperature T*(p/ps)^kappa |
|---|
| 24 | c |
|---|
| 25 | c outputs: |
|---|
| 26 | c -------- |
|---|
| 27 | c pcdv(ngrid) Cd for the wind |
|---|
| 28 | c pcdh(ngrid) Cd for potential temperature |
|---|
| 29 | c |
|---|
| 30 | c======================================================================= |
|---|
| 31 | c |
|---|
| 32 | c----------------------------------------------------------------------- |
|---|
| 33 | c Declarations: |
|---|
| 34 | c ------------- |
|---|
| 35 | |
|---|
| 36 | c Arguments: |
|---|
| 37 | c ---------- |
|---|
| 38 | |
|---|
| 39 | INTEGER ngrid,nlay |
|---|
| 40 | REAL pz0(ngrid) |
|---|
| 41 | REAL pg,pz(ngrid) |
|---|
| 42 | REAL pu(ngrid),pv(ngrid) |
|---|
| 43 | REAL pts(ngrid),ph(ngrid) |
|---|
| 44 | REAL pcdv(ngrid),pcdh(ngrid) |
|---|
| 45 | |
|---|
| 46 | c Local: |
|---|
| 47 | c ------ |
|---|
| 48 | |
|---|
| 49 | INTEGER ig |
|---|
| 50 | |
|---|
| 51 | REAL zu2,z1,zri,zcd0,zz |
|---|
| 52 | |
|---|
| 53 | REAL b,c,d,c2b,c3bc,c3b,z0,umin2 |
|---|
| 54 | LOGICAL firstcal |
|---|
| 55 | DATA b,c,d,umin2/5.,5.,5.,1.e-12/ |
|---|
| 56 | DATA firstcal/.true./ |
|---|
| 57 | SAVE b,c,d,c2b,c3bc,c3b,firstcal,umin2 |
|---|
| 58 | |
|---|
| 59 | c----------------------------------------------------------------------- |
|---|
| 60 | c couche de surface: |
|---|
| 61 | c ------------------ |
|---|
| 62 | |
|---|
| 63 | c DO ig=1,ngrid |
|---|
| 64 | c zu2=pu(ig)*pu(ig)+pv(ig)*pv(ig)+umin2 |
|---|
| 65 | c pcdv(ig)=pz0(ig)*(1.+sqrt(zu2)) |
|---|
| 66 | c pcdh(ig)=pcdv(ig) |
|---|
| 67 | c ENDDO |
|---|
| 68 | c RETURN |
|---|
| 69 | |
|---|
| 70 | IF (firstcal) THEN |
|---|
| 71 | c2b=2.*b |
|---|
| 72 | c3bc=3.*b*c |
|---|
| 73 | c3b=3.*b |
|---|
| 74 | firstcal=.false. |
|---|
| 75 | ENDIF |
|---|
| 76 | |
|---|
| 77 | c!!!! WARNING, verifier la formule originale de Louis! |
|---|
| 78 | DO ig=1,ngrid |
|---|
| 79 | zu2=pu(ig)*pu(ig)+pv(ig)*pv(ig)+umin2 |
|---|
| 80 | zri=pg*pz(ig)*(ph(ig)-pts(ig))/(ph(ig)*zu2) |
|---|
| 81 | z1=1.+pz(ig)/pz0(ig) |
|---|
| 82 | zcd0=karman/log(z1) |
|---|
| 83 | zcd0=zcd0*zcd0*sqrt(zu2) |
|---|
| 84 | IF(zri.LT.0.) THEN |
|---|
| 85 | z1=b*zri/(1.+c3bc*zcd0*sqrt(-z1*zri)) |
|---|
| 86 | pcdv(ig)=zcd0*(1.-2.*z1) |
|---|
| 87 | pcdh(ig)=zcd0*(1.-3.*z1) |
|---|
| 88 | ELSE |
|---|
| 89 | zz=sqrt(1.+d*zri) |
|---|
| 90 | pcdv(ig)=zcd0/(1.+c2b*zri/zz) |
|---|
| 91 | pcdh(ig)=zcd0/(1.+c3b*zri*zz) |
|---|
| 92 | ENDIF |
|---|
| 93 | ENDDO |
|---|
| 94 | |
|---|
| 95 | c----------------------------------------------------------------------- |
|---|
| 96 | |
|---|
| 97 | RETURN |
|---|
| 98 | END |
|---|