Changeset 1938


Ignore:
Timestamp:
Jan 20, 2014, 5:20:05 PM (10 years ago)
Author:
lguez
Message:

New run-time parameters: ok_gwd_rando, ruwmax and sat. Logical
variable ok_gwd_rando activates the new stochastic parameterization of
the drag of non-orographic gravity waves, by F. Lott. Default value of
ok_gwd_rando is false. A run with ok_gwd_rando creates new variables
in restartphy.nc: du_gwd_rando and dv_gwd_rando. Possible output in
history files of new variables du_gwd_rando, dv_gwd_rando and
vstr_gwd_rando.

Location:
LMDZ5/trunk/libf/phylmd
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/YOEGWD.h

    r1907 r1938  
    1313      real GFRCRIT,GKWAKE,GRCRIT,GVCRIT,GKDRAG,GKLIFT
    1414      real GHMAX,GRAHILO,GSIGCR,GSSEC,GTSEC,GVSEC
    15       COMMON/YOEGWD/ GFRCRIT,GKWAKE,GRCRIT,GVCRIT,GKDRAG,GKLIFT         &
    16      &        ,GHMAX,GRAHILO,GSIGCR,NKTOPG,NSTRA,GSSEC,GTSEC,GVSEC
     15
     16      REAL RUWMAX
     17!     Maximum Eliassen-Palm flux at launch level, in "FLOTT_GWD_rando"
     18
     19      REAL SAT ! saturation parameter in "FLOTT_GWD_rando"
     20!     S_c in equation (12) of Lott (JGR, vol 118, page 8897, 2013)
     21
     22
     23      COMMON/YOEGWD/ GFRCRIT,GKWAKE,GRCRIT,GVCRIT,GKDRAG,GKLIFT,        &
     24     &     GHMAX,GRAHILO,GSIGCR,NKTOPG,NSTRA,GSSEC,GTSEC,GVSEC,         &
     25     &     RUWMAX, sat
     26
     27      save /YOEGWD/
    1728!$OMP THREADPRIVATE(/YOEGWD/)
  • LMDZ5/trunk/libf/phylmd/clesphys.h

    r1907 r1938  
    6565       CHARACTER(len=4) type_run
    6666! aer_type: pour utiliser un fichier constant dans readaerosol
    67        CHARACTER*8 :: aer_type
     67       CHARACTER(len=8) :: aer_type
    6868       LOGICAL ok_regdyn
    6969       REAL lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
     
    7676       INTEGER :: ip_ebil_phy, iflag_rrtm, iflag_ice_thermo
    7777       LOGICAL :: ok_strato
    78        LOGICAL :: ok_hines
     78       LOGICAL :: ok_hines, ok_gwd_rando
    7979
    8080       COMMON/clesphys/cycle_diurne, soil_model, new_oliq,              &
     
    103103     &     , qsol0,albsno0,evap0                                        &
    104104     &     , iflag_rrtm, ok_strato,ok_hines,ecrit_LES                   &
    105      &     , co2_ppm0, iflag_ice_thermo
     105     &     , co2_ppm0, iflag_ice_thermo, ok_gwd_rando
    106106     
    107107       save /clesphys/
  • LMDZ5/trunk/libf/phylmd/conf_phys_m.F90

    r1913 r1938  
    66module conf_phys_m
    77
    8    implicit none
     8  implicit none
    99
    1010contains
    1111
    1212  subroutine conf_phys(ok_journe, ok_mensuel, ok_instan, ok_hf, &
    13                        ok_LES,&
    14                        callstats,&
    15                        solarlong0,seuil_inversion, &
    16                        fact_cldcon, facttemps,ok_newmicro,iflag_radia,&
    17                        iflag_cldcon, &
    18                        iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
    19                        ok_ade, ok_aie, ok_cdnc, aerosol_couple, &
    20                        flag_aerosol, flag_aerosol_strat, new_aod, &
    21                        bl95_b0, bl95_b1,&
    22                        read_climoz, &
    23                        alp_offset)
    24 
    25    use IOIPSL
    26    USE surface_data
    27    USE phys_cal_mod
    28    USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl
    29    use control_mod
    30 
    31  include "conema3.h"
    32  include "fisrtilp.h"
    33  include "nuage.h"
    34  include "YOMCST.h"
    35  include "YOMCST2.h"
    36 
    37  include "thermcell.h"
    38  include "iniprint.h"
    39 
    40 !IM : on inclut/initialise les taux de CH4, N2O, CFC11 et CFC12
    41 include "clesphys.h"
    42 include "compbl.h"
    43 include "comsoil.h"
    44 !
    45 ! Configuration de la "physique" de LMDZ a l'aide de la fonction
    46 ! GETIN de IOIPSL
    47 !
    48 ! LF 05/2001
    49 !
    50 
    51 !
    52 ! type_ocean:      type d'ocean (force, slab, couple)
    53 ! version_ocean:   version d'ocean (opa8/nemo pour type_ocean=couple ou
    54 !                                   sicOBS pour type_ocean=slab)
    55 ! ok_veget:   type de modele de vegetation
    56 ! ok_journe:  sorties journalieres
    57 ! ok_hf:  sorties haute frequence
    58 ! ok_mensuel: sorties mensuelles
    59 ! ok_instan:  sorties instantanees
    60 ! ok_ade, ok_aie: apply or not aerosol direct and indirect effects
    61 ! ok_cdnc, ok cloud droplet number concentration
    62 ! flag_aerosol_strat : flag pour les aerosols stratos
    63 ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc
    64 !
    65 
    66 
    67 ! Sortie:
    68   logical              :: ok_newmicro
    69   integer              :: iflag_radia
    70   logical              :: ok_journe, ok_mensuel, ok_instan, ok_hf
    71   logical              :: ok_LES
    72   LOGICAL              :: callstats
    73   LOGICAL              :: ok_ade, ok_aie, ok_cdnc, aerosol_couple
    74   INTEGER              :: flag_aerosol
    75   LOGICAL              :: flag_aerosol_strat
    76   LOGICAL              :: new_aod
    77   REAL                 :: bl95_b0, bl95_b1
    78   real                 :: fact_cldcon, facttemps,ratqsbas,ratqshaut,tau_ratqs
    79   integer              :: iflag_cldcon
    80   integer              :: iflag_ratqs
    81 
    82   character (len = 6),SAVE  :: type_ocean_omp, version_ocean_omp, ocean_omp
    83   character (len = 10),SAVE  :: type_veget_omp
    84   CHARACTER(len = 8),SAVE   :: aer_type_omp
    85   logical,SAVE              :: ok_snow_omp
    86   logical,SAVE              :: ok_newmicro_omp
    87   logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
    88   logical,SAVE        :: ok_LES_omp   
    89   LOGICAL,SAVE        :: callstats_omp
    90   LOGICAL,SAVE        :: ok_ade_omp, ok_aie_omp, ok_cdnc_omp, aerosol_couple_omp
    91   INTEGER, SAVE       :: flag_aerosol_omp
    92   LOGICAL, SAVE       :: flag_aerosol_strat_omp
    93   LOGICAL, SAVE       :: new_aod_omp
    94   REAL,SAVE           :: bl95_b0_omp, bl95_b1_omp
    95   REAL,SAVE           :: freq_ISCCP_omp, ecrit_ISCCP_omp
    96   REAL,SAVE           :: freq_COSP_omp
    97   real,SAVE           :: fact_cldcon_omp, facttemps_omp,ratqsbas_omp
    98   real,SAVE           :: ratqshaut_omp
    99   real,SAVE           :: tau_ratqs_omp
    100   integer,SAVE        :: iflag_radia_omp
    101   integer,SAVE        :: iflag_rrtm_omp
    102   integer,SAVE        :: iflag_cldcon_omp, ip_ebil_phy_omp
    103   integer,SAVE        :: iflag_ratqs_omp
    104 
    105   Real,SAVE           :: f_cdrag_ter_omp,f_cdrag_oce_omp
    106   Real,SAVE           :: f_rugoro_omp   
    107 
    108 ! Local
    109   real                 :: zzz
    110 
    111   real :: seuil_inversion
    112   real,save :: seuil_inversion_omp
    113 
    114   integer,SAVE :: iflag_thermals_ed_omp,iflag_thermals_optflux_omp
    115   integer,SAVE :: iflag_thermals_omp,nsplit_thermals_omp
    116   real,save :: tau_thermals_omp,alp_bl_k_omp
    117 !!! nrlmd le 10/04/2012
    118   integer,SAVE :: iflag_trig_bl_omp,iflag_clos_bl_omp
    119   integer,SAVE :: tau_trig_shallow_omp,tau_trig_deep_omp
    120   real,SAVE    :: s_trig_omp
    121 !!! fin nrlmd le 10/04/2012
    122   real :: alp_offset
    123   REAL, SAVE :: alp_offset_omp
    124   integer,SAVE :: iflag_coupl_omp,iflag_clos_omp,iflag_wake_omp
    125   integer,SAVE :: iflag_cvl_sigd_omp
    126   REAL, SAVE :: supcrit1_omp, supcrit2_omp
    127   INTEGER, SAVE :: iflag_mix_omp
    128   real, save :: scut_omp, qqa1_omp, qqa2_omp, gammas_omp, Fmax_omp, alphas_omp
    129 
    130   REAL,SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp
    131   REAL,SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp
    132   REAL,SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp
    133   REAL,SAVE :: N2O_ppb_omp, RN2O_omp, N2O_ppb_per_omp, RN2O_per_omp
    134   REAL,SAVE :: CFC11_ppt_omp,RCFC11_omp,CFC11_ppt_per_omp,RCFC11_per_omp
    135   REAL,SAVE :: CFC12_ppt_omp,RCFC12_omp,CFC12_ppt_per_omp,RCFC12_per_omp
    136   LOGICAL,SAVE :: ok_4xCO2atm_omp
    137   REAL,SAVE :: epmax_omp
    138   LOGICAL,SAVE :: ok_adj_ema_omp
    139   INTEGER,SAVE :: iflag_clw_omp
    140   REAL,SAVE :: cld_lc_lsc_omp,cld_lc_con_omp,cld_tau_lsc_omp,cld_tau_con_omp
    141   REAL,SAVE :: ffallv_lsc_omp, ffallv_con_omp,coef_eva_omp
    142   LOGICAL,SAVE :: reevap_ice_omp
    143   INTEGER,SAVE :: iflag_pdf_omp
    144   INTEGER,SAVE :: iflag_ice_thermo_omp
    145   REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp
    146   REAL,SAVE :: t_glace_min_omp, t_glace_max_omp
    147   REAL,SAVE :: rei_min_omp, rei_max_omp
    148   REAL,SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_ice_omp
    149   REAL,SAVE :: qsol0_omp
    150   REAL,SAVE :: evap0_omp
    151   REAL,SAVE :: albsno0_omp
    152   REAL      :: solarlong0
    153   REAL,SAVE :: solarlong0_omp
    154   INTEGER,SAVE :: top_height_omp,overlap_omp
    155   REAL,SAVE :: cdmmax_omp,cdhmax_omp,ksta_omp,ksta_ter_omp
    156   LOGICAL,SAVE :: ok_kzmin_omp
    157   REAL, SAVE ::  fmagic_omp, pmagic_omp
    158   INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
    159   Integer, save :: lev_histins_omp, lev_histLES_omp
    160   INTEGER, SAVE :: lev_histdayNMC_omp
    161   INTEGER, SAVE :: levout_histNMC_omp(3)
    162   LOGICAL, SAVE :: ok_histNMC_omp(3)
    163   REAL, SAVE :: freq_outNMC_omp(3), freq_calNMC_omp(3)
    164   CHARACTER*4, SAVE :: type_run_omp
    165   LOGICAL,SAVE :: ok_cosp_omp
    166   LOGICAL,SAVE :: ok_mensuelCOSP_omp,ok_journeCOSP_omp,ok_hfCOSP_omp
    167   REAL,SAVE :: lonmin_ins_omp, lonmax_ins_omp, latmin_ins_omp, latmax_ins_omp
    168   REAL,SAVE :: ecrit_hf_omp, ecrit_day_omp, ecrit_mth_omp, ecrit_reg_omp
    169   REAL,SAVE :: ecrit_ins_omp
    170   REAL,SAVE :: ecrit_LES_omp
    171   REAL,SAVE :: ecrit_tra_omp
    172   REAL,SAVE :: cvl_corr_omp
    173   LOGICAL,SAVE :: ok_lic_melt_omp
    174 !
    175   LOGICAL,SAVE :: cycle_diurne_omp,soil_model_omp,new_oliq_omp
    176   LOGICAL,SAVE :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp
    177   INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp
    178   INTEGER, SAVE :: iflag_ener_conserv_omp
    179   INTEGER, SAVE :: iflag_fisrtilp_qsat_omp
    180   LOGICAL,SAVE :: ok_strato_omp
    181   LOGICAL,SAVE :: ok_hines_omp
    182   LOGICAL,SAVE      :: carbon_cycle_tr_omp
    183   LOGICAL,SAVE      :: carbon_cycle_cpl_omp
    184 
    185   integer, intent(out):: read_climoz ! read ozone climatology, OpenMP shared
    186   ! Allowed values are 0, 1 and 2
    187   ! 0: do not read an ozone climatology
    188   ! 1: read a single ozone climatology that will be used day and night
    189   ! 2: read two ozone climatologies, the average day and night
    190   ! climatology and the daylight climatology
    191 
    192 !$OMP MASTER
    193 !Config Key  = type_ocean
    194 !Config Desc = Type d'ocean
    195 !Config Def  = force
    196 !Config Help = Type d'ocean utilise: force, slab,couple
    197 !
    198   type_ocean_omp = 'force '
    199   call getin('type_ocean', type_ocean_omp)
    200 !
    201 !Config Key  = version_ocean
    202 !Config Desc = Version d'ocean
    203 !Config Def  = xxxxxx
    204 !Config Help = Version d'ocean utilise: opa8/nemo/sicOBS/xxxxxx
    205 !
    206   version_ocean_omp = 'xxxxxx'
    207   call getin('version_ocean', version_ocean_omp)
    208 
    209 !Config Key  = OCEAN
    210 !Config Desc = Old parameter name for type_ocean
    211 !Config Def  = yyyyyy
    212 !Config Help = This is only for testing purpose
    213 !
    214   ocean_omp = 'yyyyyy'
    215   call getin('OCEAN', ocean_omp)
    216   IF (ocean_omp /= 'yyyyyy') THEN
    217      WRITE(lunout,*)'ERROR!! Old variable name OCEAN used in parmeter file.'
    218      WRITE(lunout,*)'Variable OCEAN has been replaced by the variable type_ocean.'
    219      WRITE(lunout,*)'You have to update your parameter file physiq.def to succed running'
    220      CALL abort_gcm('conf_phys','Variable OCEAN no longer existing, use variable name type_ocean',1)
    221   END IF
    222 
    223 !
    224 !Config Key  = VEGET
    225 !Config Desc = Type de modele de vegetation
    226 !Config Def  = .false.
    227 !Config Help = Type de modele de vegetation utilise
    228 !
    229   type_veget_omp ='orchidee'
    230   call getin('VEGET', type_veget_omp)
    231 !
    232 
    233 ! Martin
    234 !Config Key  = ok_snow
    235 !Config Desc = Flag to activate snow model SISVAT
    236 !Config Def  = .false.
    237   ok_snow_omp = .false.
    238   call getin('ok_snow', ok_snow_omp)
    239 ! Martin
    240 
    241 !Config Key  = OK_journe
    242 !Config Desc = Pour des sorties journalieres
    243 !Config Def  = .false.
    244 !Config Help = Pour creer le fichier histday contenant les sorties
    245 !              journalieres
    246 !
    247   ok_journe_omp = .false.
    248   call getin('OK_journe', ok_journe_omp)
    249 !
    250 !Config Key  = ok_hf
    251 !Config Desc = Pour des sorties haute frequence
    252 !Config Def  = .false.
    253 !Config Help = Pour creer le fichier histhf contenant les sorties
    254 !              haute frequence ( 3h ou 6h)
    255 !
    256   ok_hf_omp = .false.
    257   call getin('ok_hf', ok_hf_omp)
    258 !
    259 !Config Key  = OK_mensuel
    260 !Config Desc = Pour des sorties mensuelles
    261 !Config Def  = .true.
    262 !Config Help = Pour creer le fichier histmth contenant les sorties
    263 !              mensuelles
    264 !
    265   ok_mensuel_omp = .true.
    266   call getin('OK_mensuel', ok_mensuel_omp)
    267 !
    268 !Config Key  = OK_instan
    269 !Config Desc = Pour des sorties instantanees
    270 !Config Def  = .false.
    271 !Config Help = Pour creer le fichier histins contenant les sorties
    272 !              instantanees
    273 !
    274   ok_instan_omp = .false.
    275   call getin('OK_instan', ok_instan_omp)
    276 !
    277 !Config Key  = ok_ade
    278 !Config Desc = Aerosol direct effect or not?
    279 !Config Def  = .false.
    280 !Config Help = Used in radlwsw.F
    281 !
    282   ok_ade_omp = .false.
    283   call getin('ok_ade', ok_ade_omp)
    284 
    285 !
    286 !Config Key  = ok_aie
    287 !Config Desc = Aerosol indirect effect or not?
    288 !Config Def  = .false.
    289 !Config Help = Used in nuage.F and radlwsw.F
    290 !
    291   ok_aie_omp = .false.
    292   call getin('ok_aie', ok_aie_omp)
    293 
    294 !
    295 !Config Key  = ok_cdnc
    296 !Config Desc = ok cloud droplet number concentration
    297 !Config Def  = .false.
    298 !Config Help = Used in newmicro.F
    299 !
    300   ok_cdnc_omp = .false.
    301   call getin('ok_cdnc', ok_cdnc_omp)
    302 !
    303 !Config Key  = aerosol_couple
    304 !Config Desc = read aerosol in file or calcul by inca
    305 !Config Def  = .false.
    306 !Config Help = Used in physiq.F
    307 !
    308   aerosol_couple_omp = .false.
    309   CALL getin('aerosol_couple',aerosol_couple_omp)
    310 !
    311 !Config Key  = flag_aerosol
    312 !Config Desc = which aerosol is use for coupled model
    313 !Config Def  = 1
    314 !Config Help = Used in physiq.F
    315 !
    316 ! - flag_aerosol=0 => no aerosol
    317 ! - flag_aerosol=1 => so4 only (defaut)
    318 ! - flag_aerosol=2 => bc  only
    319 ! - flag_aerosol=3 => pom only
    320 ! - flag_aerosol=4 => seasalt only
    321 ! - flag_aerosol=5 => dust only
    322 ! - flag_aerosol=6 => all aerosol
    323 
    324   flag_aerosol_omp = 0
    325   CALL getin('flag_aerosol',flag_aerosol_omp)
    326 !
    327 !Config Key  = flag_aerosol_strat
    328 !Config Desc = use stratospheric aerosols T/F
    329 !Config Def  = false
    330 !Config Help = Used in physiq.F
    331 !
    332 !
    333   flag_aerosol_strat_omp = .false.
    334   CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp)
    335 
    336 ! Temporary variable for testing purpose!!
    337 !Config Key  = new_aod
    338 !Config Desc = which calcul of aeropt
    339 !Config Def  = false
    340 !Config Help = Used in physiq.F
    341 !
    342   new_aod_omp = .true.
    343   CALL getin('new_aod',new_aod_omp)
    344 
    345 !
    346 !Config Key  = aer_type
    347 !Config Desc = Use a constant field for the aerosols
    348 !Config Def  = scenario
    349 !Config Help = Used in readaerosol.F90
    350 !
    351   aer_type_omp = 'scenario'
    352   call getin('aer_type', aer_type_omp)
    353 
    354 !
    355 !Config Key  = bl95_b0
    356 !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
    357 !Config Def  = .false.
    358 !Config Help = Used in nuage.F
    359 !
    360   bl95_b0_omp = 2.
    361   call getin('bl95_b0', bl95_b0_omp)
    362 
    363 !Config Key  = bl95_b1
    364 !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
    365 !Config Def  = .false.
    366 !Config Help = Used in nuage.F
    367 !
    368   bl95_b1_omp = 0.2
    369   call getin('bl95_b1', bl95_b1_omp)
    370 
    371 !Config Key  = freq_ISCCP
    372 !Config Desc = Frequence d'appel du simulateur ISCCP en secondes;
    373 !              par defaut 10800, i.e. 3 heures
    374 !Config Def  = 10800.
    375 !Config Help = Used in ini_histISCCP.h
    376 !
    377   freq_ISCCP_omp = 10800.
    378   call getin('freq_ISCCP', freq_ISCCP_omp)
    379 !
    380 !Config Key  = ecrit_ISCCP
    381 !Config Desc = Frequence d'ecriture des resultats du simulateur ISCCP en nombre de jours;
    382 !              par defaut 1., i.e. 1 jour
    383 !Config Def  = 1.
    384 !Config Help = Used in ini_histISCCP.h
    385 !
    386 !
    387   ecrit_ISCCP_omp = 1.
    388   call getin('ecrit_ISCCP', ecrit_ISCCP_omp)
    389 
    390 !Config Key  = freq_COSP
    391 !Config Desc = Frequence d'appel du simulateur COSP en secondes;
    392 !              par defaut 10800, i.e. 3 heures
    393 !Config Def  = 10800.
    394 !Config Help = Used in ini_histdayCOSP.h
    395 !
    396   freq_COSP_omp = 10800.
    397   call getin('freq_COSP', freq_COSP_omp)
    398 
    399 !
    400 !Config Key  = ip_ebil_phy
    401 !Config Desc = Niveau de sortie pour les diags bilan d'energie
    402 !Config Def  = 0
    403 !Config Help =
    404 !               
    405   ip_ebil_phy_omp = 0
    406   call getin('ip_ebil_phy', ip_ebil_phy_omp)
    407 !
    408 !Config Key  = seuil_inversion
    409 !Config Desc = Seuil ur dTh pour le choix entre les schemas de CL
    410 !Config Def  = -0.1
    411 !Config Help =
    412 !               
    413   seuil_inversion_omp = -0.1
    414   call getin('seuil_inversion', seuil_inversion_omp)
    415 
    416 !!
    417 !! Constante solaire & Parametres orbitaux & taux gaz effet de serre BEG
    418 !!
    419 !Config Key  = R_ecc
    420 !Config Desc = Excentricite
    421 !Config Def  = 0.016715
    422 !Config Help =
    423 !               
    424 !valeur AMIP II
    425   R_ecc_omp = 0.016715
    426   call getin('R_ecc', R_ecc_omp)
    427 !!
    428 !Config Key  = R_peri
    429 !Config Desc = Equinoxe
    430 !Config Def  =
    431 !Config Help =
    432 !               
    433 !
    434 !valeur AMIP II
    435   R_peri_omp = 102.7
    436   call getin('R_peri', R_peri_omp)
    437 !!
    438 !Config Key  = R_incl
    439 !Config Desc = Inclinaison
    440 !Config Def  =
    441 !Config Help =
    442 !               
    443 !
    444 !valeur AMIP II
    445   R_incl_omp = 23.441
    446   call getin('R_incl', R_incl_omp)
    447 !!
    448 !Config Key  = solaire
    449 !Config Desc = Constante solaire en W/m2
    450 !Config Def  = 1365.
    451 !Config Help =
    452 !               
    453 !
    454 !valeur AMIP II
    455   solaire_omp = 1365.
    456   call getin('solaire', solaire_omp)
    457 !!
    458 !Config Key  = co2_ppm
    459 !Config Desc = concentration du gaz carbonique en ppmv
    460 !Config Def  = 348.
    461 !Config Help =
    462 !               
    463 !
    464 !valeur AMIP II
    465   co2_ppm_omp = 348.
    466   call getin('co2_ppm', co2_ppm_omp)
    467 !!
    468 !Config Key  = RCO2
    469 !Config Desc = Concentration du CO2
    470 !Config Def  = co2_ppm * 1.0e-06  * 44.011/28.97
    471 !Config Def  = 348. * 1.0e-06  * 44.011/28.97
    472 !Config Help =
    473 !               
    474 ! RCO2 = 5.286789092164308E-04
    475 !ancienne valeur
    476   RCO2_omp = co2_ppm_omp * 1.0e-06  * 44.011/28.97 ! pour co2_ppm=348.
    477 
    478 !!  call getin('RCO2', RCO2)
    479 !!
    480 !Config Key  = RCH4
    481 !Config Desc = Concentration du CH4
    482 !Config Def  = 1.65E-06* 16.043/28.97
    483 !Config Help =
    484 !               
    485 !
    486 !valeur AMIP II
    487 !OK  RCH4 = 1.65E-06* 16.043/28.97
    488 ! RCH4 = 9.137366240938903E-07
    489 !
    490 !ancienne valeur
    491 ! RCH4 = 1.72E-06* 16.043/28.97
    492 !OK call getin('RCH4', RCH4)
    493   zzz = 1650.
    494   call getin('CH4_ppb', zzz)
    495   CH4_ppb_omp = zzz
    496   RCH4_omp = CH4_ppb_omp * 1.0E-09 * 16.043/28.97
    497 !!
    498 !Config Key  = RN2O
    499 !Config Desc = Concentration du N2O
    500 !Config Def  = 306.E-09* 44.013/28.97
    501 !Config Help =
    502 !               
    503 !
    504 !valeur AMIP II
    505 !OK  RN2O = 306.E-09* 44.013/28.97
    506 ! RN2O = 4.648939592682085E-07
    507 !
    508 !ancienne valeur
    509 ! RN2O = 310.E-09* 44.013/28.97
    510 !OK  call getin('RN2O', RN2O)
    511   zzz=306.
    512   call getin('N2O_ppb', zzz)
    513   N2O_ppb_omp = zzz
    514   RN2O_omp = N2O_ppb_omp * 1.0E-09 * 44.013/28.97
    515 !!
    516 !Config Key  = RCFC11
    517 !Config Desc = Concentration du CFC11
    518 !Config Def  = 280.E-12* 137.3686/28.97
    519 !Config Help =
    520 !               
    521 !
    522 !OK RCFC11 = 280.E-12* 137.3686/28.97
    523   zzz = 280.
    524   call getin('CFC11_ppt',zzz)
    525   CFC11_ppt_omp = zzz
    526   RCFC11_omp=CFC11_ppt_omp* 1.0E-12 * 137.3686/28.97
    527 ! RCFC11 = 1.327690990680013E-09
    528 !OK call getin('RCFC11', RCFC11)
    529 !!
    530 !Config Key  = RCFC12
    531 !Config Desc = Concentration du CFC12
    532 !Config Def  = 484.E-12* 120.9140/28.97
    533 !Config Help =
    534 !               
    535 !
    536 !OK RCFC12 = 484.E-12* 120.9140/28.97
    537   zzz = 484.
    538   call getin('CFC12_ppt',zzz)
    539   CFC12_ppt_omp = zzz
    540   RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * 120.9140/28.97
    541 ! RCFC12 = 2.020102726958923E-09
    542 !OK call getin('RCFC12', RCFC12)
    543 
    544 !ajout CFMIP begin
    545 !!
    546 !Config Key  = co2_ppm_per
    547 !Config Desc = concentration du co2_ppm_per
    548 !Config Def  = 348.
    549 !Config Help =
    550 !               
    551   co2_ppm_per_omp = co2_ppm_omp
    552   call getin('co2_ppm_per', co2_ppm_per_omp)
    553 !!
    554 !Config Key  = RCO2_per
    555 !Config Desc = Concentration du CO2_per
    556 !Config Def  = co2_ppm_per * 1.0e-06  * 44.011/28.97
    557 !Config Def  = 348. * 1.0e-06  * 44.011/28.97
    558 !Config Help =
    559 !               
    560   RCO2_per_omp = co2_ppm_per_omp * 1.0e-06  * 44.011/28.97
    561 
    562 !Config Key  = ok_4xCO2atm
    563 !Config Desc = Calcul ou non effet radiatif 4xco2
    564 !Config Def  = .false.
    565 !Config Help =
    566 
    567   ok_4xCO2atm_omp = .false.
    568   call getin('ok_4xCO2atm',ok_4xCO2atm_omp)
    569 
    570 !Config Key  = RCH4_per
    571 !Config Desc = Concentration du CH4_per
    572 !Config Def  = 1.65E-06* 16.043/28.97
    573 !Config Help =
    574 !               
    575   zzz = CH4_ppb_omp
    576   call getin('CH4_ppb_per', zzz)
    577   CH4_ppb_per_omp = zzz
    578   RCH4_per_omp = CH4_ppb_per_omp * 1.0E-09 * 16.043/28.97
    579 !!
    580 !Config Key  = RN2O_per
    581 !Config Desc = Concentration du N2O_per
    582 !Config Def  = 306.E-09* 44.013/28.97
    583 !Config Help =
    584 !               
    585   zzz = N2O_ppb_omp
    586   call getin('N2O_ppb_per', zzz)
    587   N2O_ppb_per_omp = zzz
    588   RN2O_per_omp = N2O_ppb_per_omp * 1.0E-09 * 44.013/28.97
    589 !!
    590 !Config Key  = RCFC11_per
    591 !Config Desc = Concentration du CFC11_per
    592 !Config Def  = 280.E-12* 137.3686/28.97
    593 !Config Help =
    594 !               
    595   zzz = CFC11_ppt_omp
    596   call getin('CFC11_ppt_per',zzz)
    597   CFC11_ppt_per_omp = zzz
    598   RCFC11_per_omp=CFC11_ppt_per_omp* 1.0E-12 * 137.3686/28.97
    599 !!
    600 !Config Key  = RCFC12_per
    601 !Config Desc = Concentration du CFC12_per
    602 !Config Def  = 484.E-12* 120.9140/28.97
    603 !Config Help =
    604 !               
    605   zzz = CFC12_ppt_omp
    606   call getin('CFC12_ppt_per',zzz)
    607   CFC12_ppt_per_omp = zzz
    608   RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * 120.9140/28.97
    609 !ajout CFMIP end
    610 
    611 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    612 ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
    613 ! Constantes precedemment dans dyn3d/conf_gcm
    614 
    615 !Config  Key  = cycle_diurne
    616 !Config  Desc = Cycle ddiurne
    617 !Config  Def  = y
    618 !Config  Help = Cette option permet d'eteidre le cycle diurne.
    619 !Config         Peut etre util pour accelerer le code !
    620        cycle_diurne_omp = .TRUE.
    621        CALL getin('cycle_diurne',cycle_diurne_omp)
    622 
    623 !Config  Key  = soil_model
    624 !Config  Desc = Modele de sol
    625 !Config  Def  = y
    626 !Config  Help = Choix du modele de sol (Thermique ?)
    627 !Config         Option qui pourait un string afin de pouvoir
    628 !Config         plus de choix ! Ou meme une liste d'options !
    629        soil_model_omp = .TRUE.
    630        CALL getin('soil_model',soil_model_omp)
    631 
    632 !Config  Key  = new_oliq
    633 !Config  Desc = Nouvelle eau liquide
    634 !Config  Def  = y
    635 !Config  Help = Permet de mettre en route la
    636 !Config         nouvelle parametrisation de l'eau liquide !
    637        new_oliq_omp = .TRUE.
    638        CALL getin('new_oliq',new_oliq_omp)
    639 
    640 !Config  Key  = ok_orodr
    641 !Config  Desc = Orodr ???
    642 !Config  Def  = y
    643 !Config  Help = Y en a pas comprendre !
    644 !Config         
    645        ok_orodr_omp = .TRUE.
    646        CALL getin('ok_orodr',ok_orodr_omp)
    647 
    648 !Config  Key  =  ok_orolf
    649 !Config  Desc = Orolf ??
    650 !Config  Def  = y
    651 !Config  Help = Connais pas !
    652        ok_orolf_omp = .TRUE.
    653        CALL getin('ok_orolf', ok_orolf_omp)
    654 
    655 !Config  Key  = ok_limitvrai
    656 !Config  Desc = Force la lecture de la bonne annee
    657 !Config  Def  = n
    658 !Config  Help = On peut forcer le modele a lire le
    659 !Config         fichier SST de la bonne annee. C'est une tres bonne
    660 !Config         idee, pourquoi ne pas mettre toujours a y ???
    661        ok_limitvrai_omp = .FALSE.
    662        CALL getin('ok_limitvrai',ok_limitvrai_omp)
    663 
    664 !Config  Key  = nbapp_rad
    665 !Config  Desc = Frequence d'appel au rayonnement
    666 !Config  Def  = 12
    667 !Config  Help = Nombre  d'appels des routines de rayonnements
    668 !Config         par jour.
    669        nbapp_rad_omp = 12
    670        CALL getin('nbapp_rad',nbapp_rad_omp)
    671 
    672 !Config  Key  = iflag_con
    673 !Config  Desc = Flag de convection
    674 !Config  Def  = 2
    675 !Config  Help = Flag  pour la convection les options suivantes existent :
    676 !Config         1 pour LMD,
    677 !Config         2 pour Tiedtke,
    678 !Config         3 pour CCM(NCAR) 
    679        iflag_con_omp = 2
    680        CALL getin('iflag_con',iflag_con_omp)
    681 
    682 !Config  Key  = iflag_ener_conserv
    683 !Config  Desc = Flag de convection
    684 !Config  Def  = 1
    685 !Config  Help = Flag  pour la convection les options suivantes existent :
    686 !Config         -1 pour Kinetic energy correction
    687 !Config         1  conservation kinetic and enthalpy
    688        iflag_ener_conserv_omp = -1
    689        CALL getin('iflag_ener_conserv',iflag_ener_conserv_omp)
    690 
    691 !Config  Key  = iflag_fisrtilp_qsat
    692 !Config  Desc = Flag de convection
    693 !Config  Def  = 1
    694 !Config  Help = Flag  pour la convection les options suivantes existent :
    695 !Config         -1 pour Kinetic energy correction
    696 !Config         1  conservation kinetic and enthalpy
    697        iflag_fisrtilp_qsat_omp = 0
    698        CALL getin('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat_omp)
    699 
    700 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    701 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    702 !!
    703 !! Constante solaire & Parametres orbitaux & taux gaz effet de serre END
    704 !!
    705 !! KE
    706 !
    707 
    708 !Config key  = cvl_corr
    709 !Config Desc = Facteur multiplication des precip convectives dans KE
    710 !Config Def  = 1.00
    711 !Config Help = 1.02 pour un moderne ou un pre-ind. A ajuster pour un glaciaire
    712   cvl_corr_omp = 1.00
    713   CALL getin('cvl_corr', cvl_corr_omp)
    714 
    715 
    716 !Config Key  = epmax
    717 !Config Desc = Efficacite precip
    718 !Config Def  = 0.993
    719 !Config Help =
    720 !
    721   epmax_omp = .993
    722   call getin('epmax', epmax_omp)
    723 !
    724 !Config Key  = ok_adj_ema
    725 !Config Desc = 
    726 !Config Def  = false
    727 !Config Help =
    728 !
    729   ok_adj_ema_omp = .false.
    730   call getin('ok_adj_ema',ok_adj_ema_omp)
    731 !
    732 !Config Key  = iflag_clw
    733 !Config Desc = 
    734 !Config Def  = 0
    735 !Config Help =
    736 !
    737   iflag_clw_omp = 0
    738   call getin('iflag_clw',iflag_clw_omp)
    739 !
    740 !Config Key  = cld_lc_lsc
    741 !Config Desc = 
    742 !Config Def  = 2.6e-4
    743 !Config Help =
    744 !
    745   cld_lc_lsc_omp = 2.6e-4
    746   call getin('cld_lc_lsc',cld_lc_lsc_omp)
    747 !
    748 !Config Key  = cld_lc_con
    749 !Config Desc = 
    750 !Config Def  = 2.6e-4
    751 !Config Help =
    752 !
    753   cld_lc_con_omp = 2.6e-4
    754   call getin('cld_lc_con',cld_lc_con_omp)
    755 !
    756 !Config Key  = cld_tau_lsc
    757 !Config Desc = 
    758 !Config Def  = 3600.
    759 !Config Help =
    760 !
    761   cld_tau_lsc_omp = 3600.
    762   call getin('cld_tau_lsc',cld_tau_lsc_omp)
    763 !
    764 !Config Key  = cld_tau_con
    765 !Config Desc = 
    766 !Config Def  = 3600.
    767 !Config Help =
    768 !
    769   cld_tau_con_omp = 3600.
    770   call getin('cld_tau_con',cld_tau_con_omp)
    771 !
    772 !Config Key  = ffallv_lsc
    773 !Config Desc = 
    774 !Config Def  = 1.
    775 !Config Help =
    776 !
    777   ffallv_lsc_omp = 1.
    778   call getin('ffallv_lsc',ffallv_lsc_omp)
    779 !
    780 !Config Key  = ffallv_con
    781 !Config Desc = 
    782 !Config Def  = 1.
    783 !Config Help =
    784 !
    785   ffallv_con_omp = 1.
    786   call getin('ffallv_con',ffallv_con_omp)
    787 !
    788 !Config Key  = coef_eva
    789 !Config Desc = 
    790 !Config Def  = 2.e-5
    791 !Config Help =
    792 !
    793   coef_eva_omp = 2.e-5
    794   call getin('coef_eva',coef_eva_omp)
    795 !
    796 !Config Key  = reevap_ice
    797 !Config Desc = 
    798 !Config Def  = .false.
    799 !Config Help =
    800 !
    801   reevap_ice_omp = .false.
    802   call getin('reevap_ice',reevap_ice_omp)
    803 
    804 !Config Key  = iflag_ratqs
    805 !Config Desc =
    806 !Config Def  = 1
    807 !Config Help =
    808 !
    809   iflag_ratqs_omp = 1
    810   call getin('iflag_ratqs',iflag_ratqs_omp)
    811 
    812 !
    813 !Config Key  = iflag_radia
    814 !Config Desc = 
    815 !Config Def  = 1
    816 !Config Help =
    817 !
    818   iflag_radia_omp = 1
    819   call getin('iflag_radia',iflag_radia_omp)
    820 
    821 !
    822 !Config Key  = iflag_rrtm
    823 !Config Desc = 
    824 !Config Def  = 0
    825 !Config Help =
    826 !
    827   iflag_rrtm_omp = 0
    828   call getin('iflag_rrtm',iflag_rrtm_omp)
    829 
    830 !
    831 !Config Key  = iflag_cldcon
    832 !Config Desc = 
    833 !Config Def  = 1
    834 !Config Help =
    835 !
    836   iflag_cldcon_omp = 1
    837   call getin('iflag_cldcon',iflag_cldcon_omp)
    838 
    839 !
    840 !Config Key  = iflag_pdf
    841 !Config Desc = 
    842 !Config Def  = 0
    843 !Config Help =
    844 !
    845   iflag_pdf_omp = 0
    846   call getin('iflag_pdf',iflag_pdf_omp)
    847 !
    848 !Config Key  = fact_cldcon
    849 !Config Desc = 
    850 !Config Def  = 0.375
    851 !Config Help =
    852 !
    853   fact_cldcon_omp = 0.375
    854   call getin('fact_cldcon',fact_cldcon_omp)
    855 
    856 !
    857 !Config Key  = facttemps
    858 !Config Desc = 
    859 !Config Def  = 1.e-4
    860 !Config Help =
    861 !
    862   facttemps_omp = 1.e-4
    863   call getin('facttemps',facttemps_omp)
    864 
    865 !
    866 !Config Key  = ok_newmicro
    867 !Config Desc = 
    868 !Config Def  = .true.
    869 !Config Help =
    870 !
    871   ok_newmicro_omp = .true.
    872   call getin('ok_newmicro',ok_newmicro_omp)
    873 !
    874 !Config Key  = ratqsbas
    875 !Config Desc = 
    876 !Config Def  = 0.01
    877 !Config Help =
    878 !
    879   ratqsbas_omp = 0.01
    880   call getin('ratqsbas',ratqsbas_omp)
    881 !
    882 !Config Key  = ratqshaut
    883 !Config Desc = 
    884 !Config Def  = 0.3
    885 !Config Help =
    886 !
    887   ratqshaut_omp = 0.3
    888   call getin('ratqshaut',ratqshaut_omp)
    889 
    890 !Config Key  = tau_ratqs
    891 !Config Desc = 
    892 !Config Def  = 1800.
    893 !Config Help =
    894 !
    895   tau_ratqs_omp = 1800.
    896   call getin('tau_ratqs',tau_ratqs_omp)
    897 
    898 !
    899 !-----------------------------------------------------------------------
    900 ! Longitude solaire pour le calcul de l'ensoleillement en degre
    901 ! si on veut imposer la saison. Sinon, solarlong0=-999.999
    902 !Config Key  = solarlong0
    903 !Config Desc = 
    904 !Config Def  = -999.999
    905 !Config Help =
    906 !
    907   solarlong0_omp = -999.999
    908   call getin('solarlong0',solarlong0_omp)
    909 !
    910 !-----------------------------------------------------------------------
    911 !  Valeur imposee pour configuration idealisees
    912 !Config Key  = qsol0 pour le bucket, evap0 pour aquaplanetes, albsno0
    913 ! Default value -1 to activate the full computation
    914   qsol0_omp = -1.
    915   call getin('qsol0',qsol0_omp)
    916   evap0_omp = -1.
    917   call getin('evap0',evap0_omp)
    918   albsno0_omp = -1.
    919   call getin('albsno0',albsno0_omp)
    920 !
    921 !-----------------------------------------------------------------------
    922 !
    923 !Config Key  = inertie_ice
    924 !Config Desc = 
    925 !Config Def  = 2000.
    926 !Config Help =
    927 !
    928   inertie_ice_omp = 2000.
    929   call getin('inertie_ice',inertie_ice_omp)
    930 !
    931 !Config Key  = inertie_sno
    932 !Config Desc = 
    933 !Config Def  = 2000.
    934 !Config Help =
    935 !
    936   inertie_sno_omp = 2000.
    937   call getin('inertie_sno',inertie_sno_omp)
    938 !
    939 !Config Key  = inertie_sol
    940 !Config Desc = 
    941 !Config Def  = 2000.
    942 !Config Help =
    943 !
    944   inertie_sol_omp = 2000.
    945   call getin('inertie_sol',inertie_sol_omp)
    946 
    947 !
    948 !Config Key  = rad_froid
    949 !Config Desc = 
    950 !Config Def  = 35.0
    951 !Config Help =
    952 !
    953   rad_froid_omp = 35.0
    954   call getin('rad_froid',rad_froid_omp)
    955 
    956 !
    957 !Config Key  = rad_chau1
    958 !Config Desc = 
    959 !Config Def  = 13.0
    960 !Config Help =
    961 !
    962   rad_chau1_omp = 13.0
    963   call getin('rad_chau1',rad_chau1_omp)
    964 
    965 !
    966 !Config Key  = rad_chau2
    967 !Config Desc = 
    968 !Config Def  = 9.0
    969 !Config Help =
    970 !
    971   rad_chau2_omp = 9.0
    972   call getin('rad_chau2',rad_chau2_omp)
    973 
    974 !
    975 !Config Key  = t_glace_min
    976 !Config Desc = 
    977 !Config Def  = 258.
    978 !Config Help =
    979 !
    980   t_glace_min_omp = 258.
    981   call getin('t_glace_min',t_glace_min_omp)
    982 
    983 !
    984 !Config Key  = t_glace_max
    985 !Config Desc = 
    986 !Config Def  = 273.13
    987 !Config Help =
    988 !
    989   t_glace_max_omp = 273.13
    990   call getin('t_glace_max',t_glace_max_omp)
    991 
    992 !
    993 !Config Key  = iflag_ice_thermo
    994 !Config Desc = 
    995 !Config Def  = 0
    996 !Config Help =
    997 !
    998   iflag_ice_thermo_omp = 0
    999   call getin('iflag_ice_thermo',iflag_ice_thermo_omp)
    1000 
    1001 !Config Key  = rei_min
    1002 !Config Desc = 
    1003 !Config Def  = 3.5
    1004 !Config Help =
    1005 !
    1006   rei_min_omp = 3.5
    1007   call getin('rei_min',rei_min_omp)
    1008 
    1009 !
    1010 !Config Key  = rei_max
    1011 !Config Desc = 
    1012 !Config Def  = 61.29
    1013 !Config Help =
    1014 !
    1015   rei_max_omp = 61.29
    1016   call getin('rei_max',rei_max_omp)
    1017 
    1018 !
    1019 !Config Key  = top_height
    1020 !Config Desc =
    1021 !Config Def  = 3
    1022 !Config Help =
    1023 !
    1024   top_height_omp = 3
    1025   call getin('top_height',top_height_omp)
    1026 
    1027 !
    1028 !Config Key  = overlap
    1029 !Config Desc =
    1030 !Config Def  = 3
    1031 !Config Help =
    1032 !
    1033   overlap_omp = 3
    1034   call getin('overlap',overlap_omp)
    1035 
    1036 
    1037 !
    1038 !
    1039 !Config Key  = cdmmax
    1040 !Config Desc =
    1041 !Config Def  = 1.3E-3
    1042 !Config Help =
    1043 !
    1044   cdmmax_omp = 1.3E-3
    1045   call getin('cdmmax',cdmmax_omp)
    1046 
    1047 !
    1048 !Config Key  = cdhmax
    1049 !Config Desc =
    1050 !Config Def  = 1.1E-3
    1051 !Config Help =
    1052 !
    1053   cdhmax_omp = 1.1E-3
    1054   call getin('cdhmax',cdhmax_omp)
    1055 
    1056 !261103
    1057 !
    1058 !Config Key  = ksta
    1059 !Config Desc =
    1060 !Config Def  = 1.0e-10
    1061 !Config Help =
    1062 !
    1063   ksta_omp = 1.0e-10
    1064   call getin('ksta',ksta_omp)
    1065 
    1066 !
    1067 !Config Key  = ksta_ter
    1068 !Config Desc =
    1069 !Config Def  = 1.0e-10
    1070 !Config Help =
    1071 !
    1072   ksta_ter_omp = 1.0e-10
    1073   call getin('ksta_ter',ksta_ter_omp)
    1074 
    1075 !
    1076 !Config Key  = ok_kzmin
    1077 !Config Desc =
    1078 !Config Def  = .true.
    1079 !Config Help =
    1080 !
    1081   ok_kzmin_omp = .true.
    1082   call getin('ok_kzmin',ok_kzmin_omp)
    1083 
    1084 !
    1085 !Config Key  = fmagic
    1086 !Config Desc = additionnal multiplicator factor used for albedo
    1087 !Config Def  = 1.
    1088 !Config Help = additionnal multiplicator factor used in albedo.F
    1089 !
    1090   fmagic_omp = 1.
    1091   call getin('fmagic',fmagic_omp)
    1092 
    1093 !
    1094 !Config Key  = pmagic
    1095 !Config Desc = additional factor used for albedo
    1096 !Config Def  = 0.
    1097 !Config Help = additional factor used in albedo.F
    1098 !
    1099   pmagic_omp = 0.
    1100   call getin('pmagic',pmagic_omp)
    1101 
    1102 
    1103 !Config Key = ok_lic_melt
    1104 !Config Desc = Prise en compte de la fonte de la calotte dans le bilan d'eau
    1105 !Config Def  = .false.
    1106 !Config Help = mettre a .false. pour assurer la conservation en eau
    1107   ok_lic_melt_omp = .false.
    1108   call getin('ok_lic_melt', ok_lic_melt_omp)
    1109 
    1110 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1111 ! PARAMETER FOR THE PLANETARY BOUNDARY LAYER
    1112 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1113 
    1114 !Config Key  = iflag_pbl
    1115 !Config Desc =
    1116 !Config Def  = 1
    1117 !Config Help =
    1118 !
    1119   iflag_pbl_omp = 1
    1120   call getin('iflag_pbl',iflag_pbl_omp)
    1121 !
    1122 !Config Key  = iflag_thermals
    1123 !Config Desc =
    1124 !Config Def  = 0
    1125 !Config Help =
    1126 !
    1127   iflag_thermals_omp = 0
    1128   call getin('iflag_thermals',iflag_thermals_omp)
    1129 !
    1130 !
    1131 !Config Key  = iflag_thermals_ed
    1132 !Config Desc =
    1133 !Config Def  = 0
    1134 !Config Help =
    1135 !
    1136   iflag_thermals_ed_omp = 0
    1137   call getin('iflag_thermals_ed',iflag_thermals_ed_omp)
    1138 !
    1139 !
    1140 !Config Key  = iflag_thermals_optflux
    1141 !Config Desc =
    1142 !Config Def  = 0
    1143 !Config Help =
    1144 !
    1145   iflag_thermals_optflux_omp = 0
    1146   call getin('iflag_thermals_optflux',iflag_thermals_optflux_omp)
    1147 !
    1148 !
    1149 !Config Key  = nsplit_thermals
    1150 !Config Desc =
    1151 !Config Def  = 1
    1152 !Config Help =
    1153 !
    1154   nsplit_thermals_omp = 1
    1155   call getin('nsplit_thermals',nsplit_thermals_omp)
    1156 
    1157 !Config Key  = alp_bl_k
    1158 !Config Desc =
    1159 !Config Def  = 0.
    1160 !Config Help =
    1161 !
    1162   alp_bl_k_omp = 1.
    1163   call getin('alp_bl_k',alp_bl_k_omp)
    1164 
    1165 !!! nrlmd le 10/04/2012
    1166 
    1167 !Config Key  = iflag_trig_bl
    1168 !Config Desc = 
    1169 !Config Def  = 0
    1170 !Config Help =
    1171 !
    1172   iflag_trig_bl_omp = 0
    1173   call getin('iflag_trig_bl',iflag_trig_bl_omp)
    1174 
    1175 !Config Key  = s_trig_bl
    1176 !Config Desc = 
    1177 !Config Def  = 0
    1178 !Config Help =
    1179 !
    1180   s_trig_omp = 2e7
    1181   call getin('s_trig',s_trig_omp)
    1182 
    1183 !Config Key  = tau_trig_shallow
    1184 !Config Desc = 
    1185 !Config Def  = 0
    1186 !Config Help =
    1187 !
    1188   tau_trig_shallow_omp = 600
    1189   call getin('tau_trig_shallow',tau_trig_shallow_omp)
    1190 
    1191 !Config Key  = tau_trig_deep
    1192 !Config Desc = 
    1193 !Config Def  = 0
    1194 !Config Help =
    1195 !
    1196   tau_trig_deep_omp = 1800
    1197   call getin('tau_trig_deep',tau_trig_deep_omp)
    1198 
    1199 !Config Key  = iflag_clos_bl
    1200 !Config Desc = 
    1201 !Config Def  = 0
    1202 !Config Help =
    1203 !
    1204   iflag_clos_bl_omp = 0
    1205   call getin('iflag_clos_bl',iflag_clos_bl_omp)
    1206 
    1207 !!! fin nrlmd le 10/04/2012
    1208 
    1209 !
    1210 !Config Key  = tau_thermals
    1211 !Config Desc =
    1212 !Config Def  = 0.
    1213 !Config Help =
    1214 !
    1215   tau_thermals_omp = 0.
    1216   call getin('tau_thermals',tau_thermals_omp)
    1217 
    1218 !
    1219 !Config Key  = iflag_coupl
    1220 !Config Desc =
    1221 !Config Def  = 0
    1222 !Config Help =
    1223 !
    1224   iflag_coupl_omp = 0
    1225   call getin('iflag_coupl',iflag_coupl_omp)
    1226 
    1227 !
    1228 !Config Key  = iflag_clos
    1229 !Config Desc = 
    1230 !Config Def  = 0
    1231 !Config Help =
    1232 !
    1233   iflag_clos_omp = 1
    1234   call getin('iflag_clos',iflag_clos_omp)
    1235 !
    1236 !Config Key  = iflag_cvl_sigd
    1237 !Config Desc = 
    1238 !Config Def  = 0
    1239 !Config Help =
    1240 !
    1241   iflag_cvl_sigd_omp = 0
    1242   call getin('iflag_cvl_sigd',iflag_cvl_sigd_omp)
    1243 
    1244 !Config Key  = iflag_wake
    1245 !Config Desc = 
    1246 !Config Def  = 0
    1247 !Config Help =
    1248 !
    1249   iflag_wake_omp = 0
    1250   call getin('iflag_wake',iflag_wake_omp)
    1251 
    1252 !Config Key  = alp_offset
    1253 !Config Desc = 
    1254 !Config Def  = 0
    1255 !Config Help =
    1256 !
    1257   alp_offset_omp = 0.
    1258   call getin('alp_offset',alp_offset_omp)
    1259 
    1260 !
    1261 !Config Key  = lev_histhf
    1262 !Config Desc =
    1263 !Config Def  = 1
    1264 !Config Help =
    1265 !
    1266   lev_histhf_omp = 1
    1267   call getin('lev_histhf',lev_histhf_omp)
    1268 
    1269 !
    1270 !Config Key  = lev_histday
    1271 !Config Desc =
    1272 !Config Def  = 1
    1273 !Config Help =
    1274 !
    1275   lev_histday_omp = 1
    1276   call getin('lev_histday',lev_histday_omp)
    1277 
    1278 !
    1279 !Config Key  = lev_histmth
    1280 !Config Desc =
    1281 !Config Def  = 2
    1282 !Config Help =
    1283 !
    1284   lev_histmth_omp = 2
    1285   call getin('lev_histmth',lev_histmth_omp)
    1286 !
    1287 !Config Key  = lev_histins
    1288 !Config Desc =
    1289 !Config Def  = 1
    1290 !Config Help =
    1291 !
    1292   lev_histins_omp = 1
    1293   call getin('lev_histins',lev_histins_omp)
    1294   !
    1295 !Config Key  = lev_histLES
    1296 !Config Desc =
    1297 !Config Def  = 1
    1298 !Config Help =
    1299 !
    1300   lev_histLES_omp = 1
    1301   call getin('lev_histLES',lev_histLES_omp)
    1302 !
    1303 !Config Key  = lev_histdayNMC
    1304 !Config Desc =
    1305 !Config Def  = 8
    1306 !Config Help =
    1307 !
    1308   lev_histdayNMC_omp = 8
    1309   call getin('lev_histdayNMC',lev_histdayNMC_omp)
    1310 !
    1311 !Config Key  = levout_histNMC
    1312 !Config Desc =
    1313 !Config Def  = 5
    1314 !Config Help =
    1315 !
    1316   levout_histNMC_omp(1) = 5
    1317   levout_histNMC_omp(2) = 5
    1318   levout_histNMC_omp(3) = 5
    1319   call getin('levout_histNMC',levout_histNMC_omp)
    1320 !
    1321 !histNMC BEG
    1322 !Config Key  = ok_histNMC
    1323 !Config Desc = ok_histNMC(1) = frequence de sortie fichiers histmthNMC
    1324 !Config Desc = ok_histNMC(2) = frequence de sortie fichiers histdayNMC
    1325 !Config Desc = ok_histNMC(3) = frequence de sortie fichiers histhfNMC
    1326 !Config Def  = n, n, n
    1327 !Config Help =
    1328 !
    1329   ok_histNMC_omp(1) = .false.
    1330   ok_histNMC_omp(2) = .false.
    1331   ok_histNMC_omp(3) = .false.
    1332   call getin('ok_histNMC',ok_histNMC_omp)
    1333 !
    1334 !Config Key  = freq_outNMC
    1335 !Config Desc = freq_outNMC(1) = frequence de sortie fichiers histmthNMC
    1336 !Config Desc = freq_outNMC(2) = frequence de sortie fichiers histdayNMC
    1337 !Config Desc = freq_outNMC(3) = frequence de sortie fichiers histhfNMC
    1338 !Config Def  = 2592000., 86400., 21600. (1mois, 1jour, 6h)
    1339 !Config Help =
    1340 !
    1341   freq_outNMC_omp(1) = mth_len
    1342   freq_outNMC_omp(2) = 1.
    1343   freq_outNMC_omp(3) = 1./4.
    1344   call getin('freq_outNMC',freq_outNMC_omp)
    1345 !
    1346 !Config Key  = freq_calNMC
    1347 !Config Desc = freq_calNMC(1) = frequence de calcul fichiers histmthNMC
    1348 !Config Desc = freq_calNMC(2) = frequence de calcul fichiers histdayNMC
    1349 !Config Desc = freq_calNMC(3) = frequence de calcul fichiers histhfNMC
    1350 !Config Def  = pasphys
    1351 !Config Help =
    1352 !
    1353   freq_calNMC_omp(1) = pasphys
    1354   freq_calNMC_omp(2) = pasphys
    1355   freq_calNMC_omp(3) = pasphys
    1356   call getin('freq_calNMC',freq_calNMC_omp)
    1357 !
    1358 !Config Key  = type_run
    1359 !Config Desc =
    1360 !Config Def  = 'AMIP'/'CFMIP'  ou 'CLIM'/'ENSP'
    1361 !Config Help =
    1362 !
    1363   type_run_omp = 'AMIP'
    1364   call getin('type_run',type_run_omp)
    1365 
    1366 !
    1367 !Config Key  = ok_cosp
    1368 !Config Desc =
    1369 !Config Def  = .false.
    1370 !Config Help =
    1371 !
    1372   ok_cosp_omp = .false.
    1373   call getin('ok_cosp',ok_cosp_omp)
    1374 
    1375 !
    1376 !Config Key  = ok_mensuelCOSP
    1377 !Config Desc =
    1378 !Config Def  = .true.
    1379 !Config Help =
    1380 !
    1381   ok_mensuelCOSP_omp = .true.
    1382   call getin('ok_mensuelCOSP',ok_mensuelCOSP_omp)
    1383 
    1384 !
    1385 !Config Key  = ok_journeCOSP
    1386 !Config Desc =
    1387 !Config Def  = .true.
    1388 !Config Help =
    1389 !
    1390   ok_journeCOSP_omp = .true.
    1391   call getin('ok_journeCOSP',ok_journeCOSP_omp)
    1392 
    1393 !
    1394 !Config Key  = ok_hfCOSP
    1395 !Config Desc =
    1396 !Config Def  = .false.
    1397 !Config Help =
    1398 !
    1399   ok_hfCOSP_omp = .false.
    1400   call getin('ok_hfCOSP',ok_hfCOSP_omp)
    1401 
    1402 !
    1403 ! coordonnees (lonmin_ins, lonmax_ins, latmin_ins, latmax_ins) pour la zone
    1404 ! avec sorties instantannees tous les pas de temps de la physique => "histbilKP_ins.nc"
    1405 !
    1406 !Config Key  = lonmin_ins
    1407 !Config Desc = 100. 
    1408 !Config Def  = longitude minimale sorties "bilKP_ins"
    1409 !Config Help =
    1410 !
    1411    lonmin_ins_omp = 100.
    1412    call getin('lonmin_ins',lonmin_ins_omp)
    1413 !
    1414 !Config Key  = lonmax_ins
    1415 !Config Desc = 130.
    1416 !Config Def  = longitude maximale sorties "bilKP_ins"
    1417 !Config Help =
    1418 !
    1419    lonmax_ins_omp = 130.
    1420    call getin('lonmax_ins',lonmax_ins_omp)
    1421 !
    1422 !Config Key  = latmin_ins
    1423 !Config Desc = -20. 
    1424 !Config Def  = latitude minimale sorties "bilKP_ins"
    1425 !Config Help =
    1426 !
    1427    latmin_ins_omp = -20.
    1428    call getin('latmin_ins',latmin_ins_omp)
    1429 !
    1430 !Config Key  = latmax_ins
    1431 !Config Desc = 20.
    1432 !Config Def  = latitude maximale sorties "bilKP_ins"
    1433 !Config Help =
    1434 !
    1435    latmax_ins_omp = 20.
    1436    call getin('latmax_ins',latmax_ins_omp)
    1437 !
    1438 !Config Key  = ecrit_hf
    1439 !Config Desc =
    1440 !Config Def  = 1./8. !toutes les 3h
    1441 !Config Help =
    1442 !
    1443   ecrit_hf_omp = 1./8.
    1444   call getin('ecrit_hf',ecrit_hf_omp)
    1445 !
    1446 !Config Key  = ecrit_ins
    1447 !Config Desc =
    1448 !Config Def  = 1./48. ! toutes les 1/2 h
    1449 !Config Help =
    1450 !
    1451   ecrit_ins_omp = 1./48.
    1452   call getin('ecrit_ins',ecrit_ins_omp)
    1453 !
    1454 !Config Key  = ecrit_day
    1455 !Config Desc =
    1456 !Config Def  = 1.0 !tous les jours
    1457 !Config Help = nombre de jours pour ecriture fichier histday.nc
    1458 !
    1459   ecrit_day_omp = 1.0
    1460   call getin('ecrit_day',ecrit_day_omp)
    1461 !
    1462 !Config Key  = ecrit_mth
    1463 !Config Desc =
    1464 !Config Def  = 30. !tous les 30jours (1 fois par mois)
    1465 !Config Help =
    1466 !
    1467   ecrit_mth_omp = 30.
    1468   call getin('ecrit_mth',ecrit_mth_omp)
    1469 !
    1470 !Config Key  = ecrit_tra
    1471 !Config Desc =
    1472 !Config Def  = 30. !tous les 30jours (1 fois par mois)
    1473 !Config Help =
    1474 !
    1475   ecrit_tra_omp = 0.
    1476   call getin('ecrit_tra',ecrit_tra_omp)
    1477 !
    1478 !Config Key  = ecrit_reg
    1479 !Config Desc =
    1480 !Config Def  = 0.25  !4 fois par jour
    1481 !Config Help =
    1482 !
    1483   ecrit_reg_omp = 0.25   !4 fois par jour
    1484   call getin('ecrit_reg',ecrit_reg_omp)
    1485 !
    1486 !
    1487 !
    1488 ! PARAMETRES CDRAG
    1489 !
    1490 !Config Key  = f_cdrag_ter
    1491 !Config Desc =
    1492 !Config Def  = 0.8
    1493 !Config Help =
    1494 !
    1495   f_cdrag_ter_omp = 0.8
    1496   call getin('f_cdrag_ter',f_cdrag_ter_omp)
    1497 !
    1498 !Config Key  = f_cdrag_oce
    1499 !Config Desc =
    1500 !Config Def  = 0.8
    1501 !Config Help =
    1502 !
    1503   f_cdrag_oce_omp = 0.8
    1504   call getin('f_cdrag_oce',f_cdrag_oce_omp)
    1505 !
    1506 ! RUGORO
    1507 !Config Key  = f_rugoro
    1508 !Config Desc =
    1509 !Config Def  = 0.
    1510 !Config Help =
    1511 !
    1512   f_rugoro_omp = 0.
    1513   call getin('f_rugoro',f_rugoro_omp)
    1514 
    1515 ! PARAMETERS FOR CONVECTIVE INHIBITION BY TROPOS. DRYNESS
    1516 !
    1517 !Config Key  = supcrit1
    1518 !Config Desc =
    1519 !Config Def  = .540
    1520 !Config Help =
    1521 !
    1522   supcrit1_omp = .540
    1523   call getin('supcrit1',supcrit1_omp)
    1524 
    1525 !
    1526 !Config Key  = supcrit2
    1527 !Config Desc =
    1528 !Config Def  = .600
    1529 !Config Help =
    1530 !
    1531   supcrit2_omp = .600
    1532   call getin('supcrit2',supcrit2_omp)
    1533 
    1534 !
    1535 ! PARAMETERS FOR THE MIXING DISTRIBUTION
    1536 ! iflag_mix: 0=OLD,
    1537 !            1=NEW (JYG),           
    1538 !            2=NEW + conv. depth inhib. by tropos. dryness
    1539 ! '2' is NOT operationnal and should not be used.
    1540 !
    1541 !Config Key  = iflag_mix
    1542 !Config Desc =
    1543 !Config Def  = 1
    1544 !Config Help =
    1545 !
    1546   iflag_mix_omp = 1
    1547   call getin('iflag_mix',iflag_mix_omp)
    1548 
    1549 !
    1550 !Config Key  = scut
    1551 !Config Desc =
    1552 !Config Def  = 0.95
    1553 !Config Help =
    1554 !
    1555   scut_omp = 0.95
    1556   call getin('scut',scut_omp)
    1557 
    1558 !
    1559 !Config Key  = qqa1
    1560 !Config Desc =
    1561 !Config Def  = 1.0
    1562 !Config Help =
    1563 !
    1564   qqa1_omp = 1.0
    1565   call getin('qqa1',qqa1_omp)
    1566 
    1567 !
    1568 !Config Key  = qqa2
    1569 !Config Desc =
    1570 !Config Def  = 0.0
    1571 !Config Help =
    1572 !
    1573   qqa2_omp = 0.0
    1574   call getin('qqa2',qqa2_omp)
    1575 
    1576 !
    1577 !Config Key  = gammas
    1578 !Config Desc =
    1579 !Config Def  = 0.05
    1580 !Config Help =
    1581 !
    1582   gammas_omp = 0.05
    1583   call getin('gammas',gammas_omp)
    1584 
    1585 !
    1586 !Config Key  = Fmax
    1587 !Config Desc =
    1588 !Config Def  = 0.65
    1589 !Config Help =
    1590 !
    1591   Fmax_omp = 0.65
    1592   call getin('Fmax',Fmax_omp)
    1593 
    1594 !
    1595 !Config Key  = alphas 
    1596 !Config Desc =
    1597 !Config Def  = -5.
    1598 !Config Help =
    1599 !
    1600   alphas_omp = -5.
    1601   call getin('alphas',alphas_omp)
    1602 
    1603 !Config key = ok_strato
    1604 !Config  Desc = activation de la version strato
    1605 !Config  Def  = .FALSE.
    1606 !Config  Help = active la version stratosphérique de LMDZ de F. Lott
    1607 
    1608   ok_strato_omp=.FALSE.
    1609   CALL getin('ok_strato',ok_strato_omp)
    1610      
    1611 !Config  key = ok_hines
    1612 !Config  Desc = activation de la parametrisation de hines
    1613 !Config  Def  = .FALSE.
    1614 !Config  Help = Clefs controlant la parametrization de Hines
    1615 !               Et la sponge layer (Runs Stratospheriques)
    1616 
    1617   ok_hines_omp=.FALSE.
    1618   CALL getin('ok_hines',ok_hines_omp)
    1619 
    1620 !Config Key  = OK_LES                                               
    1621 !Config Desc = Pour des sorties LES                                 
    1622 !Config Def  = .false.                                             
    1623 !Config Help = Pour creer le fichier histLES contenant les sorties 
    1624 !              LES                                                 
    1625 !                                                                   
    1626   ok_LES_omp = .false.                                             
    1627   call getin('OK_LES', ok_LES_omp)                                 
    1628 
    1629 !Config Key  = callstats                                               
    1630 !Config Desc = Pour des sorties callstats                                 
    1631 !Config Def  = .false.                                             
    1632 !Config Help = Pour creer le fichier stats contenant les sorties 
    1633 !              stats                                                 
    1634 !                                                                   
    1635   callstats_omp = .false.                                             
    1636   call getin('callstats', callstats_omp)                                 
    1637 !
    1638 !Config Key  = ecrit_LES
    1639 !Config Desc = Frequence d'ecriture des resultats du LES en nombre de jours;
    1640 !              par defaut 1., i.e. 1 jour
    1641 !Config Def  = 1./8.
    1642 !Config Help = ...
    1643 !
    1644 !
    1645   ecrit_LES_omp = 1./8.
    1646   call getin('ecrit_LES', ecrit_LES_omp)
    1647 !
    1648   read_climoz = 0 ! default value
    1649   call getin('read_climoz', read_climoz)
    1650 
    1651   carbon_cycle_tr_omp=.FALSE.
    1652   CALL getin('carbon_cycle_tr',carbon_cycle_tr_omp)
    1653 
    1654   carbon_cycle_cpl_omp=.FALSE.
    1655   CALL getin('carbon_cycle_cpl',carbon_cycle_cpl_omp)
    1656 
    1657 !$OMP END MASTER
    1658 !$OMP BARRIER
     13       ok_LES,&
     14       callstats,&
     15       solarlong0,seuil_inversion, &
     16       fact_cldcon, facttemps,ok_newmicro,iflag_radia,&
     17       iflag_cldcon, &
     18       iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
     19       ok_ade, ok_aie, ok_cdnc, aerosol_couple, &
     20       flag_aerosol, flag_aerosol_strat, new_aod, &
     21       bl95_b0, bl95_b1,&
     22       read_climoz, &
     23       alp_offset)
     24
     25    use IOIPSL
     26    USE surface_data
     27    USE phys_cal_mod
     28    USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl
     29    use control_mod
     30
     31    include "conema3.h"
     32    include "fisrtilp.h"
     33    include "nuage.h"
     34    include "YOMCST.h"
     35    include "YOMCST2.h"
     36
     37    include "thermcell.h"
     38    include "iniprint.h"
     39
     40    !IM : on inclut/initialise les taux de CH4, N2O, CFC11 et CFC12
     41    include "clesphys.h"
     42    include "compbl.h"
     43    include "comsoil.h"
     44    include "YOEGWD.h"
     45    !
     46    ! Configuration de la "physique" de LMDZ a l'aide de la fonction
     47    ! GETIN de IOIPSL
     48    !
     49    ! LF 05/2001
     50    !
     51
     52    !
     53    ! type_ocean:      type d'ocean (force, slab, couple)
     54    ! version_ocean:   version d'ocean (opa8/nemo pour type_ocean=couple ou
     55    !                                   sicOBS pour type_ocean=slab)
     56    ! ok_veget:   type de modele de vegetation
     57    ! ok_journe:  sorties journalieres
     58    ! ok_hf:  sorties haute frequence
     59    ! ok_mensuel: sorties mensuelles
     60    ! ok_instan:  sorties instantanees
     61    ! ok_ade, ok_aie: apply or not aerosol direct and indirect effects
     62    ! ok_cdnc, ok cloud droplet number concentration
     63    ! flag_aerosol_strat : flag pour les aerosols stratos
     64    ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc
     65    !
     66
     67
     68    ! Sortie:
     69    logical              :: ok_newmicro
     70    integer              :: iflag_radia
     71    logical              :: ok_journe, ok_mensuel, ok_instan, ok_hf
     72    logical              :: ok_LES
     73    LOGICAL              :: callstats
     74    LOGICAL              :: ok_ade, ok_aie, ok_cdnc, aerosol_couple
     75    INTEGER              :: flag_aerosol
     76    LOGICAL              :: flag_aerosol_strat
     77    LOGICAL              :: new_aod
     78    REAL                 :: bl95_b0, bl95_b1
     79    real                 :: fact_cldcon, facttemps,ratqsbas,ratqshaut,tau_ratqs
     80    integer              :: iflag_cldcon
     81    integer              :: iflag_ratqs
     82
     83    character (len = 6),SAVE  :: type_ocean_omp, version_ocean_omp, ocean_omp
     84    character (len = 10),SAVE  :: type_veget_omp
     85    CHARACTER(len = 8),SAVE   :: aer_type_omp
     86    logical,SAVE              :: ok_snow_omp
     87    logical,SAVE              :: ok_newmicro_omp
     88    logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
     89    logical,SAVE        :: ok_LES_omp   
     90    LOGICAL,SAVE        :: callstats_omp
     91    LOGICAL,SAVE        :: ok_ade_omp, ok_aie_omp, ok_cdnc_omp, aerosol_couple_omp
     92    INTEGER, SAVE       :: flag_aerosol_omp
     93    LOGICAL, SAVE       :: flag_aerosol_strat_omp
     94    LOGICAL, SAVE       :: new_aod_omp
     95    REAL,SAVE           :: bl95_b0_omp, bl95_b1_omp
     96    REAL,SAVE           :: freq_ISCCP_omp, ecrit_ISCCP_omp
     97    REAL,SAVE           :: freq_COSP_omp
     98    real,SAVE           :: fact_cldcon_omp, facttemps_omp,ratqsbas_omp
     99    real,SAVE           :: ratqshaut_omp
     100    real,SAVE           :: tau_ratqs_omp
     101    integer,SAVE        :: iflag_radia_omp
     102    integer,SAVE        :: iflag_rrtm_omp
     103    integer,SAVE        :: iflag_cldcon_omp, ip_ebil_phy_omp
     104    integer,SAVE        :: iflag_ratqs_omp
     105
     106    Real,SAVE           :: f_cdrag_ter_omp,f_cdrag_oce_omp
     107    Real,SAVE           :: f_rugoro_omp   
     108
     109    ! Local
     110    real                 :: zzz
     111
     112    real :: seuil_inversion
     113    real,save :: seuil_inversion_omp
     114
     115    integer,SAVE :: iflag_thermals_ed_omp,iflag_thermals_optflux_omp
     116    integer,SAVE :: iflag_thermals_omp,nsplit_thermals_omp
     117    real,save :: tau_thermals_omp,alp_bl_k_omp
     118    ! nrlmd le 10/04/2012
     119    integer,SAVE :: iflag_trig_bl_omp,iflag_clos_bl_omp
     120    integer,SAVE :: tau_trig_shallow_omp,tau_trig_deep_omp
     121    real,SAVE    :: s_trig_omp
     122    ! fin nrlmd le 10/04/2012
     123    real :: alp_offset
     124    REAL, SAVE :: alp_offset_omp
     125    integer,SAVE :: iflag_coupl_omp,iflag_clos_omp,iflag_wake_omp
     126    integer,SAVE :: iflag_cvl_sigd_omp
     127    REAL, SAVE :: supcrit1_omp, supcrit2_omp
     128    INTEGER, SAVE :: iflag_mix_omp
     129    real, save :: scut_omp, qqa1_omp, qqa2_omp, gammas_omp, Fmax_omp, alphas_omp
     130
     131    REAL,SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp
     132    REAL,SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp
     133    REAL,SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp
     134    REAL,SAVE :: N2O_ppb_omp, RN2O_omp, N2O_ppb_per_omp, RN2O_per_omp
     135    REAL,SAVE :: CFC11_ppt_omp,RCFC11_omp,CFC11_ppt_per_omp,RCFC11_per_omp
     136    REAL,SAVE :: CFC12_ppt_omp,RCFC12_omp,CFC12_ppt_per_omp,RCFC12_per_omp
     137    LOGICAL,SAVE :: ok_4xCO2atm_omp
     138    REAL,SAVE :: epmax_omp
     139    LOGICAL,SAVE :: ok_adj_ema_omp
     140    INTEGER,SAVE :: iflag_clw_omp
     141    REAL,SAVE :: cld_lc_lsc_omp,cld_lc_con_omp,cld_tau_lsc_omp,cld_tau_con_omp
     142    REAL,SAVE :: ffallv_lsc_omp, ffallv_con_omp,coef_eva_omp
     143    LOGICAL,SAVE :: reevap_ice_omp
     144    INTEGER,SAVE :: iflag_pdf_omp
     145    INTEGER,SAVE :: iflag_ice_thermo_omp
     146    REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp
     147    REAL,SAVE :: t_glace_min_omp, t_glace_max_omp
     148    REAL,SAVE :: rei_min_omp, rei_max_omp
     149    REAL,SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_ice_omp
     150    REAL,SAVE :: qsol0_omp
     151    REAL,SAVE :: evap0_omp
     152    REAL,SAVE :: albsno0_omp
     153    REAL      :: solarlong0
     154    REAL,SAVE :: solarlong0_omp
     155    INTEGER,SAVE :: top_height_omp,overlap_omp
     156    REAL,SAVE :: cdmmax_omp,cdhmax_omp,ksta_omp,ksta_ter_omp
     157    LOGICAL,SAVE :: ok_kzmin_omp
     158    REAL, SAVE ::  fmagic_omp, pmagic_omp
     159    INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
     160    Integer, save :: lev_histins_omp, lev_histLES_omp
     161    INTEGER, SAVE :: lev_histdayNMC_omp
     162    INTEGER, SAVE :: levout_histNMC_omp(3)
     163    LOGICAL, SAVE :: ok_histNMC_omp(3)
     164    REAL, SAVE :: freq_outNMC_omp(3), freq_calNMC_omp(3)
     165    CHARACTER*4, SAVE :: type_run_omp
     166    LOGICAL,SAVE :: ok_cosp_omp
     167    LOGICAL,SAVE :: ok_mensuelCOSP_omp,ok_journeCOSP_omp,ok_hfCOSP_omp
     168    REAL,SAVE :: lonmin_ins_omp, lonmax_ins_omp, latmin_ins_omp, latmax_ins_omp
     169    REAL,SAVE :: ecrit_hf_omp, ecrit_day_omp, ecrit_mth_omp, ecrit_reg_omp
     170    REAL,SAVE :: ecrit_ins_omp
     171    REAL,SAVE :: ecrit_LES_omp
     172    REAL,SAVE :: ecrit_tra_omp
     173    REAL,SAVE :: cvl_corr_omp
     174    LOGICAL,SAVE :: ok_lic_melt_omp
     175    !
     176    LOGICAL,SAVE :: cycle_diurne_omp,soil_model_omp,new_oliq_omp
     177    LOGICAL,SAVE :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp
     178    INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp
     179    INTEGER, SAVE :: iflag_ener_conserv_omp
     180    INTEGER, SAVE :: iflag_fisrtilp_qsat_omp
     181    LOGICAL,SAVE :: ok_strato_omp
     182    LOGICAL,SAVE :: ok_hines_omp, ok_gwd_rando_omp
     183    real, SAVE:: RUWMAX_omp, sat_omp
     184    LOGICAL,SAVE      :: carbon_cycle_tr_omp
     185    LOGICAL,SAVE      :: carbon_cycle_cpl_omp
     186
     187    integer, intent(out):: read_climoz ! read ozone climatology, OpenMP shared
     188    ! Allowed values are 0, 1 and 2
     189    ! 0: do not read an ozone climatology
     190    ! 1: read a single ozone climatology that will be used day and night
     191    ! 2: read two ozone climatologies, the average day and night
     192    ! climatology and the daylight climatology
     193
     194    !-----------------------------------------------------------------
     195
     196    !$OMP MASTER
     197    !Config Key  = type_ocean
     198    !Config Desc = Type d'ocean
     199    !Config Def  = force
     200    !Config Help = Type d'ocean utilise: force, slab,couple
     201    !
     202    type_ocean_omp = 'force '
     203    call getin('type_ocean', type_ocean_omp)
     204    !
     205    !Config Key  = version_ocean
     206    !Config Desc = Version d'ocean
     207    !Config Def  = xxxxxx
     208    !Config Help = Version d'ocean utilise: opa8/nemo/sicOBS/xxxxxx
     209    !
     210    version_ocean_omp = 'xxxxxx'
     211    call getin('version_ocean', version_ocean_omp)
     212
     213    !Config Key  = OCEAN
     214    !Config Desc = Old parameter name for type_ocean
     215    !Config Def  = yyyyyy
     216    !Config Help = This is only for testing purpose
     217    !
     218    ocean_omp = 'yyyyyy'
     219    call getin('OCEAN', ocean_omp)
     220    IF (ocean_omp /= 'yyyyyy') THEN
     221       WRITE(lunout,*)'ERROR! Old variable name OCEAN used in parmeter file.'
     222       WRITE(lunout,*)'Variable OCEAN has been replaced by the variable type_ocean.'
     223       WRITE(lunout,*)'You have to update your parameter file physiq.def to succed running'
     224       CALL abort_gcm('conf_phys','Variable OCEAN no longer existing, use variable name type_ocean',1)
     225    END IF
     226
     227    !
     228    !Config Key  = VEGET
     229    !Config Desc = Type de modele de vegetation
     230    !Config Def  = .false.
     231    !Config Help = Type de modele de vegetation utilise
     232    !
     233    type_veget_omp ='orchidee'
     234    call getin('VEGET', type_veget_omp)
     235    !
     236
     237    ! Martin
     238    !Config Key  = ok_snow
     239    !Config Desc = Flag to activate snow model SISVAT
     240    !Config Def  = .false.
     241    ok_snow_omp = .false.
     242    call getin('ok_snow', ok_snow_omp)
     243    ! Martin
     244
     245    !Config Key  = OK_journe
     246    !Config Desc = Pour des sorties journalieres
     247    !Config Def  = .false.
     248    !Config Help = Pour creer le fichier histday contenant les sorties
     249    !              journalieres
     250    !
     251    ok_journe_omp = .false.
     252    call getin('OK_journe', ok_journe_omp)
     253    !
     254    !Config Key  = ok_hf
     255    !Config Desc = Pour des sorties haute frequence
     256    !Config Def  = .false.
     257    !Config Help = Pour creer le fichier histhf contenant les sorties
     258    !              haute frequence ( 3h ou 6h)
     259    !
     260    ok_hf_omp = .false.
     261    call getin('ok_hf', ok_hf_omp)
     262    !
     263    !Config Key  = OK_mensuel
     264    !Config Desc = Pour des sorties mensuelles
     265    !Config Def  = .true.
     266    !Config Help = Pour creer le fichier histmth contenant les sorties
     267    !              mensuelles
     268    !
     269    ok_mensuel_omp = .true.
     270    call getin('OK_mensuel', ok_mensuel_omp)
     271    !
     272    !Config Key  = OK_instan
     273    !Config Desc = Pour des sorties instantanees
     274    !Config Def  = .false.
     275    !Config Help = Pour creer le fichier histins contenant les sorties
     276    !              instantanees
     277    !
     278    ok_instan_omp = .false.
     279    call getin('OK_instan', ok_instan_omp)
     280    !
     281    !Config Key  = ok_ade
     282    !Config Desc = Aerosol direct effect or not?
     283    !Config Def  = .false.
     284    !Config Help = Used in radlwsw.F
     285    !
     286    ok_ade_omp = .false.
     287    call getin('ok_ade', ok_ade_omp)
     288
     289    !
     290    !Config Key  = ok_aie
     291    !Config Desc = Aerosol indirect effect or not?
     292    !Config Def  = .false.
     293    !Config Help = Used in nuage.F and radlwsw.F
     294    !
     295    ok_aie_omp = .false.
     296    call getin('ok_aie', ok_aie_omp)
     297
     298    !
     299    !Config Key  = ok_cdnc
     300    !Config Desc = ok cloud droplet number concentration
     301    !Config Def  = .false.
     302    !Config Help = Used in newmicro.F
     303    !
     304    ok_cdnc_omp = .false.
     305    call getin('ok_cdnc', ok_cdnc_omp)
     306    !
     307    !Config Key  = aerosol_couple
     308    !Config Desc = read aerosol in file or calcul by inca
     309    !Config Def  = .false.
     310    !Config Help = Used in physiq.F
     311    !
     312    aerosol_couple_omp = .false.
     313    CALL getin('aerosol_couple',aerosol_couple_omp)
     314    !
     315    !Config Key  = flag_aerosol
     316    !Config Desc = which aerosol is use for coupled model
     317    !Config Def  = 1
     318    !Config Help = Used in physiq.F
     319    !
     320    ! - flag_aerosol=0 => no aerosol
     321    ! - flag_aerosol=1 => so4 only (defaut)
     322    ! - flag_aerosol=2 => bc  only
     323    ! - flag_aerosol=3 => pom only
     324    ! - flag_aerosol=4 => seasalt only
     325    ! - flag_aerosol=5 => dust only
     326    ! - flag_aerosol=6 => all aerosol
     327
     328    flag_aerosol_omp = 0
     329    CALL getin('flag_aerosol',flag_aerosol_omp)
     330    !
     331    !Config Key  = flag_aerosol_strat
     332    !Config Desc = use stratospheric aerosols T/F
     333    !Config Def  = false
     334    !Config Help = Used in physiq.F
     335    !
     336    !
     337    flag_aerosol_strat_omp = .false.
     338    CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp)
     339
     340    ! Temporary variable for testing purpose!
     341    !Config Key  = new_aod
     342    !Config Desc = which calcul of aeropt
     343    !Config Def  = false
     344    !Config Help = Used in physiq.F
     345    !
     346    new_aod_omp = .true.
     347    CALL getin('new_aod',new_aod_omp)
     348
     349    !
     350    !Config Key  = aer_type
     351    !Config Desc = Use a constant field for the aerosols
     352    !Config Def  = scenario
     353    !Config Help = Used in readaerosol.F90
     354    !
     355    aer_type_omp = 'scenario'
     356    call getin('aer_type', aer_type_omp)
     357
     358    !
     359    !Config Key  = bl95_b0
     360    !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
     361    !Config Def  = .false.
     362    !Config Help = Used in nuage.F
     363    !
     364    bl95_b0_omp = 2.
     365    call getin('bl95_b0', bl95_b0_omp)
     366
     367    !Config Key  = bl95_b1
     368    !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
     369    !Config Def  = .false.
     370    !Config Help = Used in nuage.F
     371    !
     372    bl95_b1_omp = 0.2
     373    call getin('bl95_b1', bl95_b1_omp)
     374
     375    !Config Key  = freq_ISCCP
     376    !Config Desc = Frequence d'appel du simulateur ISCCP en secondes;
     377    !              par defaut 10800, i.e. 3 heures
     378    !Config Def  = 10800.
     379    !Config Help = Used in ini_histISCCP.h
     380    !
     381    freq_ISCCP_omp = 10800.
     382    call getin('freq_ISCCP', freq_ISCCP_omp)
     383    !
     384    !Config Key  = ecrit_ISCCP
     385    !Config Desc = Frequence d'ecriture des resultats du simulateur ISCCP en nombre de jours;
     386    !              par defaut 1., i.e. 1 jour
     387    !Config Def  = 1.
     388    !Config Help = Used in ini_histISCCP.h
     389    !
     390    !
     391    ecrit_ISCCP_omp = 1.
     392    call getin('ecrit_ISCCP', ecrit_ISCCP_omp)
     393
     394    !Config Key  = freq_COSP
     395    !Config Desc = Frequence d'appel du simulateur COSP en secondes;
     396    !              par defaut 10800, i.e. 3 heures
     397    !Config Def  = 10800.
     398    !Config Help = Used in ini_histdayCOSP.h
     399    !
     400    freq_COSP_omp = 10800.
     401    call getin('freq_COSP', freq_COSP_omp)
     402
     403    !
     404    !Config Key  = ip_ebil_phy
     405    !Config Desc = Niveau de sortie pour les diags bilan d'energie
     406    !Config Def  = 0
     407    !Config Help =
     408    !               
     409    ip_ebil_phy_omp = 0
     410    call getin('ip_ebil_phy', ip_ebil_phy_omp)
     411    !
     412    !Config Key  = seuil_inversion
     413    !Config Desc = Seuil ur dTh pour le choix entre les schemas de CL
     414    !Config Def  = -0.1
     415    !Config Help =
     416    !               
     417    seuil_inversion_omp = -0.1
     418    call getin('seuil_inversion', seuil_inversion_omp)
     419
     420    !
     421    ! Constante solaire & Parametres orbitaux & taux gaz effet de serre BEG
     422    !
     423    !Config Key  = R_ecc
     424    !Config Desc = Excentricite
     425    !Config Def  = 0.016715
     426    !Config Help =
     427    !               
     428    !valeur AMIP II
     429    R_ecc_omp = 0.016715
     430    call getin('R_ecc', R_ecc_omp)
     431    !
     432    !Config Key  = R_peri
     433    !Config Desc = Equinoxe
     434    !Config Def  =
     435    !Config Help =
     436    !               
     437    !
     438    !valeur AMIP II
     439    R_peri_omp = 102.7
     440    call getin('R_peri', R_peri_omp)
     441    !
     442    !Config Key  = R_incl
     443    !Config Desc = Inclinaison
     444    !Config Def  =
     445    !Config Help =
     446    !               
     447    !
     448    !valeur AMIP II
     449    R_incl_omp = 23.441
     450    call getin('R_incl', R_incl_omp)
     451    !
     452    !Config Key  = solaire
     453    !Config Desc = Constante solaire en W/m2
     454    !Config Def  = 1365.
     455    !Config Help =
     456    !               
     457    !
     458    !valeur AMIP II
     459    solaire_omp = 1365.
     460    call getin('solaire', solaire_omp)
     461    !
     462    !Config Key  = co2_ppm
     463    !Config Desc = concentration du gaz carbonique en ppmv
     464    !Config Def  = 348.
     465    !Config Help =
     466    !               
     467    !
     468    !valeur AMIP II
     469    co2_ppm_omp = 348.
     470    call getin('co2_ppm', co2_ppm_omp)
     471    !
     472    !Config Key  = RCO2
     473    !Config Desc = Concentration du CO2
     474    !Config Def  = co2_ppm * 1.0e-06  * 44.011/28.97
     475    !Config Def  = 348. * 1.0e-06  * 44.011/28.97
     476    !Config Help =
     477    !               
     478    ! RCO2 = 5.286789092164308E-04
     479    !ancienne valeur
     480    RCO2_omp = co2_ppm_omp * 1.0e-06  * 44.011/28.97 ! pour co2_ppm=348.
     481
     482    !  call getin('RCO2', RCO2)
     483    !
     484    !Config Key  = RCH4
     485    !Config Desc = Concentration du CH4
     486    !Config Def  = 1.65E-06* 16.043/28.97
     487    !Config Help =
     488    !               
     489    !
     490    !valeur AMIP II
     491    !OK  RCH4 = 1.65E-06* 16.043/28.97
     492    ! RCH4 = 9.137366240938903E-07
     493    !
     494    !ancienne valeur
     495    ! RCH4 = 1.72E-06* 16.043/28.97
     496    !OK call getin('RCH4', RCH4)
     497    zzz = 1650.
     498    call getin('CH4_ppb', zzz)
     499    CH4_ppb_omp = zzz
     500    RCH4_omp = CH4_ppb_omp * 1.0E-09 * 16.043/28.97
     501    !
     502    !Config Key  = RN2O
     503    !Config Desc = Concentration du N2O
     504    !Config Def  = 306.E-09* 44.013/28.97
     505    !Config Help =
     506    !               
     507    !
     508    !valeur AMIP II
     509    !OK  RN2O = 306.E-09* 44.013/28.97
     510    ! RN2O = 4.648939592682085E-07
     511    !
     512    !ancienne valeur
     513    ! RN2O = 310.E-09* 44.013/28.97
     514    !OK  call getin('RN2O', RN2O)
     515    zzz=306.
     516    call getin('N2O_ppb', zzz)
     517    N2O_ppb_omp = zzz
     518    RN2O_omp = N2O_ppb_omp * 1.0E-09 * 44.013/28.97
     519    !
     520    !Config Key  = RCFC11
     521    !Config Desc = Concentration du CFC11
     522    !Config Def  = 280.E-12* 137.3686/28.97
     523    !Config Help =
     524    !               
     525    !
     526    !OK RCFC11 = 280.E-12* 137.3686/28.97
     527    zzz = 280.
     528    call getin('CFC11_ppt',zzz)
     529    CFC11_ppt_omp = zzz
     530    RCFC11_omp=CFC11_ppt_omp* 1.0E-12 * 137.3686/28.97
     531    ! RCFC11 = 1.327690990680013E-09
     532    !OK call getin('RCFC11', RCFC11)
     533    !
     534    !Config Key  = RCFC12
     535    !Config Desc = Concentration du CFC12
     536    !Config Def  = 484.E-12* 120.9140/28.97
     537    !Config Help =
     538    !               
     539    !
     540    !OK RCFC12 = 484.E-12* 120.9140/28.97
     541    zzz = 484.
     542    call getin('CFC12_ppt',zzz)
     543    CFC12_ppt_omp = zzz
     544    RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * 120.9140/28.97
     545    ! RCFC12 = 2.020102726958923E-09
     546    !OK call getin('RCFC12', RCFC12)
     547
     548    !ajout CFMIP begin
     549    !
     550    !Config Key  = co2_ppm_per
     551    !Config Desc = concentration du co2_ppm_per
     552    !Config Def  = 348.
     553    !Config Help =
     554    !               
     555    co2_ppm_per_omp = co2_ppm_omp
     556    call getin('co2_ppm_per', co2_ppm_per_omp)
     557    !
     558    !Config Key  = RCO2_per
     559    !Config Desc = Concentration du CO2_per
     560    !Config Def  = co2_ppm_per * 1.0e-06  * 44.011/28.97
     561    !Config Def  = 348. * 1.0e-06  * 44.011/28.97
     562    !Config Help =
     563    !               
     564    RCO2_per_omp = co2_ppm_per_omp * 1.0e-06  * 44.011/28.97
     565
     566    !Config Key  = ok_4xCO2atm
     567    !Config Desc = Calcul ou non effet radiatif 4xco2
     568    !Config Def  = .false.
     569    !Config Help =
     570
     571    ok_4xCO2atm_omp = .false.
     572    call getin('ok_4xCO2atm',ok_4xCO2atm_omp)
     573
     574    !Config Key  = RCH4_per
     575    !Config Desc = Concentration du CH4_per
     576    !Config Def  = 1.65E-06* 16.043/28.97
     577    !Config Help =
     578    !               
     579    zzz = CH4_ppb_omp
     580    call getin('CH4_ppb_per', zzz)
     581    CH4_ppb_per_omp = zzz
     582    RCH4_per_omp = CH4_ppb_per_omp * 1.0E-09 * 16.043/28.97
     583    !
     584    !Config Key  = RN2O_per
     585    !Config Desc = Concentration du N2O_per
     586    !Config Def  = 306.E-09* 44.013/28.97
     587    !Config Help =
     588    !               
     589    zzz = N2O_ppb_omp
     590    call getin('N2O_ppb_per', zzz)
     591    N2O_ppb_per_omp = zzz
     592    RN2O_per_omp = N2O_ppb_per_omp * 1.0E-09 * 44.013/28.97
     593    !
     594    !Config Key  = RCFC11_per
     595    !Config Desc = Concentration du CFC11_per
     596    !Config Def  = 280.E-12* 137.3686/28.97
     597    !Config Help =
     598    !               
     599    zzz = CFC11_ppt_omp
     600    call getin('CFC11_ppt_per',zzz)
     601    CFC11_ppt_per_omp = zzz
     602    RCFC11_per_omp=CFC11_ppt_per_omp* 1.0E-12 * 137.3686/28.97
     603    !
     604    !Config Key  = RCFC12_per
     605    !Config Desc = Concentration du CFC12_per
     606    !Config Def  = 484.E-12* 120.9140/28.97
     607    !Config Help =
     608    !               
     609    zzz = CFC12_ppt_omp
     610    call getin('CFC12_ppt_per',zzz)
     611    CFC12_ppt_per_omp = zzz
     612    RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * 120.9140/28.97
     613    !ajout CFMIP end
     614
     615    !
     616    ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
     617    ! Constantes precedemment dans dyn3d/conf_gcm
     618
     619    !Config  Key  = cycle_diurne
     620    !Config  Desc = Cycle ddiurne
     621    !Config  Def  = y
     622    !Config  Help = Cette option permet d'eteidre le cycle diurne.
     623    !Config         Peut etre util pour accelerer le code !
     624    cycle_diurne_omp = .TRUE.
     625    CALL getin('cycle_diurne',cycle_diurne_omp)
     626
     627    !Config  Key  = soil_model
     628    !Config  Desc = Modele de sol
     629    !Config  Def  = y
     630    !Config  Help = Choix du modele de sol (Thermique ?)
     631    !Config         Option qui pourait un string afin de pouvoir
     632    !Config         plus de choix ! Ou meme une liste d'options !
     633    soil_model_omp = .TRUE.
     634    CALL getin('soil_model',soil_model_omp)
     635
     636    !Config  Key  = new_oliq
     637    !Config  Desc = Nouvelle eau liquide
     638    !Config  Def  = y
     639    !Config  Help = Permet de mettre en route la
     640    !Config         nouvelle parametrisation de l'eau liquide !
     641    new_oliq_omp = .TRUE.
     642    CALL getin('new_oliq',new_oliq_omp)
     643
     644    !Config  Key  = ok_orodr
     645    !Config  Desc = Orodr ???
     646    !Config  Def  = y
     647    !Config  Help = Y en a pas comprendre !
     648    !Config         
     649    ok_orodr_omp = .TRUE.
     650    CALL getin('ok_orodr',ok_orodr_omp)
     651
     652    !Config  Key  =  ok_orolf
     653    !Config  Desc = Orolf ??
     654    !Config  Def  = y
     655    !Config  Help = Connais pas !
     656    ok_orolf_omp = .TRUE.
     657    CALL getin('ok_orolf', ok_orolf_omp)
     658
     659    !Config  Key  = ok_limitvrai
     660    !Config  Desc = Force la lecture de la bonne annee
     661    !Config  Def  = n
     662    !Config  Help = On peut forcer le modele a lire le
     663    !Config         fichier SST de la bonne annee. C'est une tres bonne
     664    !Config         idee, pourquoi ne pas mettre toujours a y ???
     665    ok_limitvrai_omp = .FALSE.
     666    CALL getin('ok_limitvrai',ok_limitvrai_omp)
     667
     668    !Config  Key  = nbapp_rad
     669    !Config  Desc = Frequence d'appel au rayonnement
     670    !Config  Def  = 12
     671    !Config  Help = Nombre  d'appels des routines de rayonnements
     672    !Config         par jour.
     673    nbapp_rad_omp = 12
     674    CALL getin('nbapp_rad',nbapp_rad_omp)
     675
     676    !Config  Key  = iflag_con
     677    !Config  Desc = Flag de convection
     678    !Config  Def  = 2
     679    !Config  Help = Flag  pour la convection les options suivantes existent :
     680    !Config         1 pour LMD,
     681    !Config         2 pour Tiedtke,
     682    !Config         3 pour CCM(NCAR) 
     683    iflag_con_omp = 2
     684    CALL getin('iflag_con',iflag_con_omp)
     685
     686    !Config  Key  = iflag_ener_conserv
     687    !Config  Desc = Flag de convection
     688    !Config  Def  = 1
     689    !Config  Help = Flag  pour la convection les options suivantes existent :
     690    !Config         -1 pour Kinetic energy correction
     691    !Config         1  conservation kinetic and enthalpy
     692    iflag_ener_conserv_omp = -1
     693    CALL getin('iflag_ener_conserv',iflag_ener_conserv_omp)
     694
     695    !Config  Key  = iflag_fisrtilp_qsat
     696    !Config  Desc = Flag de convection
     697    !Config  Def  = 1
     698    !Config  Help = Flag  pour la convection les options suivantes existent :
     699    !Config         -1 pour Kinetic energy correction
     700    !Config         1  conservation kinetic and enthalpy
     701    iflag_fisrtilp_qsat_omp = 0
     702    CALL getin('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat_omp)
     703
     704    !
     705    !
     706    !
     707    ! Constante solaire & Parametres orbitaux & taux gaz effet de serre END
     708    !
     709    ! KE
     710    !
     711
     712    !Config key  = cvl_corr
     713    !Config Desc = Facteur multiplication des precip convectives dans KE
     714    !Config Def  = 1.00
     715    !Config Help = 1.02 pour un moderne ou un pre-ind. A ajuster pour un glaciaire
     716    cvl_corr_omp = 1.00
     717    CALL getin('cvl_corr', cvl_corr_omp)
     718
     719
     720    !Config Key  = epmax
     721    !Config Desc = Efficacite precip
     722    !Config Def  = 0.993
     723    !Config Help =
     724    !
     725    epmax_omp = .993
     726    call getin('epmax', epmax_omp)
     727    !
     728    !Config Key  = ok_adj_ema
     729    !Config Desc = 
     730    !Config Def  = false
     731    !Config Help =
     732    !
     733    ok_adj_ema_omp = .false.
     734    call getin('ok_adj_ema',ok_adj_ema_omp)
     735    !
     736    !Config Key  = iflag_clw
     737    !Config Desc = 
     738    !Config Def  = 0
     739    !Config Help =
     740    !
     741    iflag_clw_omp = 0
     742    call getin('iflag_clw',iflag_clw_omp)
     743    !
     744    !Config Key  = cld_lc_lsc
     745    !Config Desc = 
     746    !Config Def  = 2.6e-4
     747    !Config Help =
     748    !
     749    cld_lc_lsc_omp = 2.6e-4
     750    call getin('cld_lc_lsc',cld_lc_lsc_omp)
     751    !
     752    !Config Key  = cld_lc_con
     753    !Config Desc = 
     754    !Config Def  = 2.6e-4
     755    !Config Help =
     756    !
     757    cld_lc_con_omp = 2.6e-4
     758    call getin('cld_lc_con',cld_lc_con_omp)
     759    !
     760    !Config Key  = cld_tau_lsc
     761    !Config Desc = 
     762    !Config Def  = 3600.
     763    !Config Help =
     764    !
     765    cld_tau_lsc_omp = 3600.
     766    call getin('cld_tau_lsc',cld_tau_lsc_omp)
     767    !
     768    !Config Key  = cld_tau_con
     769    !Config Desc = 
     770    !Config Def  = 3600.
     771    !Config Help =
     772    !
     773    cld_tau_con_omp = 3600.
     774    call getin('cld_tau_con',cld_tau_con_omp)
     775    !
     776    !Config Key  = ffallv_lsc
     777    !Config Desc = 
     778    !Config Def  = 1.
     779    !Config Help =
     780    !
     781    ffallv_lsc_omp = 1.
     782    call getin('ffallv_lsc',ffallv_lsc_omp)
     783    !
     784    !Config Key  = ffallv_con
     785    !Config Desc = 
     786    !Config Def  = 1.
     787    !Config Help =
     788    !
     789    ffallv_con_omp = 1.
     790    call getin('ffallv_con',ffallv_con_omp)
     791    !
     792    !Config Key  = coef_eva
     793    !Config Desc = 
     794    !Config Def  = 2.e-5
     795    !Config Help =
     796    !
     797    coef_eva_omp = 2.e-5
     798    call getin('coef_eva',coef_eva_omp)
     799    !
     800    !Config Key  = reevap_ice
     801    !Config Desc = 
     802    !Config Def  = .false.
     803    !Config Help =
     804    !
     805    reevap_ice_omp = .false.
     806    call getin('reevap_ice',reevap_ice_omp)
     807
     808    !Config Key  = iflag_ratqs
     809    !Config Desc =
     810    !Config Def  = 1
     811    !Config Help =
     812    !
     813    iflag_ratqs_omp = 1
     814    call getin('iflag_ratqs',iflag_ratqs_omp)
     815
     816    !
     817    !Config Key  = iflag_radia
     818    !Config Desc = 
     819    !Config Def  = 1
     820    !Config Help =
     821    !
     822    iflag_radia_omp = 1
     823    call getin('iflag_radia',iflag_radia_omp)
     824
     825    !
     826    !Config Key  = iflag_rrtm
     827    !Config Desc = 
     828    !Config Def  = 0
     829    !Config Help =
     830    !
     831    iflag_rrtm_omp = 0
     832    call getin('iflag_rrtm',iflag_rrtm_omp)
     833
     834    !
     835    !Config Key  = iflag_cldcon
     836    !Config Desc = 
     837    !Config Def  = 1
     838    !Config Help =
     839    !
     840    iflag_cldcon_omp = 1
     841    call getin('iflag_cldcon',iflag_cldcon_omp)
     842
     843    !
     844    !Config Key  = iflag_pdf
     845    !Config Desc = 
     846    !Config Def  = 0
     847    !Config Help =
     848    !
     849    iflag_pdf_omp = 0
     850    call getin('iflag_pdf',iflag_pdf_omp)
     851    !
     852    !Config Key  = fact_cldcon
     853    !Config Desc = 
     854    !Config Def  = 0.375
     855    !Config Help =
     856    !
     857    fact_cldcon_omp = 0.375
     858    call getin('fact_cldcon',fact_cldcon_omp)
     859
     860    !
     861    !Config Key  = facttemps
     862    !Config Desc = 
     863    !Config Def  = 1.e-4
     864    !Config Help =
     865    !
     866    facttemps_omp = 1.e-4
     867    call getin('facttemps',facttemps_omp)
     868
     869    !
     870    !Config Key  = ok_newmicro
     871    !Config Desc = 
     872    !Config Def  = .true.
     873    !Config Help =
     874    !
     875    ok_newmicro_omp = .true.
     876    call getin('ok_newmicro',ok_newmicro_omp)
     877    !
     878    !Config Key  = ratqsbas
     879    !Config Desc = 
     880    !Config Def  = 0.01
     881    !Config Help =
     882    !
     883    ratqsbas_omp = 0.01
     884    call getin('ratqsbas',ratqsbas_omp)
     885    !
     886    !Config Key  = ratqshaut
     887    !Config Desc = 
     888    !Config Def  = 0.3
     889    !Config Help =
     890    !
     891    ratqshaut_omp = 0.3
     892    call getin('ratqshaut',ratqshaut_omp)
     893
     894    !Config Key  = tau_ratqs
     895    !Config Desc = 
     896    !Config Def  = 1800.
     897    !Config Help =
     898    !
     899    tau_ratqs_omp = 1800.
     900    call getin('tau_ratqs',tau_ratqs_omp)
     901
     902    !
     903    !-----------------------------------------------------------------------
     904    ! Longitude solaire pour le calcul de l'ensoleillement en degre
     905    ! si on veut imposer la saison. Sinon, solarlong0=-999.999
     906    !Config Key  = solarlong0
     907    !Config Desc = 
     908    !Config Def  = -999.999
     909    !Config Help =
     910    !
     911    solarlong0_omp = -999.999
     912    call getin('solarlong0',solarlong0_omp)
     913    !
     914    !-----------------------------------------------------------------------
     915    !  Valeur imposee pour configuration idealisees
     916    !Config Key  = qsol0 pour le bucket, evap0 pour aquaplanetes, albsno0
     917    ! Default value -1 to activate the full computation
     918    qsol0_omp = -1.
     919    call getin('qsol0',qsol0_omp)
     920    evap0_omp = -1.
     921    call getin('evap0',evap0_omp)
     922    albsno0_omp = -1.
     923    call getin('albsno0',albsno0_omp)
     924    !
     925    !-----------------------------------------------------------------------
     926    !
     927    !Config Key  = inertie_ice
     928    !Config Desc = 
     929    !Config Def  = 2000.
     930    !Config Help =
     931    !
     932    inertie_ice_omp = 2000.
     933    call getin('inertie_ice',inertie_ice_omp)
     934    !
     935    !Config Key  = inertie_sno
     936    !Config Desc = 
     937    !Config Def  = 2000.
     938    !Config Help =
     939    !
     940    inertie_sno_omp = 2000.
     941    call getin('inertie_sno',inertie_sno_omp)
     942    !
     943    !Config Key  = inertie_sol
     944    !Config Desc = 
     945    !Config Def  = 2000.
     946    !Config Help =
     947    !
     948    inertie_sol_omp = 2000.
     949    call getin('inertie_sol',inertie_sol_omp)
     950
     951    !
     952    !Config Key  = rad_froid
     953    !Config Desc = 
     954    !Config Def  = 35.0
     955    !Config Help =
     956    !
     957    rad_froid_omp = 35.0
     958    call getin('rad_froid',rad_froid_omp)
     959
     960    !
     961    !Config Key  = rad_chau1
     962    !Config Desc = 
     963    !Config Def  = 13.0
     964    !Config Help =
     965    !
     966    rad_chau1_omp = 13.0
     967    call getin('rad_chau1',rad_chau1_omp)
     968
     969    !
     970    !Config Key  = rad_chau2
     971    !Config Desc = 
     972    !Config Def  = 9.0
     973    !Config Help =
     974    !
     975    rad_chau2_omp = 9.0
     976    call getin('rad_chau2',rad_chau2_omp)
     977
     978    !
     979    !Config Key  = t_glace_min
     980    !Config Desc = 
     981    !Config Def  = 258.
     982    !Config Help =
     983    !
     984    t_glace_min_omp = 258.
     985    call getin('t_glace_min',t_glace_min_omp)
     986
     987    !
     988    !Config Key  = t_glace_max
     989    !Config Desc = 
     990    !Config Def  = 273.13
     991    !Config Help =
     992    !
     993    t_glace_max_omp = 273.13
     994    call getin('t_glace_max',t_glace_max_omp)
     995
     996    !
     997    !Config Key  = iflag_ice_thermo
     998    !Config Desc = 
     999    !Config Def  = 0
     1000    !Config Help =
     1001    !
     1002    iflag_ice_thermo_omp = 0
     1003    call getin('iflag_ice_thermo',iflag_ice_thermo_omp)
     1004
     1005    !Config Key  = rei_min
     1006    !Config Desc = 
     1007    !Config Def  = 3.5
     1008    !Config Help =
     1009    !
     1010    rei_min_omp = 3.5
     1011    call getin('rei_min',rei_min_omp)
     1012
     1013    !
     1014    !Config Key  = rei_max
     1015    !Config Desc = 
     1016    !Config Def  = 61.29
     1017    !Config Help =
     1018    !
     1019    rei_max_omp = 61.29
     1020    call getin('rei_max',rei_max_omp)
     1021
     1022    !
     1023    !Config Key  = top_height
     1024    !Config Desc =
     1025    !Config Def  = 3
     1026    !Config Help =
     1027    !
     1028    top_height_omp = 3
     1029    call getin('top_height',top_height_omp)
     1030
     1031    !
     1032    !Config Key  = overlap
     1033    !Config Desc =
     1034    !Config Def  = 3
     1035    !Config Help =
     1036    !
     1037    overlap_omp = 3
     1038    call getin('overlap',overlap_omp)
     1039
     1040
     1041    !
     1042    !
     1043    !Config Key  = cdmmax
     1044    !Config Desc =
     1045    !Config Def  = 1.3E-3
     1046    !Config Help =
     1047    !
     1048    cdmmax_omp = 1.3E-3
     1049    call getin('cdmmax',cdmmax_omp)
     1050
     1051    !
     1052    !Config Key  = cdhmax
     1053    !Config Desc =
     1054    !Config Def  = 1.1E-3
     1055    !Config Help =
     1056    !
     1057    cdhmax_omp = 1.1E-3
     1058    call getin('cdhmax',cdhmax_omp)
     1059
     1060    !261103
     1061    !
     1062    !Config Key  = ksta
     1063    !Config Desc =
     1064    !Config Def  = 1.0e-10
     1065    !Config Help =
     1066    !
     1067    ksta_omp = 1.0e-10
     1068    call getin('ksta',ksta_omp)
     1069
     1070    !
     1071    !Config Key  = ksta_ter
     1072    !Config Desc =
     1073    !Config Def  = 1.0e-10
     1074    !Config Help =
     1075    !
     1076    ksta_ter_omp = 1.0e-10
     1077    call getin('ksta_ter',ksta_ter_omp)
     1078
     1079    !
     1080    !Config Key  = ok_kzmin
     1081    !Config Desc =
     1082    !Config Def  = .true.
     1083    !Config Help =
     1084    !
     1085    ok_kzmin_omp = .true.
     1086    call getin('ok_kzmin',ok_kzmin_omp)
     1087
     1088    !
     1089    !Config Key  = fmagic
     1090    !Config Desc = additionnal multiplicator factor used for albedo
     1091    !Config Def  = 1.
     1092    !Config Help = additionnal multiplicator factor used in albedo.F
     1093    !
     1094    fmagic_omp = 1.
     1095    call getin('fmagic',fmagic_omp)
     1096
     1097    !
     1098    !Config Key  = pmagic
     1099    !Config Desc = additional factor used for albedo
     1100    !Config Def  = 0.
     1101    !Config Help = additional factor used in albedo.F
     1102    !
     1103    pmagic_omp = 0.
     1104    call getin('pmagic',pmagic_omp)
     1105
     1106
     1107    !Config Key = ok_lic_melt
     1108    !Config Desc = Prise en compte de la fonte de la calotte dans le bilan d'eau
     1109    !Config Def  = .false.
     1110    !Config Help = mettre a .false. pour assurer la conservation en eau
     1111    ok_lic_melt_omp = .false.
     1112    call getin('ok_lic_melt', ok_lic_melt_omp)
     1113
     1114    !
     1115    ! PARAMETER FOR THE PLANETARY BOUNDARY LAYER
     1116    !
     1117
     1118    !Config Key  = iflag_pbl
     1119    !Config Desc =
     1120    !Config Def  = 1
     1121    !Config Help =
     1122    !
     1123    iflag_pbl_omp = 1
     1124    call getin('iflag_pbl',iflag_pbl_omp)
     1125    !
     1126    !Config Key  = iflag_thermals
     1127    !Config Desc =
     1128    !Config Def  = 0
     1129    !Config Help =
     1130    !
     1131    iflag_thermals_omp = 0
     1132    call getin('iflag_thermals',iflag_thermals_omp)
     1133    !
     1134    !
     1135    !Config Key  = iflag_thermals_ed
     1136    !Config Desc =
     1137    !Config Def  = 0
     1138    !Config Help =
     1139    !
     1140    iflag_thermals_ed_omp = 0
     1141    call getin('iflag_thermals_ed',iflag_thermals_ed_omp)
     1142    !
     1143    !
     1144    !Config Key  = iflag_thermals_optflux
     1145    !Config Desc =
     1146    !Config Def  = 0
     1147    !Config Help =
     1148    !
     1149    iflag_thermals_optflux_omp = 0
     1150    call getin('iflag_thermals_optflux',iflag_thermals_optflux_omp)
     1151    !
     1152    !
     1153    !Config Key  = nsplit_thermals
     1154    !Config Desc =
     1155    !Config Def  = 1
     1156    !Config Help =
     1157    !
     1158    nsplit_thermals_omp = 1
     1159    call getin('nsplit_thermals',nsplit_thermals_omp)
     1160
     1161    !Config Key  = alp_bl_k
     1162    !Config Desc =
     1163    !Config Def  = 0.
     1164    !Config Help =
     1165    !
     1166    alp_bl_k_omp = 1.
     1167    call getin('alp_bl_k',alp_bl_k_omp)
     1168
     1169    ! nrlmd le 10/04/2012
     1170
     1171    !Config Key  = iflag_trig_bl
     1172    !Config Desc = 
     1173    !Config Def  = 0
     1174    !Config Help =
     1175    !
     1176    iflag_trig_bl_omp = 0
     1177    call getin('iflag_trig_bl',iflag_trig_bl_omp)
     1178
     1179    !Config Key  = s_trig_bl
     1180    !Config Desc = 
     1181    !Config Def  = 0
     1182    !Config Help =
     1183    !
     1184    s_trig_omp = 2e7
     1185    call getin('s_trig',s_trig_omp)
     1186
     1187    !Config Key  = tau_trig_shallow
     1188    !Config Desc = 
     1189    !Config Def  = 0
     1190    !Config Help =
     1191    !
     1192    tau_trig_shallow_omp = 600
     1193    call getin('tau_trig_shallow',tau_trig_shallow_omp)
     1194
     1195    !Config Key  = tau_trig_deep
     1196    !Config Desc = 
     1197    !Config Def  = 0
     1198    !Config Help =
     1199    !
     1200    tau_trig_deep_omp = 1800
     1201    call getin('tau_trig_deep',tau_trig_deep_omp)
     1202
     1203    !Config Key  = iflag_clos_bl
     1204    !Config Desc = 
     1205    !Config Def  = 0
     1206    !Config Help =
     1207    !
     1208    iflag_clos_bl_omp = 0
     1209    call getin('iflag_clos_bl',iflag_clos_bl_omp)
     1210
     1211    ! fin nrlmd le 10/04/2012
     1212
     1213    !
     1214    !Config Key  = tau_thermals
     1215    !Config Desc =
     1216    !Config Def  = 0.
     1217    !Config Help =
     1218    !
     1219    tau_thermals_omp = 0.
     1220    call getin('tau_thermals',tau_thermals_omp)
     1221
     1222    !
     1223    !Config Key  = iflag_coupl
     1224    !Config Desc =
     1225    !Config Def  = 0
     1226    !Config Help =
     1227    !
     1228    iflag_coupl_omp = 0
     1229    call getin('iflag_coupl',iflag_coupl_omp)
     1230
     1231    !
     1232    !Config Key  = iflag_clos
     1233    !Config Desc = 
     1234    !Config Def  = 0
     1235    !Config Help =
     1236    !
     1237    iflag_clos_omp = 1
     1238    call getin('iflag_clos',iflag_clos_omp)
     1239    !
     1240    !Config Key  = iflag_cvl_sigd
     1241    !Config Desc = 
     1242    !Config Def  = 0
     1243    !Config Help =
     1244    !
     1245    iflag_cvl_sigd_omp = 0
     1246    call getin('iflag_cvl_sigd',iflag_cvl_sigd_omp)
     1247
     1248    !Config Key  = iflag_wake
     1249    !Config Desc = 
     1250    !Config Def  = 0
     1251    !Config Help =
     1252    !
     1253    iflag_wake_omp = 0
     1254    call getin('iflag_wake',iflag_wake_omp)
     1255
     1256    !Config Key  = alp_offset
     1257    !Config Desc = 
     1258    !Config Def  = 0
     1259    !Config Help =
     1260    !
     1261    alp_offset_omp = 0.
     1262    call getin('alp_offset',alp_offset_omp)
     1263
     1264    !
     1265    !Config Key  = lev_histhf
     1266    !Config Desc =
     1267    !Config Def  = 1
     1268    !Config Help =
     1269    !
     1270    lev_histhf_omp = 1
     1271    call getin('lev_histhf',lev_histhf_omp)
     1272
     1273    !
     1274    !Config Key  = lev_histday
     1275    !Config Desc =
     1276    !Config Def  = 1
     1277    !Config Help =
     1278    !
     1279    lev_histday_omp = 1
     1280    call getin('lev_histday',lev_histday_omp)
     1281
     1282    !
     1283    !Config Key  = lev_histmth
     1284    !Config Desc =
     1285    !Config Def  = 2
     1286    !Config Help =
     1287    !
     1288    lev_histmth_omp = 2
     1289    call getin('lev_histmth',lev_histmth_omp)
     1290    !
     1291    !Config Key  = lev_histins
     1292    !Config Desc =
     1293    !Config Def  = 1
     1294    !Config Help =
     1295    !
     1296    lev_histins_omp = 1
     1297    call getin('lev_histins',lev_histins_omp)
     1298    !
     1299    !Config Key  = lev_histLES
     1300    !Config Desc =
     1301    !Config Def  = 1
     1302    !Config Help =
     1303    !
     1304    lev_histLES_omp = 1
     1305    call getin('lev_histLES',lev_histLES_omp)
     1306    !
     1307    !Config Key  = lev_histdayNMC
     1308    !Config Desc =
     1309    !Config Def  = 8
     1310    !Config Help =
     1311    !
     1312    lev_histdayNMC_omp = 8
     1313    call getin('lev_histdayNMC',lev_histdayNMC_omp)
     1314    !
     1315    !Config Key  = levout_histNMC
     1316    !Config Desc =
     1317    !Config Def  = 5
     1318    !Config Help =
     1319    !
     1320    levout_histNMC_omp(1) = 5
     1321    levout_histNMC_omp(2) = 5
     1322    levout_histNMC_omp(3) = 5
     1323    call getin('levout_histNMC',levout_histNMC_omp)
     1324    !
     1325    !histNMC BEG
     1326    !Config Key  = ok_histNMC
     1327    !Config Desc = ok_histNMC(1) = frequence de sortie fichiers histmthNMC
     1328    !Config Desc = ok_histNMC(2) = frequence de sortie fichiers histdayNMC
     1329    !Config Desc = ok_histNMC(3) = frequence de sortie fichiers histhfNMC
     1330    !Config Def  = n, n, n
     1331    !Config Help =
     1332    !
     1333    ok_histNMC_omp(1) = .false.
     1334    ok_histNMC_omp(2) = .false.
     1335    ok_histNMC_omp(3) = .false.
     1336    call getin('ok_histNMC',ok_histNMC_omp)
     1337    !
     1338    !Config Key  = freq_outNMC
     1339    !Config Desc = freq_outNMC(1) = frequence de sortie fichiers histmthNMC
     1340    !Config Desc = freq_outNMC(2) = frequence de sortie fichiers histdayNMC
     1341    !Config Desc = freq_outNMC(3) = frequence de sortie fichiers histhfNMC
     1342    !Config Def  = 2592000., 86400., 21600. (1mois, 1jour, 6h)
     1343    !Config Help =
     1344    !
     1345    freq_outNMC_omp(1) = mth_len
     1346    freq_outNMC_omp(2) = 1.
     1347    freq_outNMC_omp(3) = 1./4.
     1348    call getin('freq_outNMC',freq_outNMC_omp)
     1349    !
     1350    !Config Key  = freq_calNMC
     1351    !Config Desc = freq_calNMC(1) = frequence de calcul fichiers histmthNMC
     1352    !Config Desc = freq_calNMC(2) = frequence de calcul fichiers histdayNMC
     1353    !Config Desc = freq_calNMC(3) = frequence de calcul fichiers histhfNMC
     1354    !Config Def  = pasphys
     1355    !Config Help =
     1356    !
     1357    freq_calNMC_omp(1) = pasphys
     1358    freq_calNMC_omp(2) = pasphys
     1359    freq_calNMC_omp(3) = pasphys
     1360    call getin('freq_calNMC',freq_calNMC_omp)
     1361    !
     1362    !Config Key  = type_run
     1363    !Config Desc =
     1364    !Config Def  = 'AMIP'/'CFMIP'  ou 'CLIM'/'ENSP'
     1365    !Config Help =
     1366    !
     1367    type_run_omp = 'AMIP'
     1368    call getin('type_run',type_run_omp)
     1369
     1370    !
     1371    !Config Key  = ok_cosp
     1372    !Config Desc =
     1373    !Config Def  = .false.
     1374    !Config Help =
     1375    !
     1376    ok_cosp_omp = .false.
     1377    call getin('ok_cosp',ok_cosp_omp)
     1378
     1379    !
     1380    !Config Key  = ok_mensuelCOSP
     1381    !Config Desc =
     1382    !Config Def  = .true.
     1383    !Config Help =
     1384    !
     1385    ok_mensuelCOSP_omp = .true.
     1386    call getin('ok_mensuelCOSP',ok_mensuelCOSP_omp)
     1387
     1388    !
     1389    !Config Key  = ok_journeCOSP
     1390    !Config Desc =
     1391    !Config Def  = .true.
     1392    !Config Help =
     1393    !
     1394    ok_journeCOSP_omp = .true.
     1395    call getin('ok_journeCOSP',ok_journeCOSP_omp)
     1396
     1397    !
     1398    !Config Key  = ok_hfCOSP
     1399    !Config Desc =
     1400    !Config Def  = .false.
     1401    !Config Help =
     1402    !
     1403    ok_hfCOSP_omp = .false.
     1404    call getin('ok_hfCOSP',ok_hfCOSP_omp)
     1405
     1406    !
     1407    ! coordonnees (lonmin_ins, lonmax_ins, latmin_ins, latmax_ins) pour la zone
     1408    ! avec sorties instantannees tous les pas de temps de la physique => "histbilKP_ins.nc"
     1409    !
     1410    !Config Key  = lonmin_ins
     1411    !Config Desc = 100. 
     1412    !Config Def  = longitude minimale sorties "bilKP_ins"
     1413    !Config Help =
     1414    !
     1415    lonmin_ins_omp = 100.
     1416    call getin('lonmin_ins',lonmin_ins_omp)
     1417    !
     1418    !Config Key  = lonmax_ins
     1419    !Config Desc = 130.
     1420    !Config Def  = longitude maximale sorties "bilKP_ins"
     1421    !Config Help =
     1422    !
     1423    lonmax_ins_omp = 130.
     1424    call getin('lonmax_ins',lonmax_ins_omp)
     1425    !
     1426    !Config Key  = latmin_ins
     1427    !Config Desc = -20. 
     1428    !Config Def  = latitude minimale sorties "bilKP_ins"
     1429    !Config Help =
     1430    !
     1431    latmin_ins_omp = -20.
     1432    call getin('latmin_ins',latmin_ins_omp)
     1433    !
     1434    !Config Key  = latmax_ins
     1435    !Config Desc = 20.
     1436    !Config Def  = latitude maximale sorties "bilKP_ins"
     1437    !Config Help =
     1438    !
     1439    latmax_ins_omp = 20.
     1440    call getin('latmax_ins',latmax_ins_omp)
     1441    !
     1442    !Config Key  = ecrit_hf
     1443    !Config Desc =
     1444    !Config Def  = 1./8. !toutes les 3h
     1445    !Config Help =
     1446    !
     1447    ecrit_hf_omp = 1./8.
     1448    call getin('ecrit_hf',ecrit_hf_omp)
     1449    !
     1450    !Config Key  = ecrit_ins
     1451    !Config Desc =
     1452    !Config Def  = 1./48. ! toutes les 1/2 h
     1453    !Config Help =
     1454    !
     1455    ecrit_ins_omp = 1./48.
     1456    call getin('ecrit_ins',ecrit_ins_omp)
     1457    !
     1458    !Config Key  = ecrit_day
     1459    !Config Desc =
     1460    !Config Def  = 1.0 !tous les jours
     1461    !Config Help = nombre de jours pour ecriture fichier histday.nc
     1462    !
     1463    ecrit_day_omp = 1.0
     1464    call getin('ecrit_day',ecrit_day_omp)
     1465    !
     1466    !Config Key  = ecrit_mth
     1467    !Config Desc =
     1468    !Config Def  = 30. !tous les 30jours (1 fois par mois)
     1469    !Config Help =
     1470    !
     1471    ecrit_mth_omp = 30.
     1472    call getin('ecrit_mth',ecrit_mth_omp)
     1473    !
     1474    !Config Key  = ecrit_tra
     1475    !Config Desc =
     1476    !Config Def  = 30. !tous les 30jours (1 fois par mois)
     1477    !Config Help =
     1478    !
     1479    ecrit_tra_omp = 0.
     1480    call getin('ecrit_tra',ecrit_tra_omp)
     1481    !
     1482    !Config Key  = ecrit_reg
     1483    !Config Desc =
     1484    !Config Def  = 0.25  !4 fois par jour
     1485    !Config Help =
     1486    !
     1487    ecrit_reg_omp = 0.25   !4 fois par jour
     1488    call getin('ecrit_reg',ecrit_reg_omp)
     1489    !
     1490    !
     1491    !
     1492    ! PARAMETRES CDRAG
     1493    !
     1494    !Config Key  = f_cdrag_ter
     1495    !Config Desc =
     1496    !Config Def  = 0.8
     1497    !Config Help =
     1498    !
     1499    f_cdrag_ter_omp = 0.8
     1500    call getin('f_cdrag_ter',f_cdrag_ter_omp)
     1501    !
     1502    !Config Key  = f_cdrag_oce
     1503    !Config Desc =
     1504    !Config Def  = 0.8
     1505    !Config Help =
     1506    !
     1507    f_cdrag_oce_omp = 0.8
     1508    call getin('f_cdrag_oce',f_cdrag_oce_omp)
     1509    !
     1510    ! RUGORO
     1511    !Config Key  = f_rugoro
     1512    !Config Desc =
     1513    !Config Def  = 0.
     1514    !Config Help =
     1515    !
     1516    f_rugoro_omp = 0.
     1517    call getin('f_rugoro',f_rugoro_omp)
     1518
     1519    ! PARAMETERS FOR CONVECTIVE INHIBITION BY TROPOS. DRYNESS
     1520    !
     1521    !Config Key  = supcrit1
     1522    !Config Desc =
     1523    !Config Def  = .540
     1524    !Config Help =
     1525    !
     1526    supcrit1_omp = .540
     1527    call getin('supcrit1',supcrit1_omp)
     1528
     1529    !
     1530    !Config Key  = supcrit2
     1531    !Config Desc =
     1532    !Config Def  = .600
     1533    !Config Help =
     1534    !
     1535    supcrit2_omp = .600
     1536    call getin('supcrit2',supcrit2_omp)
     1537
     1538    !
     1539    ! PARAMETERS FOR THE MIXING DISTRIBUTION
     1540    ! iflag_mix: 0=OLD,
     1541    !            1=NEW (JYG),           
     1542    !            2=NEW + conv. depth inhib. by tropos. dryness
     1543    ! '2' is NOT operationnal and should not be used.
     1544    !
     1545    !Config Key  = iflag_mix
     1546    !Config Desc =
     1547    !Config Def  = 1
     1548    !Config Help =
     1549    !
     1550    iflag_mix_omp = 1
     1551    call getin('iflag_mix',iflag_mix_omp)
     1552
     1553    !
     1554    !Config Key  = scut
     1555    !Config Desc =
     1556    !Config Def  = 0.95
     1557    !Config Help =
     1558    !
     1559    scut_omp = 0.95
     1560    call getin('scut',scut_omp)
     1561
     1562    !
     1563    !Config Key  = qqa1
     1564    !Config Desc =
     1565    !Config Def  = 1.0
     1566    !Config Help =
     1567    !
     1568    qqa1_omp = 1.0
     1569    call getin('qqa1',qqa1_omp)
     1570
     1571    !
     1572    !Config Key  = qqa2
     1573    !Config Desc =
     1574    !Config Def  = 0.0
     1575    !Config Help =
     1576    !
     1577    qqa2_omp = 0.0
     1578    call getin('qqa2',qqa2_omp)
     1579
     1580    !
     1581    !Config Key  = gammas
     1582    !Config Desc =
     1583    !Config Def  = 0.05
     1584    !Config Help =
     1585    !
     1586    gammas_omp = 0.05
     1587    call getin('gammas',gammas_omp)
     1588
     1589    !
     1590    !Config Key  = Fmax
     1591    !Config Desc =
     1592    !Config Def  = 0.65
     1593    !Config Help =
     1594    !
     1595    Fmax_omp = 0.65
     1596    call getin('Fmax',Fmax_omp)
     1597
     1598    !
     1599    !Config Key  = alphas 
     1600    !Config Desc =
     1601    !Config Def  = -5.
     1602    !Config Help =
     1603    !
     1604    alphas_omp = -5.
     1605    call getin('alphas',alphas_omp)
     1606
     1607    !Config key = ok_strato
     1608    !Config  Desc = activation de la version strato
     1609    !Config  Def  = .FALSE.
     1610    !Config  Help = active la version stratosphérique de LMDZ de F. Lott
     1611
     1612    ok_strato_omp=.FALSE.
     1613    CALL getin('ok_strato',ok_strato_omp)
     1614
     1615    !Config  key = ok_hines
     1616    !Config  Desc = activation de la parametrisation de hines
     1617    !Config  Def  = .FALSE.
     1618    !Config  Help = Clefs controlant la parametrization de Hines
     1619    !               Et la sponge layer (Runs Stratospheriques)
     1620
     1621    ok_hines_omp=.FALSE.
     1622    CALL getin('ok_hines',ok_hines_omp)
     1623
     1624    ! Random gravity waves:
     1625
     1626    ok_gwd_rando_omp = .FALSE.
     1627    CALL getin('ok_gwd_rando', ok_gwd_rando_omp)
     1628
     1629    RUWMAX_omp = 0.01
     1630    CALL getin('ruwmax', RUWMAX_omp)
     1631
     1632    sat_omp = 0.25
     1633    CALL getin('sat', sat_omp)
     1634
     1635    !Config Key  = OK_LES                                               
     1636    !Config Desc = Pour des sorties LES                                 
     1637    !Config Def  = .false.                                             
     1638    !Config Help = Pour creer le fichier histLES contenant les sorties 
     1639    !              LES                                                 
     1640    !                                                                   
     1641    ok_LES_omp = .false.                                             
     1642    call getin('OK_LES', ok_LES_omp)                                 
     1643
     1644    !Config Key  = callstats                                               
     1645    !Config Desc = Pour des sorties callstats                                 
     1646    !Config Def  = .false.                                             
     1647    !Config Help = Pour creer le fichier stats contenant les sorties 
     1648    !              stats                                                 
     1649    !                                                                   
     1650    callstats_omp = .false.                                             
     1651    call getin('callstats', callstats_omp)                                 
     1652    !
     1653    !Config Key  = ecrit_LES
     1654    !Config Desc = Frequence d'ecriture des resultats du LES en nombre de jours;
     1655    !              par defaut 1., i.e. 1 jour
     1656    !Config Def  = 1./8.
     1657    !Config Help = ...
     1658    !
     1659    !
     1660    ecrit_LES_omp = 1./8.
     1661    call getin('ecrit_LES', ecrit_LES_omp)
     1662    !
     1663    read_climoz = 0 ! default value
     1664    call getin('read_climoz', read_climoz)
     1665
     1666    carbon_cycle_tr_omp=.FALSE.
     1667    CALL getin('carbon_cycle_tr',carbon_cycle_tr_omp)
     1668
     1669    carbon_cycle_cpl_omp=.FALSE.
     1670    CALL getin('carbon_cycle_cpl',carbon_cycle_cpl_omp)
     1671
     1672    !$OMP END MASTER
     1673    !$OMP BARRIER
    16591674
    16601675    R_ecc = R_ecc_omp
     
    16831698    RCFC11_per = RCFC11_per_omp
    16841699    RCFC12_per = RCFC12_per_omp
    1685    
     1700
    16861701    cycle_diurne = cycle_diurne_omp
    16871702    soil_model = soil_model_omp
     
    17481763    ok_veget=.true.
    17491764    type_veget=type_veget_omp
    1750     if (type_veget=='n' .or. type_veget=='bucket' .or. type_veget=='betaclim' ) &
    1751          & then
    1752          ok_veget=.false.
     1765    if (type_veget=='n' .or. type_veget=='bucket' .or. type_veget=='betaclim') &
     1766         then
     1767       ok_veget=.false.
    17531768    endif
    17541769    ! Martin
     
    17911806    tau_thermals = tau_thermals_omp
    17921807    alp_bl_k = alp_bl_k_omp
    1793 !!! nrlmd le 10/04/2012
     1808    ! nrlmd le 10/04/2012
    17941809    iflag_trig_bl = iflag_trig_bl_omp
    17951810    s_trig = s_trig_omp
     
    17971812    tau_trig_deep = tau_trig_deep_omp
    17981813    iflag_clos_bl = iflag_clos_bl_omp
    1799 !!! fin nrlmd le 10/04/2012
     1814    ! fin nrlmd le 10/04/2012
    18001815    iflag_coupl = iflag_coupl_omp
    18011816    iflag_clos = iflag_clos_omp
     
    18351850    ok_strato = ok_strato_omp
    18361851    ok_hines = ok_hines_omp
     1852    ok_gwd_rando = ok_gwd_rando_omp
     1853    RUWMAX = RUWMAX_omp
     1854    sat = sat_omp
    18371855    ok_LES = ok_LES_omp
    18381856    callstats = callstats_omp
     
    18411859    carbon_cycle_cpl = carbon_cycle_cpl_omp
    18421860
    1843 ! Test of coherence between type_ocean and version_ocean
     1861    ! Test of coherence between type_ocean and version_ocean
    18441862    IF (type_ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo') ) THEN
    18451863       WRITE(lunout,*)' ERROR version_ocean=',version_ocean,' not valid in coupled configuration'
     
    18541872    END IF
    18551873
    1856 ! Test sur new_aod. Ce flag permet de retrouver les resultats de l'AR4
    1857 ! il n'est utilisable que lors du couplage avec le SO4 seul
     1874    ! Test sur new_aod. Ce flag permet de retrouver les resultats de l'AR4
     1875    ! il n'est utilisable que lors du couplage avec le SO4 seul
    18581876    IF (ok_ade .OR. ok_aie) THEN
    18591877       IF ( flag_aerosol .EQ. 0 ) THEN
     
    18651883    END IF
    18661884
    1867 ! ok_cdnc must be set to y if ok_aie is activated
     1885    ! ok_cdnc must be set to y if ok_aie is activated
    18681886    IF (ok_aie .AND. .NOT. ok_cdnc) THEN
    18691887       CALL abort_gcm('conf_phys', 'ok_cdnc must be set to y if ok_aie is activated',1)
    1870     ENDIF
    1871 
    1872 !$OMP MASTER
    1873 
    1874   write(lunout,*)' ##############################################'
    1875   write(lunout,*)' Configuration des parametres de la physique: '
    1876   write(lunout,*)' Type ocean = ', type_ocean
    1877   write(lunout,*)' Version ocean = ', version_ocean
    1878   write(lunout,*)' Config veget = ', ok_veget,type_veget
    1879   write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow
    1880   write(lunout,*)' Sortie journaliere = ', ok_journe
    1881   write(lunout,*)' Sortie haute frequence = ', ok_hf
    1882   write(lunout,*)' Sortie mensuelle = ', ok_mensuel
    1883   write(lunout,*)' Sortie instantanee = ', ok_instan
    1884   write(lunout,*)' Frequence appel simulateur ISCCP, freq_ISCCP =', freq_ISCCP
    1885   write(lunout,*)' Frequence appel simulateur ISCCP, ecrit_ISCCP =', ecrit_ISCCP
    1886   write(lunout,*)' Frequence appel simulateur COSP, freq_COSP =', freq_COSP
    1887   write(lunout,*)' Sortie bilan d''energie, ip_ebil_phy =', ip_ebil_phy
    1888   write(lunout,*)' Excentricite = ',R_ecc
    1889   write(lunout,*)' Equinoxe = ',R_peri
    1890   write(lunout,*)' Inclinaison =',R_incl
    1891   write(lunout,*)' Constante solaire =',solaire
    1892   write(lunout,*)' co2_ppm =',co2_ppm
    1893   write(lunout,*)' RCO2_act = ',RCO2_act
    1894   write(lunout,*)' CH4_ppb =',CH4_ppb,' RCH4_act = ',RCH4_act
    1895   write(lunout,*)' N2O_ppb =',N2O_ppb,' RN2O_act=  ',RN2O_act
    1896   write(lunout,*)' CFC11_ppt=',CFC11_ppt,' RCFC11_act=  ',RCFC11_act
    1897   write(lunout,*)' CFC12_ppt=',CFC12_ppt,' RCFC12_act=  ',RCFC12_act
    1898   write(lunout,*)' ok_4xCO2atm=',ok_4xCO2atm
    1899   write(lunout,*)' RCO2_per = ',RCO2_per,' RCH4_per = ', RCH4_per
    1900   write(lunout,*)' RN2O_per = ',RN2O_per,' RCFC11_per = ', RCFC11_per
    1901   write(lunout,*)' RCFC12_per = ',RCFC12_per
    1902   write(lunout,*)' cvl_corr=', cvl_corr
    1903   write(lunout,*)'ok_lic_melt=', ok_lic_melt
    1904   write(lunout,*)'cycle_diurne=',cycle_diurne
    1905   write(lunout,*)'soil_model=',soil_model
    1906   write(lunout,*)'new_oliq=',new_oliq
    1907   write(lunout,*)'ok_orodr=',ok_orodr
    1908   write(lunout,*)'ok_orolf=',ok_orolf
    1909   write(lunout,*)'ok_limitvrai=',ok_limitvrai
    1910   write(lunout,*)'nbapp_rad=',nbapp_rad
    1911   write(lunout,*)'iflag_con=',iflag_con
    1912   write(lunout,*)'iflag_ener_conserv=',iflag_ener_conserv
    1913   write(lunout,*)'iflag_fisrtilp_qsat=',iflag_fisrtilp_qsat
    1914   write(lunout,*)' epmax = ', epmax
    1915   write(lunout,*)' ok_adj_ema = ', ok_adj_ema
    1916   write(lunout,*)' iflag_clw = ', iflag_clw
    1917   write(lunout,*)' cld_lc_lsc = ', cld_lc_lsc
    1918   write(lunout,*)' cld_lc_con = ', cld_lc_con
    1919   write(lunout,*)' cld_tau_lsc = ', cld_tau_lsc
    1920   write(lunout,*)' cld_tau_con = ', cld_tau_con
    1921   write(lunout,*)' ffallv_lsc = ', ffallv_lsc
    1922   write(lunout,*)' ffallv_con = ', ffallv_con
    1923   write(lunout,*)' coef_eva = ', coef_eva
    1924   write(lunout,*)' reevap_ice = ', reevap_ice
    1925   write(lunout,*)' iflag_pdf = ', iflag_pdf
    1926   write(lunout,*)' iflag_cldcon = ', iflag_cldcon
    1927   write(lunout,*)' iflag_radia = ', iflag_radia
    1928   write(lunout,*)' iflag_rrtm = ', iflag_rrtm
    1929   write(lunout,*)' iflag_ratqs = ', iflag_ratqs
    1930   write(lunout,*)' seuil_inversion = ', seuil_inversion
    1931   write(lunout,*)' fact_cldcon = ', fact_cldcon
    1932   write(lunout,*)' facttemps = ', facttemps
    1933   write(lunout,*)' ok_newmicro = ',ok_newmicro
    1934   write(lunout,*)' ratqsbas = ',ratqsbas
    1935   write(lunout,*)' ratqshaut = ',ratqshaut
    1936   write(lunout,*)' tau_ratqs = ',tau_ratqs
    1937   write(lunout,*)' top_height = ',top_height
    1938   write(lunout,*)' rad_froid = ',rad_froid
    1939   write(lunout,*)' rad_chau1 = ',rad_chau1
    1940   write(lunout,*)' rad_chau2 = ',rad_chau2
    1941   write(lunout,*)' t_glace_min = ',t_glace_min
    1942   write(lunout,*)' t_glace_max = ',t_glace_max
    1943   write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo
    1944   write(lunout,*)' rei_min = ',rei_min
    1945   write(lunout,*)' rei_max = ',rei_max
    1946   write(lunout,*)' overlap = ',overlap
    1947   write(lunout,*)' cdmmax = ',cdmmax
    1948   write(lunout,*)' cdhmax = ',cdhmax
    1949   write(lunout,*)' ksta = ',ksta
    1950   write(lunout,*)' ksta_ter = ',ksta_ter
    1951   write(lunout,*)' ok_kzmin = ',ok_kzmin
    1952   write(lunout,*)' fmagic = ',fmagic
    1953   write(lunout,*)' pmagic = ',pmagic
    1954   write(lunout,*)' ok_ade = ',ok_ade
    1955   write(lunout,*)' ok_aie = ',ok_aie
    1956   write(lunout,*)' aerosol_couple = ', aerosol_couple
    1957   write(lunout,*)' flag_aerosol = ', flag_aerosol
    1958   write(lunout,*)' flag_aerosol_strat = ', flag_aerosol_strat
    1959   write(lunout,*)' new_aod = ', new_aod
    1960   write(lunout,*)' aer_type = ',aer_type
    1961   write(lunout,*)' bl95_b0 = ',bl95_b0
    1962   write(lunout,*)' bl95_b1 = ',bl95_b1
    1963   write(lunout,*)' lev_histhf = ',lev_histhf
    1964   write(lunout,*)' lev_histday = ',lev_histday
    1965   write(lunout,*)' lev_histmth = ',lev_histmth
    1966   write(lunout,*)' lev_histins = ',lev_histins
    1967   write(lunout,*)' lev_histLES = ',lev_histLES
    1968   write(lunout,*)' lev_histdayNMC = ',lev_histdayNMC
    1969   write(lunout,*)' levout_histNMC = ',levout_histNMC
    1970   write(lunout,*)' ok_histNMC = ',ok_histNMC
    1971   write(lunout,*)' freq_outNMC = ',freq_outNMC
    1972   write(lunout,*)' freq_calNMC = ',freq_calNMC
    1973   write(lunout,*)' iflag_pbl = ', iflag_pbl
    1974   write(lunout,*)' iflag_thermals = ', iflag_thermals
    1975   write(lunout,*)' iflag_thermals_ed = ', iflag_thermals_ed
    1976   write(lunout,*)' iflag_thermals_optflux = ', iflag_thermals_optflux
    1977   write(lunout,*)' iflag_clos = ', iflag_clos
    1978   write(lunout,*)' type_run = ',type_run
    1979   write(lunout,*)' ok_cosp = ',ok_cosp
    1980   write(lunout,*)' ok_mensuelCOSP = ',ok_mensuelCOSP
    1981   write(lunout,*)' ok_journeCOSP = ',ok_journeCOSP
    1982   write(lunout,*)' ok_hfCOSP =',ok_hfCOSP
    1983   write(lunout,*)' solarlong0 = ', solarlong0
    1984   write(lunout,*)' qsol0 = ', qsol0
    1985   write(lunout,*)' evap0 = ', evap0
    1986   write(lunout,*)' albsno0 = ', albsno0
    1987   write(lunout,*)' inertie_sol = ', inertie_sol
    1988   write(lunout,*)' inertie_ice = ', inertie_ice
    1989   write(lunout,*)' inertie_sno = ', inertie_sno
    1990   write(lunout,*)' f_cdrag_ter = ',f_cdrag_ter
    1991   write(lunout,*)' f_cdrag_oce = ',f_cdrag_oce
    1992   write(lunout,*)' f_rugoro = ',f_rugoro
    1993   write(lunout,*)' supcrit1 = ', supcrit1
    1994   write(lunout,*)' supcrit2 = ', supcrit2
    1995   write(lunout,*)' iflag_mix = ', iflag_mix
    1996   write(lunout,*)' scut = ', scut
    1997   write(lunout,*)' qqa1 = ', qqa1
    1998   write(lunout,*)' qqa2 = ', qqa2
    1999   write(lunout,*)' gammas = ', gammas
    2000   write(lunout,*)' Fmax = ', Fmax
    2001   write(lunout,*)' alphas = ', alphas
    2002   write(lunout,*)' iflag_wake = ', iflag_wake
    2003   write(lunout,*)' alp_offset = ', alp_offset
    2004 !!! nrlmd le 10/04/2012
    2005   write(lunout,*)' iflag_trig_bl = ', iflag_trig_bl
    2006   write(lunout,*)' s_trig = ', s_trig
    2007   write(lunout,*)' tau_trig_shallow = ', tau_trig_shallow
    2008   write(lunout,*)' tau_trig_deep = ', tau_trig_deep
    2009   write(lunout,*)' iflag_clos_bl = ', iflag_clos_bl
    2010 !!! fin nrlmd le 10/04/2012
    2011 
    2012   write(lunout,*)' lonmin lonmax latmin latmax bilKP_ins =',&
    2013    lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
    2014   write(lunout,*)' ecrit_ hf, ins, day, mth, reg, tra, ISCCP, LES',&
    2015    ecrit_hf, ecrit_ins, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES
    2016 
    2017   write(lunout,*) 'ok_strato = ', ok_strato
    2018   write(lunout,*) 'ok_hines = ',  ok_hines
    2019   write(lunout,*) 'read_climoz = ', read_climoz
    2020   write(lunout,*) 'carbon_cycle_tr = ', carbon_cycle_tr
    2021   write(lunout,*) 'carbon_cycle_cpl = ', carbon_cycle_cpl
    2022  
    2023 !$OMP END MASTER
    2024 
    2025   return
    2026  
     1888    ENDIF
     1889
     1890    !$OMP MASTER
     1891
     1892    write(lunout,*)' ##############################################'
     1893    write(lunout,*)' Configuration des parametres de la physique: '
     1894    write(lunout,*)' Type ocean = ', type_ocean
     1895    write(lunout,*)' Version ocean = ', version_ocean
     1896    write(lunout,*)' Config veget = ', ok_veget,type_veget
     1897    write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow
     1898    write(lunout,*)' Sortie journaliere = ', ok_journe
     1899    write(lunout,*)' Sortie haute frequence = ', ok_hf
     1900    write(lunout,*)' Sortie mensuelle = ', ok_mensuel
     1901    write(lunout,*)' Sortie instantanee = ', ok_instan
     1902    write(lunout,*)' Frequence appel simulateur ISCCP, freq_ISCCP =', freq_ISCCP
     1903    write(lunout,*)' Frequence appel simulateur ISCCP, ecrit_ISCCP =', ecrit_ISCCP
     1904    write(lunout,*)' Frequence appel simulateur COSP, freq_COSP =', freq_COSP
     1905    write(lunout,*)' Sortie bilan d''energie, ip_ebil_phy =', ip_ebil_phy
     1906    write(lunout,*)' Excentricite = ',R_ecc
     1907    write(lunout,*)' Equinoxe = ',R_peri
     1908    write(lunout,*)' Inclinaison =',R_incl
     1909    write(lunout,*)' Constante solaire =',solaire
     1910    write(lunout,*)' co2_ppm =',co2_ppm
     1911    write(lunout,*)' RCO2_act = ',RCO2_act
     1912    write(lunout,*)' CH4_ppb =',CH4_ppb,' RCH4_act = ',RCH4_act
     1913    write(lunout,*)' N2O_ppb =',N2O_ppb,' RN2O_act=  ',RN2O_act
     1914    write(lunout,*)' CFC11_ppt=',CFC11_ppt,' RCFC11_act=  ',RCFC11_act
     1915    write(lunout,*)' CFC12_ppt=',CFC12_ppt,' RCFC12_act=  ',RCFC12_act
     1916    write(lunout,*)' ok_4xCO2atm=',ok_4xCO2atm
     1917    write(lunout,*)' RCO2_per = ',RCO2_per,' RCH4_per = ', RCH4_per
     1918    write(lunout,*)' RN2O_per = ',RN2O_per,' RCFC11_per = ', RCFC11_per
     1919    write(lunout,*)' RCFC12_per = ',RCFC12_per
     1920    write(lunout,*)' cvl_corr=', cvl_corr
     1921    write(lunout,*)'ok_lic_melt=', ok_lic_melt
     1922    write(lunout,*)'cycle_diurne=',cycle_diurne
     1923    write(lunout,*)'soil_model=',soil_model
     1924    write(lunout,*)'new_oliq=',new_oliq
     1925    write(lunout,*)'ok_orodr=',ok_orodr
     1926    write(lunout,*)'ok_orolf=',ok_orolf
     1927    write(lunout,*)'ok_limitvrai=',ok_limitvrai
     1928    write(lunout,*)'nbapp_rad=',nbapp_rad
     1929    write(lunout,*)'iflag_con=',iflag_con
     1930    write(lunout,*)'iflag_ener_conserv=',iflag_ener_conserv
     1931    write(lunout,*)'iflag_fisrtilp_qsat=',iflag_fisrtilp_qsat
     1932    write(lunout,*)' epmax = ', epmax
     1933    write(lunout,*)' ok_adj_ema = ', ok_adj_ema
     1934    write(lunout,*)' iflag_clw = ', iflag_clw
     1935    write(lunout,*)' cld_lc_lsc = ', cld_lc_lsc
     1936    write(lunout,*)' cld_lc_con = ', cld_lc_con
     1937    write(lunout,*)' cld_tau_lsc = ', cld_tau_lsc
     1938    write(lunout,*)' cld_tau_con = ', cld_tau_con
     1939    write(lunout,*)' ffallv_lsc = ', ffallv_lsc
     1940    write(lunout,*)' ffallv_con = ', ffallv_con
     1941    write(lunout,*)' coef_eva = ', coef_eva
     1942    write(lunout,*)' reevap_ice = ', reevap_ice
     1943    write(lunout,*)' iflag_pdf = ', iflag_pdf
     1944    write(lunout,*)' iflag_cldcon = ', iflag_cldcon
     1945    write(lunout,*)' iflag_radia = ', iflag_radia
     1946    write(lunout,*)' iflag_rrtm = ', iflag_rrtm
     1947    write(lunout,*)' iflag_ratqs = ', iflag_ratqs
     1948    write(lunout,*)' seuil_inversion = ', seuil_inversion
     1949    write(lunout,*)' fact_cldcon = ', fact_cldcon
     1950    write(lunout,*)' facttemps = ', facttemps
     1951    write(lunout,*)' ok_newmicro = ',ok_newmicro
     1952    write(lunout,*)' ratqsbas = ',ratqsbas
     1953    write(lunout,*)' ratqshaut = ',ratqshaut
     1954    write(lunout,*)' tau_ratqs = ',tau_ratqs
     1955    write(lunout,*)' top_height = ',top_height
     1956    write(lunout,*)' rad_froid = ',rad_froid
     1957    write(lunout,*)' rad_chau1 = ',rad_chau1
     1958    write(lunout,*)' rad_chau2 = ',rad_chau2
     1959    write(lunout,*)' t_glace_min = ',t_glace_min
     1960    write(lunout,*)' t_glace_max = ',t_glace_max
     1961    write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo
     1962    write(lunout,*)' rei_min = ',rei_min
     1963    write(lunout,*)' rei_max = ',rei_max
     1964    write(lunout,*)' overlap = ',overlap
     1965    write(lunout,*)' cdmmax = ',cdmmax
     1966    write(lunout,*)' cdhmax = ',cdhmax
     1967    write(lunout,*)' ksta = ',ksta
     1968    write(lunout,*)' ksta_ter = ',ksta_ter
     1969    write(lunout,*)' ok_kzmin = ',ok_kzmin
     1970    write(lunout,*)' fmagic = ',fmagic
     1971    write(lunout,*)' pmagic = ',pmagic
     1972    write(lunout,*)' ok_ade = ',ok_ade
     1973    write(lunout,*)' ok_aie = ',ok_aie
     1974    write(lunout,*)' aerosol_couple = ', aerosol_couple
     1975    write(lunout,*)' flag_aerosol = ', flag_aerosol
     1976    write(lunout,*)' flag_aerosol_strat = ', flag_aerosol_strat
     1977    write(lunout,*)' new_aod = ', new_aod
     1978    write(lunout,*)' aer_type = ',aer_type
     1979    write(lunout,*)' bl95_b0 = ',bl95_b0
     1980    write(lunout,*)' bl95_b1 = ',bl95_b1
     1981    write(lunout,*)' lev_histhf = ',lev_histhf
     1982    write(lunout,*)' lev_histday = ',lev_histday
     1983    write(lunout,*)' lev_histmth = ',lev_histmth
     1984    write(lunout,*)' lev_histins = ',lev_histins
     1985    write(lunout,*)' lev_histLES = ',lev_histLES
     1986    write(lunout,*)' lev_histdayNMC = ',lev_histdayNMC
     1987    write(lunout,*)' levout_histNMC = ',levout_histNMC
     1988    write(lunout,*)' ok_histNMC = ',ok_histNMC
     1989    write(lunout,*)' freq_outNMC = ',freq_outNMC
     1990    write(lunout,*)' freq_calNMC = ',freq_calNMC
     1991    write(lunout,*)' iflag_pbl = ', iflag_pbl
     1992    write(lunout,*)' iflag_thermals = ', iflag_thermals
     1993    write(lunout,*)' iflag_thermals_ed = ', iflag_thermals_ed
     1994    write(lunout,*)' iflag_thermals_optflux = ', iflag_thermals_optflux
     1995    write(lunout,*)' iflag_clos = ', iflag_clos
     1996    write(lunout,*)' type_run = ',type_run
     1997    write(lunout,*)' ok_cosp = ',ok_cosp
     1998    write(lunout,*)' ok_mensuelCOSP = ',ok_mensuelCOSP
     1999    write(lunout,*)' ok_journeCOSP = ',ok_journeCOSP
     2000    write(lunout,*)' ok_hfCOSP =',ok_hfCOSP
     2001    write(lunout,*)' solarlong0 = ', solarlong0
     2002    write(lunout,*)' qsol0 = ', qsol0
     2003    write(lunout,*)' evap0 = ', evap0
     2004    write(lunout,*)' albsno0 = ', albsno0
     2005    write(lunout,*)' inertie_sol = ', inertie_sol
     2006    write(lunout,*)' inertie_ice = ', inertie_ice
     2007    write(lunout,*)' inertie_sno = ', inertie_sno
     2008    write(lunout,*)' f_cdrag_ter = ',f_cdrag_ter
     2009    write(lunout,*)' f_cdrag_oce = ',f_cdrag_oce
     2010    write(lunout,*)' f_rugoro = ',f_rugoro
     2011    write(lunout,*)' supcrit1 = ', supcrit1
     2012    write(lunout,*)' supcrit2 = ', supcrit2
     2013    write(lunout,*)' iflag_mix = ', iflag_mix
     2014    write(lunout,*)' scut = ', scut
     2015    write(lunout,*)' qqa1 = ', qqa1
     2016    write(lunout,*)' qqa2 = ', qqa2
     2017    write(lunout,*)' gammas = ', gammas
     2018    write(lunout,*)' Fmax = ', Fmax
     2019    write(lunout,*)' alphas = ', alphas
     2020    write(lunout,*)' iflag_wake = ', iflag_wake
     2021    write(lunout,*)' alp_offset = ', alp_offset
     2022    ! nrlmd le 10/04/2012
     2023    write(lunout,*)' iflag_trig_bl = ', iflag_trig_bl
     2024    write(lunout,*)' s_trig = ', s_trig
     2025    write(lunout,*)' tau_trig_shallow = ', tau_trig_shallow
     2026    write(lunout,*)' tau_trig_deep = ', tau_trig_deep
     2027    write(lunout,*)' iflag_clos_bl = ', iflag_clos_bl
     2028    ! fin nrlmd le 10/04/2012
     2029
     2030    write(lunout,*)' lonmin lonmax latmin latmax bilKP_ins =',&
     2031         lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
     2032    write(lunout,*)' ecrit_ hf, ins, day, mth, reg, tra, ISCCP, LES',&
     2033         ecrit_hf, ecrit_ins, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES
     2034
     2035    write(lunout,*) 'ok_strato = ', ok_strato
     2036    write(lunout,*) 'ok_hines = ',  ok_hines
     2037    write(lunout,*) 'ok_gwd_rando = ',  ok_gwd_rando
     2038    write(lunout,*) 'RUWMAX = ', RUWMAX
     2039    write(lunout,*) 'sat = ', sat
     2040    write(lunout,*) 'read_climoz = ', read_climoz
     2041    write(lunout,*) 'carbon_cycle_tr = ', carbon_cycle_tr
     2042    write(lunout,*) 'carbon_cycle_cpl = ', carbon_cycle_cpl
     2043
     2044    !$OMP END MASTER
     2045
     2046    return
     2047
    20272048  end subroutine conf_phys
    20282049
     
    20322053!
    20332054
    2034    subroutine conf_interface(tau_calv)
    2035 
    2036    use IOIPSL
    2037    implicit none
    2038    include "iniprint.h"
    2039 ! Configuration de l'interace atm/surf
    2040 !
    2041 ! tau_calv:    temps de relaxation pour la fonte des glaciers
     2055subroutine conf_interface(tau_calv)
     2056
     2057  use IOIPSL
     2058  implicit none
     2059  include "iniprint.h"
     2060  ! Configuration de l'interace atm/surf
     2061  !
     2062  ! tau_calv:    temps de relaxation pour la fonte des glaciers
    20422063
    20432064  REAL          :: tau_calv
    20442065  REAL,SAVE     :: tau_calv_omp
    20452066
    2046 !
    2047 !Config Key  = tau_calv
    2048 !Config Desc = temps de relaxation pour fonte des glaciers en jours
    2049 !Config Def  = 1 an
    2050 !Config Help =
    2051 !
     2067  !
     2068  !Config Key  = tau_calv
     2069  !Config Desc = temps de relaxation pour fonte des glaciers en jours
     2070  !Config Def  = 1 an
     2071  !Config Help =
     2072  !
    20522073  tau_calv_omp = 360.*10.
    2053 !$OMP MASTER
     2074  !$OMP MASTER
    20542075  call getin('tau_calv',tau_calv_omp)
    2055 !$OMP END MASTER
    2056 !$OMP BARRIER
     2076  !$OMP END MASTER
     2077  !$OMP BARRIER
    20572078
    20582079  tau_calv=tau_calv_omp
    2059  
    2060 !$OMP MASTER
     2080
     2081  !$OMP MASTER
    20612082  write(lunout,*)' ##############################################'
    20622083  WRITE(lunout,*)' Configuration de l''interface atm/surfaces  : '
    20632084  WRITE(lunout,*)' tau_calv = ',tau_calv
    2064 !$OMP END MASTER
     2085  !$OMP END MASTER
    20652086
    20662087  return
    20672088
    2068   end subroutine conf_interface
     2089end subroutine conf_interface
  • LMDZ5/trunk/libf/phylmd/phyetat0.F90

    r1931 r1938  
    33SUBROUTINE phyetat0 (fichnom, clesphy0, tabcntr0)
    44
    5   USE dimphy
    6   USE mod_grid_phy_lmdz
    7   USE mod_phys_lmdz_para
    8   USE iophy
     5  USE dimphy, only: klon, zmasq, klev
     6  USE iophy, ONLY : init_iophy_new
    97  USE ocean_cpl_mod,    ONLY : ocean_cpl_init
    108  USE fonte_neige_mod,  ONLY : fonte_neige_init
    119  USE pbl_surface_mod,  ONLY : pbl_surface_init
    1210  USE surface_data,     ONLY : type_ocean
    13   USE phys_state_var_mod
    14   USE iostart
    15   USE write_field_phy
    16   USE infotrac
     11  USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, dtime, &
     12       du_gwd_rando, dv_gwd_rando, entr_therm, f0, falb1, falb2, fm_therm, &
     13       ftsol, pbl_tke, pctsrf, q_ancien, radpas, radsol, rain_fall, ratqs, &
     14       rlat, rlon, rnebcon, rugoro, sig1, snow_fall, solaire_etat0, sollw, &
     15       solsw, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, &
     16       wake_deltat, wake_fip, wake_pe, wake_s, zgam, zmax0, zmea, zpic, zsig, &
     17       zstd, zthe, zval
     18  USE iostart, ONLY : close_startphy, get_field, get_var, open_startphy
     19  USE infotrac, only: nbtr, type_trac, tname, niadv
    1720  USE traclmdz_mod,    ONLY : traclmdz_from_restart
    1821  USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl, co2_send
    19   USE indice_sol_mod
     22  USE indice_sol_mod, only: nbsrf, is_ter, epsfra, is_lic, is_oce, is_sic
    2023
    2124  IMPLICIT none
     
    10281031  END IF
    10291032
     1033  if (ok_gwd_rando) then
     1034     call get_field("du_gwd_rando", du_gwd_rando, found)
     1035     if (.not. found) then
     1036        print *, "du_gwd_rando not found, setting it to 0."
     1037        du_gwd_rando = 0.
     1038     end if
     1039
     1040     call get_field("dv_gwd_rando", dv_gwd_rando, found)
     1041     if (.not. found) then
     1042        print *, "dv_gwd_rando not found, setting it to 0."
     1043        dv_gwd_rando = 0.
     1044     end if
     1045  end if
     1046
    10301047  ! on ferme le fichier
    10311048  CALL close_startphy
  • LMDZ5/trunk/libf/phylmd/phyredem.F90

    r1931 r1938  
    340340  END IF
    341341
     342  if (ok_gwd_rando) then
     343     call put_field("du_gwd_rando", &
     344          "tendency on zonal wind due to gravity waves", &
     345          du_gwd_rando)
     346     call put_field("dv_gwd_rando", &
     347          "tendency on meriodional wind due to gravity waves", &
     348          dv_gwd_rando)
     349  end if
     350
    342351  CALL close_restartphy
    343352  !$OMP BARRIER
  • LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r1924 r1938  
    10881088    'dthin', 'Hines GWD dT', 'K/s', (/ ('', i=1, 9) /))
    10891089
     1090  type(ctrl_out), save:: o_du_gwd_rando &
     1091       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'du_gwd_rando', &
     1092       "Random gravity waves dU/dt", "m/s2", (/ ('', i=1, 9) /))
     1093  type(ctrl_out), save:: o_dv_gwd_rando &
     1094       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'dv_gwd_rando', &
     1095       "Random gravity waves dV/dt", "m/s2", (/ ('', i=1, 9) /))
     1096  type(ctrl_out), save:: o_vstr_gwd_rando &
     1097       = ctrl_out((/ 4, 10, 10, 10, 10, 10, 11, 11, 11 /), 'vstr_gwd_rando', &
     1098       "meridional wind stress random gravity waves", "Pa", (/ ('', i=1, 9) /))
     1099
    10901100  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_trac(:)
    10911101  TYPE(ctrl_out), SAVE, ALLOCATABLE :: o_trac_cum(:)
  • LMDZ5/trunk/libf/phylmd/phys_output_var_mod.F90

    r1907 r1938  
    22! phys_local_var_mod.F90 1327 2010-03-17 15:33:56Z idelkadi $
    33
    4       MODULE phys_output_var_mod
     4MODULE phys_output_var_mod
    55
    6       use dimphy
    7 ! Variables outputs pour les ecritures des sorties
    8 !======================================================================
    9 !
    10 !
    11 !======================================================================
    12 ! Declaration des variables
     6  use dimphy
     7  ! Variables outputs pour les ecritures des sorties
     8  !======================================================================
     9  !
     10  !
     11  !======================================================================
     12  ! Declaration des variables
    1313
    14       REAL, SAVE, ALLOCATABLE :: snow_o(:), zfra_o(:)
    15 !$OMP THREADPRIVATE(snow_o, zfra_o)
    16       INTEGER, SAVE, ALLOCATABLE ::  itau_con(:)       ! Nombre de pas ou rflag <= 1
    17 !$OMP THREADPRIVATE(itau_con)
    18       REAL, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation
    19       REAL, ALLOCATABLE :: bils_tke(:) ! Contribution of energy conservation
    20       REAL, ALLOCATABLE :: bils_diss(:) ! Contribution of energy conservation
    21       REAL, ALLOCATABLE :: bils_kinetic(:) ! bilan de chaleur au sol, kinetic
    22       REAL, ALLOCATABLE :: bils_enthalp(:) ! bilan de chaleur au sol
    23       REAL, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol
    24 !$OMP THREADPRIVATE(bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
     14  REAL, SAVE, ALLOCATABLE :: snow_o(:), zfra_o(:)
     15  !$OMP THREADPRIVATE(snow_o, zfra_o)
     16  INTEGER, SAVE, ALLOCATABLE ::  itau_con(:)       ! Nombre de pas ou rflag <= 1
     17  !$OMP THREADPRIVATE(itau_con)
     18  REAL, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation
     19  REAL, ALLOCATABLE :: bils_tke(:) ! Contribution of energy conservation
     20  REAL, ALLOCATABLE :: bils_diss(:) ! Contribution of energy conservation
     21  REAL, ALLOCATABLE :: bils_kinetic(:) ! bilan de chaleur au sol, kinetic
     22  REAL, ALLOCATABLE :: bils_enthalp(:) ! bilan de chaleur au sol
     23  REAL, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol
     24  !$OMP THREADPRIVATE(bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
    2525
    2626
    27 ! ug Plein de variables venues de phys_output_mod
    28       INTEGER, PARAMETER                           :: nfiles = 9
    29       LOGICAL, DIMENSION(nfiles), SAVE             :: clef_files
    30       LOGICAL, DIMENSION(nfiles), SAVE             :: clef_stations
    31       INTEGER, DIMENSION(nfiles), SAVE             :: lev_files
    32       INTEGER, DIMENSION(nfiles), SAVE             :: nid_files
    33       INTEGER, DIMENSION(nfiles), SAVE  :: nnid_files
    34 !$OMP THREADPRIVATE(clef_files, clef_stations, lev_files,nid_files,nnid_files)
    35       INTEGER, DIMENSION(nfiles), SAVE :: nnhorim
     27  ! ug Plein de variables venues de phys_output_mod
     28  INTEGER, PARAMETER                           :: nfiles = 9
     29  LOGICAL, DIMENSION(nfiles), SAVE             :: clef_files
     30  LOGICAL, DIMENSION(nfiles), SAVE             :: clef_stations
     31  INTEGER, DIMENSION(nfiles), SAVE             :: lev_files
     32  INTEGER, DIMENSION(nfiles), SAVE             :: nid_files
     33  INTEGER, DIMENSION(nfiles), SAVE  :: nnid_files
     34  !$OMP THREADPRIVATE(clef_files, clef_stations, lev_files,nid_files,nnid_files)
     35  INTEGER, DIMENSION(nfiles), SAVE :: nnhorim
    3636
    37       INTEGER, DIMENSION(nfiles), SAVE :: nhorim, nvertm
    38       INTEGER, DIMENSION(nfiles), SAVE :: nvertap, nvertbp, nvertAlt
    39       REAL, DIMENSION(nfiles), SAVE                :: zoutm
    40       CHARACTER(LEN=20), DIMENSION(nfiles), SAVE   :: type_ecri
    41 !$OMP THREADPRIVATE(nnhorim, nhorim, nvertm, zoutm,type_ecri)
    42       CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: type_ecri_files, phys_out_filetypes
    43 !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes)
    44     CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: phys_out_filenames
    45 !$OMP THREADPRIVATE(phys_out_filenames)
     37  INTEGER, DIMENSION(nfiles), SAVE :: nhorim, nvertm
     38  INTEGER, DIMENSION(nfiles), SAVE :: nvertap, nvertbp, nvertAlt
     39  REAL, DIMENSION(nfiles), SAVE                :: zoutm
     40  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE   :: type_ecri
     41  !$OMP THREADPRIVATE(nnhorim, nhorim, nvertm, zoutm,type_ecri)
     42  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: type_ecri_files, phys_out_filetypes
     43  !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes)
     44  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: phys_out_filenames
     45  !$OMP THREADPRIVATE(phys_out_filenames)
    4646
    47  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
    48       LOGICAL, SAVE                                :: swaero_diag=.FALSE.
    49 !$OMP THREADPRIVATE(swaero_diag)
     47  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
     48  LOGICAL, SAVE                                :: swaero_diag=.FALSE.
     49  !$OMP THREADPRIVATE(swaero_diag)
    5050
    51       INTEGER, SAVE:: levmin(nfiles) = 1
    52       INTEGER, SAVE:: levmax(nfiles)
    53 !$OMP THREADPRIVATE(levmin, levmax)
     51  INTEGER, SAVE:: levmin(nfiles) = 1
     52  INTEGER, SAVE:: levmax(nfiles)
     53  !$OMP THREADPRIVATE(levmin, levmax)
    5454
    55       REAL, SAVE                :: zdtime_moy
    56 !$OMP THREADPRIVATE(zdtime_moy)
     55  REAL, SAVE                :: zdtime_moy
     56  !$OMP THREADPRIVATE(zdtime_moy)
    5757
    58       LOGICAL, SAVE :: vars_defined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL
     58  LOGICAL, SAVE :: vars_defined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL
     59
     60  REAL, allocatable:: zustr_gwd_rando(:), zvstr_gwd_rando(:) ! (klon)
     61  !$OMP THREADPRIVATE(zustr_gwd_rando, zvstr_gwd_rando)
    5962
    6063  TYPE ctrl_out
     
    6568     CHARACTER(len=20),DIMENSION(nfiles)  :: type_ecrit
    6669  END TYPE ctrl_out
     70
    6771CONTAINS
    6872
    69 !======================================================================
    70 SUBROUTINE phys_output_var_init
    71 use dimphy
     73  !======================================================================
     74  SUBROUTINE phys_output_var_init
     75    use dimphy
    7276
    73 IMPLICIT NONE
     77    IMPLICIT NONE
    7478
    75       allocate(snow_o(klon), zfra_o(klon))
    76       allocate(itau_con(klon))
    77       allocate (bils_ec(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon))
     79    include "clesphys.h"
    7880
    79 END SUBROUTINE phys_output_var_init
     81    !------------------------------------------------
    8082
    81 !======================================================================
    82 SUBROUTINE phys_output_var_end
    83 use dimphy
    84 IMPLICIT NONE
     83    allocate(snow_o(klon), zfra_o(klon))
     84    allocate(itau_con(klon))
     85    allocate (bils_ec(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon))
    8586
    86       deallocate(snow_o,zfra_o,itau_con)
    87       deallocate (bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
     87    IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon))
    8888
    89 END SUBROUTINE phys_output_var_end
     89  END SUBROUTINE phys_output_var_init
     90
     91  !======================================================================
     92  SUBROUTINE phys_output_var_end
     93    use dimphy
     94    IMPLICIT NONE
     95
     96    deallocate(snow_o,zfra_o,itau_con)
     97    deallocate (bils_ec,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
     98
     99  END SUBROUTINE phys_output_var_end
    90100
    91101END MODULE phys_output_var_mod
  • LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90

    r1924 r1938  
    146146         o_dtr_insc, o_dtr_bcscav, o_dtr_evapls, &
    147147         o_dtr_ls, o_dtr_trsp, o_dtr_sscav, &
    148          o_dtr_sat, o_dtr_uscav, o_trac_cum
     148         o_dtr_sat, o_dtr_uscav, o_trac_cum, o_du_gwd_rando, o_dv_gwd_rando, &
     149         o_vstr_gwd_rando
    149150
    150151    USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, &
     
    167168         vqsumSTD, vTsumSTD, O3daysumSTD, wqsumSTD, &
    168169         vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, &
    169          T2sumSTD, nlevSTD
     170         T2sumSTD, nlevSTD, du_gwd_rando, dv_gwd_rando
    170171
    171172    USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, &
     
    216217
    217218    USE phys_output_var_mod, only: vars_defined, snow_o, zfra_o, bils_diss, &
    218          bils_ec, bils_tke, bils_kinetic, bils_latent, &
    219          bils_enthalp, itau_con, nfiles, clef_files, &
    220          nid_files
     219         bils_ec, bils_tke, bils_kinetic, bils_latent, bils_enthalp, &
     220         itau_con, nfiles, clef_files, nid_files, zvstr_gwd_rando
    221221    USE indice_sol_mod, only: nbsrf
    222222    USE infotrac, only: nqtot
     
    892892       CALL histwrite_phy(o_rnebcon, rnebcon)
    893893       CALL histwrite_phy(o_rnebls, rneb)
    894 IF (vars_defined)  THEN
    895       DO k=1, klev
    896          DO i=1, klon
    897             zx_tmp_fi3d(i,k)=cldfra(i,k)*JrNt(i)
    898          ENDDO
    899       ENDDO
    900 ENDIF
     894       IF (vars_defined)  THEN
     895          DO k=1, klev
     896             DO i=1, klon
     897                zx_tmp_fi3d(i,k)=cldfra(i,k)*JrNt(i)
     898             ENDDO
     899          ENDDO
     900       ENDIF
    901901       CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d)
    902902       CALL histwrite_phy(o_rhum, zx_rh)
     
    11191119          CALL histwrite_phy(o_dthin, zx_tmp_fi3d)
    11201120       ENDIF
     1121
     1122       IF (ok_gwd_rando) then
     1123          CALL histwrite_phy(o_du_gwd_rando, du_gwd_rando / pdtphys)
     1124          CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_rando / pdtphys)
     1125          CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando)
     1126       end IF
     1127
    11211128       CALL histwrite_phy(o_rsu, swup)
    11221129       CALL histwrite_phy(o_rsd, swdn)
  • LMDZ5/trunk/libf/phylmd/phys_state_var_mod.F90

    r1907 r1938  
    357357!!! fin nrlmd le 10/04/2012
    358358
     359      REAL, ALLOCATABLE, SAVE:: du_gwd_rando(:, :), dv_gwd_rando(:, :)
     360      !$OMP THREADPRIVATE(du_gwd_rando, dv_gwd_rando)
     361      ! tendencies on wind due to gravity waves
     362
    359363CONTAINS
    360364
     
    376380! climatology and the daylight climatology
    377381
     382include "clesphys.h"
    378383      ALLOCATE(rlat(klon), rlon(klon))
    379384      ALLOCATE(pctsrf(klon,nbsrf))
     
    517522      ALLOCATE(ale_bl_trig(klon))
    518523!!! fin nrlmd le 10/04/2012
     524      if (ok_gwd_rando) allocate(du_gwd_rando(klon, klev), &
     525           dv_gwd_rando(klon, klev))
    519526
    520527END SUBROUTINE phys_state_var_init
     
    526533USE indice_sol_mod
    527534IMPLICIT NONE
     535include "clesphys.h"
    528536
    529537      deallocate(rlat, rlon, pctsrf, ftsol, falb1, falb2)
     
    624632      deallocate(tau_aero,piz_aero,cg_aero)
    625633      deallocate(ccm)
     634      if (ok_gwd_rando) deallocate(du_gwd_rando, dv_gwd_rando)
    626635       
    627636!!! nrlmd le 10/04/2012
  • LMDZ5/trunk/libf/phylmd/physiq.F90

    r1931 r1938  
    5555  !IM stations CFMIP
    5656  USE CFMIP_point_locations
     57  use FLOTT_GWD_rando_m, only: FLOTT_GWD_rando
     58
    5759  IMPLICIT none
    5860  !>======================================================================
     
    614616
    615617  ! tendance nulles
    616   REAL du0(klon,klev),dv0(klon,klev),dq0(klon,klev),dql0(klon,klev)
     618  REAL, dimension(klon,klev):: du0, dv0, dt0, dq0, dql0
    617619
    618620  !
     
    13901392  du0(:,:)=0.
    13911393  dv0(:,:)=0.
     1394  dt0 = 0.
    13921395  dq0(:,:)=0.
    13931396  dql0(:,:)=0.
     
    32513254  ENDIF
    32523255
    3253   !
    3254   !IM cf. FLott BEG
     3256  if (ok_gwd_rando) then
     3257     call FLOTT_GWD_rando(DTIME, pplay, t_seri, u_seri, v_seri, &
     3258          rain_fall + snow_fall, zustr_gwd_rando, zvstr_gwd_rando, &
     3259          du_gwd_rando, dv_gwd_rando)
     3260     CALL add_phys_tend(du_gwd_rando, dv_gwd_rando, dt0, dq0, dql0, &
     3261          'flott_gwd_rando')
     3262  end if
     3263
    32553264  ! STRESS NECESSAIRES: TOUTE LA PHYSIQUE
    32563265
Note: See TracChangeset for help on using the changeset viewer.