Changeset 6200


Ignore:
Timestamp:
Apr 23, 2026, 8:17:40 PM (11 days ago)
Author:
lguez
Message:

Indent file

File:
1 edited

Legend:

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

    r6198 r6200  
    66MODULE conf_phys_m
    77
    8     USE clesphys_mod_h
    9     IMPLICIT NONE
    10 
    11 ! Récupéré de physiq_mod mars 2026. Faire le tri de ce qui doit être réintégré dans
    12 ! des modules spécifiques
    13     LOGICAL, SAVE, PROTECTED :: ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES
    14 !$OMP THREADPRIVATE(ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES)
    15     LOGICAL, SAVE, PROTECTED :: ok_volcan ! pour activer les diagnostics volcaniques
    16     !$OMP THREADPRIVATE(ok_volcan)
    17     INTEGER, SAVE, PROTECTED :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf/strato
    18     !$OMP THREADPRIVATE(flag_volc_surfstrat)
    19     INTEGER, SAVE, PROTECTED :: iflag_radia     ! active ou non le rayonnement (MPL)
    20     !$OMP THREADPRIVATE(iflag_radia)
    21     REAL, SAVE, PROTECTED :: facttemps, fact_cldcon
    22     !$OMP THREADPRIVATE(facttemps,fact_cldcon)
    23     INTEGER, SAVE, PROTECTED :: iflag_cld_th
    24     !$OMP THREADPRIVATE(iflag_cld_th)
    25     LOGICAL ok_ade, ok_aie    ! Apply aerosol (in)direct effects or not
    26     LOGICAL ok_alw            ! Apply aerosol LW effect or not
    27     LOGICAL ok_cdnc ! ok cloud droplet number concentration (O. Boucher 01-2013)
    28     REAL bl95_b0, bl95_b1   ! Parameter in Boucher and Lohmann (1995)
    29     SAVE ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1
    30     !$OMP THREADPRIVATE(ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1)
    31     LOGICAL, SAVE :: aerosol_couple ! true  : calcul des aerosols dans INCA
    32     ! false : lecture des aerosol dans un fichier
    33     !$OMP THREADPRIVATE(aerosol_couple)
    34     LOGICAL, SAVE :: chemistry_couple ! true  : use INCA chemistry O3
    35     ! false : use offline chemistry O3
    36     !$OMP THREADPRIVATE(chemistry_couple)
    37     INTEGER, SAVE :: flag_aerosol
    38     !$OMP THREADPRIVATE(flag_aerosol)
    39     LOGICAL, SAVE :: flag_bc_internal_mixture
    40     !$OMP THREADPRIVATE(flag_bc_internal_mixture)
    41     !                           
    42     !--STRAT AEROSOL           
    43     INTEGER, SAVE :: flag_aerosol_strat
    44     !$OMP THREADPRIVATE(flag_aerosol_strat)
    45     !
    46     !--INTERACTIVE AEROSOL FEEDBACK ON RADIATION
    47     LOGICAL, SAVE :: flag_aer_feedback
    48     !$OMP THREADPRIVATE(flag_aer_feedback)
    49 
    50     REAL,SAVE ::  solarlong0
    51     !$OMP THREADPRIVATE(solarlong0)
    52 
    53     REAL, SAVE :: alp_offset
    54     !$OMP THREADPRIVATE(alp_offset)
    55 
    56     INTEGER, SAVE, protected:: read_climoz = 0 ! read ozone climatology
    57     !     Allowed values are 0, 1 and 2
    58     !     0: do not read an ozone climatology
    59     !     1: read a single ozone climatology that will be used day and night
    60     !     2: read two ozone climatologies, the average day and night
    61     !     climatology and the daylight climatology
    62     !$OMP THREADPRIVATE(read_climoz)
    63 
    64     LOGICAL, SAVE, protected:: ok_daily_climoz
    65     ! TRUE  => daily interpolation
    66     ! FALSE => no interpolation (14 months)
    67     ! calendar dependent number of days
    68     !$OMP THREADPRIVATE(ok_daily_climoz)
    69 
    70     LOGICAL, SAVE, protected:: adjust_tropopause
    71     ! tropopause adjustement required
    72     !$OMP THREADPRIVATE(adjust_tropopause)
     8  USE clesphys_mod_h
     9  IMPLICIT NONE
     10
     11  ! Récupéré de physiq_mod mars 2026. Faire le tri de ce qui doit être réintégré dans
     12  ! des modules spécifiques
     13  LOGICAL, SAVE, PROTECTED :: ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES
     14  !$OMP THREADPRIVATE(ok_journe, ok_mensuel, ok_instan, ok_hf, ok_LES)
     15  LOGICAL, SAVE, PROTECTED :: ok_volcan ! pour activer les diagnostics volcaniques
     16  !$OMP THREADPRIVATE(ok_volcan)
     17  INTEGER, SAVE, PROTECTED :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf/strato
     18  !$OMP THREADPRIVATE(flag_volc_surfstrat)
     19  INTEGER, SAVE, PROTECTED :: iflag_radia     ! active ou non le rayonnement (MPL)
     20  !$OMP THREADPRIVATE(iflag_radia)
     21  REAL, SAVE, PROTECTED :: facttemps, fact_cldcon
     22  !$OMP THREADPRIVATE(facttemps,fact_cldcon)
     23  INTEGER, SAVE, PROTECTED :: iflag_cld_th
     24  !$OMP THREADPRIVATE(iflag_cld_th)
     25  LOGICAL ok_ade, ok_aie    ! Apply aerosol (in)direct effects or not
     26  LOGICAL ok_alw            ! Apply aerosol LW effect or not
     27  LOGICAL ok_cdnc ! ok cloud droplet number concentration (O. Boucher 01-2013)
     28  REAL bl95_b0, bl95_b1   ! Parameter in Boucher and Lohmann (1995)
     29  SAVE ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1
     30  !$OMP THREADPRIVATE(ok_ade, ok_aie, ok_alw, ok_cdnc, bl95_b0, bl95_b1)
     31  LOGICAL, SAVE :: aerosol_couple ! true  : calcul des aerosols dans INCA
     32  ! false : lecture des aerosol dans un fichier
     33  !$OMP THREADPRIVATE(aerosol_couple)
     34  LOGICAL, SAVE :: chemistry_couple ! true  : use INCA chemistry O3
     35  ! false : use offline chemistry O3
     36  !$OMP THREADPRIVATE(chemistry_couple)
     37  INTEGER, SAVE :: flag_aerosol
     38  !$OMP THREADPRIVATE(flag_aerosol)
     39  LOGICAL, SAVE :: flag_bc_internal_mixture
     40  !$OMP THREADPRIVATE(flag_bc_internal_mixture)
     41  !
     42  !--STRAT AEROSOL
     43  INTEGER, SAVE :: flag_aerosol_strat
     44  !$OMP THREADPRIVATE(flag_aerosol_strat)
     45  !
     46  !--INTERACTIVE AEROSOL FEEDBACK ON RADIATION
     47  LOGICAL, SAVE :: flag_aer_feedback
     48  !$OMP THREADPRIVATE(flag_aer_feedback)
     49
     50  REAL,SAVE ::  solarlong0
     51  !$OMP THREADPRIVATE(solarlong0)
     52
     53  REAL, SAVE :: alp_offset
     54  !$OMP THREADPRIVATE(alp_offset)
     55
     56  INTEGER, SAVE, protected:: read_climoz = 0 ! read ozone climatology
     57  !     Allowed values are 0, 1 and 2
     58  !     0: do not read an ozone climatology
     59  !     1: read a single ozone climatology that will be used day and night
     60  !     2: read two ozone climatologies, the average day and night
     61  !     climatology and the daylight climatology
     62  !$OMP THREADPRIVATE(read_climoz)
     63
     64  LOGICAL, SAVE, protected:: ok_daily_climoz
     65  ! TRUE  => daily interpolation
     66  ! FALSE => no interpolation (14 months)
     67  ! calendar dependent number of days
     68  !$OMP THREADPRIVATE(ok_daily_climoz)
     69
     70  LOGICAL, SAVE, protected:: adjust_tropopause
     71  ! tropopause adjustement required
     72  !$OMP THREADPRIVATE(adjust_tropopause)
    7373
    7474CONTAINS
     
    7676  SUBROUTINE conf_phys
    7777
    78         USE compbl_mod_h
    79  USE ioipsl_getin_p_mod, ONLY : getin_p
     78    USE compbl_mod_h
     79    USE ioipsl_getin_p_mod, ONLY : getin_p
    8080    USE alpale_mod
    8181    USE yomcst_mod_h
     
    8484    USE phys_cal_mod
    8585    USE carbon_cycle_mod,  ONLY: carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm
    86 ! << PC
     86    ! << PC
    8787    USE carbon_cycle_mod,  ONLY: read_daily_co2ff
    8888    USE carbon_cycle_mod,  ONLY: carbon_cycle_conc_driven
    89 ! >> PC       
     89    ! >> PC
    9090    USE carbon_cycle_mod,  ONLY: read_fco2_ocean_cor,var_fco2_ocean_cor
    9191    USE carbon_cycle_mod,  ONLY: read_fco2_land_cor,var_fco2_land_cor
     
    100100    USE comsoil_mod_h
    101101    USE ch4n2o_correction_mod, ONLY: ok_CH4_eff_ppb, ok_N2O_eff_ppb
    102    
     102
    103103
    104104    !
     
    137137    !-----------------------------------------------------------------
    138138
    139 CHARACTER (len = 6) :: ocean
    140 REAL co2_ppm_per
     139    CHARACTER (len = 6) :: ocean
     140    REAL co2_ppm_per
    141141    print*,'CONFPHYS ENTREE'
    142142    !
     
    270270
    271271    !==================================================================
    272    
     272
    273273    !              journalieres
    274274    !
     
    659659    ok_suntime_rrtm = .FALSE.
    660660    IF (iflag_rrtm==1) THEN
    661       CALL getin_p('ok_suntime_rrtm',ok_suntime_rrtm)
    662     ENDIF
    663    
     661       CALL getin_p('ok_suntime_rrtm',ok_suntime_rrtm)
     662    ENDIF
     663
    664664    ! - 0 = no stratospheric aerosols
    665665    ! - 1 = stratospheric aerosols scaled from 550 nm AOD
     
    830830    CALL getin_p('iflag_physiq',iflag_physiq)
    831831
    832 !FC
     832    !FC
    833833    !
    834834    ifl_pbltree = 0
    835835    CALL getin_p('ifl_pbltree',ifl_pbltree)
    836 !FC
     836    !FC
    837837    !
    838838    Cd_frein = 7.5E-02
    839839    CALL getin_p('Cd_frein',Cd_frein)
    840 !AM
     840    !AM
    841841    !
    842842    iflag_hetero_surf = 0
     
    10901090
    10911091
    1092       ! PARAMETERS FOR SNOW AND ICE MELTING
     1092    ! PARAMETERS FOR SNOW AND ICE MELTING
    10931093    chasno_tun=0.15
    10941094    CALL getin_p('chasno_tun',chasno_tun)
     
    11261126    !              .TRUE. if backward compatibility is needed.
    11271127    !  and lighter monthly climoz files, inetrpolated in time at gcm run time.
    1128    
     1128
    11291129    ok_new_lscp = .FALSE.
    11301130    CALL getin_p('ok_new_lscp', ok_new_lscp)
     
    11741174    read_fco2_ocean_cor_2d=.FALSE.
    11751175    CALL getin_p('read_fco2_ocean_cor_2d',read_fco2_ocean_cor_2d)
    1176    
     1176
    11771177    read_fco2_land_cor_2d=.FALSE.
    11781178    CALL getin_p('read_fco2_land_cor_2d',read_fco2_land_cor_2d)
     
    12081208    END IF
    12091209
    1210    
     1210
    12111211    dms_cycle_cpl=.FALSE.
    12121212    CALL getin_p('transm_dms_oa',dms_cycle_cpl)
     
    12171217    CALL getin_p('transm_n2o_oa',n2o_cycle_cpl)
    12181218    !
    1219    
     1219
    12201220    ndp_cycle_cpl=.FALSE.
    12211221    CALL getin_p('transm_ndp_ao',ndp_cycle_cpl)
    12221222    !
    12231223
    1224    
     1224
    12251225    nh3_cycle_cpl=.FALSE.
    12261226    CALL getin_p('transm_nh3_oa',nh3_cycle_cpl)
     
    12381238
    12391239
    1240 !FC
    1241 !AM
     1240    !FC
     1241    !AM
    12421242
    12431243
     
    12751275    !--test on radiative scheme
    12761276    IF (iflag_rrtm .EQ. 0) THEN
    1277       IF (NSW.NE.2) THEN
    1278         WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=0 and NSW<>2 not possible'
    1279         CALL abort_physic('conf_phys','choice NSW not valid',1)
    1280       ENDIF
     1277       IF (NSW.NE.2) THEN
     1278          WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=0 and NSW<>2 not possible'
     1279          CALL abort_physic('conf_phys','choice NSW not valid',1)
     1280       ENDIF
    12811281    ELSE IF (iflag_rrtm .EQ. 1) THEN
    1282       IF (NSW.NE.2.AND.NSW.NE.4.AND.NSW.NE.6) THEN
    1283         WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'
    1284         CALL abort_physic('conf_phys','choice NSW not valid',1)
    1285       ENDIF
    1286    ELSE IF (iflag_rrtm .EQ. 2) THEN
    1287       IF (NSW.NE.2.AND.NSW.NE.4.AND.NSW.NE.6) THEN
    1288         WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'
    1289         CALL abort_physic('conf_phys','choice NSW not valid',1)
    1290       ENDIF
     1282       IF (NSW.NE.2.AND.NSW.NE.4.AND.NSW.NE.6) THEN
     1283          WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'
     1284          CALL abort_physic('conf_phys','choice NSW not valid',1)
     1285       ENDIF
     1286    ELSE IF (iflag_rrtm .EQ. 2) THEN
     1287       IF (NSW.NE.2.AND.NSW.NE.4.AND.NSW.NE.6) THEN
     1288          WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'
     1289          CALL abort_physic('conf_phys','choice NSW not valid',1)
     1290       ENDIF
    12911291    ELSE
    12921292       WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm<>0,1'
     
    12941294    ENDIF
    12951295    !--here we test that solaire has not been changed if ok_suntime_rrtm is activated
    1296 !       WRITE(lunout,*) 'conf_phys :  ERROR ok_suntime_rrtm=y and solaire is provided in def file'
    1297 !       CALL abort_physic('conf_phys','ok_suntime_rrtm=y and solaire is provided',1)
    1298 !    ENDIF
    1299 IF (CPPKEY_STRATAER) THEN
    1300     IF (iflag_rrtm .NE. 1) THEN
    1301        WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm<>1 but StratAer activated'
    1302        CALL abort_physic('conf_phys','iflag_rrtm not valid for StratAer',1)
    1303     ENDIF
    1304     IF (NSW .NE. 6) THEN
    1305        WRITE(lunout,*) 'conf_phys :  ERROR NSW<>6 but StratAer activated'
    1306        CALL abort_physic('conf_phys','NSW not valid for StratAer',1)
    1307     ENDIF
    1308 END IF
     1296    !       WRITE(lunout,*) 'conf_phys :  ERROR ok_suntime_rrtm=y and solaire is provided in def file'
     1297    !       CALL abort_physic('conf_phys','ok_suntime_rrtm=y and solaire is provided',1)
     1298    !    ENDIF
     1299    IF (CPPKEY_STRATAER) THEN
     1300       IF (iflag_rrtm .NE. 1) THEN
     1301          WRITE(lunout,*) 'conf_phys :  ERROR iflag_rrtm<>1 but StratAer activated'
     1302          CALL abort_physic('conf_phys','iflag_rrtm not valid for StratAer',1)
     1303       ENDIF
     1304       IF (NSW .NE. 6) THEN
     1305          WRITE(lunout,*) 'conf_phys :  ERROR NSW<>6 but StratAer activated'
     1306          CALL abort_physic('conf_phys','NSW not valid for StratAer',1)
     1307       ENDIF
     1308    END IF
    13091309
    13101310    !--test on ocean surface albedo
     
    13631363    IF (flag_volc_surfstrat.LT.0.OR.flag_volc_surfstrat.GT.2) THEN
    13641364       CALL abort_physic('conf_phys', 'flag_volc_surfstrat can only be 0 1 or 2',1)
    1365     ENDIF 
     1365    ENDIF
    13661366    IF ((.NOT.ok_volcan.OR..NOT.ok_ade.OR..NOT.ok_aie).AND.flag_volc_surfstrat.GT.0) THEN
    13671367       CALL abort_physic('conf_phys', 'ok_ade, ok_aie, ok_volcan need to be activated if flag_volc_surfstrat is 1 or 2',1)
    1368     ENDIF 
     1368    ENDIF
    13691369
    13701370    ! Test on carbon cycle
     
    13761376    ENDIF
    13771377
    1378 ! << PC
     1378    ! << PC
    13791379    ! Consistency checks for CO2 driving philosophy
    13801380    ! If CO2 is concentration-driven for the surface components, the radiation
     
    13851385       WRITE(lunout,*) 'CO2 concentration-driven: radiation uses prescribed co2_ppm: atmospheric tracer is diagnostic only.'
    13861386    ENDIF
    1387 ! >> PC
     1387    ! >> PC
    13881388
    13891389    ! Test on chemistry cycle
     
    13911391       CALL abort_physic('conf_phys', 'transm_dms_oa, transm_n2o_oa, transm_ndp_ao or transm_nh3_oa can be TRUE only with INCA coupling model',1)
    13921392    ENDIF
    1393    
     1393
    13941394    ! ORCHIDEE must be activated for ifl_pbltree=1
    13951395    IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN
     
    14911491    WRITE(lunout,*) 'conf_phys :  iflag_pbl = ', iflag_pbl
    14921492    WRITE(lunout,*) 'conf_phys :  iflag_physiq = ', iflag_physiq
    1493 !FC
     1493    !FC
    14941494    WRITE(lunout,*) 'conf_phys :  ifl_pbltree = ', ifl_pbltree
    14951495    WRITE(lunout,*) 'conf_phys :  Cd_frein = ', Cd_frein
    1496 !AM
     1496    !AM
    14971497    WRITE(lunout,*) 'conf_phys :  iflag_hetero_surf = ', iflag_hetero_surf
    14981498    WRITE(lunout,*) 'conf_phys :  iflag_pbl_split = ', iflag_pbl_split
     
    15891589    WRITE(lunout,*) 'conf_phys :  fseaN = ', fseaN
    15901590    WRITE(lunout,*) 'conf_phys :  fseaS = ', fseaS
    1591    
     1591
    15921592    WRITE(lunout,*) 'conf_phys :  n2o_cycle_cpl = ', n2o_cycle_cpl
    15931593    WRITE(lunout,*) 'conf_phys :  ndp_cycle_cpl = ', ndp_cycle_cpl
     
    16261626
    16271627SUBROUTINE conf_interface(tau_calv)
    1628  USE ioipsl_getin_p_mod, ONLY : getin_p
     1628  USE ioipsl_getin_p_mod, ONLY : getin_p
    16291629
    16301630  USE IOIPSL
Note: See TracChangeset for help on using the changeset viewer.