Changeset 5996


Ignore:
Timestamp:
Jan 5, 2026, 5:27:37 PM (7 days ago)
Author:
evignon
Message:

externalisation des routines de phase des nuages dans lmdz_lscp_phase

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

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/lmdz_call_cloud_optics_prop.f90

    r5828 r5996  
    3939 
    4040  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14) 
    41   USE lmdz_lscp_tools, only: icefrac_lscp
     41  USE lmdz_lscp_phase, only: icefrac_lscp
    4242  USE nuage_mod, ONLY: nuage
    4343
  • LMDZ6/trunk/libf/phylmd/lmdz_lscp_main.f90

    r5994 r5996  
    7171
    7272! USE de modules contenant des fonctions.
    73 USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf, calc_gammasat
    74 USE lmdz_lscp_tools, ONLY : icefrac_lscp, icefrac_lscp_turb, distance_to_cloud_top
     73USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf, calc_gammasat, distance_to_cloud_top
     74USE lmdz_lscp_phase, ONLY : icefrac_lscp, icefrac_lscp_turb
    7575USE lmdz_lscp_condensation, ONLY : condensation_lognormal, condensation_ice_supersat
    7676USE lmdz_lscp_condensation, ONLY : cloudth, cloudth_v3, cloudth_v6, condensation_cloudth
  • LMDZ6/trunk/libf/phylmd/lmdz_lscp_tools.f90

    r5933 r5996  
    100100END SUBROUTINE FALLICE_VELOCITY
    101101!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    102 
    103 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    104 SUBROUTINE ICEFRAC_LSCP(klon, temp, iflag_ice_thermo, distcltop, temp_cltop, icefrac, dicefracdT)
    105 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    106  
    107   ! Compute the ice fraction 1-xliq (see e.g.
    108   ! Doutriaux-Boucher & Quaas 2004, section 2.2.)
    109   ! as a function of temperature
    110   ! see also Fig 3 of Madeleine et al. 2020, JAMES
    111 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    112 
    113 
    114     USE print_control_mod, ONLY: lunout, prt_level
    115     USE lmdz_lscp_ini, ONLY: t_glace_min, t_glace_max, exposant_glace, iflag_t_glace
    116     USE lmdz_lscp_ini, ONLY : RTT, dist_liq, temp_nowater
    117 
    118     IMPLICIT NONE
    119 
    120 
    121     INTEGER, INTENT(IN)                 :: klon              ! number of horizontal grid points
    122     REAL, INTENT(IN), DIMENSION(klon)   :: temp              ! temperature
    123     REAL, INTENT(IN), DIMENSION(klon)   :: distcltop         ! distance to cloud top
    124     REAL, INTENT(IN), DIMENSION(klon)   :: temp_cltop        ! temperature of cloud top
    125     INTEGER, INTENT(IN)                 :: iflag_ice_thermo
    126     REAL, INTENT(OUT), DIMENSION(klon)  :: icefrac
    127     REAL, INTENT(OUT), DIMENSION(klon)  :: dicefracdT
    128 
    129 
    130     INTEGER i
    131     REAL    liqfrac_tmp, dicefrac_tmp
    132     REAL    Dv, denomdep,beta,qsi,dqsidt
    133     LOGICAL ice_thermo
    134 
    135     CHARACTER (len = 20) :: modname = 'lscp_tools'
    136     CHARACTER (len = 80) :: abort_message
    137 
    138     IF ((iflag_t_glace.LT.2)) THEN !.OR. (iflag_t_glace.GT.6)) THEN
    139        abort_message = 'lscp cannot be used if iflag_t_glace<2 or >6'
    140        CALL abort_physic(modname,abort_message,1)
    141     ENDIF
    142 
    143     IF (.NOT.((iflag_ice_thermo .EQ. 1).OR.(iflag_ice_thermo .GE. 3))) THEN
    144        abort_message = 'lscp cannot be used without ice thermodynamics'
    145        CALL abort_physic(modname,abort_message,1)
    146     ENDIF
    147 
    148 
    149     DO i=1,klon
    150  
    151         ! old function with sole dependence upon temperature
    152         IF (iflag_t_glace .EQ. 2) THEN
    153             liqfrac_tmp = (temp(i)-t_glace_min) / (t_glace_max-t_glace_min)
    154             liqfrac_tmp = MIN(MAX(liqfrac_tmp,0.0),1.0)
    155             icefrac(i) = (1.0-liqfrac_tmp)**exposant_glace
    156             IF (icefrac(i) .GT.0.) THEN
    157                  dicefracdT(i)= exposant_glace * (icefrac(i)**(exposant_glace-1.)) &
    158                            / (t_glace_min - t_glace_max)
    159             ENDIF
    160 
    161             IF ((icefrac(i).EQ.0).OR.(icefrac(i).EQ.1)) THEN
    162                  dicefracdT(i)=0.
    163             ENDIF
    164 
    165         ENDIF
    166 
    167         ! function of temperature used in CMIP6 physics
    168         IF (iflag_t_glace .EQ. 3) THEN
    169             liqfrac_tmp = (temp(i)-t_glace_min) / (t_glace_max-t_glace_min)
    170             liqfrac_tmp = MIN(MAX(liqfrac_tmp,0.0),1.0)
    171             icefrac(i) = 1.0-liqfrac_tmp**exposant_glace
    172             IF ((icefrac(i) .GT.0.) .AND. (liqfrac_tmp .GT. 0.)) THEN
    173                 dicefracdT(i)= exposant_glace * ((liqfrac_tmp)**(exposant_glace-1.)) &
    174                           / (t_glace_min - t_glace_max)
    175             ELSE
    176                 dicefracdT(i)=0.
    177             ENDIF
    178         ENDIF
    179 
    180         ! for iflag_t_glace .GE. 4, the liquid fraction depends upon temperature at cloud top
    181         ! and then decreases with decreasing height
    182 
    183         !with linear function of temperature at cloud top
    184         IF (iflag_t_glace .EQ. 4) THEN 
    185                 liqfrac_tmp = (temp(i)-t_glace_min) / (t_glace_max-t_glace_min)
    186                 liqfrac_tmp = MIN(MAX(liqfrac_tmp,0.0),1.0)
    187                 icefrac(i)    =  MAX(MIN(1.,1.0 - liqfrac_tmp*exp(-distcltop(i)/dist_liq)),0.)
    188                 dicefrac_tmp = - temp(i)/(t_glace_max-t_glace_min)
    189                 dicefracdT(i) = dicefrac_tmp*exp(-distcltop(i)/dist_liq)
    190                 IF ((liqfrac_tmp .LE.0) .OR. (liqfrac_tmp .GE. 1)) THEN
    191                         dicefracdT(i) = 0.
    192                 ENDIF
    193         ENDIF
    194 
    195         ! with CMIP6 function of temperature at cloud top
    196         IF ((iflag_t_glace .EQ. 5) .OR. (iflag_t_glace .EQ. 7)) THEN
    197                 liqfrac_tmp = (temp(i)-t_glace_min) / (t_glace_max-t_glace_min)
    198                 liqfrac_tmp =  MIN(MAX(liqfrac_tmp,0.0),1.0)
    199                 liqfrac_tmp = liqfrac_tmp**exposant_glace
    200                 icefrac(i)  =  MAX(MIN(1.,1.0 - liqfrac_tmp*exp(-distcltop(i)/dist_liq)),0.)
    201                 IF ((liqfrac_tmp .LE.0) .OR. (liqfrac_tmp .GE. 1)) THEN
    202                         dicefracdT(i) = 0.
    203                 ELSE
    204                         dicefracdT(i) = exposant_glace*((liqfrac_tmp)**(exposant_glace-1.))/(t_glace_min- t_glace_max) &
    205                                         *exp(-distcltop(i)/dist_liq)
    206                 ENDIF
    207         ENDIF
    208 
    209         ! with modified function of temperature at cloud top
    210         ! to get largere values around 260 K, works well with t_glace_min = 241K
    211         IF (iflag_t_glace .EQ. 6) THEN
    212                 IF (temp(i) .GT. t_glace_max) THEN
    213                         liqfrac_tmp = 1.
    214                 ELSE
    215                         liqfrac_tmp = -((temp(i)-t_glace_max) / (t_glace_max-t_glace_min))**2+1.
    216                 ENDIF
    217                 liqfrac_tmp  = MIN(MAX(liqfrac_tmp,0.0),1.0)
    218                 icefrac(i)   = MAX(MIN(1.,1.0 - liqfrac_tmp*exp(-distcltop(i)/dist_liq)),0.)       
    219                 IF ((liqfrac_tmp .LE.0) .OR. (liqfrac_tmp .GE. 1)) THEN
    220                         dicefracdT(i) = 0.
    221                 ELSE
    222                         dicefracdT(i) = 2*((temp(i)-t_glace_max) / (t_glace_max-t_glace_min))/(t_glace_max-t_glace_min) &
    223                                   *exp(-distcltop(i)/dist_liq)
    224                 ENDIF
    225         ENDIF
    226 
    227         ! if temperature or temperature of cloud top <-40°C,
    228         IF (iflag_t_glace .GE. 4) THEN
    229                 IF ((temp_cltop(i) .LE. temp_nowater) .AND. (temp(i) .LE. t_glace_max)) THEN
    230                         icefrac(i) = 1.
    231                         dicefracdT(i) = 0.
    232                 ENDIF
    233         ENDIF
    234      
    235 
    236      ENDDO ! klon
    237      RETURN
    238  
    239 END SUBROUTINE ICEFRAC_LSCP
    240 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    241 
    242 
    243 SUBROUTINE ICEFRAC_LSCP_TURB(klon, dtime, pticefracturb, temp, pplay, paprsdn, paprsup, wvel, qice_ini, snowcld, qtot_incl, cldfra, tke,   &
    244                              tke_dissip, sursat_e, invtau_e, qliq, qvap_cld, qice, icefrac, dicefracdT, cldfraliq, sigma2_icefracturb, mean_icefracturb)
    245 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    246   ! Compute the liquid, ice and vapour content (+ice fraction) based
    247   ! on turbulence (see Fields 2014, Furtado 2016, Raillard 2025)
    248   ! L.Raillard (23/09/24)
    249   ! E.Vignon (03/2025) : additional elements for treatment of convective
    250   !                      boundary layer clouds
    251 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    252 
    253 
    254    USE lmdz_lscp_ini, ONLY : prt_level, lunout
    255    USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG, RV, RPI
    256    USE lmdz_lscp_ini, ONLY : seuil_neb, temp_nowater
    257    USE lmdz_lscp_ini, ONLY : naero5, gamma_snwretro, gamma_taud, capa_crystal, rho_ice
    258    USE lmdz_lscp_ini, ONLY : eps, snow_fallspeed
    259 
    260    IMPLICIT NONE
    261 
    262    INTEGER,   INTENT(IN)                           :: klon                !--number of horizontal grid points
    263    REAL,      INTENT(IN)                           :: dtime               !--time step [s]
    264    LOGICAL,   INTENT(IN),       DIMENSION(klon)    :: pticefracturb       !--grid points concerned by this routine 
    265    REAL,      INTENT(IN),       DIMENSION(klon)    :: temp                !--temperature
    266    REAL,      INTENT(IN),       DIMENSION(klon)    :: pplay               !--pressure in the middle of the layer           [Pa]
    267    REAL,      INTENT(IN),       DIMENSION(klon)    :: paprsdn             !--pressure at the bottom interface of the layer [Pa]
    268    REAL,      INTENT(IN),       DIMENSION(klon)    :: paprsup             !--pressure at the top interface of the layer    [Pa]
    269    REAL,      INTENT(IN),       DIMENSION(klon)    :: wvel                !--vertical velocity                             [m/s]
    270    REAL,      INTENT(IN),       DIMENSION(klon)    :: qtot_incl           !--specific total cloud water in-cloud content   [kg/kg]
    271    REAL,      INTENT(IN),       DIMENSION(klon)    :: cldfra              !--cloud fraction in gridbox                     [-]
    272    REAL,      INTENT(IN),       DIMENSION(klon)    :: tke                 !--turbulent kinetic energy                      [m2/s2]
    273    REAL,      INTENT(IN),       DIMENSION(klon)    :: tke_dissip          !--TKE dissipation                               [m2/s3]
    274 
    275    REAL,      INTENT(IN),       DIMENSION(klon)    :: qice_ini            !--initial specific ice content gridbox-mean     [kg/kg]
    276    REAL,      INTENT(IN),       DIMENSION(klon)    :: snowcld             !--in-cloud snowfall flux                        [kg/m2/s]
    277    REAL,      INTENT(IN),       DIMENSION(klon)    :: sursat_e            !--environment supersaturation                   [-]
    278    REAL,      INTENT(IN),       DIMENSION(klon)    :: invtau_e            !--inverse time-scale of mixing with environment [s-1]
    279    REAL,      INTENT(OUT),      DIMENSION(klon)    :: qliq                !--specific liquid content gridbox-mean          [kg/kg]
    280    REAL,      INTENT(OUT),      DIMENSION(klon)    :: qvap_cld            !--specific cloud vapor content, gridbox-mean    [kg/kg]
    281    REAL,      INTENT(OUT),      DIMENSION(klon)    :: qice                !--specific ice content gridbox-mean             [kg/kg]
    282 
    283    REAL,      INTENT(INOUT),    DIMENSION(klon)    :: icefrac             !--fraction of ice in condensed water            [-]
    284    REAL,      INTENT(INOUT),    DIMENSION(klon)    :: dicefracdT
    285 
    286    REAL,      INTENT(OUT),      DIMENSION(klon)    :: cldfraliq           !--fraction of cldfra where liquid               [-]
    287    REAL,      INTENT(OUT),      DIMENSION(klon)    :: sigma2_icefracturb  !--Sigma2 of the ice supersaturation PDF         [-]
    288    REAL,      INTENT(OUT),      DIMENSION(klon)    :: mean_icefracturb    !--Mean of the ice supersaturation PDF           [-]
    289 
    290    REAL, DIMENSION(klon) :: qzero, qsatl, dqsatl, qsati, dqsati           !--specific humidity saturation values
    291    INTEGER :: i
    292 
    293    REAL :: qvap_incl, qice_incl, qliq_incl, qiceini_incl                  !--In-cloud specific quantities                  [kg/kg]
    294    REAL :: water_vapor_diff                                               !--Water-vapour diffusion coeff in air (f(T,P))  [m2/s]
    295    REAL :: air_thermal_conduct                                            !--Thermal conductivity of air (f(T))            [J/m/K/s]
    296    REAL :: C0                                                             !--Lagrangian structure function                 [-]
    297    REAL :: tau_dissipturb
    298    REAL :: invtau_phaserelax
    299    REAL :: sigma2_pdf
    300    REAL :: ai, bi, B0
    301    REAL :: sursat_iceliq
    302    REAL :: sursat_equ
    303    REAL :: liqfra_max
    304    REAL :: sursat_iceext
    305    REAL :: nb_crystals                                                    !--number concentration of ice crystals          [#/m3]
    306    REAL :: moment1_PSD                                                    !--1st moment of ice PSD
    307    REAL :: N0_PSD, lambda_PSD                                             !--parameters of the exponential PSD
    308 
    309    REAL :: cldfra1D
    310    REAL :: rho_air
    311    REAL :: psati                                                          !--saturation vapor pressure wrt ice             [Pa]
    312    REAL :: sigmaw2                                                        !--variance of vertical turbulent velocity       [m2/s2]
    313                                                                        
    314     REAL :: tempvig1, tempvig2
    315 
    316    tempvig1    = -21.06 + RTT
    317    tempvig2    = -30.35 + RTT
    318    C0            = 10.                                                    !--value assumed in Field2014           
    319    sursat_iceext = -0.1
    320    qzero(:)      = 0.
    321    cldfraliq(:)  = 0.
    322    qliq(:)       = 0.
    323    qice(:)       = 0.
    324    qvap_cld(:)   = 0.
    325    sigma2_icefracturb(:) = 0.
    326    mean_icefracturb(:)   = 0.
    327 
    328    !--wrt liquid
    329    CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,1,.false.,qsatl(:),dqsatl(:))
    330    !--wrt ice
    331    CALL calc_qsat_ecmwf(klon,temp(:),qzero(:),pplay(:),RTT,2,.false.,qsati(:),dqsati(:))
    332 
    333 
    334     DO i=1,klon
    335      rho_air  = pplay(i) / temp(i) / RD
    336      ! assuming turbulence isotropy, tke=3/2*sigmaw2
    337      sigmaw2=2./3*tke(i)
    338      ! because cldfra is intent in, but can be locally modified due to test
    339      cldfra1D = cldfra(i)
    340      ! activate param for concerned grid points and for cloudy conditions
    341      IF ((pticefracturb(i)) .AND. (cldfra(i) .GT. 0.)) THEN
    342         IF (cldfra(i) .GE. 1.0) THEN
    343            cldfra1D = 1.0
    344         END IF
    345        
    346         ! T>0°C, no ice allowed
    347         IF ( temp(i) .GE. RTT ) THEN
    348            qvap_cld(i)   = qsatl(i) * cldfra1D
    349            qliq(i)       = MAX(0.0,qtot_incl(i)-qsatl(i))  * cldfra1D
    350            qice(i)       = 0.
    351            cldfraliq(i)  = 1.
    352            icefrac(i)    = 0.
    353            dicefracdT(i) = 0.
    354        
    355         ! T<-38°C, no liquid allowed
    356         ELSE IF ( temp(i) .LE. temp_nowater) THEN
    357            qvap_cld(i)   = qsati(i) * cldfra1D
    358            qliq(i)       = 0.
    359            qice(i)       = MAX(0.0,qtot_incl(i)-qsati(i)) * cldfra1D
    360            cldfraliq(i)  = 0.
    361            icefrac(i)    = 1.
    362            dicefracdT(i) = 0.
    363 
    364 
    365         !---------------------------------------------------------
    366         !--             MIXED PHASE TEMPERATURE REGIME         
    367         !---------------------------------------------------------
    368         !--In the mixed phase regime (-38°C< T <0°C) we distinguish
    369         !--3 possible subcases.
    370         !--1.  No pre-existing ice 
    371         !--2A. Pre-existing ice and no turbulence
    372         !--2B. Pre-existing ice and turbulence
    373         ELSE
    374 
    375            ! gamma_snwretro controls the contribution of snowflakes to the negative feedback
    376            ! note that for reasons related to inetarctions with the condensation iteration in lscp_main
    377            ! we consider here the mean snowflake concentration in the mesh (not the in-cloud concentration)
    378            ! when poprecip is active, it will be worth testing considering the incloud fraction, dividing
    379            ! by znebprecipcld     
    380            ! qiceini_incl  = qice_ini(i) / cldfra1D + &
    381            !              gamma_snwretro * snowcld(i) * RG * dtime / ( paprsdn(i) - paprsup(i) )
    382            ! assuming constant snowfall velocity
    383            qiceini_incl  = qice_ini(i) / cldfra1D + gamma_snwretro * snowcld(i) / pplay(i) * RD * temp(i) / snow_fallspeed
    384 
    385            !--1. No preexisting ice and no mixing with environment: if vertical motion, fully liquid
    386            !--cloud else fully iced cloud
    387            IF ( (qiceini_incl .LT. eps) .AND. (invtau_e(i) .LT. eps) ) THEN
    388               IF ( (wvel(i)+sqrt(sigmaw2) .GT. eps) .OR. (tke(i) .GT. eps) ) THEN
    389                  qvap_cld(i)   = qsatl(i) * cldfra1D
    390                  qliq(i)       = MAX(0.,qtot_incl(i)-qsatl(i)) * cldfra1D
    391                  qice(i)       = 0.
    392                  cldfraliq(i)  = 1.
    393                  icefrac(i)    = 0.
    394                  dicefracdT(i) = 0.
    395               ELSE
    396                  qvap_cld(i)   = qsati(i) * cldfra1D
    397                  qliq(i)       = 0.
    398                  qice(i)       = MAX(0.,qtot_incl(i)-qsati(i)) * cldfra1D
    399                  cldfraliq(i)  = 0.
    400                  icefrac(i)    = 1.
    401                  dicefracdT(i) = 0.
    402               ENDIF
    403            
    404 
    405            !--2. Pre-existing ice and/or mixing with environment:computation of ice properties for
    406            !--feedback
    407            ELSE
    408 
    409               sursat_iceliq = qsatl(i)/qsati(i) - 1.
    410               psati         = qsati(i) * pplay(i) / (RD/RV)
    411              
    412               !--We assume an exponential ice PSD whose parameters
    413               !--are computed following Morrison&Gettelman 2008
    414               !--Ice number density is assumed equals to INP density
    415               !--which is for naero5>0 a function of temperature (DeMott 2010)   
    416               !--bi and B0 are microphysical function characterizing
    417               !--vapor/ice interactions
    418               !--tau_phase_relax is the typical time of vapor deposition
    419               !--onto ice crystals
    420 
    421               !--For naero5<=0 INP density is derived from the empirical fit
    422               !--from MARCUS campaign from Vignon 2021
    423               !--/!\ Note that option is very specific and should be use for
    424               !--the Southern Ocean and the Antarctic
    425 
    426               IF (naero5 .LE. 0) THEN
    427                  IF ( temp(i) .GT. tempvig1 ) THEN
    428                       nb_crystals = 1.e3 * 10**(-0.14*(temp(i)-tempvig1) - 2.88)
    429                  ELSE IF ( temp(i) .GT. tempvig2 ) THEN
    430                       nb_crystals = 1.e3 * 10**(-0.31*(temp(i)-tempvig1) - 2.88)
    431                  ELSE
    432                       nb_crystals = 1.e3 * 10**(0.)
    433                  ENDIF
    434               ELSE
    435                  nb_crystals = 1.e3 * 5.94e-5 * ( RTT - temp(i) )**3.33 * naero5**(0.0264*(RTT-temp(i))+0.0033)
    436               ENDIF
    437               lambda_PSD  = ( (RPI*rho_ice*nb_crystals) / (rho_air * MAX(qiceini_incl , eps) ) ) ** (1./3.)
    438               N0_PSD      = nb_crystals * lambda_PSD
    439               moment1_PSD = N0_PSD/lambda_PSD**2
    440 
    441               !--Formulae for air thermal conductivity and water vapor diffusivity
    442               !--comes respectively from Beard and Pruppacher (1971)
    443               !--and  Hall and Pruppacher (1976)
    444 
    445               air_thermal_conduct = ( 5.69 + 0.017 * ( temp(i) - RTT ) ) * 1.e-3 * 4.184
    446               water_vapor_diff    = 2.11*1e-5 * ( temp(i) / RTT )**1.94 * ( 101325 / pplay(i) )
    447              
    448               bi = 1./((qsati(i)+qsatl(i))/2.) + RLSTT**2 / RCPD / RV / temp(i)**2
    449               B0 = 4. * RPI * capa_crystal * 1. / (  RLSTT**2 / air_thermal_conduct / RV / temp(i)**2  &
    450                                                   +  RV * temp(i) / psati / water_vapor_diff  )
    451               invtau_phaserelax = bi * B0 * moment1_PSD
    452              
    453               ai = RG / RD / temp(i) * ( RD * RLSTT / RCPD / RV / temp(i) - 1. )
    454               sursat_equ    = (ai * wvel(i) + sursat_e(i)*invtau_e(i)) / (invtau_phaserelax + invtau_e(i))
    455               ! as sursaturation is by definition lower than -1 and
    456               ! because local supersaturation > 1 are never found in the atmosphere
    457 
    458               !--2A. No TKE : stationnary binary solution depending on vertical velocity and mixing with env.
    459               ! If Sequ > Siw liquid cloud, else ice cloud
    460               IF ( tke_dissip(i) .LE. eps )  THEN
    461                  sigma2_icefracturb(i)= 0.
    462                  mean_icefracturb(i)  = sursat_equ
    463                  IF (sursat_equ .GT. sursat_iceliq) THEN
    464                     qvap_cld(i)   = qsatl(i) * cldfra1D
    465                     qliq(i)       = MAX(0.,qtot_incl(i)-qsatl(i)) * cldfra1D
    466                     qice(i)       = 0.
    467                     cldfraliq(i)  = 1.
    468                     icefrac(i)    = 0.
    469                     dicefracdT(i) = 0.
    470                  ELSE
    471                     qvap_cld(i)   = qsati(i) * cldfra1D
    472                     qliq(i)       = 0.
    473                     qice(i)       = MAX(0.,qtot_incl(i)-qsati(i)) * cldfra1D
    474                     cldfraliq(i)  = 0.
    475                     icefrac(i)    = 1.
    476                     dicefracdT(i) = 0.
    477                  ENDIF
    478                  
    479               !--2B. TKE and ice : ice supersaturation PDF
    480               !--we compute the cloud liquid properties with a Gaussian PDF
    481               !--of ice supersaturation F(Si) (Field2014, Furtado2016).
    482               !--Parameters of the PDF are function of turbulence and
    483               !--microphysics/existing ice.
    484               ELSE 
    485                      
    486                  !--Tau_dissipturb is the time needed for turbulence to decay
    487                  !--due to viscosity
    488                  tau_dissipturb = gamma_taud * 2. * sigmaw2 / tke_dissip(i) / C0
    489 
    490                  !--------------------- PDF COMPUTATIONS ---------------------
    491                  !--Formulae for sigma2_pdf (variance), mean of PDF in Raillard2025
    492                  !--cloud liquid fraction and in-cloud liquid content are given
    493                  !--by integrating resp. F(Si) and Si*F(Si)
    494                  !--Liquid is limited by the available water vapor trough a
    495                  !--maximal liquid fraction
    496                  !--qice_ini(i) / cldfra1D = qiceincld without precip
    497 
    498                  liqfra_max = MAX(0., (MIN (1.,( qtot_incl(i) - (qice_ini(i) / cldfra1D) - qsati(i) * (1 + sursat_iceext ) ) / ( qsatl(i) - qsati(i) ) ) ) )
    499                  sigma2_pdf = 1./2. * ( ai**2 ) *  sigmaw2 * tau_dissipturb / (invtau_phaserelax + invtau_e(i))
    500                  ! sursat ranges between -1 and 1, so we prevent sigma2 so exceed 1
    501                  cldfraliq(i) = 0.5 * (1. - erf( ( sursat_iceliq - sursat_equ) / (SQRT(2.* sigma2_pdf) ) ) )
    502                  IF (cldfraliq(i) .GT. liqfra_max) THEN
    503                      cldfraliq(i) = liqfra_max
    504                  ENDIF
    505                  
    506                  qliq_incl = qsati(i) * SQRT(sigma2_pdf) / SQRT(2.*RPI) * EXP( -1.*(sursat_iceliq - sursat_equ)**2. / (2.*sigma2_pdf) )  &
    507                            - qsati(i) * cldfraliq(i) * (sursat_iceliq - sursat_equ )
    508                  
    509                  sigma2_icefracturb(i)= sigma2_pdf
    510                  mean_icefracturb(i)  = sursat_equ
    511      
    512                  !------------ SPECIFIC VAPOR CONTENT AND WATER CONSERVATION  ------------
    513 
    514                  IF ( (qliq_incl .LE. eps) .OR. (cldfraliq(i) .LE. eps) ) THEN
    515                      qliq_incl    = 0.
    516                      cldfraliq(i) = 0.
    517                  END IF
    518                  
    519                  !--Specific humidity is the max between qsati and the weighted mean between
    520                  !--qv in MPC patches and qv in ice-only parts. We assume that MPC parts are
    521                  !--always at qsatl and ice-only parts slightly subsaturated (qsati*sursat_iceext+1)
    522                  !--The whole cloud can therefore be supersaturated but never subsaturated.
    523 
    524                  qvap_incl = MAX(qsati(i), ( 1. - cldfraliq(i) ) * (sursat_iceext + 1.) * qsati(i) + cldfraliq(i) * qsatl(i) )
    525 
    526                  IF ( qvap_incl  .GE. qtot_incl(i) ) THEN
    527                     qvap_incl = qsati(i)
    528                     qliq_incl = MAX(0.0,qtot_incl(i) - qvap_incl)
    529                     qice_incl = 0.
    530 
    531                  ELSEIF ( (qvap_incl + qliq_incl) .GE. qtot_incl(i) ) THEN
    532                     qliq_incl = MAX(0.0,qtot_incl(i) - qvap_incl)
    533                     qice_incl = 0.
    534                  ELSE
    535                     qice_incl = qtot_incl(i) - qvap_incl - qliq_incl
    536                  END IF
    537 
    538                  qvap_cld(i)   = qvap_incl * cldfra1D
    539                  qliq(i)       = qliq_incl * cldfra1D
    540                  qice(i)       = qice_incl * cldfra1D
    541                  IF ((qice(i)+qliq(i)) .GT. 0.) THEN
    542                     icefrac(i)    = qice(i) / ( qice(i) + qliq(i) )
    543                  ELSE
    544                     icefrac(i)    = 1. ! to keep computation of qsat wrt ice in condensation loop in lmdz_lscp_main
    545                  ENDIF
    546                  dicefracdT(i) = 0.
    547 
    548               END IF ! Enough TKE
    549            
    550            END IF ! End qini
    551 
    552         END IF ! ! MPC temperature
    553 
    554      END IF ! pticefracturb and cldfra
    555    
    556    ENDDO ! klon
    557 END SUBROUTINE ICEFRAC_LSCP_TURB
    558 !
    559 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    560 
    561102
    562103SUBROUTINE CALC_QSAT_ECMWF(klon,temp,qtot,pressure,tref,phase,flagth,qs,dqs)
  • LMDZ6/trunk/libf/phylmd/nuage.f90

    r5828 r5996  
    1313  USE yomcst_mod_h
    1414  USE dimphy
    15   USE lmdz_lscp_tools, only: icefrac_lscp
     15  USE lmdz_lscp_phase, only: icefrac_lscp
    1616  USE icefrac_lsc_mod ! computes ice fraction (JBM 3/14)
    1717  USE lmdz_lscp_ini, only : iflag_t_glace
Note: See TracChangeset for help on using the changeset viewer.