[4176] | 1 | SUBROUTINE coefdifv( np,nlev, |
---|
| 2 | $ pu,pv,ph,pphi, |
---|
| 3 | $ pcdzv,pcdzh) |
---|
| 4 | USE constlim |
---|
| 5 | IMPLICIT NONE |
---|
| 6 | |
---|
| 7 | c======================================================================= |
---|
| 8 | c |
---|
| 9 | c calcul des coeficients de la diffusion verticale |
---|
| 10 | c |
---|
| 11 | c======================================================================= |
---|
| 12 | c |
---|
| 13 | c----------------------------------------------------------------------- |
---|
| 14 | c Declarations: |
---|
| 15 | c ------------- |
---|
| 16 | |
---|
| 17 | #include "dimensions.h" |
---|
| 18 | #include "comcstfi.h" |
---|
| 19 | |
---|
| 20 | c Arguments: |
---|
| 21 | c ---------- |
---|
| 22 | |
---|
| 23 | INTEGER np,nlev |
---|
| 24 | REAL pu(np,nlev),pv(np,nlev) |
---|
| 25 | REAL ph(np,nlev),pphi(np,nlev) |
---|
| 26 | REAL pcdzv(np,nlev),pcdzh(np,nlev) |
---|
| 27 | |
---|
| 28 | c Local: |
---|
| 29 | c ------ |
---|
| 30 | |
---|
| 31 | INTEGER ilev,ip |
---|
| 32 | REAL z1(np),z2(np) |
---|
| 33 | REAL z1odz(np),zdzu2(np),zhbar(np) |
---|
| 34 | |
---|
| 35 | c----------------------------------------------------------------------- |
---|
| 36 | c initialisations: |
---|
| 37 | c ---------------- |
---|
| 38 | |
---|
| 39 | c----------------------------------------------------------------------- |
---|
| 40 | c couche de surface: |
---|
| 41 | c ------------------ |
---|
| 42 | |
---|
| 43 | DO 210 ip=1,np |
---|
| 44 | z1(ip)=pu(ip,1)*pu(ip,1)+pv(ip,1)*pv(ip,1) |
---|
| 45 | pcdzv(ip,1)=dgcdrag(ip)*(SQRT(z1(ip))+1.) / ph(ip,1) |
---|
| 46 | pcdzh(ip,1)=pcdzv(ip,1) |
---|
| 47 | 210 CONTINUE |
---|
| 48 | c |
---|
| 49 | c |
---|
| 50 | c----------------------------------------------------------------------- |
---|
| 51 | c autres couches: |
---|
| 52 | c --------------- |
---|
| 53 | |
---|
| 54 | PRINT*,'Coeff k' |
---|
| 55 | DO 310 ilev=1,nlev-1 |
---|
| 56 | DO 320 ip=1,np |
---|
| 57 | z1(ip)=pu(ip,ilev+1)-pu(ip,ilev) |
---|
| 58 | z2(ip)=pv(ip,ilev+1)-pv(ip,ilev) |
---|
| 59 | z1(ip)=z1(ip)*z1(ip)+z2(ip)*z2(ip) |
---|
| 60 | z1odz(ip)=g/(pphi(ip,ilev+1)-pphi(ip,ilev)) |
---|
| 61 | zdzu2(ip)=z1(ip)*z1odz(ip)*z1odz(ip) |
---|
| 62 | zhbar(ip)=0.5*(ph(ip,ilev)+ph(ip,ilev+1)) |
---|
| 63 | z1(ip)=( (ph(ip,ilev+1)-ph(ip,ilev))*z1odz(ip)- |
---|
| 64 | $ cpgam ) * ccdzh/zhbar(ip) |
---|
| 65 | pcdzv(ip,ilev+1)=cdzconst(ilev+1)* |
---|
| 66 | $ SQRT(AMAX1(zdzu2(ip)-z1(ip),cdzmin)) / |
---|
| 67 | c $ SQRT(cdzmin) / |
---|
| 68 | $ (zhbar(ip)*zhbar(ip)) |
---|
| 69 | IF(ip.eq.np/2+1) PRINT*,lmixmin*lmixmin* |
---|
| 70 | s SQRT(AMAX1(zdzu2(ip)-z1(ip),cdzmin)) |
---|
| 71 | pcdzh(ip,ilev+1)=pcdzv(ip,ilev+1) |
---|
| 72 | 320 CONTINUE |
---|
| 73 | 310 CONTINUE |
---|
| 74 | |
---|
| 75 | c----------------------------------------------------------------------- |
---|
| 76 | |
---|
| 77 | RETURN |
---|
| 78 | END |
---|