Ignore:
Timestamp:
Apr 14, 2025, 9:21:07 PM (8 weeks ago)
Author:
evignon
Message:

Commission liée à un update majeur de la routine de condensation grande echelle suite au travail
de Lea, Audran et Etienne
Elle inclue une restructuration des routines pour clarifier le role "moniteur" de la routine lscp_main,
une mise à jour de la parametrisation de partitionnement de phase de Lea pour inclure les nuages de couche limite,
ainsi que des corrections des routines de precipitations "poprecip".
Convergence numerique verifiee en prod et debug pour les physiques NPv6.3 et 7.0.1c

File:
1 edited

Legend:

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

    r5430 r5614  
    330330LOGICAL, INTENT(IN)                     :: iftop          !--if top of the column
    331331
     332
    332333REAL,    INTENT(IN),    DIMENSION(klon) :: paprsdn        !--pressure at the bottom interface of the layer [Pa]
    333334REAL,    INTENT(IN),    DIMENSION(klon) :: paprsup        !--pressure at the top interface of the layer [Pa]
     
    540541          IF (zoliqi(i) .GT. 0.) THEN
    541542            zfroi=(zoliqi(i)-((zoliqi(i)**(-dice_velo)) &
    542               +dice_velo*dtime/REAL(niter_lscp)*cice_velo/zdz(i)*ffallv)**(-1./dice_velo))
     543              +dice_velo*dtime/REAL(niter_lscp)*cice_velo/zdz(i)/zneb(i)*zrho(i)*ffallv)**(-1./dice_velo))
    543544          ELSE
    544545            zfroi=0.
     
    618619    ! Computation of DT if all the liquid precip freezes
    619620    DeltaT = RLMLT*zqprecl(i) / (zcp*(1.+coef1))
     621   
     622
    620623    ! T should not exceed the freezing point
    621624    ! that is Delta > RTT-zt(i)
     
    722725USE lmdz_lscp_ini, ONLY : RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG
    723726USE lmdz_lscp_ini, ONLY : ok_corr_vap_evasub, ok_ice_supersat, ok_unadjusted_clouds
    724 USE lmdz_lscp_ini, ONLY : eps, temp_nowater
     727USE lmdz_lscp_ini, ONLY : eps, temp_nowater, ok_growth_precip_deposition
    725728USE lmdz_lscp_tools, ONLY : calc_qsat_ecmwf
    726729
     
    792795dqreva(:) = 0.
    793796dqssub(:) = 0.
    794 dqrevap   = 0.
    795 dqssubl   = 0.
    796797
    797798!-- dhum_to_dflux = rho * dz/dt = 1 / g * dP/dt
     
    880881DO i = 1, klon
    881882
     883  dqrevap   = 0.
     884  dqssubl   = 0.
    882885  !--If there is precipitation from the layer above
    883886  IF ( ( rain(i) + snow(i) ) .GT. 0. ) THEN
     
    913916      IF ( ( 1. - precipfraccld(i) ) .GT. eps ) THEN
    914917        qvapclr = qvapclrup(i) / qtotupnew(i) * qvap(i) / ( 1. - precipfraccld(i) )
     918      ELSE
     919        qvapclr = 0.
     920      ENDIF
     921      IF (  precipfraccld(i)  .GT. eps ) THEN
     922        qvapcld = MAX(qtotupnew(i)-qvapclrup(i) , 0.) / qtotupnew(i) * qvap(i) /  precipfraccld(i)
     923      ELSE
     924        qvapcld = 0.
    915925      ENDIF
    916926    ELSE
     
    918928      !--for the evap / subl process
    919929      qvapclr = qvap(i)
     930      qvapcld = qvap(i)
    920931    ENDIF
    921932
     
    940951      !--NB. with ok_ice_supersat activated, this barrier should be useless
    941952      drainclreva = MIN(0., drainclreva)
    942 
     953     
     954      ! we set it to 0 as not sufficiently tested
     955      drainclreva = 0.
    943956
    944957      !--Sublimation of the solid precipitation coming from above
     
    986999      ENDIF
    9871000
     1001    ELSE
     1002           
     1003    !--All the precipitation is sublimated if the fraction is zero
     1004       drainclreva = - rainclr_tmp(i)
     1005       dsnowclrsub = - snowclr_tmp(i)
     1006
    9881007    ENDIF ! precipfracclr_tmp .GT. eps
    9891008
     
    9931012    !---------------------------
    9941013
    995     IF ( ok_unadjusted_clouds .AND. ( temp(i) .LE. temp_nowater ) .AND. ( precipfraccld_tmp(i) .GT. eps ) ) THEN
     1014    IF ( ok_growth_precip_deposition .AND. ( temp(i) .LE. RTT ) .AND. ( precipfraccld_tmp(i) .GT. eps ) ) THEN
    9961015      !--Evaporation of liquid precipitation coming from above
    9971016      !--in the cloud only
     
    10001019      !--Exact explicit formulation (raincld is resolved exactly, qvap explicitly)
    10011020      !--which does not need a barrier on raincld, because included in the formula
    1002       !draincldeva = precipfraccld_tmp(i) * MAX(0., &
    1003       !            - coef_eva * ( 1. - expo_eva ) * (1. - qvapcld / qsatl(i)) * dz(i) &
    1004       !            + ( raincld_tmp(i) / precipfraccld_tmp(i) )**( 1. - expo_eva ) &
    1005       !            )**( 1. / ( 1. - expo_eva ) ) - raincld_tmp(i)
    1006                
     1021     
     1022      draincldeva = precipfraccld_tmp(i) * MAX(0., &
     1023                  - coef_eva * ( 1. - expo_eva ) * (1. - qvapcld / qsatl(i)) * dz(i) &
     1024                  + ( raincld_tmp(i) / precipfraccld_tmp(i) )**( 1. - expo_eva ) &
     1025                  )**( 1. / ( 1. - expo_eva ) ) - raincld_tmp(i)
     1026
    10071027      !--Evaporation is limited by 0
    10081028      !--NB. with ok_ice_supersat activated, this barrier should be useless
    1009       !draincldeva = MIN(0., draincldeva)
    1010       draincldeva = 0.
     1029      draincldeva = MIN(0., draincldeva)
    10111030
    10121031
     
    12771296
    12781297USE lmdz_lscp_ini, ONLY : cld_lc_con, cld_tau_con, cld_expo_con, seuil_neb,    &
    1279                           cld_lc_lsc, cld_tau_lsc, cld_expo_lsc, rain_int_min, &
     1298                          cld_lc_lsc, cld_tau_lsc, cld_expo_lsc,               &
    12801299                          thresh_precip_frac, gamma_col, gamma_agg, gamma_rim, &
    12811300                          rho_rain, r_rain, r_snow, rho_ice,                   &
     1301                          expo_tau_auto_snow,                                  &
    12821302                          tau_auto_snow_min, tau_auto_snow_max,                &
    1283                           thresh_precip_frac, eps,                             &
     1303                          thresh_precip_frac, eps, rain_int_min,               &
    12841304                          gamma_melt, alpha_freez, beta_freez, temp_nowater,   &
    12851305                          iflag_cloudth_vert, iflag_rain_incloud_vol,          &
     
    13401360REAL, DIMENSION(klon) :: dhum_to_dflux
    13411361REAL, DIMENSION(klon) :: qtot                             !--includes vap, liq, ice and precip
     1362REAL                  :: min_precip                       !--minimum precip flux below which precip fraction decreases
    13421363
    13431364!--Collection, aggregation and riming
     
    15021523        !--tau for snow depends on the ice fraction in mixed-phase clouds     
    15031524        tau_auto_snow = tau_auto_snow_max &
    1504                       + ( tau_auto_snow_min - tau_auto_snow_max ) * ( 1. - icefrac(i) )
     1525                      + ( tau_auto_snow_min - tau_auto_snow_max ) * ((1. - icefrac(i))**expo_tau_auto_snow)
    15051526
    15061527        expo_auto_rain = cld_expo_con
     
    15131534        !--tau for snow depends on the ice fraction in mixed-phase clouds     
    15141535        tau_auto_snow = tau_auto_snow_max &
    1515                       + ( tau_auto_snow_min - tau_auto_snow_max ) * ( 1. - icefrac(i) )
     1536                      + ( tau_auto_snow_min - tau_auto_snow_max ) * ((1. - icefrac(i))**expo_tau_auto_snow)
    15161537
    15171538        expo_auto_rain = cld_expo_lsc
     
    15341555               - ( qice(i) / eff_cldfra / qthresh_auto_snow ) ** expo_auto_snow ) ) ) )
    15351556
    1536 
    15371557    !--Barriers so that we don't create more rain/snow
    15381558    !--than there is liquid/ice
     
    15431563    qliq(i) = qliq(i) + dqlauto
    15441564    qice(i) = qice(i) + dqiauto
     1565
    15451566    raincld(i) = raincld(i) - dqlauto * dhum_to_dflux(i)
    15461567    snowcld(i) = snowcld(i) - dqiauto * dhum_to_dflux(i)
     
    17101731  !--second: immersion freezing following (inspired by Bigg 1953)
    17111732  !--the latter is parameterized as an exponential decrease of the rain
    1712   !--water content with a homemade formulya
     1733  !--water content with a homemade formula
    17131734  !--This is based on a caracteritic time of freezing, which
    17141735  !--exponentially depends on temperature so that it is
     
    17171738  !--NB.: this process needs a temperature adjustment
    17181739  !--dqrfreez_max : maximum rain freezing so that temperature
    1719   !--              stays lower than 273 K [kg/kg]
     1740  !--               stays lower than 273 K [kg/kg]
    17201741  !--tau_freez    : caracteristic time of freezing [s]
    17211742  !--gamma_freez  : tuning parameter [s-1]
     
    17981819              * EXP( - alpha_freez * ( temp(i) - temp_nowater ) / ( RTT - temp_nowater ) ) )
    17991820
    1800 
    18011821    !--In clear air
    18021822    IF ( rainclr(i) .GT. 0. ) THEN
     
    18271847    !--Add tendencies
    18281848    !--The MAX is needed because in some cases, the flux can be slightly negative (numerical precision)
     1849   
    18291850    rainclr(i) = MAX(0., rainclr(i) + dqrclrfreez * dhum_to_dflux(i))
    18301851    raincld(i) = MAX(0., raincld(i) + dqrcldfreez * dhum_to_dflux(i))
     
    18331854
    18341855
     1856
    18351857    !--Temperature adjustment with the uptake of latent
    18361858    !--heat because of freezing
     1859
    18371860    temp(i) = temp(i) - dqrtotfreez_step2 * RLMLT / RCPD &
    18381861                      / ( 1. + RVTMP2 * qtot(i) )
    1839 
    18401862    !--Diagnostic tendencies
    18411863    dqrtotfreez = dqrtotfreez_step1 + dqrtotfreez_step2         
     
    18471869
    18481870
    1849   !--If the local flux of rain+snow in clear/cloudy air is lower than rain_int_min,
    1850   !--we reduce the precipiration fraction in the clear/cloudy air so that the new
    1851   !--local flux of rain+snow is equal to rain_int_min.
     1871  !--If the local flux of rain+snow in clear air is lower than min_precip,
     1872  !--we reduce the precipiration fraction in the clear air so that the new
     1873  !--local flux of rain+snow is equal to min_precip.
     1874  !--we apply the minimum only on the clear-sky fraction because the cloudy precip fraction
     1875  !--already decreases out of clouds
    18521876  !--Here, rain+snow is the gridbox-mean flux of precip.
    18531877  !--Therefore, (rain+snow)/precipfrac is the local flux of precip.
    1854   !--If the local flux of precip is lower than rain_int_min, i.e.,
    1855   !-- (rain+snow)/precipfrac < rain_int_min , i.e.,
    1856   !-- (rain+snow)/rain_int_min < precipfrac , then we want to reduce
    1857   !--the precip fraction to the equality, i.e., precipfrac = (rain+snow)/rain_int_min.
     1878  !--If the local flux of precip is lower than min_precip, i.e.,
     1879  !-- (rain+snow)/precipfrac < min_precip , i.e.,
     1880  !-- (rain+snow)/min_precip < precipfrac , then we want to reduce
     1881  !--the precip fraction to the equality, i.e., precipfrac = (rain+snow)/min_precip.
    18581882  !--Note that this is physically different than what is proposed in LTP thesis.
    1859   precipfracclr(i) = MIN( precipfracclr(i), ( rainclr(i) + snowclr(i) ) / rain_int_min )
    1860   precipfraccld(i) = MIN( precipfraccld(i), ( raincld(i) + snowcld(i) ) / rain_int_min )
     1883  !--min_precip is either equal to rain_int_min or calculated as a very small fraction
     1884  !--of the minimum precip flux estimated as the flux associated with the
     1885  !--autoconversion threshold mass content
     1886  !min_precip=1.e-6*(pplay(i)/RD/temp(i))*MIN(rain_fallspeed_clr*cld_lc_lsc,snow_fallspeed_clr*cld_lc_lsc_snow)
     1887  min_precip=rain_int_min
     1888  precipfracclr(i) = MIN( precipfracclr(i), ( rainclr(i) + snowclr(i) ) / min_precip )
    18611889
    18621890  !--Calculate outputs
Note: See TracChangeset for help on using the changeset viewer.