Ignore:
Timestamp:
May 6, 2011, 12:40:30 PM (13 years ago)
Author:
idelkadi
Message:

Corrections, organisation et modifications des parametres de la convection lus dans les fichiers inputs conv_param.data et ep_param.data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cv3_routines.F

    r1510 r1515  
    3838      CHARACTER (LEN=20) :: modname='cv3_param'
    3939      CHARACTER (LEN=80) :: abort_message
    40       LOGICAL, SAVE :: FIRST=.TRUE.
    41 !$OMP THREADPRIVATE(FIRST)
    42 
     40
     41      LOGICAL,SAVE :: first=.true.
     42c$OMP THREADPRIVATE(first)
    4343
    4444c noff: integer limit for convection (nd-noff)
     
    5353      nlm=nl-1
    5454
     55      IF (first) THEN
     56
    5557c -- "microphysical" parameters:
    5658       sigdz=0.01
    57 c      sigd=0.003
    58 c     sigd   = 0.01
    59 cCR:test sur la fraction des descentes precipitantes
    6059      spfac  = 0.15
    6160      pbcrit = 150.0
    6261      ptcrit = 500.0
     62cIM beg: ajout fis. reglage ep
     63      flag_epKEorig=0
     64      elcrit=0.0011
     65      tlcrit=-55.0
    6366cIM lu dans physiq.def via conf_phys.F90     epmax  = 0.993
    6467
     
    7174ccc      dttrig = 5.   ! (loose) condition for triggering
    7275      dttrig = 10.   ! (loose) condition for triggering
     76      wb = 1.   ! (m/s) adiab updraught speed at LFC (used in cv3p1_closure)
    7377
    7478c -- rate of approach to quasi-equilibrium:
     
    8589      betad=10.0   ! original value (from convect 4.3)
    8690
    87       OPEN(99,file='conv_param.data',status='old',
     91       OPEN(99,file='conv_param.data',status='old',
    8892     $          form='formatted',err=9999)
    8993      READ(99,*,end=9998) dpbase
     
    9397      READ(99,*,end=9998) spfac
    9498      READ(99,*,end=9998) tau
     99      READ(99,*,end=9998) wb
    951009998  Continue
    96101      CLOSE(99)
    971029999  Continue
    98       if (first) then
    99103        WRITE(*,*)'dpbase=',dpbase
    100104        WRITE(*,*)'pbcrit=',pbcrit
     
    103107        WRITE(*,*)'spfac=',spfac
    104108        WRITE(*,*)'tau=',tau
    105         first = .false.
    106       endif
     109        WRITE(*,*)'wb =',wb
     110
     111cIM Lecture du fichier ep_param.data
     112      OPEN(79,file='ep_param.data',status='old',
     113     $          form='formatted',err=7999)
     114      READ(79,*,end=7998) flag_epKEorig
     115      READ(79,*,end=7998) elcrit
     116      READ(79,*,end=7998) tlcrit
     1177998  Continue
     118      CLOSE(79)
     1197999  Continue
     120      WRITE(*,*)'flag_epKEorig',flag_epKEorig
     121      WRITE(*,*)'elcrit=',elcrit
     122      WRITE(*,*)'tlcrit=',tlcrit
     123cIM end: ajout fis. reglage ep
     124
     125       first = .false.
     126      ENDIF
    107127
    108128      beta   = 1.0 - delt/tau
    109129      alpha1 = 1.5e-3
     130cjyg    Correction bug alpha
     131      alpha1  = alpha1*1.5
    110132      alpha  = alpha1 * delt/tau
    111 c increase alpha to compensate W decrease:
    112       alpha  = alpha*1.5
     133cjyg    Bug
     134ccc increase alpha to compensate W decrease:
     135cc      alpha  = alpha*1.5
    113136
    114137      return
     
    942965      logical lcape(nloc)
    943966      integer iposit(nloc)
    944       real elcrit, tlcrit, sigs
    945       parameter(sigs=0.15)
    946       integer flag_epKEorig
    947       LOGICAL, SAVE :: FIRST=.TRUE.
    948 !$OMP THREADPRIVATE(FIRST)
    949967
    950968!=====================================================================
     
    10551073! --- THESE MAY BE FUNCTIONS OF TP(I), P(I) AND CLW(I)
    10561074!=====================================================================
    1057 cIM beg: ajout fis. reglage ep
    1058       flag_epKEorig=0
    1059       elcrit=0.0011
    1060       tlcrit=-55.0
    1061 cIM Lecture du fichier ep_param.data
    1062       OPEN(99,file='ep_param.data',status='old',
    1063      $          form='formatted',err=9999)
    1064       READ(99,*,end=9998) flag_epKEorig
    1065       READ(99,*,end=9998) elcrit
    1066       READ(99,*,end=9998) tlcrit
    1067 9998  Continue
    1068       CLOSE(99)
    1069 9999  Continue
    1070       if (first) then
    1071         WRITE(*,*)'flag_epKEorig',flag_epKEorig
    1072         WRITE(*,*)'elcrit=',elcrit
    1073         WRITE(*,*)'tlcrit=',tlcrit
    1074         first=.false.
    1075       endif
    1076 cIM end: ajout fis. reglage ep
    10771075
    10781076      if(flag_epKEorig.ne.1) THEN
     
    10811079           pden=ptcrit-pbcrit
    10821080           ep(i,k)=(plcl(i)-p(i,k)-pbcrit)/pden*epmax
    1083            ep(i,k)=amax1(ep(i,k),0.0)
    1084            ep(i,k)=amin1(ep(i,k),epmax)
     1081           ep(i,k)=max(ep(i,k),0.0)
     1082           ep(i,k)=min(ep(i,k),epmax)
    10851083           sigp(i,k)=spfac
    10861084 310    continue
     
    11001098              ep(i,k)=max(ep(i,k),0.0 )
    11011099              ep(i,k)=min(ep(i,k),epmax )
    1102               sigp(i,k)=sigs
     1100              sigp(i,k)=spfac
    11031101          endif
    11041102 315    continue
Note: See TracChangeset for help on using the changeset viewer.