Changeset 4380


Ignore:
Timestamp:
Jan 11, 2023, 10:45:36 AM (2 years ago)
Author:
evignon
Message:

premier commit d'un travail en cours sur l'externalisation de la routine lscp pour l'utilisation du replay
+ nettoyage

Location:
LMDZ6/trunk/libf
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/cloudth_mod.F90

    r4260 r4380  
    15381538
    15391539!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    1540 SUBROUTINE cloudth_mpc(klon,klev,ind2,mpc_bl_points,                        &
     1540SUBROUTINE cloudth_mpc(klon,klev,ind2,iflag_mpc_bl,mpc_bl_points,           &
    15411541&           temp,ztv,po,zqta,fraca,zpspsk,paprs,pplay,ztla,zthl,            &
    15421542&           ratqs,zqs,snowflux,qcloud,qincloud,icefrac,ctot,ctot_vol)
     
    15861586      REAL, DIMENSION(klon),      INTENT(IN)      ::  zqs           ! Saturation specific humidity in the mesh [kg/kg]
    15871587      REAL, DIMENSION(klon,klev+1), INTENT(IN)    ::  snowflux      ! snow flux at the interface of the layer [kg/m2/s]
     1588      INTEGER,                      INTENT(IN)    ::  iflag_mpc_bl  ! option flag for mpc boundary layer clouds param.
     1589
    15881590
    15891591      INTEGER, DIMENSION(klon,klev), INTENT(INOUT) :: mpc_bl_points  ! grid points with convective (thermals) mixed phase clouds
  • LMDZ6/trunk/libf/phylmd/conf_phys_m.F90

    r4352 r4380  
    185185    REAL,SAVE :: t_glace_min_omp, t_glace_max_omp
    186186    REAL,SAVE :: exposant_glace_omp
    187     INTEGER,SAVE :: iflag_gammasat_omp, iflag_mpc_bl_omp
     187    INTEGER,SAVE :: iflag_gammasat_omp
    188188    REAL,SAVE :: rei_min_omp, rei_max_omp
    189189    INTEGER,SAVE :: iflag_sic_omp, iflag_inertie_omp
     
    255255    LOGICAL, SAVE :: ok_new_lscp_omp
    256256    LOGICAL, SAVE :: ok_icefra_lscp_omp
    257     LOGICAL, SAVE :: ok_radliq_snow_omp
    258257
    259258
     
    14291428
    14301429    !
    1431     !Config Key  = iflag_mpc_bl
    1432     !Config Desc =
    1433     !Config Def  = 0
    1434     !Config Help =
    1435     !
    1436     iflag_mpc_bl_omp=0
    1437     CALL getin('iflag_mpc_bl',iflag_mpc_bl_omp)
    1438 
    1439 
    1440 
    1441     !
    14421430    !Config Key  = iflag_t_glace
    14431431    !Config Desc = 
     
    23522340    !Config Help = ...
    23532341
    2354 
    2355     ok_radliq_snow_omp = .FALSE.
    2356     CALL getin('ok_radliq_snow', ok_radliq_snow_omp)
    2357     !
    2358     !Config Key  = ok_radliq_snow_omp
    2359     !Config Desc = take into account snowfall for radiation
    2360     !Config Def  = .FALSE.
    2361     !Config Help = ...
    23622342
    23632343    ecrit_LES_omp = 1./8.
     
    24782458    exposant_glace = exposant_glace_omp
    24792459    iflag_gammasat=iflag_gammasat_omp
    2480     iflag_mpc_bl=iflag_mpc_bl_omp
    24812460    iflag_t_glace = iflag_t_glace_omp
    24822461    iflag_cloudth_vert=iflag_cloudth_vert_omp
     
    26882667    ok_new_lscp = ok_new_lscp_omp
    26892668    ok_icefra_lscp=ok_icefra_lscp_omp
    2690     ok_radliq_snow=ok_radliq_snow_omp
    26912669    read_fco2_ocean_cor = read_fco2_ocean_cor_omp
    26922670    var_fco2_ocean_cor = var_fco2_ocean_cor_omp
     
    29112889    WRITE(lunout,*) ' exposant_glace = ',exposant_glace
    29122890    WRITE(lunout,*) ' iflag_gammasat = ',iflag_gammasat
    2913     WRITE(lunout,*) ' iflag_mpc_bl = ',iflag_mpc_bl
    29142891    WRITE(lunout,*) ' iflag_t_glace = ',iflag_t_glace
    29152892    WRITE(lunout,*) ' iflag_cloudth_vert = ',iflag_cloudth_vert
     
    30303007    WRITE(lunout,*) ' ok_new_lscp = ', ok_new_lscp
    30313008    WRITE(lunout,*) ' ok_icefra_lscp = ', ok_icefra_lscp
    3032     WRITE(lunout,*) ' ok_radliq_snow = ', ok_radliq_snow
    30333009    WRITE(lunout,*) ' read_climoz = ', read_climoz
    30343010    WRITE(lunout,*) ' carbon_cycle_tr = ', carbon_cycle_tr
  • LMDZ6/trunk/libf/phylmd/fisrtilp.F90

    r4260 r4380  
    8989  ! Coeffients de fraction lessivee : pour OFF-LINE
    9090  !
    91   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_nucl
    92   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_1nucl
    93   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_impa
     91  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_nucl
     92  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_1nucl
     93  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_impa
    9494  !
    9595  ! Fraction d'aerosols lessivee par impaction et par nucleation
  • LMDZ6/trunk/libf/phylmd/lscp_mod.F90

    r4226 r4380  
    1 MODULE LSCP_mod
     1MODULE lscp_mod
    22
    33IMPLICIT NONE
     
    66
    77!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    8 SUBROUTINE LSCP(dtime,missing_val,                      &
     8SUBROUTINE lscp(klon,klev,dtime,missing_val,            &
    99     paprs,pplay,t,q,ptconv,ratqs,                      &
    10      d_t, d_q, d_ql, d_qi, rneb, rneb_seri,             &
     10     d_t, d_q, d_ql, d_qi, rneb, rneblsvol, rneb_seri,  &
    1111     radliq, radicefrac, rain, snow,                    &
    12      pfrac_impa, pfrac_nucl, pfrac_1nucl,               &
    1312     frac_impa, frac_nucl, beta,                        &
    1413     prfl, psfl, rhcl, zqta, fraca,                     &
    1514     ztv, zpspsk, ztla, zthl, iflag_cld_th,             &
    16      iflag_ice_thermo, ok_ice_sursat)
     15     iflag_ice_thermo, ok_ice_sursat, qsatl, qsats,     &
     16     qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss,   &
     17     Tcontr, qcontr, qcontr2, fcontrN, fcontrP)
    1718
    1819!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
    2829! and 'ilp' (il pleut, L. Li)
    2930!
    30 ! Compared to fisrtilp, LSCP
     31! Compared to the original fisrtilp code, lscp
    3132! -> assumes thermcep = .TRUE. all the time (fisrtilp inconsistent when .FALSE.)
    3233! -> consider always precipitation thermalisation (fl_cor_ebil>0)
     
    7677!   cldliq(physiq)=radliq(fisrt)=lwcon(nc)+iwcon(nc)
    7778!
    78 ! Physics/Dynamics:
    79 ! ql_seri(physiq)+qs_seri(physiq)=ocond(nc)
    80 !
    8179! Notetheless, be aware of:
    8280!
     
    8785!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    8886!
    89 USE dimphy
    9087USE print_control_mod, ONLY: prt_level, lunout
    91 USE cloudth_mod
    92 USE ioipsl_getin_p_mod, ONLY : getin_p
    93 USE phys_local_var_mod, ONLY: ql_seri,qs_seri
    94 USE phys_local_var_mod, ONLY: rneblsvol
    95 USE lscp_tools_mod, ONLY : CALC_QSAT_ECMWF, ICEFRAC_LSCP, CALC_GAMMASAT, FALLICE_VELOCITY
    96 USE ice_sursat_mod
    97 !--ice supersaturation
    98 USE phys_local_var_mod, ONLY: zqsats, zqsatl
    99 USE phys_local_var_mod, ONLY: qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss
    100 USE phys_local_var_mod, ONLY: Tcontr, qcontr, qcontr2, fcontrN, fcontrP
     88USE cloudth_mod, ONLY : cloudth, cloudth_v3, cloudth_v6, cloudth_mpc
     89USE lscp_tools_mod, ONLY : calc_qsat_ecmwf, icefrac_lscp, calc_gammasat, fallice_velocity
     90USE ice_sursat_mod, ONLY : ice_sursat
     91
     92USE lscp_ini_mod, ONLY : seuil_neb, ninter, iflag_evap_prec, t_coup, DDT0, ztfondue, rain_int_min
     93USE lscp_ini_mod, ONLY : iflag_mpc_bl, ok_radliq_snow, a_tr_sca
     94
    10195
    10296IMPLICIT NONE
    10397
    10498!===============================================================================
    105 ! VARIABLE DECLARATION
     99! VARIABLES DECLARATION
    106100!===============================================================================
    107101
    108102include "YOMCST.h"
    109103include "YOETHF.h"
    110 include "FCTTRE.h"
    111104include "fisrtilp.h"
    112105include "nuage.h"
     
    115108!-----------------
    116109
     110  INTEGER,                         INTENT(IN)   :: klon,klev       ! number of horizontal grid points and vertical levels
    117111  REAL,                            INTENT(IN)   :: dtime           ! time step [s]
    118   REAL, INTENT(IN)                              :: missing_val     ! missing value for output
     112  REAL,                            INTENT(IN)   :: missing_val     ! missing value for output
    119113
    120114  REAL, DIMENSION(klon,klev+1),    INTENT(IN)   :: paprs           ! inter-layer pressure [Pa]
    121115  REAL, DIMENSION(klon,klev),      INTENT(IN)   :: pplay           ! mid-layer pressure [Pa]
    122116  REAL, DIMENSION(klon,klev),      INTENT(IN)   :: t               ! temperature (K)
    123   REAL, DIMENSION(klon,klev),      INTENT(IN)   :: q               ! specific humidity [kg/kg]
     117  REAL, DIMENSION(klon,klev),      INTENT(IN)   :: q               ! specific humidity [kg/kg] 
    124118  INTEGER,                         INTENT(IN)   :: iflag_cld_th    ! flag that determines the distribution of convective clouds
    125119  INTEGER,                         INTENT(IN)   :: iflag_ice_thermo! flag to activate the ice thermodynamics
     
    143137
    144138  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: ratqs            ! function of pressure that sets the large-scale
     139  REAL, DIMENSION(klon,klev),      INTENT(INOUT):: beta             ! conversion rate of condensed water
     140
    145141
    146142  ! Input sursaturation en glace
     
    155151  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: d_qi             ! cloud ice mass increment [kg/kg]
    156152  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rneb             ! cloud fraction [-]
     153  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rneblsvol        ! cloud fraction per unit volume [-] 
    157154  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: radliq           ! condensed water used in the radiation scheme [kg/kg]
    158155  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: radicefrac       ! ice fraction of condensed water for radiation scheme
     
    160157  REAL, DIMENSION(klon),           INTENT(OUT)  :: rain             ! large-scale rainfall [kg/s/m2]
    161158  REAL, DIMENSION(klon),           INTENT(OUT)  :: snow             ! large-scale snowfall [kg/s/m2]
     159  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qsatl            ! saturation specific humidity wrt liquid [kg/kg]
     160  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qsats            ! saturation specific humidity wrt ice [kg/kg] 
    162161  REAL, DIMENSION(klon,klev+1),    INTENT(OUT)  :: prfl             ! large-scale rainfall flux in the column [kg/s/m2]
    163162  REAL, DIMENSION(klon,klev+1),    INTENT(OUT)  :: psfl             ! large-scale snowfall flux in the column [kg/s/m2]
    164163
    165   ! cofficients of scavenging fraction (for off-line)
    166  
    167   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_nucl       ! scavenging fraction due tu nucleation [-]
    168   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_1nucl      ! scavenging fraction due tu nucleation with a -1 factor [-]
    169   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_impa       ! scavening fraction due to impaction [-]
    170  
    171164  ! fraction of aerosol scavenging through impaction and nucleation (for on-line)
    172165 
     
    174167  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: frac_nucl        ! scavenging fraction due tu nucleation [-]
    175168 
    176   ! PROGRAM PARAMETERS:
    177   !--------------------
     169  ! for supersaturation and contrails parameterisation
    178170 
    179   REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
    180   !$OMP THREADPRIVATE(seuil_neb)
    181 
    182   INTEGER, SAVE :: ninter=5                     ! number of iterations to calculate autoconversion to precipitation
    183   !$OMP THREADPRIVATE(ninter)
    184 
    185   INTEGER,SAVE :: iflag_evap_prec=1             ! precipitation evaporation flag. 0: nothing, 1: "old way",
    186                                                 ! 2: Max cloud fraction above to calculate the max of reevaporation
    187                                                 ! 4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
    188   !$OMP THREADPRIVATE(iflag_evap_prec)
    189 
    190   REAL t_coup                                   ! temperature threshold which determines the phase
    191   PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
    192 
    193   REAL DDT0                                     ! iteration parameter
    194   PARAMETER (DDT0=.01)
    195 
    196   REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
    197   PARAMETER (ztfondue=278.15)
    198 
    199   REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
    200   !$OMP THREADPRIVATE(rain_int_min)
    201 
     171  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qclr             ! specific total water content in clear sky region [kg/kg]
     172  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcld             ! specific total water content in cloudy region [kg/kg]
     173  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qss              ! specific total water content in supersat region [kg/kg]
     174  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qvc              ! specific vapor content in clouds [kg/kg]
     175  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rnebclr          ! mesh fraction of clear sky [-]   
     176  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: rnebss           ! mesh fraction of ISSR [-] 
     177  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: gamma_ss         ! coefficient governing the ice nucleation RHi threshold [-]     
     178  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: Tcontr           ! ?
     179  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcontr           ! ?
     180  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: qcontr2          ! ?         
     181  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: fcontrN          ! ?
     182  REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: fcontrP          ! ?
     183 
    202184
    203185  ! LOCAL VARIABLES:
    204186  !----------------
    205 
    206187
    207188  REAL qsl(klon), qsi(klon)
     
    236217  ! Variables precipitation energy conservation
    237218  REAL zmqc(klon)
    238   ! Variables for tracers
    239   ! temporary: alpha parameter for scavenging
    240   ! 4 possible scavenging processes
    241   REAL,SAVE :: a_tr_sca(4)
    242   !$OMP THREADPRIVATE(a_tr_sca)
    243219  REAL zalpha_tr
    244220  REAL zfrac_lessi
    245221  REAL zprec_cond(klon)
    246   REAL beta(klon,klev)                   ! conversion rate of condensed water
    247222  REAL zmair(klon), zcpair, zcpeau
    248223  REAL zlh_solid(klon), zm_solid         ! for liquid -> solid conversion
     
    262237  INTEGER ncoreczq
    263238  INTEGER mpc_bl_points(klon,klev)
    264   INTEGER,SAVE :: itap=0
    265   !$OMP THREADPRIVATE(itap)
    266239
    267240  LOGICAL lognormale(klon)
     
    291264ENDIF
    292265
    293 IF (.NOT.thermcep) THEN
    294     abort_message = 'lscp cannot be used when thermcep=false'
    295     CALL abort_physic(modname,abort_message,1)
    296 ENDIF
    297 
    298266IF (iflag_fisrtilp_qsat .LT. 0) THEN
    299267    abort_message = 'lscp cannot be used with iflag_fisrtilp<0'
     
    303271! Few initialisations
    304272
    305 itap=itap+1
    306273znebprecip(:)=0.0
    307274ctot_vol(1:klon,1:klev)=0.0
     
    314281IF (prt_level>9) WRITE(lunout,*) 'NUAGES4 A. JAM'
    315282
    316 IF (appel1er) THEN
    317     CALL getin_p('ninter',ninter)
    318     CALL getin_p('iflag_evap_prec',iflag_evap_prec)
    319     CALL getin_p('seuil_neb',seuil_neb)
    320     CALL getin_p('rain_int_min',rain_int_min)
    321     WRITE(lunout,*) 'lscp, ninter:', ninter
    322     WRITE(lunout,*) 'lscp, iflag_evap_prec:', iflag_evap_prec
    323     WRITE(lunout,*) 'lscp, seuil_neb:', seuil_neb
    324     WRITE(lunout,*) 'lscp, rain_int_min:', rain_int_min
    325 
    326     ! check for precipitation sub-time steps
    327     IF (ABS(dtime/REAL(ninter)-360.0).GT.0.001) THEN
    328         WRITE(lunout,*) 'lscp: it is not expected, see Z.X.Li', dtime
    329         WRITE(lunout,*) 'I would prefer a 6 min sub-timestep'
    330     ENDIF
    331 
    332     !AA Temporary initialisation
    333     a_tr_sca(1) = -0.5
    334     a_tr_sca(2) = -0.5
    335     a_tr_sca(3) = -0.5
    336     a_tr_sca(4) = -0.5
    337 
    338     !AA Set scavenged fractions to 1
    339     DO k = 1, klev
    340         DO i = 1, klon
    341             pfrac_nucl(i,k)=1.0
    342             pfrac_1nucl(i,k)=1.0
    343             pfrac_impa(i,k)=1.0
    344             beta(i,k)=0.0
    345         ENDDO
    346     ENDDO
    347 
    348     IF (ok_ice_sursat) CALL ice_sursat_init()
    349 
    350     appel1er = .FALSE.
    351 
    352 ENDIF     !(appel1er)
    353 
    354283! AA for 'safety' reasons
    355284zalpha_tr   = 0.
    356285zfrac_lessi = 0.
    357 
    358 ! Initialisation of output variables (JYG):
     286beta(:,:)= 0.
     287
     288! Initialisation of variables:
     289
    359290prfl(:,:) = 0.0
    360291psfl(:,:) = 0.0
    361 
    362292d_t(:,:) = 0.0
    363293d_q(:,:) = 0.0
     
    369299frac_nucl(:,:) = 1.0
    370300frac_impa(:,:) = 1.0
    371 
    372301rain(:) = 0.0
    373302snow(:) = 0.0
     
    390319qzero(:) = 0.0
    391320
    392 !--ice sursaturation
     321!--ice supersaturation
    393322gamma_ss(:,:) = 1.0
    394323qss(:,:) = 0.0
     
    426355    ! ---------------------------------------------------------------------
    427356   
    428     IF (k.LE.klevm1) THEN
     357    IF (k.LE.klev-1) THEN
    429358
    430359        DO i = 1, klon
     
    465394        ! Calculation of saturation specific humidity
    466395        ! depending on temperature:
    467         CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
     396        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
    468397        ! wrt liquid water
    469         CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.false.,qsl(:),dqsl(:))
     398        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,1,.false.,qsl(:),dqsl(:))
    470399        ! wrt ice
    471         CALL CALC_QSAT_ECMWF(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.false.,qsi(:),dqsi(:))
     400        CALL calc_qsat_ecmwf(klon,zt(:),qzero(:),pplay(:,k),RTT,2,.false.,qsi(:),dqsi(:))
    472401
    473402        DO i = 1, klon
     
    626555
    627556     qtot(:)=zq(:)+zmqc(:)
    628      CALL CALC_QSAT_ECMWF(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
     557     CALL calc_qsat_ecmwf(klon,zt(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
    629558     DO i = 1, klon
    630559            zdelta = MAX(0.,SIGN(1.,RTT-zt(i)))
     
    691620                ! + stationary mixed-phase cloud model
    692621
    693                     CALL cloudth_mpc(klon,klev,k,mpc_bl_points,            &
     622                    CALL cloudth_mpc(klon,klev,k,iflag_mpc_bl,mpc_bl_points, &
    694623                         t,ztv,zq,zqta,fraca, zpspsk,                      &
    695624                         paprs,pplay,ztla,zthl,ratqs,zqs,psfl,             &
     
    761690                  ENDDO
    762691
    763                   ! Calculation of saturation specific humidity and ce fraction
     692                  ! Calculation of saturation specific humidity and ice fraction
    764693                  CALL calc_qsat_ecmwf(klon,Tbef(:),qtot(:),pplay(:,k),RTT,0,.false.,zqs(:),zdqs(:))
    765694                  CALL calc_gammasat(klon,Tbef(:),qtot(:),pplay(:,k),gammasat(:),dgammasatdt(:))
     
    975904    ENDDO
    976905
    977     ! -------------------------------------------------------------------------------
    978906    ! Autoconversion
    979907    ! -------------------------------------------------------------------------------
     
    1052980
    1053981    DO i = 1, klon
    1054 
    1055             ziflprev(i)=zifl(i)
     982           
     983            IF (iflag_evap_prec.EQ.4) THEN
     984                ziflprev(i)=ziflcld(i)
     985            ELSE
     986                ziflprev(i)=zifl(i)*zneb(i)
     987            ENDIF
    1056988
    1057989            IF (rneb(i,k) .GT. 0.0) THEN
     
    12001132
    12011133            zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/zneb(i))
    1202             pfrac_nucl(i,k)=pfrac_nucl(i,k)*(1.-zneb(i)*zfrac_lessi)
    12031134            frac_nucl(i,k)= 1.-zneb(i)*zfrac_lessi
    12041135
    12051136            ! Nucleation with a factor of -1 instead of -0.5
    12061137            zfrac_lessi = 1. - EXP(-zprec_cond(i)/zneb(i))
    1207             pfrac_1nucl(i,k)=pfrac_1nucl(i,k)*(1.-zneb(i)*zfrac_lessi)
    12081138
    12091139        ENDIF
     
    12261156
    12271157              zfrac_lessi = 1. - EXP(zalpha_tr*zprec_cond(i)/zneb(i))
    1228               pfrac_impa(i,kk)=pfrac_impa(i,kk)*(1.-zneb(i)*zfrac_lessi)
    12291158              frac_impa(i,kk)= 1.-zneb(i)*zfrac_lessi
    12301159
     
    12491178   ENDDO
    12501179   !q_sat
    1251    CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.false.,zqsatl(:,k),zdqs(:))
    1252    CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.false.,zqsats(:,k),zdqs(:))
     1180   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,1,.false.,qsatl(:,k),zdqs(:))
     1181   CALL calc_qsat_ecmwf(klon,Tbef(:),qzero(:),pplay(:,k),RTT,2,.false.,qsats(:,k),zdqs(:))
    12531182
    12541183ENDDO
     
    12681197  ENDIF
    12691198
    1270 END SUBROUTINE LSCP
     1199END SUBROUTINE lscp
    12711200!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    12721201
    1273 END MODULE LSCP_MOD
     1202END MODULE lscp_mod
  • LMDZ6/trunk/libf/phylmd/nuage.h

    r4114 r4380  
    1212      INTEGER iflag_rain_incloud_vol
    1313   
    14       INTEGER iflag_mpc_bl, iflag_gammasat, iflag_vice, iflag_rei
    15       LOGICAL ok_icefra_lscp, ok_radliq_snow
     14      INTEGER iflag_gammasat, iflag_vice, iflag_rei
     15      LOGICAL ok_icefra_lscp
    1616
    1717      common /nuagecom/ rad_froid,rad_chau1, rad_chau2,t_glace_max,     &
     
    2121     &                  iflag_t_glace,iflag_cloudth_vert,iflag_cld_cv,  &
    2222     &                  iflag_rain_incloud_vol,                         &
    23      &                  ok_icefra_lscp,ok_radliq_snow,                  &
    24      &                  iflag_mpc_bl, iflag_gammasat, iflag_vice,       &
     23     &                  ok_icefra_lscp,                  &
     24     &                  iflag_gammasat, iflag_vice,       &
    2525     &                  iflag_rei   
    2626!$OMP THREADPRIVATE(/nuagecom/)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4367 r4380  
    8282    USE wake_ini_mod, ONLY : wake_ini
    8383    USE thermcell_ini_mod, ONLY : thermcell_ini
     84    USE lscp_ini_mod, ONLY : lscp_ini
    8485
    8586    !USE cmp_seri_mod
     
    285286       sij, &
    286287       !
     288       rneblsvol, &
     289       zqsatl, zqsats, &
     290       qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
     291       Tcontr, qcontr, qcontr2, fcontrN, fcontrP, &
    287292       cldemi,  &
    288293       cldfra, cldtau, fiwc,  &
     
    17421747       CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    17431748   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
    1744 
     1749       IF (ok_new_lscp) then
     1750           CALL lscp_ini(pdtphys,ok_ice_sursat)
     1751       endif
    17451752!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    17461753
     
    36273634    ENDIF
    36283635
    3629     CALL lscp(phys_tstep,missing_val,paprs,pplay, &
     3636    CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, &
    36303637         t_seri, q_seri,ptconv,ratqs, &
    3631          d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneb_seri, &
     3638         d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri, &
    36323639         cldliq, picefra, rain_lsc, snow_lsc, &
    3633          pfrac_impa, pfrac_nucl, pfrac_1nucl, &
    36343640         frac_impa, frac_nucl, beta_prec_fisrt, &
    36353641         prfl, psfl, rhcl,  &
    36363642         zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, &
    3637          iflag_ice_thermo, ok_ice_sursat)
     3643         iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, &
     3644         qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
     3645         Tcontr, qcontr, qcontr2, fcontrN, fcontrP )
    36383646
    36393647    ELSE
  • LMDZ6/trunk/libf/phylmdiso/fisrtilp.F90

    r4143 r4380  
    143143  ! Coeffients de fraction lessivee : pour OFF-LINE
    144144  !
    145   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_nucl
    146   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_1nucl
    147   REAL, DIMENSION(klon,klev),      INTENT(OUT)  :: pfrac_impa
     145  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_nucl
     146  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_1nucl
     147  REAL, DIMENSION(klon,klev),      INTENT(INOUT)  :: pfrac_impa
    148148  !
    149149  ! Fraction d'aerosols lessivee par impaction et par nucleation
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r4367 r4380  
    7979    USE wxios, ONLY: g_ctx, wxios_set_context
    8080#endif
     81    USE lscp_ini_mod, ONLY : lscp_ini
    8182    USE lscp_mod, ONLY : lscp
    8283    USE wake_ini_mod, ONLY : wake_ini
     
    324325       sij, &
    325326       !
     327       rneblsvol, &
     328       zqsatl, zqsats, &
     329       qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
     330       Tcontr, qcontr, qcontr2, fcontrN, fcontrP, &
    326331       cldemi,  &
    327332       cldfra, cldtau, fiwc,  &
     
    18811886       CALL thermcell_ini(iflag_thermals,prt_level,tau_thermals,lunout, &
    18821887   &    RG,RD,RCPD,RKAPPA,RLVTT,RETV)
     1888       IF (ok_new_lscp) then
     1889           CALL lscp_ini(pdtphys,ok_ice_sursat)
     1890       endif
    18831891
    18841892!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    46774685    ENDIF
    46784686
    4679     CALL lscp(phys_tstep,missing_val,paprs,pplay, &
     4687    CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, &
    46804688         t_seri, q_seri,ptconv,ratqs, &
    4681          d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneb_seri, &
     4689         d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri, &
    46824690         cldliq, picefra, rain_lsc, snow_lsc, &
    4683          pfrac_impa, pfrac_nucl, pfrac_1nucl, &
    46844691         frac_impa, frac_nucl, beta_prec_fisrt, &
    46854692         prfl, psfl, rhcl,  &
    46864693         zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, &
    4687          iflag_ice_thermo, ok_ice_sursat)
     4694         iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, &
     4695         qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, &
     4696         Tcontr, qcontr, qcontr2, fcontrN, fcontrP )
    46884697
    46894698    ELSE
Note: See TracChangeset for help on using the changeset viewer.