Changeset 4809


Ignore:
Timestamp:
Feb 8, 2024, 4:49:33 PM (3 months ago)
Author:
evignon
Message:

mise a jour des routines proprecip suite à l'atelier nuage

Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

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

    r4803 r4809  
    158158  !$OMP THREADPRIVATE(rho_snow)
    159159
    160   REAL, SAVE, PROTECTED :: r_rain=100.E-6                   ! A COMMENTER TODO [m]
     160  REAL, SAVE, PROTECTED :: r_rain=500.E-6                   ! A COMMENTER TODO [m]
    161161  !$OMP THREADPRIVATE(r_rain)
    162162
    163   REAL, SAVE, PROTECTED :: r_snow=100.E-6                    ! A COMMENTER TODO [m]
     163  REAL, SAVE, PROTECTED :: r_snow=1.E-3                    ! A COMMENTER TODO [m]
    164164  !$OMP THREADPRIVATE(r_snow)
    165165
  • LMDZ6/trunk/libf/phylmd/lmdz_lscp_poprecip.F90

    r4803 r4809  
    4848REAL,    INTENT(INOUT), DIMENSION(klon) :: precipfraccld  !--fraction of precipitation in the cloudy air IN THE LAYER ABOVE [-]
    4949
    50 REAL,    INTENT(INOUT), DIMENSION(klon) :: rain           !--flux of rain coming from the layer above [kg/s/m2]
    51 REAL,    INTENT(INOUT), DIMENSION(klon) :: rainclr        !--flux of rain in clear sky coming from the layer above [kg/s/m2]
    52 REAL,    INTENT(IN),    DIMENSION(klon) :: raincld        !--flux of rain in cloudy air coming from the layer above [kg/s/m2]
    53 REAL,    INTENT(INOUT), DIMENSION(klon) :: snow           !--flux of snow coming from the layer above [kg/s/m2]
    54 REAL,    INTENT(INOUT), DIMENSION(klon) :: snowclr        !--flux of snow in clear sky coming from the layer above [kg/s/m2]
    55 REAL,    INTENT(IN),    DIMENSION(klon) :: snowcld        !--flux of snow in cloudy air coming from the layer above [kg/s/m2]
     50REAL,    INTENT(INOUT), DIMENSION(klon) :: rain           !--flux of rain gridbox-mean coming from the layer above [kg/s/m2]
     51REAL,    INTENT(INOUT), DIMENSION(klon) :: rainclr        !--flux of rain gridbox-mean in clear sky coming from the layer above [kg/s/m2]
     52REAL,    INTENT(IN),    DIMENSION(klon) :: raincld        !--flux of rain gridbox-mean in cloudy air coming from the layer above [kg/s/m2]
     53REAL,    INTENT(INOUT), DIMENSION(klon) :: snow           !--flux of snow gridbox-mean coming from the layer above [kg/s/m2]
     54REAL,    INTENT(INOUT), DIMENSION(klon) :: snowclr        !--flux of snow gridbox-mean in clear sky coming from the layer above [kg/s/m2]
     55REAL,    INTENT(IN),    DIMENSION(klon) :: snowcld        !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2]
    5656
    5757REAL,    INTENT(OUT),   DIMENSION(klon) :: dqreva         !--rain tendency due to evaporation [kg/kg/s]
     
    110110       ! layer's air so that precipitation at the ground has the
    111111       ! same temperature as the lowermost layer
     112       ! we convert the flux into a specific quantity qprecip
    112113       qprecip(i) = (rain(i)+snow(i))*dtime/((paprsdn(i)-paprsup(i))/RG)
    113114       ! t(i,k+1)+d_t(i,k+1): new temperature of the overlying layer
     
    269270                                                          !--in the current layer
    270271
    271 REAL,    INTENT(INOUT), DIMENSION(klon) :: rain           !--flux of rain coming from the layer above [kg/s/m2]
    272 REAL,    INTENT(INOUT), DIMENSION(klon) :: rainclr        !--flux of rain in clear sky coming from the layer above [kg/s/m2]
    273 REAL,    INTENT(INOUT), DIMENSION(klon) :: raincld        !--flux of rain in cloudy air coming from the layer above [kg/s/m2]
    274 REAL,    INTENT(INOUT), DIMENSION(klon) :: snow           !--flux of snow coming from the layer above [kg/s/m2]
    275 REAL,    INTENT(INOUT), DIMENSION(klon) :: snowclr        !--flux of snow in clear sky coming from the layer above [kg/s/m2]
    276 REAL,    INTENT(INOUT), DIMENSION(klon) :: snowcld        !--flux of snow in cloudy air coming from the layer above [kg/s/m2]
     272REAL,    INTENT(INOUT), DIMENSION(klon) :: rain           !--flux of rain gridbox-mean coming from the layer above [kg/s/m2]
     273REAL,    INTENT(INOUT), DIMENSION(klon) :: rainclr        !--flux of rain gridbox-mean in clear sky coming from the layer above [kg/s/m2]
     274REAL,    INTENT(INOUT), DIMENSION(klon) :: raincld        !--flux of rain gridbox-mean in cloudy air coming from the layer above [kg/s/m2]
     275REAL,    INTENT(INOUT), DIMENSION(klon) :: snow           !--flux of snow gridbox-mean coming from the layer above [kg/s/m2]
     276REAL,    INTENT(INOUT), DIMENSION(klon) :: snowclr        !--flux of snow gridbox-mean in clear sky coming from the layer above [kg/s/m2]
     277REAL,    INTENT(INOUT), DIMENSION(klon) :: snowcld        !--flux of snow gridbox-mean in cloudy air coming from the layer above [kg/s/m2]
    277278
    278279REAL,    INTENT(OUT),   DIMENSION(klon) :: dqrcol         !-- rain tendendy due to collection by rain of liquid cloud droplets [kg/kg/s]
     
    299300REAL :: draincld, dsnowcld
    300301REAL :: eff_cldfra
     302REAL :: coef_col, coef_agg, coef_tmp, qrain
    301303REAL :: qthresh_auto_rain, tau_auto_rain, expo_auto_rain
    302304REAL :: qthresh_auto_snow, tau_auto_snow, expo_auto_snow
     
    309311
    310312!--Initialisation of variables
    311 
    312 
    313 dqlrim=0.0
    314 dqlcol=0.0
    315 dqiagg=0.0
    316 dqiauto=0.0
    317 dqlauto=0.0
    318 
    319313
    320314dqrcol(:) = 0.
     
    329323
    330324
    331 
    332 !Partitionning between precipitation coming from clouds and that coming from CS
    333 
    334 !0) Calculate tot_zneb, total cloud fraction above the cloud
    335 !assuming a maximum-random overlap (voir Jakob and Klein, 2000)
    336 
    337325DO i = 1, klon
    338326
     327
     328  ! variables initialisation
     329  dqlrim = 0.0
     330  dqlcol = 0.0
     331  dqiagg = 0.0
     332  dqiauto = 0.0
     333  dqlauto = 0.0
     334
     335  !------------------------------------------------------------
     336  !--     PRECIPITATION FRACTIONS UPDATE
     337  !------------------------------------------------------------
     338  !--The goal of this routine is to reattribute precipitation fractions
     339  !--and fluxes to clear or cloudy air, depending on the variation of
     340  !--the cloud fraction on the vertical dimension. We assume a
     341  !--maximum-random overlap of the cloud cover (see Jakob and Klein, 2000,
     342  !--and LTP thesis, 2021)
     343  !--NB. in fact, we assume a maximum-random overlap of the total precip. frac
     344
    339345  !--Initialisation
    340   drainclr = 0.
    341   dsnowclr = 0.
     346  !--hum_to_flux: coef to convert a specific quantity to a flux
     347  !-- hum_to_flux = rho * dz/dt = 1 / g * dP/dt
    342348  hum_to_flux = ( paprsdn(i) - paprsup(i) ) / RG / dtime
    343349  precipfractot = precipfracclr(i) + precipfraccld(i)
    344350
    345   ! formule maximum random
     351  !--Instead of using the cloud cover which was use in LTP thesis, we use the
     352  !--total precip. fraction to compute the maximum-random overlap. This is
     353  !--because all the information of the cloud cover is embedded into
     354  !--precipfractot, and this allows for taking into account the potential
     355  !--reduction of the precipitation fraction because either the flux is too
     356  !--small (see barrier at the end of poprecip_postcld) or the flux is completely
     357  !--evaporated (see barrier at the end of poprecip_precld)
     358  !--NB. precipfraccld(i) is here the cloud fraction of the layer above
    346359  precipfractot = 1. - ( 1. - precipfractot ) * &
    347360                 ( 1. - MAX( cldfra(i), precipfraccld(i) ) ) &
     
    349362
    350363
    351   ! precipfraccld est égal a rneb au niveau d'au dessus
     364  !--precipfraccld(i) is here the cloud fraction of the layer above
    352365  dcldfra = cldfra(i) - precipfraccld(i)
    353   ! add max to guaranttee precip fraction >=0
    354   dprecipfracclr = MAX(0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i)
    355   dprecipfraccld = MAX( dcldfra , -precipfraccld(i) )
    356 
    357 
     366  !--Tendency of the clear-sky precipitation fraction. We add a MAX on the
     367  !--calculation of the current CS precip. frac.
     368  dprecipfracclr = MAX( 0., ( precipfractot - cldfra(i) ) ) - precipfracclr(i)
     369  !--Tendency of the cloudy precipitation fraction. We add a MAX on the
     370  !--calculation of the current CS precip. frac.
     371  !dprecipfraccld = MAX( dcldfra , - precipfraccld(i) )
     372  !--We remove it, because cldfra is guaranteed to be > O (the MAX is activated
     373  !--if cldfra < 0)
     374  dprecipfraccld = dcldfra
     375
     376
     377  !--If the cloud extends
    358378  IF ( dprecipfraccld .GT. 0. ) THEN
    359     IF ( precipfracclr(i) .GT. 0. ) THEN
     379    !--If there is no CS precip, nothing happens.
     380    !--If there is, we reattribute some of the CS precip flux
     381    !--to the cloud precip flux, proportionnally to the
     382    !--decrease of the CS precip fraction
     383    IF ( precipfracclr(i) .LE. 0. ) THEN
     384      drainclr = 0.
     385      dsnowclr = 0.
     386    ELSE
    360387      drainclr = dprecipfracclr / precipfracclr(i) * rainclr(i)
    361388      dsnowclr = dprecipfracclr / precipfracclr(i) * snowclr(i)
    362389    ENDIF
     390  !--If the cloud narrows
     391  ELSEIF ( dprecipfraccld .LT. 0. ) THEN
     392    !--We reattribute some of the cloudy precip flux
     393    !--to the CS precip flux, proportionnally to the
     394    !--decrease of the cloud precip fraction
     395    draincld = dprecipfraccld / precipfraccld(i) * raincld(i)
     396    dsnowcld = dprecipfraccld / precipfraccld(i) * snowcld(i)
     397    drainclr = - draincld
     398    dsnowclr = - dsnowcld
     399  !--If the cloud stays the same or if there is no cloud above and
     400  !--in the current layer, nothing happens
    363401  ELSE
    364     IF  ( precipfraccld(i) .GT. 0. ) THEN
    365       draincld = dprecipfraccld / precipfraccld(i) * raincld(i)
    366       dsnowcld = dprecipfraccld / precipfraccld(i) * snowcld(i)
    367       drainclr = - draincld
    368       dsnowclr = - dsnowcld
    369     ENDIF
     402    drainclr = 0.
     403    dsnowclr = 0.
    370404  ENDIF
    371405
    372 
     406  !--We add the tendencies
    373407  precipfraccld(i) = precipfraccld(i) + dprecipfraccld
    374408  precipfracclr(i) = precipfracclr(i) + dprecipfracclr
     
    378412  snowcld(i) = snowcld(i) - dsnowclr
    379413 
    380  
     414
     415  ! if vertical heterogeneity is taken into account, we use
     416  ! the "true" volume fraction instead of a modified
     417  ! surface fraction (which is larger and artificially
     418  ! reduces the in-cloud water).
    381419  IF ( ( iflag_cloudth_vert .GE. 3 ) .AND. ( iflag_rain_incloud_vol .EQ. 1 ) ) THEN
    382420    eff_cldfra = ctot_vol(i)
     
    385423  ENDIF
    386424
     425
     426  ! Start precipitation growth processes
     427
     428  !--If the cloud is big enough, the precipitation processes activate
    387429  IF ( cldfra(i) .GE. seuil_neb ) THEN
    388430
    389     ! if vertical heterogeneity is taken into account, we use
    390     ! the "true" volume fraction instead of a modified
    391     ! surface fraction (which is larger and artificially
    392     ! reduces the in-cloud water).
    393 
    394     ! agg et col avant autoconv car on ne veut pas agg et col la nouvelle precip
    395431    !---------------------------------------------------------
    396432    !--           COLLECTION AND AGGREGATION
    397433    !---------------------------------------------------------
    398 
    399     ! remplacer la premiere ligne par "coef_col" ?
    400     dqlcol = - gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq &
    401               * qliq(i) / eff_cldfra * raincld(i) * dtime
    402 
    403     ! remplacer la premiere ligne par "coef_agg" ?
    404     dqiagg = - gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice &
    405               * qice(i) / eff_cldfra * snowcld(i) * dtime
    406 
     434    !--Collection: processus through which rain collects small liquid droplets
     435    !--in suspension, and add it to the rain flux
     436    !--Aggregation: same for snow (precip flux) and ice crystals (in suspension)
     437    !--Those processes are treated before autoconversion because we do not
     438    !--want to collect/aggregate the newly formed fluxes, which already
     439    !--"saw" the cloud as they come from it
     440    !--gamma_col: tuning coefficient [-]
     441    !--rho_rain: volumic mass of rain [kg/m3]
     442    !--r_rain: size of the rain droplets [m]
     443    !--Eff_rain_liq: efficiency of the collection process [-] (between 0 and 1)
     444    !--dqlcol is a gridbox-mean quantity, as is qliq and raincld. They are
     445    !--divided by respectively eff_cldfra, eff_cldfra and precipfraccld to
     446    !--get in-cloud mean quantities. The two divisions by eff_cldfra are
     447    !--then simplified.
     448
     449    coef_col = gamma_col * 3. / 4. / rho_rain / r_rain * Eff_rain_liq
     450    IF ((raincld(i) .GT. 0.) .AND. (coef_col .GT. 0.)) THEN
     451       !--Explicit version
     452       !dqlcol = - coef_col * qliq(i) * raincld(i) / precipfraccld(i) *dtime
     453       !--Semi-implicit version
     454       !dqlcol = qliq(i) * ( 1. / ( 1. + coef_col * raincld(i) / precipfraccld(i)*dtime ) - 1. )
     455       !--Implicit version
     456       !qrain = raincld(i) / hum_to_flux
     457       !coef_tmp = coef_col * dtime *( qrain / precipfraccld(i) + qliq(i) / eff_cldfra )
     458       !dqlcol = qliq(i) * ( 1. / ( 1. + 0.5 * ( coef_tmp - 1. + SQRT( &
     459       !    ( 1. - coef_tmp )**2. + 4. * coef_col * dtime *qrain / precipfraccld(i) ) &
     460       !                   ) ) - 1. )
     461       !dqlcol=max(dqlcol,-qliq(i))
     462       ! Exact version
     463       dqlcol=qliq(i)*(exp(-dtime * coef_col * raincld(i) / precipfraccld(i))-1.)
     464    ENDIF
     465
     466    !--Same as for aggregation
     467    coef_agg=gamma_agg * 3. / 4. / rho_snow / r_snow * Eff_snow_ice
     468    IF ((snowcld(i) .GT. 0.) .AND. (coef_agg .GT. 0.)) THEN
     469        !--Explicit version     
     470        !dqiagg = - coef_agg &
     471        !      * qice(i) * snowcld(i) / precipfraccld(i) * dtime
     472        ! Exact version
     473        dqiagg=qice(i)*(exp(-dtime * coef_agg * snowcld(i) / precipfraccld(i))-1.)
     474    ENDIF
     475    !--Barriers so that the processes do not consume more liquid/ice than
     476    !--available.
     477    dqlcol = MAX( - qliq(i), dqlcol )
    407478    dqiagg = MAX( - qice(i), dqiagg )
    408     dqlcol = MAX( - qliq(i), dqlcol )
    409 
     479
     480    !--Add tendencies
    410481    qliq(i) = qliq(i) + dqlcol
    411482    qice(i) = qice(i) + dqiagg
    412 
    413483    raincld(i) = raincld(i) - dqlcol * hum_to_flux
    414484    snowcld(i) = snowcld(i) - dqiagg * hum_to_flux
     
    443513
    444514
    445     ! Liquid water quantity to remove: zchau (Sundqvist, 1978)
     515    ! Liquid water quantity to remove according to (Sundqvist, 1978)
    446516    ! dqliq/dt=-qliq/tau*(1-exp(-qcin/clw)**2)
    447517    !.........................................................
     
    473543    !---------------------------------------------------------
    474544
     545    dqlrim=0.0
     546
    475547    ! remplacer la premiere ligne par "coef_rim" ?
    476     dqlrim = - gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq &
    477               * qliq(i) / eff_cldfra * snowcld(i) * dtime
    478 
     548    IF (snowcld(i) .GT. 0.) THEN
     549       dqlrim = - gamma_rim * 3. / 4. / rho_snow / r_snow * Eff_snow_liq &
     550              * qliq(i) * snowcld(i) /  precipfraccld(i) * dtime
     551    ENDIF
    479552    dqlrim = MAX( - qliq(i), dqlrim )
    480553
Note: See TracChangeset for help on using the changeset viewer.