Ignore:
Timestamp:
Jul 24, 2024, 4:23:34 PM (4 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move some unused files to obsolete/
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_atke_turbulence_ini.F90

    r5116 r5117  
    55  ! declaration of constants and parameters
    66
    7   real, save, protected :: rg, rd, rpi, rcpd, rv, viscom, viscoh
     7  REAL, SAVE, protected :: rg, rd, rpi, rcpd, rv, viscom, viscoh
    88  !$OMP THREADPRIVATE(rg, rd, rpi, rcpd, rv, viscom, viscoh)
    99
    10   integer, save, protected :: iflag_atke        ! flag that controls options in atke_compute_km_kh
    11   integer, save, protected :: iflag_atke_lmix   ! flag that controls the calculation of mixing length in atke
    12   integer, save, protected :: iflag_num_atke    ! flag that controls the numerical treatment of diffusion coeffiient calculation
     10  INTEGER, SAVE, protected :: iflag_atke        ! flag that controls options in atke_compute_km_kh
     11  INTEGER, SAVE, protected :: iflag_atke_lmix   ! flag that controls the calculation of mixing length in atke
     12  INTEGER, SAVE, protected :: iflag_num_atke    ! flag that controls the numerical treatment of diffusion coeffiient calculation
    1313  !$OMP THREADPRIVATE(iflag_atke, iflag_atke_lmix, iflag_num_atke)
    1414
    15   logical, save, protected :: atke_ok_vdiff    ! activate vertical diffusion of TKE or not
    16   logical, save, protected :: atke_ok_virtual  ! account for vapor for flottability
     15  logical, SAVE, protected :: atke_ok_vdiff    ! activate vertical diffusion of TKE or not
     16  logical, SAVE, protected :: atke_ok_virtual  ! account for vapor for flottability
    1717  !$OMP THREADPRIVATE(atke_ok_vdiff, atke_ok_virtual)
    1818
    19   real, save, protected :: kappa = 0.4         ! Von Karman constant
    20   real, save, protected :: cn                  ! Sm value at Ri=0
    21   real, save, protected :: cinf                ! Sm value at Ri=-Inf
    22   real, save, protected :: ri0                 ! Richardson number near zero to guarantee continuity in slope of Sm (stability function) at Ri=0
    23   real, save, protected :: ri1                 ! Richardson number near zero to guarantee continuity in slope of Pr (Prandlt's number) at Ri=0
    24   real, save, protected :: lmin = 0.01         ! minimum mixing length corresponding to the Kolmogov dissipation scale  in planetary atmospheres (Chen et al 2016, JGR Atmos)
    25   real, save, protected :: ctkes               ! coefficient for surface TKE
    26   real, save, protected :: clmixshear          ! coefficient for mixing length depending on local wind shear
     19  REAL, SAVE, protected :: kappa = 0.4         ! Von Karman constant
     20  REAL, SAVE, protected :: cn                  ! Sm value at Ri=0
     21  REAL, SAVE, protected :: cinf                ! Sm value at Ri=-Inf
     22  REAL, SAVE, protected :: ri0                 ! Richardson number near zero to guarantee continuity in slope of Sm (stability function) at Ri=0
     23  REAL, SAVE, protected :: ri1                 ! Richardson number near zero to guarantee continuity in slope of Pr (Prandlt's number) at Ri=0
     24  REAL, SAVE, protected :: lmin = 0.01         ! minimum mixing length corresponding to the Kolmogov dissipation scale  in planetary atmospheres (Chen et al 2016, JGR Atmos)
     25  REAL, SAVE, protected :: ctkes               ! coefficient for surface TKE
     26  REAL, SAVE, protected :: clmixshear          ! coefficient for mixing length depending on local wind shear
    2727  !$OMP THREADPRIVATE(kappa, cn, cinf, ri0, ri1, lmin, ctkes, clmixshear)
    2828
     
    3030  ! Tunable parameters for the ATKE scheme and their range of values
    3131  !!-------------------------------------------------------------------------------------------------------------
    32   real, save, protected :: cepsilon            ! controls the value of the dissipation length scale, range [1.2 - 10]
    33   real, save, protected :: cke                 ! controls the value of the diffusion coefficient of TKE, range [1 - 5]
    34   real, save, protected :: l0                  ! asymptotic mixing length far from the ground [m] (Sun et al 2011, JAMC), range [15 - 75]
    35   real, save, protected :: clmix               ! controls the value of the mixing length in stratified conditions, range [0.1 - 2]
    36   real, save, protected :: ric                 ! critical Richardson number controlling the slope of Sm in stable conditions, range [0.19 - 0.25]
    37   real, save, protected :: smmin               ! minimum value of Sm in very stable conditions (defined here as minsqrt(Ez/Ek)) at large Ri, range [0.025 - 0.1]
    38   real, save, protected :: pr_neut             ! neutral value of the Prandtl number (Ri=0), range [0.7 - 1]
    39   real, save, protected :: pr_slope            ! linear slope of Pr with Ri in the very stable regime, range [3 - 5]
    40   real, save, protected :: cinffac             ! ratio between cinf and cn controlling the convective limit of Sm, range [1.2 - 5.0]
    41   real, save, protected :: pr_asym             ! value of Prandlt in the convective limit(Ri=-Inf), range [0.3 - 0.5]
     32  REAL, SAVE, protected :: cepsilon            ! controls the value of the dissipation length scale, range [1.2 - 10]
     33  REAL, SAVE, protected :: cke                 ! controls the value of the diffusion coefficient of TKE, range [1 - 5]
     34  REAL, SAVE, protected :: l0                  ! asymptotic mixing length far from the ground [m] (Sun et al 2011, JAMC), range [15 - 75]
     35  REAL, SAVE, protected :: clmix               ! controls the value of the mixing length in stratified conditions, range [0.1 - 2]
     36  REAL, SAVE, protected :: ric                 ! critical Richardson number controlling the slope of Sm in stable conditions, range [0.19 - 0.25]
     37  REAL, SAVE, protected :: smmin               ! minimum value of Sm in very stable conditions (defined here as minsqrt(Ez/Ek)) at large Ri, range [0.025 - 0.1]
     38  REAL, SAVE, protected :: pr_neut             ! neutral value of the Prandtl number (Ri=0), range [0.7 - 1]
     39  REAL, SAVE, protected :: pr_slope            ! linear slope of Pr with Ri in the very stable regime, range [3 - 5]
     40  REAL, SAVE, protected :: cinffac             ! ratio between cinf and cn controlling the convective limit of Sm, range [1.2 - 5.0]
     41  REAL, SAVE, protected :: pr_asym             ! value of Prandlt in the convective limit(Ri=-Inf), range [0.3 - 0.5]
    4242  !$OMP THREADPRIVATE(cepsilon, cke, l0, clmix, ric, smmin, pr_neut, pr_slope, cinffac, pr_asym)
    4343  !!-------------------------------------------------------------------------------------------------------------
     
    5858    ! input arguments (universal constants for planet)
    5959    !-------------------------------------------------
    60     real, intent(in) :: rg_in, rd_in, rpi_in, rcpd_in, rv_in, viscom_in, viscoh_in
     60    REAL, INTENT(IN) :: rg_in, rd_in, rpi_in, rcpd_in, rv_in, viscom_in, viscoh_in
    6161    !!----------------------------------------------------------------------
    6262
     
    8181    CALL getin_p('iflag_atke_lmix', iflag_atke_lmix)
    8282
    83     if (iflag_atke == 0 .and. iflag_atke_lmix>0) THEN
     83    IF (iflag_atke == 0 .AND. iflag_atke_lmix>0) THEN
    8484      CALL abort_physic("atke_turbulence_ini", &
    8585              'stationary scheme must use mixing length formulation not depending on tke', 1)
     
    121121    CALL getin_p('atke_cinffac', cinffac)
    122122    cinf = cinffac * cn
    123     if (cinf <= cn) THEN
     123    IF (cinf <= cn) THEN
    124124      CALL abort_physic("atke_turbulence_ini", &
    125125              'cinf cannot be lower than cn', 1)
     
    134134    pr_slope = 5.0 ! default value from Zilitinkevich et al. 2005
    135135    CALL getin_p('atke_pr_slope', pr_slope)
    136     if (pr_slope <= 1) THEN
     136    IF (pr_slope <= 1) THEN
    137137      CALL abort_physic("atke_turbulence_ini", &
    138138              'pr_slope has to be greater than 1 for consistency of the tke scheme', 1)
     
    146146    pr_asym = 0.4
    147147    CALL getin_p('atke_pr_asym', pr_asym)
    148     if (pr_asym >= pr_neut) THEN
     148    IF (pr_asym >= pr_neut) THEN
    149149      CALL abort_physic("atke_turbulence_ini", &
    150150              'pr_asym must be be lower than pr_neut', 1)
Note: See TracChangeset for help on using the changeset viewer.