Changeset 4448


Ignore:
Timestamp:
Mar 2, 2023, 10:05:26 AM (21 months ago)
Author:
fhourdin
Message:

Debut de replay_isation de yamada4

Location:
LMDZ6/trunk/libf/phylmd
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/clesphys.h

    r4352 r4448  
    4848!IM, MAFo fmagic, pmagic : parametres - additionnel et multiplicatif -
    4949!                          pour regler l albedo sur ocean
    50        REAL pbl_lmixmin_alpha
    5150       REAL fmagic, pmagic
    5251! Hauteur (imposee) du contenu en eau du sol
     
    112111     &     , CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt                     &
    113112     &     , CH4_ppb_per, N2O_ppb_per, CFC11_ppt_per, CFC12_ppt_per     &
    114      &     , cdmmax,cdhmax,ksta,ksta_ter,f_ri_cd_min,pbl_lmixmin_alpha  &
     113     &     , cdmmax,cdhmax,ksta,ksta_ter,f_ri_cd_min                    &
    115114     &     , fmagic, pmagic                                             &
    116115     &     , f_cdrag_ter,f_cdrag_oce,f_rugoro,z0min,tau_gl              &
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.F90

    r4380 r4448  
    198198    REAL,SAVE :: cdmmax_omp,cdhmax_omp,ksta_omp,ksta_ter_omp,f_ri_cd_min_omp
    199199    LOGICAL,SAVE :: ok_kzmin_omp
    200     REAL, SAVE   :: pbl_lmixmin_alpha_omp
    201200    REAL, SAVE ::  fmagic_omp, pmagic_omp
    202201    INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
     
    15951594    ok_kzmin_omp = .TRUE.
    15961595    CALL getin('ok_kzmin',ok_kzmin_omp)
    1597 
    1598     pbl_lmixmin_alpha_omp=0.0
    1599     CALL getin('pbl_lmixmin_alpha',pbl_lmixmin_alpha_omp)
    16001596
    16011597    !
     
    24772473    f_ri_cd_min = f_ri_cd_min_omp
    24782474    ok_kzmin = ok_kzmin_omp
    2479     pbl_lmixmin_alpha=pbl_lmixmin_alpha_omp
    24802475    fmagic = fmagic_omp
    24812476    pmagic = pmagic_omp
     
    29072902    WRITE(lunout,*) ' f_ri_cd_min = ',f_ri_cd_min
    29082903    WRITE(lunout,*) ' ok_kzmin = ',ok_kzmin
    2909     WRITE(lunout,*) ' pbl_lmixmin_alpha = ',pbl_lmixmin_alpha
    29102904    WRITE(lunout,*) ' fmagic = ',fmagic
    29112905    WRITE(lunout,*) ' pmagic = ',pmagic
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4412 r4448  
    8181    USE lscp_mod, ONLY : lscp
    8282    USE wake_ini_mod, ONLY : wake_ini
     83    USE yamada_ini_mod, ONLY : yamada_ini
     84
    8385    USE thermcell_ini_mod, ONLY : thermcell_ini
    8486    USE lscp_ini_mod, ONLY : lscp_ini
     
    17451747!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    17461748       CALL wake_ini(rg,rd,rv,prt_level)
     1749       CALL yamada_ini(klon,lunout,prt_level)
    17471750       CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    17481751   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
  • LMDZ6/trunk/libf/phylmd/yamada4.F90

    r4289 r4448  
    44    cd, tke, km, kn, kq, ustar, iflag_pbl, drgpro)
    55
    6   USE dimphy
    7   USE ioipsl_getin_p_mod, ONLY : getin_p
     6  USE dimphy, only : klev,klon
    87  USE phys_local_var_mod, only: tke_dissip,wprime
     8  USE yamada_ini_mod, only : new_yamada4,yamada4_num,hboville
     9  USE yamada_ini_mod, only : prt_level, lunout,pbl_lmixmin_alpha,b1,kap,viscom,viscoh
     10  USE yamada_ini_mod, only : ric, yun,ydeux,lmixmin
    911 
    1012  IMPLICIT NONE
    11   include "iniprint.h"
    12   ! .......................................................................
    13   ! ym#include "dimensions.h"
    14   ! ym#include "dimphy.h"
    1513  ! ************************************************************************************************
    1614  !
     
    111109  !-------
    112110
    113   INCLUDE "clesphys.h"
    114 
    115111  REAL q2(klon, klev+1)
    116112  REAL kmpre(klon, klev+1), tmp2, qpre
     
    121117  INTEGER nlay, nlev
    122118
    123   LOGICAL,SAVE :: hboville=.TRUE.
    124   REAL,SAVE :: viscom,viscoh
    125   !$OMP THREADPRIVATE( hboville,viscom,viscoh)
    126119  INTEGER ig, jg, k
    127120  REAL ri, zrif, zalpha, zsm, zsn
     
    136129  REAL :: disseff
    137130
    138   REAL,SAVE :: ric0,ric,rifc, b1, kap
    139   !$OMP THREADPRIVATE(ric0,ric,rifc,b1,kap)
    140   DATA b1, kap/16.6, 0.4/
     131  REAL,SAVE :: rifc
     132  !$OMP THREADPRIVATE(rifc)
    141133  REAL,SAVE :: seuilsm, seuilalpha
    142134  !$OMP THREADPRIVATE(seuilsm, seuilalpha)
    143   REAL,SAVE :: lmixmin
    144   !$OMP THREADPRIVATE(lmixmin)
    145   LOGICAL, SAVE :: new_yamada4
    146   INTEGER, SAVE :: yamada4_num
    147   !$OMP THREADPRIVATE(new_yamada4,yamada4_num)
    148   REAL, SAVE :: yun,ydeux
    149   !$OMP THREADPRIVATE(yun,ydeux)
    150135
    151136  REAL frif, falpha, fsm
    152137  REAL rino(klon, klev+1), smyam(klon, klev), styam(klon, klev), &
    153138    lyam(klon, klev), knyam(klon, klev), w2yam(klon, klev), t2yam(klon, klev)
    154   LOGICAL, SAVE :: firstcall = .TRUE.
    155   !$OMP THREADPRIVATE(firstcall)
    156139
    157140  CHARACTER (len = 20) :: modname = 'yamada4'
     
    168151 
    169152
    170   IF (firstcall) THEN
    171 ! Seuil dans le code de turbulence
    172     new_yamada4=.false.
    173     CALL getin_p('new_yamada4',new_yamada4)
    174153
    175154    IF (new_yamada4) THEN
    176155! Corrections et reglages issus du travail de these d'Etienne Vignon.
    177        ric=0.143 ! qui donne des valeurs proches des seuils proposes
    178                  ! dans YAMADA 1983 : sm=0.0845 (0.085 dans Y83)
    179                  !                    sm=1.1213 (1.12  dans Y83)
    180        CALL getin_p('yamada4_ric',ric)
    181        ric0=0.19489      ! ric=0.195 originalement, mais produisait sm<0
    182        ric=min(ric,ric0) ! Au dela de ric0, sm devient n??gatif
    183156       rifc=frif(ric)
    184157       seuilsm=fsm(frif(ric))
    185158       seuilalpha=falpha(frif(ric))
    186        yun=1.
    187        ydeux=2.
    188        hboville=.FALSE.
    189        viscom=1.46E-5
    190        viscoh=2.06E-5
    191        !lmixmin=1.0E-3
    192        lmixmin=0.
    193        yamada4_num=5
    194159    ELSE
    195        ric=0.195
    196160       rifc=0.191
    197161       seuilalpha=1.12
    198162       seuilsm=0.085
    199        yun=2.
    200        ydeux=1.
    201        hboville=.TRUE.
    202        viscom=0.
    203        viscoh=0.
    204        lmixmin=1.
    205        yamada4_num=0
    206163    ENDIF
    207 
    208     WRITE(lunout,*)'YAMADA4 RIc, RIfc, Sm_min, Alpha_min',ric,rifc,seuilsm,seuilalpha
    209     firstcall = .FALSE.
    210     CALL getin_p('lmixmin',lmixmin)
    211     CALL getin_p('yamada4_hboville',hboville)
    212     CALL getin_p('yamada4_num',yamada4_num)
    213   END IF
    214 
    215 
    216164
    217165!===============================================================================
     
    760708SUBROUTINE vdif_q2(timestep, gravity, rconst, ngrid, plev, temp, kmy, q2)
    761709
    762   USE dimphy
     710  USE dimphy, only : klev,klon
    763711  IMPLICIT NONE
    764712 
     
    849797 SUBROUTINE vdif_q2e(timestep, gravity, rconst, ngrid, plev, temp, kmy, q2)
    850798 
    851    USE dimphy
     799   USE dimphy, only : klev,klon
    852800  IMPLICIT NONE
    853801
     
    920868
    921869
    922   USE dimphy
     870  USE dimphy, only : klev,klon
     871  USE yamada_ini_mod, only : l0
    923872  USE phys_state_var_mod, only: zstd, zsig, zmea
    924873  USE phys_local_var_mod, only: l_mixmin, l_mix
     874  USE yamada_ini_mod, only : kap, kapb
    925875
    926876 ! zstd: ecart type de la'altitud e sous-maille
     
    982932!-------
    983933
    984   LOGICAL, SAVE :: firstcall = .TRUE.
    985   !$OMP THREADPRIVATE(firstcall)
    986 
    987934! Outputs
    988935!---------
     
    997944 REAL     h_oro(klon)
    998945 REAL     hlim(klon)
    999  REAL, SAVE :: kap=0.4,kapb=0.4
    1000   !$OMP THREADPRIVATE(kap,kapb)
    1001946 REAL zq
    1002947 REAL sq(klon), sqz(klon)
    1003  REAL, ALLOCATABLE, SAVE :: l0(:)
    1004   !$OMP THREADPRIVATE(l0)
    1005948 REAL fl, zzz, zl0, zq2, zn2
    1006949 REAL famorti, zzzz, zh_oro, zhlim
     
    1030973
    1031974  IF (ngrid==0) RETURN
    1032 
    1033   IF (firstcall) THEN
    1034     ALLOCATE (l0(klon))
    1035     firstcall = .FALSE.
    1036   END IF
    1037975
    1038976
Note: See TracChangeset for help on using the changeset viewer.