Changeset 6007 for LMDZ6/trunk/libf


Ignore:
Timestamp:
Jan 7, 2026, 10:29:50 PM (2 weeks ago)
Author:
evignon
Message:

modif routines ratqs et lscp, fin des modifs avant le regroupement
dans un call unique

Location:
LMDZ6/trunk/libf
Files:
3 edited

Legend:

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

    r6005 r6007  
    3232!=======================================================================
    3333SUBROUTINE ratqs_main(klon,klev,nbsrf,is_ter,is_lic,          &
    34            iflag_cld_th,fact_cldcon,pdtphys,                  &
     34           iflag_cld_th,pdtphys,                              &
    3535           pctsrf,s_pblh,zstd, wake_s, wake_deltaq,           &
    36            ptconv, clwcon0th, rnebcon0th,                     &
    3736           paprs,pplay,t_seri,q_seri,                         &
    3837           qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,       &
    3938           sigd,qsat,                                         &
    4039           fm_therm,entr_therm,detr_therm,cell_area,          &
    41            ratqs,ratqsc,ratqs_inter_,sigma_qtherm)
    42 
    43 
    44 USE clouds_gno_mod,     ONLY: clouds_gno
     40           ratqsc,ratqs,ratqs_inter_,sigma_qtherm)
     41
     42
    4543USE lmdz_lscp_ini,      ONLY: prt_level, lunout, iflag_ratqs
    4644USE lmdz_lscp_ini,      ONLY: ratqsbas, ratqshaut
     
    5452! that is, sigma=ratqs*qmean
    5553! Various options controled by flags iflag_cld_th and iflag_ratqs
    56 ! by default, a vertical arctan profile of ratqs is prescribed
    57 ! new options consider an interactive computation of ratqs
    58 ! depending on other physical parameterizations and relief
     54! This routine consists in 2 steps.
     55! First the "stratiform" ratqs (ratqss, corresponding to stratiform clouds)
     56! is computed
     57! Then the total ratqs is calculated either taken equal to ratqss or
     58! calculated as a combination of ratqss and
     59! that corresponding to deep convective clouds ratqsc
     60! (input of the routine, from the deep convection part).
    5961! contact: Frederic Hourdin, frederic.hourdin@lmd.ipsl.fr
    6062!
     
    7173integer, intent(in) :: nbsrf,is_ter,is_lic ! number of subgrid tiles and indices for land and landice
    7274integer, intent(in) :: iflag_cld_th        ! flag that controls cloud properties in presence of thermals
    73 real,intent(in)     :: fact_cldcon         ! factor for convective clouds [-]
    7475real,intent(in)     :: pdtphys             ! physics time step [s]
    7576real, dimension(klon,klev+1), intent(in) :: paprs ! pressure at layer interfaces [Pa]
     
    8990
    9091real, dimension(klon,klev+1), intent(in) :: fm_therm    ! convective mass flux of thermals [kg/s/m2]
    91 logical, dimension(klon,klev), intent(in) :: ptconv     ! convective grid points
    92 real, dimension(klon,klev), intent(in)   :: clwcon0th   ! condensed water in thermals updrafts [kg/kg]
    9392real, dimension(klon,klev),intent(in)    :: wake_deltaq ! difference in humidity between wakes and environment [kg/kg]
    9493real, dimension(klon),intent(in)         :: wake_s    ! wake fraction area [-]
     
    9796real, dimension(klon),intent(in)         :: s_pblh    ! boundary layer height [m]
    9897real, dimension(klon),intent(in)         :: zstd      ! sub grid orography standard deviation [m]
     98real, dimension(klon,klev), intent(in)   :: ratqsc   ! convective ratqs
    9999                                                       
    100 ! Inout
    101 real, dimension(klon,klev), intent(inout) :: ratqs    ! ratqs i.e. factor for subgrid standard deviation of humidit
    102 real, dimension(klon,klev), intent(inout) :: ratqsc   ! convective ratqs
    103 
    104100! Output
     101real, dimension(klon,klev), intent(out) :: ratqs    ! ratqs i.e. factor for subgrid standard deviation of humidit
    105102real, dimension(klon,klev), intent(out) :: ratqs_inter_  ! interactive ratqs
    106103real, dimension(klon,klev), intent(out) :: sigma_qtherm  ! standard deviation of humidity in thermals [kg/kg]
    107 real, dimension(klon,klev), intent(out)   :: rnebcon0th  ! cloud fraction associated with thermal updrafts (old method) [-]
    108104
    109105
     
    111107integer                    :: i,k
    112108real, dimension(klon,klev) :: ratqss
    113 logical, dimension(klon,klev) :: ptconvthfalse
    114109real                       :: facteur,zfratqs1,zfratqs2
    115110real, dimension(klon,klev) :: ratqs_oro_
    116111real                       :: resol, fact
    117112
    118 ! Ratqs computation
    119 !------------------
    120 
    121 !   old-style convective ratqs computation as a function of q(z=0)-q / q
    122 !   the ratqsc computed by clouds_gno is replaced
    123       if (iflag_cld_th.eq.1) then
    124          do k=1,klev
    125          do i=1,klon
    126             if(ptconv(i,k)) then
    127               ratqsc(i,k)=ratqsbas &
    128               +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k)
    129             else
    130                ratqsc(i,k)=0.
    131             endif
    132          enddo
    133          enddo
    134 
    135 !  through log-normal distribution inversion
    136       else if (iflag_cld_th.eq.4) then
    137          ptconvthfalse(:,:)=.false.
    138          ratqsc(:,:)=0.
    139          if(prt_level.ge.9) print*,'avant clouds_gno thermique'
    140          call clouds_gno &
    141          (klon,klev,q_seri,qsat,clwcon0th,ptconvthfalse,ratqsc,rnebcon0th)
    142          if(prt_level.ge.9) print*,' CLOUDS_GNO OK'
    143        
    144        endif
    145 
    146 !   stratiform ratqs
    147       if (iflag_ratqs.eq.0) then
    148 
    149 ! iflag_ratqs=0 corresponds to IPCC 2005 version of the model.
    150          do k=1,klev
     113
     114! First step: stratiform clouds ratqs (ratqss) computation
     115!---------------------------------------------------------
     116! for all options, the background ratqss is computed as a
     117! function increasing from a value at the ground surface
     118! (0 or ratqsbas) and a value for the high atmosphere
     119! (ratqshaut)
     120     
     121    if (iflag_ratqs.eq.0) then
     122
     123      ! iflag_ratqs=0 corresponds to LMDZ4 version of the model
     124      ! with a linear function of pressure 
     125       
     126       do k=1,klev
    151127            do i=1, klon
    152128               ratqss(i,k)=ratqsbas+(ratqshaut-ratqsbas)* &
     
    155131         enddo
    156132
    157 ! for iflag_ratqs = 1 or 2, ratqs is constant above 300 hPa (ratqshaut),
    158 ! and then linearly varies between  600 and 300 hPa and it is either constant (ratqsbas) for iflag_ratqs=1
    159 ! or lineary varies (between ratqsbas and 0 at the surface) for iflag_ratqs=2
     133      ! for iflag_ratqs = 1 or 2, ratqss is constant above 300 hPa (ratqshaut),
     134      ! and then linearly varies between  600 and 300 hPa and it is either constant (ratqsbas)
     135      ! for iflag_ratqs=1 or lineary varies (between ratqsbas and 0 at the surface) for iflag_ratqs=2
     136      ! iflag_ratqs=2 was the option retained for LMDZ5A (see Hourdin et al. 2013)
    160137
    161138      else if (iflag_ratqs.eq.1) then
     
    187164         enddo
    188165
     166      ! quadratic dependency upon pressure
     167
    189168      else if (iflag_ratqs==3) then
    190169         do k=1,klev
     
    193172         enddo
    194173
     174      ! atan dependency on pressure, ratqsp0 being the pressure
     175      ! where the transition occurs and ratqsdp controls
     176      ! the sharpness of the transition. This is the version used
     177      ! in LMDZ6A (see Madeleine et al. 2020, fig 2).
     178
    195179      else if (iflag_ratqs==4) then
    196180         do k=1,klev
     
    201185
    202186      else if (iflag_ratqs==5) then
    203 ! Dependency of ratqs on model resolution (dependency on sqrt(cell_area)
    204 ! according to high-tropo aircraft obs, A. Borella PhD)
     187         ! Dependency of ratqs on model resolution (dependency on sqrt(cell_area)
     188         ! according to high-tropo aircraft obs, A. Borella PhD)
    205189         do k=1,klev
    206190            do i=1,klon
     
    213197
    214198
    215        else if (iflag_ratqs .GE. 10) then
     199      else if (iflag_ratqs .GE. 10) then
    216200 
    217        ! interactive ratqs calculations that depend on cold pools, orography
    218        ! This should help getting a more realistic ratqs in the low and mid troposphere
    219        ! We however need a "background" ratqs to account for subgrid distribution of qt (or qt/qs)
    220        ! in the high troposphere
     201      ! interactive ratqss calculations that depend on cold pools, orography
     202      ! This should help getting a more realistic ratqs in the low and mid troposphere
     203      ! We however need a "background" ratqs to account for subgrid distribution of qt (or qt/qs)
     204      ! in the high troposphere.
     205      ! work of Louis d'Alecon, PhD
    221206       
    222        ! background ratqs and initialisations
     207      ! background atan ratqs and initialisations
    223208          do k=1,klev
    224209             do i=1,klon
     
    247232      endif
    248233
    249 final ratqs
    250 !--------------
     234Second step: total ratqs calculation
     235!----------------------------------------
    251236
    252237      if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then
    253          ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations
    254          do k=1,klev
    255             do i=1,klon
    256                if ((fm_therm(i,k)>1.e-10)) then
    257                   ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2)
    258                endif
    259             enddo
    260          enddo
    261 
    262 !   ratqs are a combination of ratqss et ratqsc
     238         
     239         ! ratqs are a combination of ratqss et ratqsc
     240
    263241         if(prt_level.ge.9) write(lunout,*)'PHYLMD NEW TAU_RATQS ',tau_ratqs
    264 
     242         
    265243         if (tau_ratqs>1.e-10) then
    266244            facteur=exp(-pdtphys/tau_ratqs)
     
    270248         ratqs(:,:)=ratqsc(:,:)*(1.-facteur)+ratqs(:,:)*facteur
    271249         ratqs(:,:)=max(ratqs(:,:),ratqss(:,:))
     250     
    272251      else if (iflag_cld_th<=6) then
    273         ! we only keep the stable ratqs for lscp
     252       
     253         ! ratqs is taken equal to ratqss
    274254         ratqs(:,:)=ratqss(:,:)
     255
    275256      else
    276           zfratqs1=exp(-pdtphys/10800.)
    277           zfratqs2=exp(-pdtphys/10800.)
    278           do k=1,klev
     257
     258         ! additional exploratory combinations of ratqss and ratqsc     
     259         zfratqs1=exp(-pdtphys/10800.)
     260         zfratqs2=exp(-pdtphys/10800.)
     261         do k=1,klev
    279262             do i=1,klon
    280263                if (ratqsc(i,k).gt.1.e-10) then
     
    283266                ratqs(i,k)=min(ratqs(i,k)*zfratqs1+ratqss(i,k)*(1.-zfratqs1),0.5)
    284267             enddo
    285           enddo
     268         enddo
    286269      endif
    287270
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r6005 r6007  
    109109    USE lmdz_thermcell_dtke, ONLY : thermcell_dtke
    110110    USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs
    111     USE lmdz_lscp_ini, ONLY : lscp_ini
     111    USE lmdz_lscp_ini, ONLY : lscp_ini, ratqsbas
    112112    USE lmdz_lscp_subgridvarq, ONLY : ratqs_main, ratqs_main_first
    113113    USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini
     
    19721972          pbl_eps(:,:,is_ave) = 0.
    19731973       ENDIF
    1974        !IM begin
    1975        print*,'physiq: clwcon rnebcon ratqs',clwcon(1,1),rnebcon(1,1) &
    1976             ,ratqs(1,1)
    1977        !IM end
    19781974
    19791975
     
    34213417          ENDIF
    34223418
    3423           ! =================================================================== c
    3424           ! Calcul des proprietes des nuages convectifs
    3425           !
    3426 
    3427           !   calcul des proprietes des nuages convectifs
     3419          ! ========================================================================
     3420          ! Calculation of deep convective clouds properties
     3421          ! that is, the convective ratqs (ratqsc) and the convective cloud fraction
     3422          ! ========================================================================
     3423
    34283424          clwcon0(:,:)=fact_cldcon*clwcon0(:,:)
    34293425          IF (iflag_cld_cv == 0) THEN
     
    34353431          ENDIF
    34363432
    3437 
    3438           ! =================================================================== c
     3433          ! old-style convective ratqs computation as a function of q(z=0)-q / q
     3434          ! the ratqsc computed by clouds_gno is replaced
     3435          if (iflag_cld_th.eq.1) then
     3436            do k=1,klev
     3437               do i=1,klon
     3438                  if (ptconv(i,k)) then
     3439                      ratqsc(i,k)=ratqsbas &
     3440                      +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k)
     3441                  else
     3442                      ratqsc(i,k)=0.
     3443                  endif
     3444               enddo
     3445             enddo
     3446          ! through log-normal distribution inversion
     3447          else if (iflag_cld_th.eq.4) then
     3448             ptconvth(:,:)=.false.
     3449             ratqsc(:,:)=0.
     3450             call clouds_gno &
     3451             (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th)
     3452          endif
     3453
     3454          if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then
     3455          ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations
     3456            do k=1,klev
     3457               do i=1,klon
     3458                  if ((fm_therm(i,k)>1.e-10)) then
     3459                     ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2)
     3460                  endif
     3461               enddo
     3462            enddo
     3463          endif
     3464
     3465          ! ========================================================================
    34393466
    34403467          DO i = 1, klon
     
    39323959    CALL ratqs_main_first(klon, cell_area)
    39333960    CALL ratqs_main(klon,klev,nbsrf,is_ter,is_lic,        &
    3934          iflag_cld_th,fact_cldcon, pdtphys,  &
     3961         iflag_cld_th, pdtphys,  &
    39353962         pctsrf,s_pblh,zstd, wake_s, wake_deltaq,   &
    3936          ptconv, clwcon0th, rnebcon0th,     &
    39373963         paprs,pplay,t_seri,q_seri, &
    39383964         qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, &
    39393965         fm_therm,entr_therm,detr_therm,cell_area, &
    3940          ratqs,ratqsc,ratqs_inter_,sigma_qtherm)
     3966         ratqsc,ratqs,ratqs_inter_,sigma_qtherm)
    39413967
    39423968
  • LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90

    r6005 r6007  
    108108    USE lmdz_thermcell_dtke, ONLY : thermcell_dtke
    109109    USE lmdz_blowing_snow_ini, ONLY : blowing_snow_ini , qbst_bs
    110     USE lmdz_lscp_ini, ONLY : lscp_ini
     110    USE lmdz_lscp_ini, ONLY : lscp_ini, ratqsbas
    111111    USE lmdz_lscp_subgridvarq, ONLY : ratqs_main, ratqs_main_first
    112112    USE lmdz_cloud_optics_prop_ini, ONLY : cloud_optics_prop_ini
     
    42224222          enddo
    42234223       ENDIF
    4224 
    4225        ! =================================================================== c
    4226        ! Calcul des proprietes des nuages convectifs
    4227        !
    4228 
    4229        !   calcul des proprietes des nuages convectifs
    4230        clwcon0(:,:)=fact_cldcon*clwcon0(:,:)
    4231        IF (iflag_cld_cv == 0) THEN
    4232           CALL clouds_gno &
    4233                (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0)
    4234        ELSE
    4235           CALL clouds_bigauss &
    4236                (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0)
    4237        ENDIF
    4238 
    4239 
    4240        ! =================================================================== c
     4224         
     4225          ! =========================================================================
     4226          ! Calculation of deep convective clouds properties
     4227          ! that is, the convective ratqs (raqtsc) and the convective cloud fraction
     4228          ! =========================================================================
     4229
     4230          clwcon0(:,:)=fact_cldcon*clwcon0(:,:)
     4231          IF (iflag_cld_cv == 0) THEN
     4232             CALL clouds_gno &
     4233                  (klon,klev,q_seri,zqsat,clwcon0,ptconv,ratqsc,rnebcon0)
     4234          ELSE
     4235             CALL clouds_bigauss &
     4236                  (klon,klev,q_seri,zqsat,qtc_cv,sigt_cv,ptconv,ratqsc,rnebcon0)
     4237          ENDIF
     4238
     4239          ! old-style convective ratqs computation as a function of q(z=0)-q / q
     4240          ! the ratqsc computed by clouds_gno is replaced
     4241          if (iflag_cld_th.eq.1) then
     4242            do k=1,klev
     4243               do i=1,klon
     4244                  if (ptconv(i,k)) then
     4245                      ratqsc(i,k)=ratqsbas &
     4246                      +fact_cldcon*(q_seri(i,1)-q_seri(i,k))/q_seri(i,k)
     4247                  else
     4248                      ratqsc(i,k)=0.
     4249                  endif
     4250               enddo
     4251             enddo
     4252          ! through log-normal distribution inversion
     4253          else if (iflag_cld_th.eq.4) then
     4254             ptconvth(:,:)=.false.
     4255             ratqsc(:,:)=0.
     4256             call clouds_gno &
     4257             (klon,klev,q_seri,zqsat,clwcon0th,ptconvth,ratqsc,rnebcon0th)
     4258          endif
     4259
     4260          if (iflag_cld_th.eq.1 .or.iflag_cld_th.eq.2.or.iflag_cld_th.eq.4) then
     4261          ! We add a small constant value to ratqsc*2 to account for small-scale fluctuations
     4262            do k=1,klev
     4263               do i=1,klon
     4264                  if ((fm_therm(i,k)>1.e-10)) then
     4265                     ratqsc(i,k)=sqrt(ratqsc(i,k)**2+0.05**2)
     4266                  endif
     4267               enddo
     4268            enddo
     4269          endif
     4270
     4271          ! =======================================================================
     4272
    42414273
    42424274       DO i = 1, klon
     
    50965128    CALL ratqs_main_first(klon, cell_area)
    50975129    CALL ratqs_main(klon,klev,nbsrf,is_ter,is_lic,  &
    5098          iflag_cld_th,fact_cldcon,pdtphys,          &
     5130         iflag_cld_th,pdtphys,          &
    50995131         pctsrf,s_pblh,zstd, wake_s, wake_deltaq,   &
    5100          ptconv,clwcon0th, rnebcon0th,     &
    51015132         paprs,pplay,t_seri,q_seri, &
    51025133         qtc_cv, sigt_cv,detrain_cv,fm_cv,fqd,fqcomp,sigd,zqsat, &
    51035134         fm_therm,entr_therm,detr_therm,cell_area, &
    5104          ratqs,ratqsc,ratqs_inter_,sigma_qtherm)
     5135         ratqss,ratqs,ratqs_inter_,sigma_qtherm)
    51055136
    51065137    !
Note: See TracChangeset for help on using the changeset viewer.