Ignore:
Timestamp:
Feb 5, 2024, 10:16:07 PM (4 months ago)
Author:
evignon
Message:

implementation sous flag des premiers changements
concernant le traitement des precipitations grande echelle
dans le cadre de l'atelier nuages
Audran, Lea, Niels, Gwendal et Etienne

File:
1 edited

Legend:

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

    r4666 r4803  
    99  !$OMP THREADPRIVATE(RCPD, RLSTT, RLVTT, RLMLT, RVTMP2, RTT, RD, RG)
    1010
    11   REAL, SAVE :: seuil_neb=0.001                 ! cloud fraction threshold: a cloud really exists when exceeded
     11  REAL, SAVE, PROTECTED :: seuil_neb=0.001      ! cloud fraction threshold: a cloud really exists when exceeded
    1212  !$OMP THREADPRIVATE(seuil_neb)
    1313
     
    1515  !$OMP THREADPRIVATE(lunout,prt_level)
    1616
    17   INTEGER, SAVE :: niter_lscp=5                 ! number of iterations to calculate autoconversion to precipitation
     17  INTEGER, SAVE, PROTECTED :: niter_lscp=5      ! number of iterations to calculate autoconversion to precipitation
    1818  !$OMP THREADPRIVATE(niter_lscp)
    1919
    20   INTEGER,SAVE :: iflag_evap_prec=1            ! precipitation evaporation flag. 0: nothing, 1: "old way",
     20  INTEGER, SAVE, PROTECTED :: iflag_evap_prec=1 ! precipitation evaporation flag. 0: nothing, 1: "old way",
    2121                                                ! 2: Max cloud fraction above to calculate the max of reevaporation
    2222                                                ! >=4: LTP'method i.e. evaporation in the clear-sky fraction of the mesh only
     
    2525  !$OMP THREADPRIVATE(iflag_evap_prec)
    2626
    27   REAL t_coup                                   ! temperature threshold which determines the phase
    28   PARAMETER (t_coup=234.0)                      ! for which the saturation vapor pressure is calculated
    29 
    30   REAL DDT0                                     ! iteration parameter
    31   PARAMETER (DDT0=.01)
    32 
    33   REAL ztfondue                                 ! parameter to calculate melting fraction of precipitation
    34   PARAMETER (ztfondue=278.15)
    35 
    36   REAL temp_nowater                             ! temperature below which liquid water no longer exists
    37   PARAMETER (temp_nowater=233.15)
    38 
    39   REAL, SAVE    :: rain_int_min=0.001           ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
    40   !$OMP THREADPRIVATE(rain_int_min)
    41 
    42   REAL, SAVE :: a_tr_sca(4)                     ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
     27  REAL, SAVE, PROTECTED :: t_coup=234.0         ! temperature threshold which determines the phase
     28                                                ! for which the saturation vapor pressure is calculated
     29  !$OMP THREADPRIVATE(t_coup)
     30  REAL, SAVE, PROTECTED :: DDT0=0.01            ! iteration parameter
     31  !$OMP THREADPRIVATE(DDT0)
     32
     33  REAL, SAVE, PROTECTED :: ztfondue=278.15      ! parameter to calculate melting fraction of precipitation
     34  !$OMP THREADPRIVATE(ztfondue)
     35
     36  REAL, SAVE, PROTECTED :: temp_nowater=233.15  ! temperature below which liquid water no longer exists
     37  !$OMP THREADPRIVATE(temp_nowater)
     38
     39  REAL, SAVE, PROTECTED :: a_tr_sca(4)          ! Variables for tracers temporary: alpha parameter for scavenging, 4 possible scavenging processes
    4340  !$OMP THREADPRIVATE(a_tr_sca)
    4441 
    45   INTEGER, SAVE ::  iflag_mpc_bl=0              ! flag to activate boundary layer mixed phase cloud param
     42  INTEGER, SAVE, PROTECTED ::  iflag_mpc_bl=0   ! flag to activate boundary layer mixed phase cloud param
    4643  !$OMP THREADPRIVATE(iflag_mpc_bl)
    4744 
    48   LOGICAL, SAVE :: ok_radocond_snow=.false.      ! take into account the mass of ice precip in the cloud ice content seen by radiation
     45  LOGICAL, SAVE, PROTECTED :: ok_radocond_snow=.false. ! take into account the mass of ice precip in the cloud ice content seen by radiation
    4946  !$OMP THREADPRIVATE(ok_radocond_snow)
    5047
    51   REAL, SAVE :: t_glace_min=258.0                ! lower-bound temperature parameter for cloud phase determination
     48  REAL, SAVE, PROTECTED :: t_glace_min=258.0    ! lower-bound temperature parameter for cloud phase determination
    5249  !$OMP THREADPRIVATE(t_glace_min)
    5350
    54   REAL, SAVE :: t_glace_max=273.15               ! upper-bound temperature parameter for cloud phase determination
     51  REAL, SAVE, PROTECTED :: t_glace_max=273.15   ! upper-bound temperature parameter for cloud phase determination
    5552  !$OMP THREADPRIVATE(t_glace_max)
    5653
    57   REAL, SAVE :: exposant_glace=1.0               ! parameter for cloud phase determination
     54  REAL, SAVE, PROTECTED :: exposant_glace=1.0   ! parameter for cloud phase determination
    5855  !$OMP THREADPRIVATE(exposant_glace)
    5956
    60   INTEGER, SAVE :: iflag_vice=0                  ! which expression for ice crystall fall velocity
     57  INTEGER, SAVE, PROTECTED :: iflag_vice=0      ! which expression for ice crystall fall velocity
    6158  !$OMP THREADPRIVATE(iflag_vice)
    6259
    63   INTEGER, SAVE :: iflag_t_glace=0               ! which expression for cloud phase partitioning
     60  INTEGER, SAVE, PROTECTED :: iflag_t_glace=0   ! which expression for cloud phase partitioning
    6461  !$OMP THREADPRIVATE(iflag_t_glace)
    6562
    66   INTEGER, SAVE :: iflag_cloudth_vert=0          ! option for determining cloud fraction and content in convective boundary layers
     63  INTEGER, SAVE, PROTECTED :: iflag_cloudth_vert=0         ! option for determining cloud fraction and content in convective boundary layers
    6764  !$OMP THREADPRIVATE(iflag_cloudth_vert)
    6865
    69   INTEGER, SAVE :: iflag_gammasat=0              ! which threshold for homogeneous nucleation below -40oC
     66  INTEGER, SAVE, PROTECTED :: iflag_gammasat=0             ! which threshold for homogeneous nucleation below -40oC
    7067  !$OMP THREADPRIVATE(iflag_gammasat)
    7168
    72   INTEGER, SAVE :: iflag_rain_incloud_vol=0      ! use of volume cloud fraction for rain autoconversion
     69  INTEGER, SAVE, PROTECTED :: iflag_rain_incloud_vol=0     ! use of volume cloud fraction for rain autoconversion
    7370  !$OMP THREADPRIVATE(iflag_rain_incloud_vol)
    7471
    75   INTEGER, SAVE :: iflag_bergeron=0              ! bergeron effect for liquid precipitation treatment 
     72  INTEGER, SAVE, PROTECTED :: iflag_bergeron=0             ! bergeron effect for liquid precipitation treatment 
    7673  !$OMP THREADPRIVATE(iflag_bergeron)
    7774
    78   INTEGER, SAVE :: iflag_fisrtilp_qsat=0         ! qsat adjustment (iterative) during autoconversion
     75  INTEGER, SAVE, PROTECTED :: iflag_fisrtilp_qsat=0        ! qsat adjustment (iterative) during autoconversion
    7976  !$OMP THREADPRIVATE(iflag_fisrtilp_qsat)
    8077
    81   INTEGER, SAVE :: iflag_pdf=0                   ! type of subgrid scale qtot pdf
     78  INTEGER, SAVE, PROTECTED :: iflag_pdf=0                  ! type of subgrid scale qtot pdf
    8279  !$OMP THREADPRIVATE(iflag_pdf)
    8380
    84   INTEGER, SAVE :: iflag_autoconversion=0        ! autoconversion option
     81  INTEGER, SAVE, PROTECTED :: iflag_autoconversion=0       ! autoconversion option
    8582  !$OMP THREADPRIVATE(iflag_autoconversion)
    8683
    87   LOGICAL, SAVE :: reevap_ice=.false.            ! no liquid precip for T< threshold
     84  LOGICAL, SAVE, PROTECTED :: reevap_ice=.false.           ! no liquid precip for T< threshold
    8885  !$OMP THREADPRIVATE(reevap_ice)
    8986
    90   REAL, SAVE :: cld_lc_lsc=2.6e-4                ! liquid autoconversion coefficient, stratiform rain
     87  REAL, SAVE, PROTECTED :: cld_lc_lsc=2.6e-4               ! liquid autoconversion coefficient, stratiform rain
    9188  !$OMP THREADPRIVATE(cld_lc_lsc)
    9289
    93   REAL, SAVE :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
     90  REAL, SAVE, PROTECTED :: cld_lc_con=2.6e-4                ! liquid autoconversion coefficient, convective rain
    9491  !$OMP THREADPRIVATE(cld_lc_con)
    9592
    96   REAL, SAVE :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
     93  REAL, SAVE, PROTECTED :: cld_tau_lsc=3600.                ! liquid autoconversion timescale, stratiform rain
    9794  !$OMP THREADPRIVATE(cld_tau_lsc)
    9895
    99   REAL, SAVE :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
     96  REAL, SAVE, PROTECTED :: cld_tau_con=3600.                ! liquid autoconversion timescale, convective rain
    10097  !$OMP THREADPRIVATE(cld_tau_con)
    10198
    102   REAL, SAVE :: cld_expo_lsc=2.                  ! liquid autoconversion threshold exponent, stratiform rain
     99  REAL, SAVE, PROTECTED :: cld_expo_lsc=2.                  ! liquid autoconversion threshold exponent, stratiform rain
    103100  !$OMP THREADPRIVATE(cld_expo_lsc)
    104101
    105   REAL, SAVE :: cld_expo_con=2.                  ! liquid autoconversion threshold exponent, convective rain
     102  REAL, SAVE, PROTECTED :: cld_expo_con=2.                  ! liquid autoconversion threshold exponent, convective rain
    106103  !$OMP THREADPRIVATE(cld_expo_con)
    107104
    108   REAL, SAVE :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
     105  REAL, SAVE, PROTECTED :: ffallv_lsc=1.                    ! tuning coefficient crystal fall velocity, stratiform
    109106  !$OMP THREADPRIVATE(ffallv_lsc)
    110107
    111   REAL, SAVE :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
     108  REAL, SAVE, PROTECTED :: ffallv_con=1.                    ! tuning coefficient crystal fall velocity, convective
    112109  !$OMP THREADPRIVATE(ffallv_con)
    113110
    114   REAL, SAVE :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
     111  REAL, SAVE, PROTECTED :: coef_eva=2e-5                    ! tuning coefficient liquid precip evaporation
    115112  !$OMP THREADPRIVATE(coef_eva)
    116113
    117   REAL, SAVE :: coef_eva_i                       ! tuning coefficient ice precip sublimation
     114  REAL, SAVE, PROTECTED :: coef_eva_i                       ! tuning coefficient ice precip sublimation
    118115  !$OMP THREADPRIVATE(coef_eva_i)
    119116
    120   REAL cice_velo                                 ! factor in the ice fall velocity formulation
    121   PARAMETER (cice_velo=1.645)
    122 
    123   REAL dice_velo                                 ! exponent in the ice fall velocity formulation
    124   PARAMETER (dice_velo=0.16)
    125 
    126   REAL, SAVE :: dist_liq=300.                    ! typical deph of cloud-top liquid layer in mpcs
     117  REAL, SAVE, PROTECTED :: expo_eva=0.5                     ! tuning coefficient liquid precip evaporation
     118  !$OMP THREADPRIVATE(expo_eva)
     119
     120  REAL, SAVE, PROTECTED :: expo_eva_i                       ! tuning coefficient ice precip sublimation
     121  !$OMP THREADPRIVATE(expo_eva_i)
     122
     123  REAL, SAVE, PROTECTED :: cice_velo=1.645                  ! factor in the ice fall velocity formulation
     124  !$OMP THREADPRIVATE(cice_velo)
     125
     126  REAL, SAVE, PROTECTED ::  dice_velo=0.16                  ! exponent in the ice fall velocity formulation
     127  !$OMP THREADPRIVATE(dice_velo)
     128
     129  REAL, SAVE, PROTECTED :: dist_liq=300.                    ! typical deph of cloud-top liquid layer in mpcs
    127130  !$OMP THREADPRIVATE(dist_liq)
    128131
    129   REAL, SAVE    :: tresh_cl=0.0                  ! cloud fraction threshold for cloud top search
     132  REAL, SAVE, PROTECTED    :: tresh_cl=0.0                  ! cloud fraction threshold for cloud top search
    130133  !$OMP THREADPRIVATE(tresh_cl)
    131134
     135  !--Parameters for poprecip
     136  LOGICAL, SAVE, PROTECTED :: ok_poprecip=.FALSE.           ! use the processes-oriented formulation of precipitations
     137  !$OMP THREADPRIVATE(ok_poprecip)
     138
     139  REAL, SAVE, PROTECTED :: rain_int_min=0.001               ! Minimum local rain intensity [mm/s] before the decrease in associated precipitation fraction
     140  !$OMP THREADPRIVATE(rain_int_min)
     141
     142  REAL, SAVE, PROTECTED :: thresh_precip_frac=1.E-6         ! precipitation fraction threshold TODO [-]
     143  !$OMP THREADPRIVATE(thresh_precip_frac)
     144
     145  REAL, SAVE, PROTECTED :: gamma_col=1.                     ! A COMMENTER TODO [-]
     146  !$OMP THREADPRIVATE(gamma_col)
     147
     148  REAL, SAVE, PROTECTED :: gamma_agg=1.                     ! A COMMENTER TODO [-]
     149  !$OMP THREADPRIVATE(gamma_agg)
     150
     151  REAL, SAVE, PROTECTED :: gamma_rim=1.                     ! A COMMENTER TODO [-]
     152  !$OMP THREADPRIVATE(gamma_rim)
     153
     154  REAL, SAVE, PROTECTED :: rho_rain=1000.                    ! A COMMENTER TODO [kg/m3]
     155  !$OMP THREADPRIVATE(rho_rain)
     156
     157  REAL, SAVE, PROTECTED :: rho_snow=500.                   ! A COMMENTER TODO [kg/m3]
     158  !$OMP THREADPRIVATE(rho_snow)
     159
     160  REAL, SAVE, PROTECTED :: r_rain=100.E-6                   ! A COMMENTER TODO [m]
     161  !$OMP THREADPRIVATE(r_rain)
     162
     163  REAL, SAVE, PROTECTED :: r_snow=100.E-6                    ! A COMMENTER TODO [m]
     164  !$OMP THREADPRIVATE(r_snow)
     165
     166  REAL, SAVE, PROTECTED :: Eff_rain_liq=1.0                  ! A COMMENTER TODO [-]
     167  !$OMP THREADPRIVATE(Eff_rain_liq)
     168
     169  REAL, SAVE, PROTECTED :: Eff_snow_ice=0.5                ! A COMMENTER TODO [-]
     170  !$OMP THREADPRIVATE(Eff_snow_ice)
     171
     172  REAL, SAVE, PROTECTED :: Eff_snow_liq=1.0              ! A COMMENTER TODO [-]
     173  !$OMP THREADPRIVATE(Eff_snow_liq)
     174
     175  REAL, SAVE, PROTECTED :: tau_auto_snow_min=1800.          ! A COMMENTER TODO [s]
     176  !$OMP THREADPRIVATE(tau_auto_snow_min)
     177
     178  REAL, SAVE, PROTECTED :: tau_auto_snow_max=7200.          ! A COMMENTER TODO [s]
     179  !$OMP THREADPRIVATE(tau_auto_snow_max)
     180
     181  REAL, SAVE, PROTECTED :: eps=1.E-10                       ! A COMMENTER TODO [-]
     182  !$OMP THREADPRIVATE(eps)
     183  !--End of the parameters for poprecip
     184
    132185! Two parameters used for lmdz_lscp_old only
    133   INTEGER, SAVE :: iflag_oldbug_fisrtilp=0, fl_cor_ebil
     186  INTEGER, SAVE, PROTECTED :: iflag_oldbug_fisrtilp=0, fl_cor_ebil
    134187  !$OMP THREADPRIVATE(iflag_oldbug_fisrtilp,fl_cor_ebil)
    135188
     
    173226    CALL getin_p('iflag_evap_prec',iflag_evap_prec)
    174227    CALL getin_p('seuil_neb',seuil_neb)
    175     CALL getin_p('rain_int_min',rain_int_min)
    176228    CALL getin_p('iflag_mpc_bl',iflag_mpc_bl)
    177229    CALL getin_p('ok_radocond_snow',ok_radocond_snow)
     
    199251    coef_eva_i=coef_eva
    200252    CALL getin_p('coef_eva_i',coef_eva_i)
     253    CALL getin_p('expo_eva',expo_eva)
     254    expo_eva_i=expo_eva
     255    CALL getin_p('expo_eva_i',expo_eva_i)
    201256    CALL getin_p('iflag_autoconversion',iflag_autoconversion)
    202257    CALL getin_p('dist_liq',dist_liq)
    203258    CALL getin_p('tresh_cl',tresh_cl)
    204259    CALL getin_p('iflag_oldbug_fisrtilp',iflag_oldbug_fisrtilp)
    205 
     260    CALL getin_p('ok_poprecip',ok_poprecip)
     261    CALL getin_p('rain_int_min',rain_int_min)
     262    CALL getin_p('gamma_agg',gamma_agg)
     263    CALL getin_p('gamma_col',gamma_col)
    206264
    207265
     
    210268    WRITE(lunout,*) 'lscp_ini, iflag_evap_prec:', iflag_evap_prec
    211269    WRITE(lunout,*) 'lscp_ini, seuil_neb:', seuil_neb
    212     WRITE(lunout,*) 'lscp_ini, rain_int_min:', rain_int_min
    213270    WRITE(lunout,*) 'lscp_ini, iflag_mpc_bl:', iflag_mpc_bl
    214271    WRITE(lunout,*) 'lscp_ini, ok_radocond_snow:', ok_radocond_snow
     
    235292    WRITE(lunout,*) 'lscp_ini, coef_eva', coef_eva
    236293    WRITE(lunout,*) 'lscp_ini, coef_eva_i', coef_eva_i
     294    WRITE(lunout,*) 'lscp_ini, expo_eva', expo_eva
     295    WRITE(lunout,*) 'lscp_ini, expo_eva_i', expo_eva_i
    237296    WRITE(lunout,*) 'lscp_ini, iflag_autoconversion', iflag_autoconversion
    238297    WRITE(lunout,*) 'lscp_ini, dist_liq', dist_liq
     
    240299    WRITE(lunout,*) 'lscp_ini, iflag_oldbug_fisrtilp', iflag_oldbug_fisrtilp
    241300    WRITE(lunout,*) 'lscp_ini, fl_cor_ebil', fl_cor_ebil
     301    WRITE(lunout,*) 'lscp_ini, ok_poprecip', ok_poprecip
     302    WRITE(lunout,*) 'lscp_ini, rain_int_min:', rain_int_min
     303    WRITE(lunout,*) 'lscp_ini, gamma_agg:', gamma_agg
     304    WRITE(lunout,*) 'lscp_ini, gamma_col:', gamma_col
    242305
    243306
     
    262325
    263326
     327    ! check consistency between the use of the processes-oriented precipitation formulations
     328    ! and other options
     329   
     330    IF (ok_poprecip) THEN
     331        IF ((iflag_evap_prec .LT. 4) .OR. (niter_lscp .GT. 1)) THEN
     332           abort_message = 'in lscp, ok_poprecip=y requires iflag_evap_prec >= 4 and niter_lscp=1'
     333           CALL abort_physic (modname,abort_message,1)
     334        ENDIF
     335    ENDIF
     336
     337
    264338    !AA Temporary initialisation
    265339    a_tr_sca(1) = -0.5
Note: See TracChangeset for help on using the changeset viewer.