source: LMDZ4/trunk/libf/phylmd/cv3_inicp.F @ 1428

Last change on this file since 1428 was 1403, checked in by Laurent Fairhead, 14 years ago

Merged LMDZ4V5.0-dev branch changes r1292:r1399 to trunk.

Validation:
Validation consisted in compiling the HEAD revision of the trunk,
LMDZ4V5.0-dev branch and the merged sources and running different
configurations on local and SX8 machines comparing results.

Local machine: bench configuration, 32x24x11, gfortran

  • IPSLCM5A configuration (comparison between trunk and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent
  • MH07 configuration, new physics package (comparison between LMDZ4V5.0-dev branch and merged sources):
    • numerical convergence on dynamical fields over 3 days
    • start files are equivalent (except for RN and PB fields)
    • daily history files equivalent

SX8 machine (brodie), 96x95x39 on 4 processors:

  • IPSLCM5A configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent
  • MH07 configuration:
    • start files are equivalent (except for RN and PB fields)
    • monthly history files equivalent

Changes to the makegcm and create_make_gcm scripts to take into account
main programs in F90 files


Fusion de la branche LMDZ4V5.0-dev (r1292:r1399) au tronc principal

Validation:
La validation a consisté à compiler la HEAD de le trunk et de la banche
LMDZ4V5.0-dev et les sources fusionnées et de faire tourner le modéle selon
différentes configurations en local et sur SX8 et de comparer les résultats

En local: 32x24x11, config bench/gfortran

  • pour une config IPSLCM5A (comparaison tronc/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux (à part sur RN et Pb)
    • fichiers histoire égaux
  • pour une config nlle physique (MH07) (comparaison LMDZ4v5.0-dev/fusion):
    • convergence numérique sur les champs dynamiques après 3 jours
    • restart et restartphy égaux
    • fichiers histoire équivalents

Sur brodie, 96x95x39 sur 4 proc:

  • pour une config IPSLCM5A:
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc
  • pour une config MH07
    • restart et restartphy égaux (à part sur RN et PB)
    • pas de différence dans les fichiers histmth.nc

Changement sur makegcm et create_make-gcm pour pouvoir prendre en compte des
programmes principaux en *F90

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1        SUBROUTINE cv3_inicp()
2*
3***************************************************************
4*                                                             *
5* CV3_INIP Lecture des choix de lois de probabilité de mélange*
6*          et calcul de leurs coefficients normalisés.        *
7*                                                             *
8* written by   : Jean-Yves Grandpeix, 06/06/2006, 19.39.27    *
9* modified by :                                               *
10***************************************************************
11*
12#include "YOMCST2.h"
13c
14      INTEGER iflag_clos
15      CHARACTER (LEN=20) :: modname='cv3_inicp'
16      CHARACTER (LEN=80) :: abort_message
17c
18c --   Mixing probability distribution functions
19c
20      real Qcoef1,Qcoef2,QFF,QFFF,Qmix,Rmix,Qmix1,Rmix1,Qmix2,Rmix2,F
21      Qcoef1(F) = tanh(F/gammas)
22      Qcoef2(F) = ( tanh(F/gammas) + gammas *
23     $            log(cosh((1.- F)/gammas)/cosh(F/gammas)))
24      QFF(F) = Max(Min(F,1.),0.)
25      QFFF(F) = Min(QFF(F),scut)
26      Qmix1(F) = ( tanh((QFF(F) - Fmax)/gammas)+Qcoef1max )/
27     $           Qcoef2max
28      Rmix1(F) = ( gammas*log(cosh((QFF(F)-Fmax)/gammas))
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
32      Qmix(F) = qqa1*Qmix1(F) + qqa2*Qmix2(F)
33      Rmix(F) = qqa1*Rmix1(F) + qqa2*Rmix2(F)
34C
35ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
36c
37C
38C===========================================================================
39C       READ IN PARAMETERS FOR THE MIXING DISTRIBUTION
40C       AND PASS THESE THROUGH A COMMON BLOCK TO SUBROUTINE CONVECT etc.
41C       (Written by V.T.J. Phillips, 20-30/Jan/99)
42C===========================================================================
43C
44C   line 1:  a flag (0 or 1) to decide whether P(F) = 1 or the general P(F) is to be
45C         used, followed by SCUT, which is the cut-off value of F in CONVECT
46C   line 2:  blank
47C   line 3:  the coefficients for the linear combination of P(F)s to
48C                 make the general P(F)
49C   line 4:  blank
50C   line 5:  gammas, Fmax for the cosh^2 component of P(F)
51C   line 6:  blank
52C   line 7:  alphas for the 1st irrational P(F)
53C   line 8:  blank
54C   line 9:  betas  for the 2nd irrational P(F)
55C
56
57c        open(57,file='parameter_mix.data')
58
59c        read(57,*) iflag_clos
60c        read(57,*) iflag_mix, scut
61c        read(57,*)
62c        if(iflag_mix .gt. 0) then
63c             read(57,*) qqa1, qqa2
64c              read(57,*)
65c              read(57,*) gammas, Fmax
66c              read(57,*)
67c              read(57,*) alphas
68c         endif
69c        close(57)
70c
71      if(iflag_mix .gt. 0) then
72c
73c--      Normalize Pdf weights
74c
75        sumcoef=qqa1+qqa2
76        qqa1=qqa1/sumcoef
77        qqa2=qqa2/sumcoef
78c
79        Qcoef1max = Qcoef1(Fmax)
80        Qcoef2max = Qcoef2(Fmax)
81c
82        sigma = 0.
83        aire=0.0
84        pdf=0.0
85        mu=0.0
86        df = 0.0001
87c
88c        do ff = 0.0 + df, 1.0 - 2.*df, df
89         ff=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
94cc              write(*,*) pdf,  Qmix(ff), aire, ff
95         ff=ff+df
96         enddo
97c
98c         do ff=0.0+df,1.0 - 2.*df,df
99         ff=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
103         ff=ff+df
104         enddo
105         sigma = sqrt(sigma)
106c
107        if (abs(aire-1.0) .gt. 0.02) then
108            print *,'WARNING:: AREA OF MIXING PDF IS::', aire
109            abort_message = ''
110            CALL abort_gcm (modname,abort_message,1)
111        else
112            print *,'Area, mean & std deviation are ::', aire,mu,sigma
113        endif
114      endif     !  (iflag_mix .gt. 0)
115
116      RETURN
117      END
Note: See TracBrowser for help on using the repository browser.