3 ***************************************************************
6 * et calcul
de leurs coefficients normalisés. *
8 * written
by : jean-yves grandpeix, 06/06/2006, 19.39.27 *
10 ***************************************************************
15 CHARACTER (LEN=20) :: modname=
'cv3_inicp'
16 CHARACTER (LEN=80) :: abort_message
18 c -- mixing probability distribution functions
20 real qcoef1,qcoef2,qff,qfff,qmix,rmix,qmix1,rmix1,qmix2,rmix2,
f
24 qff(
f) = max(min(
f,1.),0.)
26 qmix1(
f) = ( tanh((qff(
f) - fmax)/
gammas)+qcoef1max )/
29 1 +qff(
f)*qcoef1max ) / qcoef2max
30 qmix2(
f) = -log(1.-qfff(
f))/
scut
31 rmix2(
f) = (qfff(
f)+(1.-qff(
f))*log(1.-qfff(
f)))/
scut
35 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
38 c===========================================================================
39 c READ in parameters for the mixing distribution
40 c and pass these through a
COMMON block to
SUBROUTINE convect etc.
41 c(written
by v.t.
j. phillips, 20-30/jan/99)
42 c===========================================================================
44 c line 1: a flag(0 or 1) to decide whether p(
f) = 1 or the general p(
f) is to be
45 c used, followed
by scut, which is the cut-off value of
f in convect
47 c line 3: the coefficients for the linear combination of p(
f)s to
48 c make the general p(
f)
50 c line 5:
gammas, fmax for the cosh^2 component of p(
f)
52 c line 7:
alphas for the 1st irrational p(
f)
54 c line 9:
betas for the 2nd irrational p(
f)
57 c open(57,file=
'parameter_mix.data')
60 c read(57,*) iflag_mix,
scut
62 c if(iflag_mix .gt. 0)
then
71 if(iflag_mix .gt. 0)
then
73 c-- normalize pdf weights
79 qcoef1max = qcoef1(fmax)
80 qcoef2max = qcoef2(fmax)
88 c do ff = 0.0 + df, 1.0 - 2.*df, df
90 dowhile( ff .le. 1.0 - 2.*df )
91 pdf = (qmix(ff+df) - qmix(ff)) * (1.-ff) / df
92 aire=
aire+(qmix(ff+df) - qmix(ff)) * (1.-ff)
93 mu =
mu + pdf * ff * df
94 cc
write(*,*) pdf, qmix(ff),
aire, ff
98 c do ff=0.0+df,1.0 - 2.*df,df
100 dowhile( ff .le. 1.0 - 2.*df )
101 pdf = (qmix(ff+df)- qmix(ff)) * (1.-ff) / df
102 sigma = sigma+pdf*(ff -
mu)*(ff -
mu)*df
107 if (abs(
aire-1.0) .gt. 0.02)
then
108 print *,
'WARNING:: AREA OF MIXING PDF IS::',
aire
112 print *,
'Area, mean & std deviation are ::',
aire,
mu,sigma