5 |
C================================================================================ |
C================================================================================ |
6 |
C |
C |
7 |
SUBROUTINE CLOUDS_GNO(klon,ND,R,RS,QSUB,PTCONV,RATQSC,CLDF) |
SUBROUTINE CLOUDS_GNO(klon,ND,R,RS,QSUB,PTCONV,RATQSC,CLDF) |
8 |
|
use numer_rec_95, only: nr_erf |
9 |
IMPLICIT NONE |
IMPLICIT NONE |
10 |
C |
C |
11 |
C-------------------------------------------------------------------------------- |
C-------------------------------------------------------------------------------- |
53 |
REAL dist(klon), fprime(klon), det(klon) |
REAL dist(klon), fprime(klon), det(klon) |
54 |
REAL pi, u(klon), v(klon), erfcu(klon), erfcv(klon) |
REAL pi, u(klon), v(klon), erfcu(klon), erfcv(klon) |
55 |
REAL xx1(klon), xx2(klon) |
REAL xx1(klon), xx2(klon) |
56 |
real erf,kkk |
real kkk |
57 |
real sqrtpi,sqrt2,zx1,zx2,exdel |
real sqrtpi,sqrt2,zx1,zx2,exdel |
58 |
c lconv = true si le calcul a converge (entre autre si qsub < min_q) |
c lconv = true si le calcul a converge (entre autre si qsub < min_q) |
59 |
LOGICAL lconv(klon) |
LOGICAL lconv(klon) |
179 |
|
|
180 |
c -- erfv -> 1.0, use an asymptotic expression of erfv for v large: |
c -- erfv -> 1.0, use an asymptotic expression of erfv for v large: |
181 |
|
|
182 |
erfcu(i) = 1.0-ERF(u(i)) |
erfcu(i) = 1.0-NR_ERF(u(i)) |
183 |
c !!! ATTENTION : rajout d'un seuil pour l'exponentiel |
c !!! ATTENTION : rajout d'un seuil pour l'exponentiel |
184 |
aux(i) = sqrtpi*erfcu(i)*EXP(min(v(i)*v(i),100.)) |
aux(i) = sqrtpi*erfcu(i)*EXP(min(v(i)*v(i),100.)) |
185 |
coeff(i) = 1.0 - 1./2./(v(i)**2.) + 3./4./(v(i)**4.) |
coeff(i) = 1.0 - 1./2./(v(i)**2.) + 3./4./(v(i)**4.) |
195 |
|
|
196 |
c -- general case: |
c -- general case: |
197 |
|
|
198 |
erfcu(i) = 1.0-ERF(u(i)) |
erfcu(i) = 1.0-NR_ERF(u(i)) |
199 |
erfcv(i) = 1.0-ERF(v(i)) |
erfcv(i) = 1.0-NR_ERF(v(i)) |
200 |
block(i) = erfcv(i) |
block(i) = erfcv(i) |
201 |
dist(i) = erfcu(i) / erfcv(i) - beta(i) |
dist(i) = erfcu(i) / erfcv(i) - beta(i) |
202 |
zu2(i)=u(i)*u(i) |
zu2(i)=u(i)*u(i) |