source: LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/conf_phys_m.F90 @ 3339

Last change on this file since 3339 was 3339, checked in by acozic, 6 years ago

merge with rev 3338 of the trunk
(add a flag chemistry_couple to use Ozone offline or Ozone calcul by Inca)

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 82.1 KB
Line 
1!
2! $Id: conf_phys.F90 1668 2012-10-12 10:47:37Z idelkadi $
3!
4!
5!
6MODULE conf_phys_m
7
8  IMPLICIT NONE
9
10CONTAINS
11
12  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_cld_th, &
18       iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
19       ok_ade, ok_aie, ok_alw, ok_cdnc, aerosol_couple, chemistry_couple, &
20       flag_aerosol, flag_aerosol_strat, new_aod, &
21       flag_bc_internal_mixture, 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 mod_grid_phy_lmdz, ONLY: klon_glo
30    USE print_control_mod, ONLY: lunout
31
32    include "conema3.h"
33    include "fisrtilp.h"
34    include "nuage.h"
35    include "YOMCST.h"
36    include "YOMCST2.h"
37
38    include "thermcell.h"
39
40
41    !IM : on inclut/initialise les taux de CH4, N2O, CFC11 et CFC12
42    include "clesphys.h"
43    include "compbl.h"
44    include "comsoil.h"
45    include "YOEGWD.h"
46    !
47    ! Configuration de la "physique" de LMDZ a l'aide de la fonction
48    ! GETIN de IOIPSL
49    !
50    ! LF 05/2001
51    !
52
53    !
54    ! type_ocean:      type d'ocean (force, slab, couple)
55    ! version_ocean:   version d'ocean (opa8/nemo pour type_ocean=couple ou
56    !                                   sicOBS,sicINT,sicNO pour type_ocean=slab)
57    ! ok_veget:   type de modele de vegetation
58    ! ok_journe:  sorties journalieres
59    ! ok_hf:  sorties haute frequence
60    ! ok_mensuel: sorties mensuelles
61    ! ok_instan:  sorties instantanees
62    ! ok_ade, ok_aie: apply or not aerosol direct and indirect effects
63    ! ok_alw: activate aerosol LW effect
64    ! ok_cdnc, ok cloud droplet number concentration
65    ! flag_aerosol_strat : flag pour les aerosols stratos
66    ! flag_bc_internal_mixture : use BC internal mixture if true
67    ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc
68    !
69
70
71    ! Sortie:
72    LOGICAL              :: ok_newmicro
73    INTEGER              :: iflag_radia
74    LOGICAL              :: ok_journe, ok_mensuel, ok_instan, ok_hf
75    LOGICAL              :: ok_LES
76    LOGICAL              :: callstats
77    LOGICAL              :: ok_ade, ok_aie, ok_alw, ok_cdnc
78    LOGICAL              :: aerosol_couple, chemistry_couple
79    INTEGER              :: flag_aerosol
80    INTEGER              :: flag_aerosol_strat
81    LOGICAL              :: flag_bc_internal_mixture
82    LOGICAL              :: new_aod
83    REAL                 :: bl95_b0, bl95_b1
84    REAL                 :: fact_cldcon, facttemps,ratqsbas,ratqshaut,tau_ratqs
85    INTEGER              :: iflag_cld_th
86    INTEGER              :: iflag_ratqs
87
88    CHARACTER (len = 6), SAVE  :: type_ocean_omp, version_ocean_omp, ocean_omp
89    CHARACTER (len = 10),SAVE  :: type_veget_omp
90    CHARACTER (len = 8), SAVE  :: aer_type_omp
91    LOGICAL, SAVE       :: ok_snow_omp
92    LOGICAL, SAVE       :: ok_newmicro_omp
93    LOGICAL, SAVE       :: ok_all_xml_omp
94    LOGICAL, SAVE       :: ok_lwoff_omp
95    LOGICAL, SAVE       :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
96    LOGICAL, SAVE       :: ok_LES_omp   
97    LOGICAL, SAVE       :: callstats_omp
98    LOGICAL, SAVE       :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp
99    LOGICAL, SAVE       :: aerosol_couple_omp, chemistry_couple_omp
100    INTEGER, SAVE       :: flag_aerosol_omp
101    INTEGER, SAVE       :: flag_aerosol_strat_omp
102    LOGICAL, SAVE       :: flag_bc_internal_mixture_omp
103    LOGICAL, SAVE       :: new_aod_omp
104    REAL,SAVE           :: bl95_b0_omp, bl95_b1_omp
105    REAL,SAVE           :: freq_ISCCP_omp, ecrit_ISCCP_omp
106    REAL,SAVE           :: freq_COSP_omp, freq_AIRS_omp
107    REAL,SAVE           :: fact_cldcon_omp, facttemps_omp,ratqsbas_omp
108    REAL,SAVE           :: tau_cld_cv_omp, coefw_cld_cv_omp
109    INTEGER, SAVE       :: iflag_cld_cv_omp
110
111
112    REAL, SAVE          :: ratqshaut_omp
113    REAL, SAVE          :: tau_ratqs_omp
114    REAL, SAVE          :: t_coupl_omp
115    INTEGER, SAVE       :: iflag_radia_omp
116    INTEGER, SAVE       :: iflag_rrtm_omp
117    INTEGER, SAVE       :: iflag_albedo_omp !albedo SB
118    LOGICAL, SAVE       :: ok_chlorophyll_omp ! albedo SB 
119    INTEGER, SAVE       :: NSW_omp
120    INTEGER, SAVE       :: iflag_cld_th_omp, ip_ebil_phy_omp
121    INTEGER, SAVE       :: iflag_ratqs_omp
122
123    REAL, SAVE          :: f_cdrag_ter_omp,f_cdrag_oce_omp
124    REAL, SAVE          :: f_rugoro_omp   , z0min_omp
125    REAL, SAVE          :: z0m_seaice_omp,z0h_seaice_omp
126    REAL, SAVE          :: min_wind_speed_omp,f_gust_wk_omp,f_gust_bl_omp,f_qsat_oce_omp, f_z0qh_oce_omp
127    INTEGER, SAVE       :: iflag_gusts_omp,iflag_z0_oce_omp
128
129    ! Local
130    REAL                 :: zzz
131
132    REAL :: seuil_inversion
133    REAL,SAVE :: seuil_inversion_omp
134
135    INTEGER,SAVE :: iflag_thermals_ed_omp,iflag_thermals_optflux_omp,iflag_thermals_closure_omp
136    REAL, SAVE :: fact_thermals_ed_dz_omp
137    INTEGER,SAVE :: iflag_thermals_omp,nsplit_thermals_omp
138    REAL,SAVE :: tau_thermals_omp,alp_bl_k_omp
139    ! nrlmd le 10/04/2012
140    INTEGER,SAVE :: iflag_trig_bl_omp,iflag_clos_bl_omp
141    INTEGER,SAVE :: tau_trig_shallow_omp,tau_trig_deep_omp
142    REAL,SAVE    :: s_trig_omp
143    ! fin nrlmd le 10/04/2012
144    REAL :: alp_offset
145    REAL, SAVE :: alp_offset_omp
146    INTEGER,SAVE :: iflag_coupl_omp,iflag_clos_omp,iflag_wake_omp
147    INTEGER,SAVE :: iflag_cvl_sigd_omp
148    REAL, SAVE :: coef_clos_ls_omp
149    REAL, SAVE :: supcrit1_omp, supcrit2_omp
150    INTEGER, SAVE :: iflag_mix_omp
151    INTEGER, SAVE :: iflag_mix_adiab_omp
152    REAL, SAVE :: scut_omp, qqa1_omp, qqa2_omp, gammas_omp, Fmax_omp, alphas_omp
153    REAL, SAVE :: tmax_fonte_cv_omp
154
155    REAL,SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp
156    LOGICAL,SAVE :: ok_suntime_rrtm_omp
157    REAL,SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp
158    REAL,SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp
159    REAL,SAVE :: N2O_ppb_omp, RN2O_omp, N2O_ppb_per_omp, RN2O_per_omp
160    REAL,SAVE :: CFC11_ppt_omp,RCFC11_omp,CFC11_ppt_per_omp,RCFC11_per_omp
161    REAL,SAVE :: CFC12_ppt_omp,RCFC12_omp,CFC12_ppt_per_omp,RCFC12_per_omp
162    REAL,SAVE :: epmax_omp
163    REAL,SAVE :: coef_epmax_cape_omp
164    LOGICAL,SAVE :: ok_adj_ema_omp
165    INTEGER,SAVE :: iflag_clw_omp
166    REAL,SAVE :: cld_lc_lsc_omp,cld_lc_con_omp,cld_tau_lsc_omp,cld_tau_con_omp
167    REAL,SAVE :: ffallv_lsc_omp, ffallv_con_omp,coef_eva_omp
168    LOGICAL,SAVE :: reevap_ice_omp
169    INTEGER,SAVE :: iflag_pdf_omp
170    INTEGER,SAVE :: iflag_ice_thermo_omp
171    INTEGER,SAVE :: iflag_t_glace_omp
172    INTEGER,SAVE :: iflag_cloudth_vert_omp
173    INTEGER,SAVE :: iflag_rain_incloud_vol_omp
174    REAL,SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp
175    REAL,SAVE :: t_glace_min_omp, t_glace_max_omp
176    REAL,SAVE :: exposant_glace_omp
177    REAL,SAVE :: rei_min_omp, rei_max_omp
178    INTEGER,SAVE :: iflag_sic_omp
179    REAL,SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_sic_omp
180    REAL,SAVE :: inertie_lic_omp
181    REAL,SAVE :: qsol0_omp
182    REAL,SAVE :: evap0_omp
183    REAL,SAVE :: albsno0_omp
184    REAL      :: solarlong0
185    REAL,SAVE :: solarlong0_omp
186    INTEGER,SAVE :: top_height_omp,overlap_omp
187    REAL,SAVE :: cdmmax_omp,cdhmax_omp,ksta_omp,ksta_ter_omp,f_ri_cd_min_omp
188    LOGICAL,SAVE :: ok_kzmin_omp
189    REAL, SAVE   :: pbl_lmixmin_alpha_omp
190    REAL, SAVE ::  fmagic_omp, pmagic_omp
191    INTEGER,SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp
192    INTEGER,SAVE :: iflag_pbl_split_omp
193!FC
194    INTEGER,SAVE :: ifl_pbltree_omp
195    REAL,SAVE :: Cd_frein_omp
196!FC
197    INTEGER,SAVE :: iflag_order2_sollw_omp
198    INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp
199    INTEGER, SAVE :: lev_histdayNMC_omp
200    INTEGER, SAVE :: levout_histNMC_omp(3)
201    LOGICAL, SAVE :: ok_histNMC_omp(3)
202    REAL, SAVE :: freq_outNMC_omp(3), freq_calNMC_omp(3)
203    CHARACTER*4, SAVE :: type_run_omp
204    LOGICAL,SAVE :: ok_cosp_omp, ok_airs_omp
205    LOGICAL,SAVE :: ok_mensuelCOSP_omp,ok_journeCOSP_omp,ok_hfCOSP_omp
206    REAL,SAVE :: lonmin_ins_omp, lonmax_ins_omp, latmin_ins_omp, latmax_ins_omp
207    REAL,SAVE :: ecrit_hf_omp, ecrit_day_omp, ecrit_mth_omp, ecrit_reg_omp
208    REAL,SAVE :: ecrit_ins_omp
209    REAL,SAVE :: ecrit_LES_omp
210    REAL,SAVE :: ecrit_tra_omp
211    REAL,SAVE :: cvl_comp_threshold_omp
212    REAL,SAVE :: cvl_sig2feed_omp
213    REAL,SAVE :: cvl_corr_omp
214    LOGICAL,SAVE :: ok_lic_melt_omp
215    LOGICAL,SAVE :: ok_lic_cond_omp
216    !
217    INTEGER,SAVE  :: iflag_cycle_diurne_omp
218    LOGICAL,SAVE  :: soil_model_omp,new_oliq_omp
219    LOGICAL,SAVE  :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp
220    INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp
221    INTEGER, SAVE :: nbapp_cv_omp, nbapp_wk_omp
222    INTEGER, SAVE :: iflag_ener_conserv_omp
223    LOGICAL, SAVE :: ok_conserv_q_omp
224    INTEGER, SAVE :: iflag_fisrtilp_qsat_omp
225    INTEGER, SAVE :: iflag_bergeron_omp
226    LOGICAL,SAVE  :: ok_strato_omp
227    LOGICAL,SAVE  :: ok_hines_omp, ok_gwd_rando_omp
228    REAL, SAVE    :: gwd_rando_ruwmax_omp, gwd_rando_sat_omp
229    REAL, SAVE    :: gwd_front_ruwmax_omp, gwd_front_sat_omp
230    REAL, SAVE    :: sso_gkdrag_omp,sso_grahil_omp,sso_grcrit_omp
231    REAL, SAVE    :: sso_gfrcri_omp,sso_gkwake_omp,sso_gklift_omp
232    LOGICAL,SAVE  :: ok_qch4_omp
233    LOGICAL,SAVE  :: carbon_cycle_tr_omp
234    LOGICAL,SAVE  :: carbon_cycle_cpl_omp
235    LOGICAL,SAVE  :: adjust_tropopause_omp
236    LOGICAL,SAVE  :: ok_daily_climoz_omp
237
238    INTEGER, INTENT(OUT):: read_climoz ! read ozone climatology, OpenMP shared
239    ! Allowed values are 0, 1 and 2
240    ! 0: do not read an ozone climatology
241    ! 1: read a single ozone climatology that will be used day and night
242    ! 2: read two ozone climatologies, the average day and night
243    ! climatology and the daylight climatology
244
245    !-----------------------------------------------------------------
246
247    print*,'CONFPHYS ENTREE'
248    !$OMP MASTER
249    !Config Key  = type_ocean
250    !Config Desc = Type d'ocean
251    !Config Def  = force
252    !Config Help = Type d'ocean utilise: force, slab,couple
253    !
254    type_ocean_omp = 'force '
255    CALL getin('type_ocean', type_ocean_omp)
256    !
257    !Config Key  = version_ocean
258    !Config Desc = Version d'ocean
259    !Config Def  = xxxxxx
260    !Config Help = Version d'ocean utilise: opa8/nemo/sicOBS/xxxxxx
261    !
262    version_ocean_omp = 'xxxxxx'
263    CALL getin('version_ocean', version_ocean_omp)
264
265    !Config Key  = OCEAN
266    !Config Desc = Old parameter name for type_ocean
267    !Config Def  = yyyyyy
268    !Config Help = This is only for testing purpose
269    !
270    ocean_omp = 'yyyyyy'
271    CALL getin('OCEAN', ocean_omp)
272    IF (ocean_omp /= 'yyyyyy') THEN
273       WRITE(lunout,*)'ERROR! Old variable name OCEAN used in parmeter file.'
274       WRITE(lunout,*)'Variable OCEAN has been replaced by the variable type_ocean.'
275       WRITE(lunout,*)'You have to update your parameter file physiq.def to succed running'
276       CALL abort_physic('conf_phys','Variable OCEAN no longer existing, use variable name type_ocean',1)
277    ENDIF
278
279    !Config Key  = t_coupl
280    !Config Desc = Pas de temps du couplage atm/oce en sec.
281    !Config Def  = 86400
282    !Config Help = This is only for testing purpose
283    !
284    t_coupl_omp = 86400.
285    CALL getin('t_coupl', t_coupl_omp)
286    IF (t_coupl_omp == 0) THEN
287       WRITE(lunout,*)'ERROR! Timestep of coupling between atmosphere and ocean'
288       WRITE(lunout,*)'cannot be zero.'
289       CALL abort_physic('conf_phys','t_coupl = 0.',1)
290    ENDIF
291
292    !
293    !Config Key  = ok_all_xml
294    !Config Desc = utiliser les xml pourles définitions des champs pour xios
295    !Config Def  = .FALSE.
296    !Config Help =
297    !
298    ok_all_xml_omp = .FALSE.
299    CALL getin('ok_all_xml', ok_all_xml_omp)
300
301    !
302    !Config Key  = ok_lwoff
303    !Config Desc = inhiber l effet radiatif LW des nuages
304    !Config Def  = .FALSE.
305    !Config Help =
306    !
307    ok_lwoff_omp = .FALSE.
308    CALL getin('ok_lwoff', ok_lwoff_omp)
309    !
310
311    !
312    !Config Key  = VEGET
313    !Config Desc = Type de modele de vegetation
314    !Config Def  = .FALSE.
315    !Config Help = Type de modele de vegetation utilise
316    !
317    type_veget_omp ='orchidee'
318    CALL getin('VEGET', type_veget_omp)
319    !
320
321    ! Martin
322    !Config Key  = ok_snow
323    !Config Desc = Flag to activate snow model SISVAT
324    !Config Def  = .FALSE.
325    ok_snow_omp = .FALSE.
326    CALL getin('ok_snow', ok_snow_omp)
327    ! Martin
328
329    !Config Key  = OK_journe
330    !Config Desc = Pour des sorties journalieres
331    !Config Def  = .FALSE.
332    !Config Help = Pour creer le fichier histday contenant les sorties
333    !              journalieres
334    !
335    ok_journe_omp = .FALSE.
336    CALL getin('OK_journe', ok_journe_omp)
337    !
338    !Config Key  = ok_hf
339    !Config Desc = Pour des sorties haute frequence
340    !Config Def  = .FALSE.
341    !Config Help = Pour creer le fichier histhf contenant les sorties
342    !              haute frequence ( 3h ou 6h)
343    !
344    ok_hf_omp = .FALSE.
345    CALL getin('ok_hf', ok_hf_omp)
346    !
347    !Config Key  = OK_mensuel
348    !Config Desc = Pour des sorties mensuelles
349    !Config Def  = .TRUE.
350    !Config Help = Pour creer le fichier histmth contenant les sorties
351    !              mensuelles
352    !
353    ok_mensuel_omp = .TRUE.
354    CALL getin('OK_mensuel', ok_mensuel_omp)
355    !
356    !Config Key  = OK_instan
357    !Config Desc = Pour des sorties instantanees
358    !Config Def  = .FALSE.
359    !Config Help = Pour creer le fichier histins contenant les sorties
360    !              instantanees
361    !
362    ok_instan_omp = .FALSE.
363    CALL getin('OK_instan', ok_instan_omp)
364    !
365    !Config Key  = ok_ade
366    !Config Desc = Aerosol direct effect or not?
367    !Config Def  = .FALSE.
368    !Config Help = Used in radlwsw.F
369    !
370    ok_ade_omp = .FALSE.
371    CALL getin('ok_ade', ok_ade_omp)
372
373    !Config Key  = ok_alw
374    !Config Desc = Aerosol longwave effect or not?
375    !Config Def  = .FALSE.
376    !Config Help = Used in radlwsw.F
377    !
378    ok_alw_omp = .FALSE.
379    CALL getin('ok_alw', ok_alw_omp)
380
381    !
382    !Config Key  = ok_aie
383    !Config Desc = Aerosol indirect effect or not?
384    !Config Def  = .FALSE.
385    !Config Help = Used in nuage.F and radlwsw.F
386    !
387    ok_aie_omp = .FALSE.
388    CALL getin('ok_aie', ok_aie_omp)
389
390    !
391    !Config Key  = ok_cdnc
392    !Config Desc = ok cloud droplet number concentration
393    !Config Def  = .FALSE.
394    !Config Help = Used in newmicro.F
395    !
396    ok_cdnc_omp = .FALSE.
397    CALL getin('ok_cdnc', ok_cdnc_omp)
398    !
399    !Config Key  = aerosol_couple
400    !Config Desc = read aerosol in file or calcul by inca
401    !Config Def  = .FALSE.
402    !Config Help = Used in physiq.F
403    !
404    aerosol_couple_omp = .FALSE.
405    CALL getin('aerosol_couple',aerosol_couple_omp)
406    !
407    !Config Key  = chemistry_couple
408    !Config Desc = read O3 chemistry in file or calcul by inca
409    !Config Def  = .FALSE.
410    !Config Help = Used in physiq.F
411    !
412    chemistry_couple_omp = .FALSE.
413    CALL getin('chemistry_couple',chemistry_couple_omp)
414    !
415    !Config Key  = flag_aerosol
416    !Config Desc = which aerosol is use for coupled model
417    !Config Def  = 1
418    !Config Help = Used in physiq.F
419    !
420    ! - flag_aerosol=0 => no aerosol
421    ! - flag_aerosol=1 => so4 only (defaut)
422    ! - flag_aerosol=2 => bc  only
423    ! - flag_aerosol=3 => pom only
424    ! - flag_aerosol=4 => seasalt only
425    ! - flag_aerosol=5 => dust only
426    ! - flag_aerosol=6 => all aerosol
427    ! - flag_aerosol=7 => natural aerosol + MACv2SP
428    ! - (in this case aerosols.1980.nc should point to aerosols.nat.nc)
429
430    flag_aerosol_omp = 0
431    CALL getin('flag_aerosol',flag_aerosol_omp)
432
433    !
434    !Config Key  = flag_bc_internal_mixture
435    !Config Desc = state of mixture for BC aerosols
436    ! - n = external mixture
437    ! - y = internal mixture
438    !Config Def  = n
439    !Config Help = Used in physiq.F / aeropt
440    !
441    flag_bc_internal_mixture_omp = .FALSE.
442    CALL getin('flag_bc_internal_mixture',flag_bc_internal_mixture_omp)
443
444    ! Temporary variable for testing purpose!
445    !Config Key  = new_aod
446    !Config Desc = which calcul of aeropt
447    !Config Def  = FALSE
448    !Config Help = Used in physiq.F
449    !
450    new_aod_omp = .TRUE.
451    CALL getin('new_aod',new_aod_omp)
452
453    !
454    !Config Key  = aer_type
455    !Config Desc = Use a constant field for the aerosols
456    !Config Def  = scenario
457    !Config Help = Used in readaerosol.F90
458    !
459    aer_type_omp = 'scenario'
460    CALL getin('aer_type', aer_type_omp)
461
462    !
463    !Config Key  = bl95_b0
464    !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
465    !Config Def  = .FALSE.
466    !Config Help = Used in nuage.F
467    !
468    bl95_b0_omp = 2.
469    CALL getin('bl95_b0', bl95_b0_omp)
470
471    !Config Key  = bl95_b1
472    !Config Desc = Parameter in CDNC-maer link (Boucher&Lohmann 1995)
473    !Config Def  = .FALSE.
474    !Config Help = Used in nuage.F
475    !
476    bl95_b1_omp = 0.2
477    CALL getin('bl95_b1', bl95_b1_omp)
478
479    !Config Key  = freq_ISCCP
480    !Config Desc = Frequence d'appel du simulateur ISCCP en secondes;
481    !              par defaut 10800, i.e. 3 heures
482    !Config Def  = 10800.
483    !Config Help = Used in ini_histISCCP.h
484    !
485    freq_ISCCP_omp = 10800.
486    CALL getin('freq_ISCCP', freq_ISCCP_omp)
487    !
488    !Config Key  = ecrit_ISCCP
489    !Config Desc = Frequence d'ecriture des resultats du simulateur ISCCP en nombre de jours;
490    !              par defaut 1., i.e. 1 jour
491    !Config Def  = 1.
492    !Config Help = Used in ini_histISCCP.h
493    !
494    !
495    ecrit_ISCCP_omp = 1.
496    CALL getin('ecrit_ISCCP', ecrit_ISCCP_omp)
497
498    !Config Key  = freq_COSP
499    !Config Desc = Frequence d'appel du simulateur COSP en secondes;
500    !              par defaut 10800, i.e. 3 heures
501    !Config Def  = 10800.
502    !Config Help = Used in ini_histdayCOSP.h
503    !
504    freq_COSP_omp = 10800.
505    CALL getin('freq_COSP', freq_COSP_omp)
506
507    !Config Key  = freq_AIRS
508    !Config Desc = Frequence d'appel du simulateur AIRS en secondes;
509    !              par defaut 10800, i.e. 3 heures
510    !Config Def  = 10800.
511    !Config Help = Used in ini_histdayAIRS.h
512    !
513    freq_AIRS_omp = 10800.
514    CALL getin('freq_AIRS', freq_AIRS_omp)
515
516    !
517    !Config Key  = ip_ebil_phy
518    !Config Desc = Niveau de sortie pour les diags bilan d'energie
519    !Config Def  = 0
520    !Config Help =
521    !               
522    ip_ebil_phy_omp = 0
523    CALL getin('ip_ebil_phy', ip_ebil_phy_omp)
524    IF (ip_ebil_phy_omp/=0) THEN
525       CALL abort_physic('conf_phys','ip_ebil_phy_omp doit etre 0 sur cette version',1)
526    ENDIF
527
528    !
529    !Config Key  = seuil_inversion
530    !Config Desc = Seuil ur dTh pour le choix entre les schemas de CL
531    !Config Def  = -0.1
532    !Config Help =
533    !               
534    seuil_inversion_omp = -0.1
535    CALL getin('seuil_inversion', seuil_inversion_omp)
536
537    !
538    ! Constante solaire & Parametres orbitaux & taux gaz effet de serre BEG
539    !
540    !Config Key  = R_ecc
541    !Config Desc = Excentricite
542    !Config Def  = 0.016715
543    !Config Help =
544    !               
545    !valeur AMIP II
546    R_ecc_omp = 0.016715
547    CALL getin('R_ecc', R_ecc_omp)
548    !
549    !Config Key  = R_peri
550    !Config Desc = Equinoxe
551    !Config Def  =
552    !Config Help =
553    !               
554    !
555    !valeur AMIP II
556    R_peri_omp = 102.7
557    CALL getin('R_peri', R_peri_omp)
558    !
559    !Config Key  = R_incl
560    !Config Desc = Inclinaison
561    !Config Def  =
562    !Config Help =
563    !               
564    !
565    !valeur AMIP II
566    R_incl_omp = 23.441
567    CALL getin('R_incl', R_incl_omp)
568    !
569    !Config Key  = solaire
570    !Config Desc = Constante solaire en W/m2
571    !Config Def  = 1365.
572    !Config Help =
573    !               
574    !
575    !valeur AMIP II
576    solaire_omp = 1365.
577    CALL getin('solaire', solaire_omp)
578    !
579    !Config Key  = co2_ppm
580    !Config Desc = concentration du gaz carbonique en ppmv
581    !Config Def  = 348.
582    !Config Help =
583    !               
584    !
585    !valeur AMIP II
586    co2_ppm_omp = 348.
587    CALL getin('co2_ppm', co2_ppm_omp)
588    !
589    !Config Key  = RCO2
590    !Config Desc = Concentration du CO2
591    !Config Def  = co2_ppm * 1.0e-06  * 44.011/28.97
592    !Config Def  = 348. * 1.0e-06  * 44.011/28.97
593    !Config Help =
594    !               
595    ! RCO2 = 5.286789092164308E-04
596    !ancienne valeur
597    RCO2_omp = co2_ppm_omp * 1.0e-06  * 44.011/28.97 ! pour co2_ppm=348.
598
599    !  CALL getin('RCO2', RCO2)
600    !
601    !Config Key  = RCH4
602    !Config Desc = Concentration du CH4
603    !Config Def  = 1.65E-06* 16.043/28.97
604    !Config Help =
605    !               
606    !
607    !valeur AMIP II
608    !OK  RCH4 = 1.65E-06* 16.043/28.97
609    ! RCH4 = 9.137366240938903E-07
610    !
611    !ancienne valeur
612    ! RCH4 = 1.72E-06* 16.043/28.97
613    !OK CALL getin('RCH4', RCH4)
614    zzz = 1650.
615    CALL getin('CH4_ppb', zzz)
616    CH4_ppb_omp = zzz
617    RCH4_omp = CH4_ppb_omp * 1.0E-09 * 16.043/28.97
618    !
619    !Config Key  = RN2O
620    !Config Desc = Concentration du N2O
621    !Config Def  = 306.E-09* 44.013/28.97
622    !Config Help =
623    !               
624    !
625    !valeur AMIP II
626    !OK  RN2O = 306.E-09* 44.013/28.97
627    ! RN2O = 4.648939592682085E-07
628    !
629    !ancienne valeur
630    ! RN2O = 310.E-09* 44.013/28.97
631    !OK  CALL getin('RN2O', RN2O)
632    zzz=306.
633    CALL getin('N2O_ppb', zzz)
634    N2O_ppb_omp = zzz
635    RN2O_omp = N2O_ppb_omp * 1.0E-09 * 44.013/28.97
636    !
637    !Config Key  = RCFC11
638    !Config Desc = Concentration du CFC11
639    !Config Def  = 280.E-12* 137.3686/28.97
640    !Config Help =
641    !               
642    !
643    !OK RCFC11 = 280.E-12* 137.3686/28.97
644    zzz = 280.
645    CALL getin('CFC11_ppt',zzz)
646    CFC11_ppt_omp = zzz
647    RCFC11_omp=CFC11_ppt_omp* 1.0E-12 * 137.3686/28.97
648    ! RCFC11 = 1.327690990680013E-09
649    !OK CALL getin('RCFC11', RCFC11)
650    !
651    !Config Key  = RCFC12
652    !Config Desc = Concentration du CFC12
653    !Config Def  = 484.E-12* 120.9140/28.97
654    !Config Help =
655    !               
656    !
657    !OK RCFC12 = 484.E-12* 120.9140/28.97
658    zzz = 484.
659    CALL getin('CFC12_ppt',zzz)
660    CFC12_ppt_omp = zzz
661    RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * 120.9140/28.97
662    ! RCFC12 = 2.020102726958923E-09
663    !OK CALL getin('RCFC12', RCFC12)
664
665    !ajout CFMIP begin
666    !
667    !Config Key  = co2_ppm_per
668    !Config Desc = concentration du co2_ppm_per
669    !Config Def  = 348.
670    !Config Help =
671    !               
672    co2_ppm_per_omp = co2_ppm_omp
673    CALL getin('co2_ppm_per', co2_ppm_per_omp)
674    !
675    !Config Key  = RCO2_per
676    !Config Desc = Concentration du CO2_per
677    !Config Def  = co2_ppm_per * 1.0e-06  * 44.011/28.97
678    !Config Def  = 348. * 1.0e-06  * 44.011/28.97
679    !Config Help =
680    !               
681    RCO2_per_omp = co2_ppm_per_omp * 1.0e-06  * 44.011/28.97
682
683    !Config Key  = ok_4xCO2atm
684    !Config Desc = Calcul ou non effet radiatif 4xco2
685    !Config Def  = .FALSE.
686    !Config Help =
687
688    !Config Key  = RCH4_per
689    !Config Desc = Concentration du CH4_per
690    !Config Def  = 1.65E-06* 16.043/28.97
691    !Config Help =
692    !               
693    zzz = CH4_ppb_omp
694    CALL getin('CH4_ppb_per', zzz)
695    CH4_ppb_per_omp = zzz
696    RCH4_per_omp = CH4_ppb_per_omp * 1.0E-09 * 16.043/28.97
697    !
698    !Config Key  = RN2O_per
699    !Config Desc = Concentration du N2O_per
700    !Config Def  = 306.E-09* 44.013/28.97
701    !Config Help =
702    !               
703    zzz = N2O_ppb_omp
704    CALL getin('N2O_ppb_per', zzz)
705    N2O_ppb_per_omp = zzz
706    RN2O_per_omp = N2O_ppb_per_omp * 1.0E-09 * 44.013/28.97
707    !
708    !Config Key  = RCFC11_per
709    !Config Desc = Concentration du CFC11_per
710    !Config Def  = 280.E-12* 137.3686/28.97
711    !Config Help =
712    !               
713    zzz = CFC11_ppt_omp
714    CALL getin('CFC11_ppt_per',zzz)
715    CFC11_ppt_per_omp = zzz
716    RCFC11_per_omp=CFC11_ppt_per_omp* 1.0E-12 * 137.3686/28.97
717    !
718    !Config Key  = RCFC12_per
719    !Config Desc = Concentration du CFC12_per
720    !Config Def  = 484.E-12* 120.9140/28.97
721    !Config Help =
722    !               
723    zzz = CFC12_ppt_omp
724    CALL getin('CFC12_ppt_per',zzz)
725    CFC12_ppt_per_omp = zzz
726    RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * 120.9140/28.97
727    !ajout CFMIP end
728
729    !
730    ! FH 2008/05/09 On elimine toutes les clefs physiques dans la dynamique
731    ! Constantes precedemment dans dyn3d/conf_gcm
732
733    !Config  Key  = iflag_cycle_diurne
734    !Config  Desc = Cycle diurne
735    !Config  Def  = 1
736    !Config  Help = Cette option permet d'eteidre le cycle diurne.
737    !Config         Peut etre util pour accelerer le code !
738    iflag_cycle_diurne_omp = 1
739    CALL getin('iflag_cycle_diurne',iflag_cycle_diurne_omp)
740
741    !Config  Key  = soil_model
742    !Config  Desc = Modele de sol
743    !Config  Def  = y
744    !Config  Help = Choix du modele de sol (Thermique ?)
745    !Config         Option qui pourait un string afin de pouvoir
746    !Config         plus de choix ! Ou meme une liste d'options !
747    soil_model_omp = .TRUE.
748    CALL getin('soil_model',soil_model_omp)
749
750    !Config  Key  = new_oliq
751    !Config  Desc = Nouvelle eau liquide
752    !Config  Def  = y
753    !Config  Help = Permet de mettre en route la
754    !Config         nouvelle parametrisation de l'eau liquide !
755    new_oliq_omp = .TRUE.
756    CALL getin('new_oliq',new_oliq_omp)
757
758    !Config  Key  = ok_orodr
759    !Config  Desc = Orodr ???
760    !Config  Def  = y
761    !Config  Help = Y en a pas comprendre !
762    !Config         
763    ok_orodr_omp = .TRUE.
764    CALL getin('ok_orodr',ok_orodr_omp)
765
766    !Config  Key  =  ok_orolf
767    !Config  Desc = Orolf ??
768    !Config  Def  = y
769    !Config  Help = Connais pas !
770    ok_orolf_omp = .TRUE.
771    CALL getin('ok_orolf', ok_orolf_omp)
772
773    !Config  Key  = ok_limitvrai
774    !Config  Desc = Force la lecture de la bonne annee
775    !Config  Def  = n
776    !Config  Help = On peut forcer le modele a lire le
777    !Config         fichier SST de la bonne annee. C'est une tres bonne
778    !Config         idee, pourquoi ne pas mettre toujours a y ???
779    ok_limitvrai_omp = .FALSE.
780    CALL getin('ok_limitvrai',ok_limitvrai_omp)
781
782    !Config  Key  = nbapp_rad
783    !Config  Desc = Frequence d'appel au rayonnement
784    !Config  Def  = 12
785    !Config  Help = Nombre  d'appels des routines de rayonnements
786    !Config         par jour.
787    nbapp_rad_omp = 12
788    CALL getin('nbapp_rad',nbapp_rad_omp)
789
790    !Config  Key  = iflag_con
791    !Config  Desc = Flag de convection
792    !Config  Def  = 2
793    !Config  Help = Flag  pour la convection les options suivantes existent :
794    !Config         1 pour LMD,
795    !Config         2 pour Tiedtke,
796    !Config         3 pour CCM(NCAR) 
797    iflag_con_omp = 2
798    CALL getin('iflag_con',iflag_con_omp)
799
800    !Config  Key  = nbapp_cv
801    !Config  Desc = Frequence d'appel a la convection
802    !Config  Def  = 0
803    !Config  Help = Nombre  d'appels des routines de convection
804    !Config         par jour. Si =0, appel a chaque pas de temps physique.
805    nbapp_cv_omp = 0
806    CALL getin('nbapp_cv',nbapp_cv_omp)
807
808    !Config  Key  = nbapp_wk
809    !Config  Desc = Frequence d'appel aux wakes
810    !Config  Def  = 0
811    !Config  Help = Nombre  d'appels des routines de wakes
812    !Config         par jour. Si =0, appel a chaque pas de temps physique.
813    nbapp_wk_omp = 0
814    CALL getin('nbapp_wk',nbapp_wk_omp)
815
816    !Config  Key  = iflag_ener_conserv
817    !Config  Desc = Flag de convection
818    !Config  Def  = 1
819    !Config  Help = Flag  pour la convection les options suivantes existent :
820    !Config         -1 pour Kinetic energy correction
821    !Config         1  conservation kinetic and enthalpy
822    iflag_ener_conserv_omp = -1
823    CALL getin('iflag_ener_conserv',iflag_ener_conserv_omp)
824
825    !Config  Key  = ok_conserv_q
826    !Config  Desc = Switch des corrections de conservation de l'eau
827    !Config  Def  = y
828    !Config  Help = Switch des corrections de conservation de l'eau
829    !Config         y -> corrections activees
830    !Config         n -> conformite avec versions anterieures au 1/4/2014
831    ok_conserv_q_omp = .FALSE.
832    CALL getin('ok_conserv_q',ok_conserv_q_omp)
833
834    !Config  Key  = iflag_fisrtilp_qsat
835    !Config  Desc = Flag de fisrtilp
836    !Config  Def  = 0
837    !Config  Help = Flag  pour la pluie grande-échelle les options suivantes existent :
838    !Config         >1 nb iterations pour converger dans le calcul de qsat
839    iflag_fisrtilp_qsat_omp = 0
840    CALL getin('iflag_fisrtilp_qsat',iflag_fisrtilp_qsat_omp)
841
842    !Config  Key  = iflag_bergeron
843    !Config  Desc = Flag de fisrtilp
844    !Config  Def  = 0
845    !Config  Help = Flag  pour la pluie grande-échelle les options suivantes existent :
846    !Config         0 pas d effet Bergeron
847    !Config         1 effet Bergeron pour T<0
848    iflag_bergeron_omp = 0
849    CALL getin('iflag_bergeron',iflag_bergeron_omp)
850
851    !
852    !
853    !
854    ! Constante solaire & Parametres orbitaux & taux gaz effet de serre END
855    !
856    ! KE
857    !
858
859    !Config key  = cvl_comp_threshold
860    !Config Desc = maximum fraction of convective points enabling compression
861    !Config Def  = 1.00
862    !Config Help = fields are compressed when less than a fraction cvl_comp_threshold
863    !Config Help = of the points is convective.
864    cvl_comp_threshold_omp = 1.00
865    CALL getin('cvl_comp_threshold', cvl_comp_threshold_omp)
866
867    !Config key  = cvl_sig2feed
868    !Config Desc = sigma coordinate at top of feeding layer
869    !Config Def  = 0.97
870    !Config Help = deep convection is fed by the layer extending from the surface (pressure ps)
871    !Config Help = and cvl_sig2feed*ps.
872    cvl_sig2feed_omp = 0.97
873    CALL getin('cvl_sig2feed', cvl_sig2feed_omp)
874
875    !Config key  = cvl_corr
876    !Config Desc = Facteur multiplication des precip convectives dans KE
877    !Config Def  = 1.00
878    !Config Help = 1.02 pour un moderne ou un pre-ind. A ajuster pour un glaciaire
879    cvl_corr_omp = 1.00
880    CALL getin('cvl_corr', cvl_corr_omp)
881
882
883    !Config Key  = epmax
884    !Config Desc = Efficacite precip
885    !Config Def  = 0.993
886    !Config Help =
887    !
888    epmax_omp = .993
889    CALL getin('epmax', epmax_omp)
890
891    coef_epmax_cape_omp = 0.0   
892    CALL getin('coef_epmax_cape', coef_epmax_cape_omp)       
893    !
894    !Config Key  = ok_adj_ema
895    !Config Desc = 
896    !Config Def  = FALSE
897    !Config Help =
898    !
899    ok_adj_ema_omp = .FALSE.
900    CALL getin('ok_adj_ema',ok_adj_ema_omp)
901    !
902    !Config Key  = iflag_clw
903    !Config Desc = 
904    !Config Def  = 0
905    !Config Help =
906    !
907    iflag_clw_omp = 0
908    CALL getin('iflag_clw',iflag_clw_omp)
909    !
910    !Config Key  = cld_lc_lsc
911    !Config Desc = 
912    !Config Def  = 2.6e-4
913    !Config Help =
914    !
915    cld_lc_lsc_omp = 2.6e-4
916    CALL getin('cld_lc_lsc',cld_lc_lsc_omp)
917    !
918    !Config Key  = cld_lc_con
919    !Config Desc = 
920    !Config Def  = 2.6e-4
921    !Config Help =
922    !
923    cld_lc_con_omp = 2.6e-4
924    CALL getin('cld_lc_con',cld_lc_con_omp)
925    !
926    !Config Key  = cld_tau_lsc
927    !Config Desc = 
928    !Config Def  = 3600.
929    !Config Help =
930    !
931    cld_tau_lsc_omp = 3600.
932    CALL getin('cld_tau_lsc',cld_tau_lsc_omp)
933    !
934    !Config Key  = cld_tau_con
935    !Config Desc = 
936    !Config Def  = 3600.
937    !Config Help =
938    !
939    cld_tau_con_omp = 3600.
940    CALL getin('cld_tau_con',cld_tau_con_omp)
941    !
942    !Config Key  = ffallv_lsc
943    !Config Desc = 
944    !Config Def  = 1.
945    !Config Help =
946    !
947    ffallv_lsc_omp = 1.
948    CALL getin('ffallv_lsc',ffallv_lsc_omp)
949    !
950    !Config Key  = ffallv_con
951    !Config Desc = 
952    !Config Def  = 1.
953    !Config Help =
954    !
955    ffallv_con_omp = 1.
956    CALL getin('ffallv_con',ffallv_con_omp)
957    !
958    !Config Key  = coef_eva
959    !Config Desc = 
960    !Config Def  = 2.e-5
961    !Config Help =
962    !
963    coef_eva_omp = 2.e-5
964    CALL getin('coef_eva',coef_eva_omp)
965    !
966    !Config Key  = reevap_ice
967    !Config Desc = 
968    !Config Def  = .FALSE.
969    !Config Help =
970    !
971    reevap_ice_omp = .FALSE.
972    CALL getin('reevap_ice',reevap_ice_omp)
973
974    !Config Key  = iflag_ratqs
975    !Config Desc =
976    !Config Def  = 1
977    !Config Help =
978    !
979    iflag_ratqs_omp = 1
980    CALL getin('iflag_ratqs',iflag_ratqs_omp)
981
982    !
983    !Config Key  = iflag_radia
984    !Config Desc = 
985    !Config Def  = 1
986    !Config Help =
987    !
988    iflag_radia_omp = 1
989    CALL getin('iflag_radia',iflag_radia_omp)
990
991    !
992    !Config Key  = iflag_rrtm
993    !Config Desc = 
994    !Config Def  = 0
995    !Config Help =
996    !
997    iflag_rrtm_omp = 0
998    CALL getin('iflag_rrtm',iflag_rrtm_omp)
999
1000    !
1001    !Config Key  = NSW
1002    !Config Desc = 
1003    !Config Def  = 0
1004    !Config Help =
1005    !
1006    NSW_omp = 2
1007    CALL getin('NSW',NSW_omp)
1008    !albedo SB >>>
1009    iflag_albedo_omp = 0
1010    CALL getin('iflag_albedo',iflag_albedo_omp)
1011
1012    ok_chlorophyll_omp=.FALSE.
1013    CALL getin('ok_chlorophyll',ok_chlorophyll_omp)
1014    !albedo SB <<<
1015    !
1016    !Config Key  = ok_sun_time
1017    !Config Desc = oui ou non variabilite solaire
1018    !Config Def  = .FALSE.
1019    !Config Help =
1020    !
1021    !
1022    !valeur AMIP II
1023    ok_suntime_rrtm_omp = .FALSE.
1024    IF (iflag_rrtm_omp==1) THEN
1025      CALL getin('ok_suntime_rrtm',ok_suntime_rrtm_omp)
1026    ENDIF
1027    !
1028    !Config Key  = flag_aerosol_strat
1029    !Config Desc = use stratospheric aerosols 0, 1, 2
1030    ! - 0 = no stratospheric aerosols
1031    ! - 1 = stratospheric aerosols scaled from 550 nm AOD
1032    ! - 2 = stratospheric aerosol properties from CMIP6
1033    !Config Def  = 0
1034    !Config Help = Used in physiq.F
1035    !
1036    !
1037    flag_aerosol_strat_omp = 0
1038    IF (iflag_rrtm_omp==1) THEN
1039      CALL getin('flag_aerosol_strat',flag_aerosol_strat_omp)
1040    ENDIF
1041
1042    !
1043    !Config Key  = iflag_cld_th
1044    !Config Desc = 
1045    !Config Def  = 1
1046    !Config Help =
1047    !
1048    iflag_cld_th_omp = 1
1049    ! On lit deux fois avec l'ancien et le nouveau nom
1050    ! pour assurer une retrocompatiblite.
1051    ! A abandonner un jour
1052    CALL getin('iflag_cldcon',iflag_cld_th_omp)
1053    CALL getin('iflag_cld_th',iflag_cld_th_omp)
1054    iflag_cld_cv_omp = 0
1055    CALL getin('iflag_cld_cv',iflag_cld_cv_omp)
1056
1057    !
1058    !Config Key  = tau_cld_cv
1059    !Config Desc =
1060    !Config Def  = 10.
1061    !Config Help =
1062    !
1063    tau_cld_cv_omp = 10.
1064    CALL getin('tau_cld_cv',tau_cld_cv_omp)
1065
1066    !
1067    !Config Key  = coefw_cld_cv
1068    !Config Desc =
1069    !Config Def  = 0.1
1070    !Config Help =
1071    !
1072    coefw_cld_cv_omp = 0.1
1073    CALL getin('coefw_cld_cv',coefw_cld_cv_omp)
1074
1075
1076
1077
1078    !
1079    !Config Key  = iflag_pdf
1080    !Config Desc = 
1081    !Config Def  = 0
1082    !Config Help =
1083    !
1084    iflag_pdf_omp = 0
1085    CALL getin('iflag_pdf',iflag_pdf_omp)
1086    !
1087    !Config Key  = fact_cldcon
1088    !Config Desc = 
1089    !Config Def  = 0.375
1090    !Config Help =
1091    !
1092    fact_cldcon_omp = 0.375
1093    CALL getin('fact_cldcon',fact_cldcon_omp)
1094
1095    !
1096    !Config Key  = facttemps
1097    !Config Desc = 
1098    !Config Def  = 1.e-4
1099    !Config Help =
1100    !
1101    facttemps_omp = 1.e-4
1102    CALL getin('facttemps',facttemps_omp)
1103
1104    !
1105    !Config Key  = ok_newmicro
1106    !Config Desc = 
1107    !Config Def  = .TRUE.
1108    !Config Help =
1109    !
1110    ok_newmicro_omp = .TRUE.
1111    CALL getin('ok_newmicro',ok_newmicro_omp)
1112    !
1113    !Config Key  = ratqsbas
1114    !Config Desc = 
1115    !Config Def  = 0.01
1116    !Config Help =
1117    !
1118    ratqsbas_omp = 0.01
1119    CALL getin('ratqsbas',ratqsbas_omp)
1120    !
1121    !Config Key  = ratqshaut
1122    !Config Desc = 
1123    !Config Def  = 0.3
1124    !Config Help =
1125    !
1126    ratqshaut_omp = 0.3
1127    CALL getin('ratqshaut',ratqshaut_omp)
1128
1129    !Config Key  = tau_ratqs
1130    !Config Desc = 
1131    !Config Def  = 1800.
1132    !Config Help =
1133    !
1134    tau_ratqs_omp = 1800.
1135    CALL getin('tau_ratqs',tau_ratqs_omp)
1136
1137    !
1138    !-----------------------------------------------------------------------
1139    ! Longitude solaire pour le calcul de l'ensoleillement en degre
1140    ! si on veut imposer la saison. Sinon, solarlong0=-999.999
1141    !Config Key  = solarlong0
1142    !Config Desc = 
1143    !Config Def  = -999.999
1144    !Config Help =
1145    !
1146    solarlong0_omp = -999.999
1147    CALL getin('solarlong0',solarlong0_omp)
1148    !
1149    !-----------------------------------------------------------------------
1150    !  Valeur imposee pour configuration idealisees
1151    !Config Key  = qsol0 pour le bucket, evap0 pour aquaplanetes, albsno0
1152    ! Default value -1 to activate the full computation
1153    qsol0_omp = -1.
1154    CALL getin('qsol0',qsol0_omp)
1155    evap0_omp = -1.
1156    CALL getin('evap0',evap0_omp)
1157    albsno0_omp = -1.
1158    CALL getin('albsno0',albsno0_omp)
1159    !
1160    !-----------------------------------------------------------------------
1161    !
1162    !Config Key  = iflag_sic
1163    !Config Desc = 
1164    !Config Def  = 0
1165    !Config Help =
1166    !
1167    iflag_sic_omp = 0
1168    CALL getin('iflag_sic',iflag_sic_omp)
1169    !
1170    !Config Key  = inertie_sic
1171    !Config Desc = 
1172    !Config Def  = 2000.
1173    !Config Help =
1174    !
1175    inertie_sic_omp = 2000.
1176    CALL getin('inertie_sic',inertie_sic_omp)
1177    !
1178    !Config Key  = inertie_lic
1179    !Config Desc = 
1180    !Config Def  = 2000.
1181    !Config Help =
1182    !
1183    inertie_lic_omp = 2000.
1184    CALL getin('inertie_lic',inertie_lic_omp)
1185    !
1186    !Config Key  = inertie_sno
1187    !Config Desc = 
1188    !Config Def  = 2000.
1189    !Config Help =
1190    !
1191    inertie_sno_omp = 2000.
1192    CALL getin('inertie_sno',inertie_sno_omp)
1193    !
1194    !Config Key  = inertie_sol
1195    !Config Desc = 
1196    !Config Def  = 2000.
1197    !Config Help =
1198    !
1199    inertie_sol_omp = 2000.
1200    CALL getin('inertie_sol',inertie_sol_omp)
1201
1202    !
1203    !Config Key  = rad_froid
1204    !Config Desc = 
1205    !Config Def  = 35.0
1206    !Config Help =
1207    !
1208    rad_froid_omp = 35.0
1209    CALL getin('rad_froid',rad_froid_omp)
1210
1211    !
1212    !Config Key  = rad_chau1
1213    !Config Desc = 
1214    !Config Def  = 13.0
1215    !Config Help =
1216    !
1217    rad_chau1_omp = 13.0
1218    CALL getin('rad_chau1',rad_chau1_omp)
1219
1220    !
1221    !Config Key  = rad_chau2
1222    !Config Desc = 
1223    !Config Def  = 9.0
1224    !Config Help =
1225    !
1226    rad_chau2_omp = 9.0
1227    CALL getin('rad_chau2',rad_chau2_omp)
1228
1229    !
1230    !Config Key  = t_glace_min
1231    !Config Desc = 
1232    !Config Def  = 258.
1233    !Config Help =
1234    !
1235    t_glace_min_omp = 258.
1236    CALL getin('t_glace_min',t_glace_min_omp)
1237
1238    !
1239    !Config Key  = t_glace_max
1240    !Config Desc = 
1241    !Config Def  = 273.13
1242    !Config Help =
1243    !
1244    t_glace_max_omp = 273.13
1245    CALL getin('t_glace_max',t_glace_max_omp)
1246
1247    !
1248    !Config Key  = exposant_glace
1249    !Config Desc = 
1250    !Config Def  = 2.
1251    !Config Help =
1252    !
1253    exposant_glace_omp = 1.
1254    CALL getin('exposant_glace',exposant_glace_omp)
1255
1256    !
1257    !Config Key  = iflag_t_glace
1258    !Config Desc = 
1259    !Config Def  = 0
1260    !Config Help =
1261    !
1262    iflag_t_glace_omp = 0
1263    CALL getin('iflag_t_glace',iflag_t_glace_omp)
1264
1265    !
1266    !Config Key  = iflag_cloudth_vert
1267    !Config Desc = 
1268    !Config Def  = 0
1269    !Config Help =
1270    !
1271    iflag_cloudth_vert_omp = 0
1272    CALL getin('iflag_cloudth_vert',iflag_cloudth_vert_omp)
1273
1274    !
1275    !Config Key  = iflag_rain_incloud_vol
1276    !Config Desc = 
1277    !Config Def  = 0
1278    !Config Help =
1279    !
1280    iflag_rain_incloud_vol_omp = 0
1281    CALL getin('iflag_rain_incloud_vol',iflag_rain_incloud_vol_omp)
1282
1283    !
1284    !Config Key  = iflag_ice_thermo
1285    !Config Desc = 
1286    !Config Def  = 0
1287    !Config Help =
1288    !
1289    iflag_ice_thermo_omp = 0
1290    CALL getin('iflag_ice_thermo',iflag_ice_thermo_omp)
1291
1292    !Config Key  = rei_min
1293    !Config Desc = 
1294    !Config Def  = 3.5
1295    !Config Help =
1296    !
1297    rei_min_omp = 3.5
1298    CALL getin('rei_min',rei_min_omp)
1299
1300    !
1301    !Config Key  = rei_max
1302    !Config Desc = 
1303    !Config Def  = 61.29
1304    !Config Help =
1305    !
1306    rei_max_omp = 61.29
1307    CALL getin('rei_max',rei_max_omp)
1308
1309    !
1310    !Config Key  = top_height
1311    !Config Desc =
1312    !Config Def  = 3
1313    !Config Help =
1314    !
1315    top_height_omp = 3
1316    CALL getin('top_height',top_height_omp)
1317
1318    !
1319    !Config Key  = overlap
1320    !Config Desc =
1321    !Config Def  = 3
1322    !Config Help =
1323    !
1324    overlap_omp = 3
1325    CALL getin('overlap',overlap_omp)
1326
1327    !
1328    !Config Key  = cdmmax
1329    !Config Desc =
1330    !Config Def  = 1.3E-3
1331    !Config Help =
1332    !
1333    cdmmax_omp = 1.3E-3
1334    CALL getin('cdmmax',cdmmax_omp)
1335
1336    !
1337    !Config Key  = cdhmax
1338    !Config Desc =
1339    !Config Def  = 1.1E-3
1340    !Config Help =
1341    !
1342    cdhmax_omp = 1.1E-3
1343    CALL getin('cdhmax',cdhmax_omp)
1344
1345    !261103
1346    !
1347    !Config Key  = ksta
1348    !Config Desc =
1349    !Config Def  = 1.0e-10
1350    !Config Help =
1351    !
1352    ksta_omp = 1.0e-10
1353    CALL getin('ksta',ksta_omp)
1354
1355    !
1356    !Config Key  = ksta_ter
1357    !Config Desc =
1358    !Config Def  = 1.0e-10
1359    !Config Help =
1360    !
1361    ksta_ter_omp = 1.0e-10
1362    CALL getin('ksta_ter',ksta_ter_omp)
1363
1364    !Config Key  = f_ri_cd_min
1365    !Config Desc =
1366    !Config Def  = 0.1
1367    !Config Help =
1368    !
1369    f_ri_cd_min_omp = 0.1
1370    CALL getin('f_ri_cd_min',f_ri_cd_min_omp)
1371
1372    !
1373    !Config Key  = ok_kzmin
1374    !Config Desc =
1375    !Config Def  = .TRUE.
1376    !Config Help =
1377    !
1378    ok_kzmin_omp = .TRUE.
1379    CALL getin('ok_kzmin',ok_kzmin_omp)
1380
1381    pbl_lmixmin_alpha_omp=0.0
1382    CALL getin('pbl_lmixmin_alpha',pbl_lmixmin_alpha_omp)
1383
1384    !
1385    !Config Key  = fmagic
1386    !Config Desc = additionnal multiplicator factor used for albedo
1387    !Config Def  = 1.
1388    !Config Help = additionnal multiplicator factor used in albedo.F
1389    !
1390    fmagic_omp = 1.
1391    CALL getin('fmagic',fmagic_omp)
1392
1393    !
1394    !Config Key  = pmagic
1395    !Config Desc = additional factor used for albedo
1396    !Config Def  = 0.
1397    !Config Help = additional factor used in albedo.F
1398    !
1399    pmagic_omp = 0.
1400    CALL getin('pmagic',pmagic_omp)
1401
1402
1403    !Config Key = ok_lic_melt
1404    !Config Desc = Prise en compte de la fonte de la calotte dans le bilan d'eau
1405    !Config Def  = .FALSE.
1406    !Config Help = mettre a .FALSE. pour assurer la conservation en eau
1407    ok_lic_melt_omp = .FALSE.
1408    CALL getin('ok_lic_melt', ok_lic_melt_omp)
1409
1410
1411    !Config Key = ok_lic_cond
1412    !Config Desc = Prise en compte depot de vapeur d'eau sur la calotte dans le bilan d'eau
1413    !Config Def  = .FALSE.
1414    !Config Help = mettre a .TRUE. pour assurer la conservation en eau
1415    ok_lic_cond_omp = .FALSE.
1416    CALL getin('ok_lic_cond', ok_lic_cond_omp)
1417
1418    !
1419    ! PARAMETER FOR THE PLANETARY BOUNDARY LAYER
1420    !
1421
1422    !Config Key  = iflag_pbl
1423    !Config Desc =
1424    !Config Def  = 1
1425    !Config Help =
1426    !
1427    iflag_pbl_omp = 1
1428    CALL getin('iflag_pbl',iflag_pbl_omp)
1429
1430!FC
1431    !Config Key  = ifl_pbltree
1432    !Config Desc = drag from trees 0 no activated
1433    !Config Def  = 0
1434    !Config Help =
1435    !
1436    ifl_pbltree_omp = 0
1437    CALL getin('ifl_pbltree',ifl_pbltree_omp)
1438!FC
1439    !Config Key  = Cd_frein
1440    !Config Desc = drag from trees
1441    !Config Def  = 7.5E-02 (valeur Masson mais fait planter avec des LAI eleves)
1442    !Config Help =
1443    !
1444    Cd_frein_omp = 7.5E-02
1445    CALL getin('Cd_frein',Cd_frein_omp)
1446
1447    !
1448    !Config Key  = iflag_pbl_split
1449    !Config Desc = decimal flag: least signif digit = split vdf; next digit = split thermals
1450    !Config Def  = 0
1451    !Config Help = 0-> no splitting; 1-> vdf splitting; 10-> thermals splitting; 11-> full splitting
1452    !
1453    iflag_pbl_split_omp = 0
1454    call getin('iflag_pbl_split',iflag_pbl_split_omp)
1455    !
1456    !Config Key  = iflag_order2_sollw
1457    !Config Desc =
1458    !Config Def  = 0
1459    !Config Help =
1460    !
1461    iflag_order2_sollw_omp = 0
1462    CALL getin('iflag_order2_sollw',iflag_order2_sollw_omp)
1463    !
1464    !Config Key  = iflag_thermals
1465    !Config Desc =
1466    !Config Def  = 0
1467    !Config Help =
1468    !
1469    iflag_thermals_omp = 0
1470    CALL getin('iflag_thermals',iflag_thermals_omp)
1471    !
1472    !Config Key  = iflag_thermals_ed
1473    !Config Desc =
1474    !Config Def  = 0
1475    !Config Help =
1476    !
1477    fact_thermals_ed_dz_omp = 0.1
1478
1479    CALL getin('fact_thermals_ed_dz',fact_thermals_ed_dz_omp)
1480    !
1481    !
1482    !Config Key  = iflag_thermals_ed
1483    !Config Desc =
1484    !Config Def  = 0
1485    !Config Help =
1486    !
1487    iflag_thermals_ed_omp = 0
1488    CALL getin('iflag_thermals_ed',iflag_thermals_ed_omp)
1489    !
1490    !
1491    !Config Key  = iflag_thermals_optflux
1492    !Config Desc =
1493    !Config Def  = 0
1494    !Config Help =
1495    !
1496    iflag_thermals_optflux_omp = 0
1497    CALL getin('iflag_thermals_optflux',iflag_thermals_optflux_omp)
1498    !
1499    !Config Key  = iflag_thermals_closure
1500    !Config Desc =
1501    !Config Def  = 0
1502    !Config Help =
1503    !
1504    iflag_thermals_closure_omp = 1
1505    CALL getin('iflag_thermals_closure',iflag_thermals_closure_omp)
1506    !
1507    !Config Key  = nsplit_thermals
1508    !Config Desc =
1509    !Config Def  = 1
1510    !Config Help =
1511    !
1512    nsplit_thermals_omp = 1
1513    CALL getin('nsplit_thermals',nsplit_thermals_omp)
1514
1515    !Config Key  = alp_bl_k
1516    !Config Desc =
1517    !Config Def  = 0.
1518    !Config Help =
1519    !
1520    alp_bl_k_omp = 1.
1521    CALL getin('alp_bl_k',alp_bl_k_omp)
1522
1523    ! nrlmd le 10/04/2012
1524
1525    !Config Key  = iflag_trig_bl
1526    !Config Desc = 
1527    !Config Def  = 0
1528    !Config Help =
1529    !
1530    iflag_trig_bl_omp = 0
1531    CALL getin('iflag_trig_bl',iflag_trig_bl_omp)
1532
1533    !Config Key  = s_trig_bl
1534    !Config Desc = 
1535    !Config Def  = 0
1536    !Config Help =
1537    !
1538    s_trig_omp = 2e7
1539    CALL getin('s_trig',s_trig_omp)
1540
1541    !Config Key  = tau_trig_shallow
1542    !Config Desc = 
1543    !Config Def  = 0
1544    !Config Help =
1545    !
1546    tau_trig_shallow_omp = 600
1547    CALL getin('tau_trig_shallow',tau_trig_shallow_omp)
1548
1549    !Config Key  = tau_trig_deep
1550    !Config Desc = 
1551    !Config Def  = 0
1552    !Config Help =
1553    !
1554    tau_trig_deep_omp = 1800
1555    CALL getin('tau_trig_deep',tau_trig_deep_omp)
1556
1557    !Config Key  = iflag_clos_bl
1558    !Config Desc = 
1559    !Config Def  = 0
1560    !Config Help =
1561    !
1562    iflag_clos_bl_omp = 0
1563    CALL getin('iflag_clos_bl',iflag_clos_bl_omp)
1564
1565    ! fin nrlmd le 10/04/2012
1566
1567    !
1568    !Config Key  = tau_thermals
1569    !Config Desc =
1570    !Config Def  = 0.
1571    !Config Help =
1572    !
1573    tau_thermals_omp = 0.
1574    CALL getin('tau_thermals',tau_thermals_omp)
1575
1576    !
1577    !Config Key  = iflag_coupl
1578    !Config Desc =
1579    !Config Def  = 0
1580    !Config Help =
1581    !
1582    iflag_coupl_omp = 0
1583    CALL getin('iflag_coupl',iflag_coupl_omp)
1584
1585    !
1586    !Config Key  = iflag_clos
1587    !Config Desc = 
1588    !Config Def  = 0
1589    !Config Help =
1590    !
1591    iflag_clos_omp = 1
1592    CALL getin('iflag_clos',iflag_clos_omp)
1593    !
1594    !Config Key  = coef_clos_ls
1595    !Config Desc = 
1596    !Config Def  = 0
1597    !Config Help =
1598    !
1599    coef_clos_ls_omp = 0.
1600    CALL getin('coef_clos_ls',coef_clos_ls_omp)
1601
1602    !
1603    !Config Key  = iflag_cvl_sigd
1604    !Config Desc = 
1605    !Config Def  = 0
1606    !Config Help =
1607    !
1608    iflag_cvl_sigd_omp = 0
1609    CALL getin('iflag_cvl_sigd',iflag_cvl_sigd_omp)
1610
1611    !Config Key  = iflag_wake
1612    !Config Desc = 
1613    !Config Def  = 0
1614    !Config Help =
1615    !
1616    iflag_wake_omp = 0
1617    CALL getin('iflag_wake',iflag_wake_omp)
1618
1619    !Config Key  = alp_offset
1620    !Config Desc = 
1621    !Config Def  = 0
1622    !Config Help =
1623    !
1624    alp_offset_omp = 0.
1625    CALL getin('alp_offset',alp_offset_omp)
1626
1627    !
1628    !Config Key  = lev_histhf
1629    !Config Desc =
1630    !Config Def  = 1
1631    !Config Help =
1632    !
1633    lev_histhf_omp = 1
1634    CALL getin('lev_histhf',lev_histhf_omp)
1635
1636    !
1637    !Config Key  = lev_histday
1638    !Config Desc =
1639    !Config Def  = 1
1640    !Config Help =
1641    !
1642    lev_histday_omp = 1
1643    CALL getin('lev_histday',lev_histday_omp)
1644
1645    !
1646    !Config Key  = lev_histmth
1647    !Config Desc =
1648    !Config Def  = 2
1649    !Config Help =
1650    !
1651    lev_histmth_omp = 2
1652    CALL getin('lev_histmth',lev_histmth_omp)
1653    !
1654    !Config Key  = lev_histins
1655    !Config Desc =
1656    !Config Def  = 1
1657    !Config Help =
1658    !
1659    lev_histins_omp = 1
1660    CALL getin('lev_histins',lev_histins_omp)
1661    !
1662    !Config Key  = lev_histLES
1663    !Config Desc =
1664    !Config Def  = 1
1665    !Config Help =
1666    !
1667    lev_histLES_omp = 1
1668    CALL getin('lev_histLES',lev_histLES_omp)
1669    !
1670    !Config Key  = lev_histdayNMC
1671    !Config Desc =
1672    !Config Def  = 8
1673    !Config Help =
1674    !
1675    lev_histdayNMC_omp = 8
1676    CALL getin('lev_histdayNMC',lev_histdayNMC_omp)
1677    !
1678    !Config Key  = levout_histNMC
1679    !Config Desc =
1680    !Config Def  = 5
1681    !Config Help =
1682    !
1683    levout_histNMC_omp(1) = 5
1684    levout_histNMC_omp(2) = 5
1685    levout_histNMC_omp(3) = 5
1686    CALL getin('levout_histNMC',levout_histNMC_omp)
1687    !
1688    !histNMC BEG
1689    !Config Key  = ok_histNMC
1690    !Config Desc = ok_histNMC(1) = frequence de sortie fichiers histmthNMC
1691    !Config Desc = ok_histNMC(2) = frequence de sortie fichiers histdayNMC
1692    !Config Desc = ok_histNMC(3) = frequence de sortie fichiers histhfNMC
1693    !Config Def  = n, n, n
1694    !Config Help =
1695    !
1696    ok_histNMC_omp(1) = .FALSE.
1697    ok_histNMC_omp(2) = .FALSE.
1698    ok_histNMC_omp(3) = .FALSE.
1699    CALL getin('ok_histNMC',ok_histNMC_omp)
1700    !
1701    !Config Key  = freq_outNMC
1702    !Config Desc = freq_outNMC(1) = frequence de sortie fichiers histmthNMC
1703    !Config Desc = freq_outNMC(2) = frequence de sortie fichiers histdayNMC
1704    !Config Desc = freq_outNMC(3) = frequence de sortie fichiers histhfNMC
1705    !Config Def  = 2592000., 86400., 21600. (1mois, 1jour, 6h)
1706    !Config Help =
1707    !
1708    freq_outNMC_omp(1) = mth_len
1709    freq_outNMC_omp(2) = 1.
1710    freq_outNMC_omp(3) = 1./4.
1711    CALL getin('freq_outNMC',freq_outNMC_omp)
1712    !
1713    !Config Key  = freq_calNMC
1714    !Config Desc = freq_calNMC(1) = frequence de calcul fichiers histmthNMC
1715    !Config Desc = freq_calNMC(2) = frequence de calcul fichiers histdayNMC
1716    !Config Desc = freq_calNMC(3) = frequence de calcul fichiers histhfNMC
1717    !Config Def  = pasphys
1718    !Config Help =
1719    !
1720    freq_calNMC_omp(1) = pasphys
1721    freq_calNMC_omp(2) = pasphys
1722    freq_calNMC_omp(3) = pasphys
1723    CALL getin('freq_calNMC',freq_calNMC_omp)
1724    !
1725    !Config Key  = type_run
1726    !Config Desc =
1727    !Config Def  = 'AMIP'/'CFMIP'  ou 'CLIM'/'ENSP'
1728    !Config Help =
1729    !
1730    type_run_omp = 'AMIP'
1731    CALL getin('type_run',type_run_omp)
1732
1733    !
1734    !Config Key  = ok_cosp
1735    !Config Desc =
1736    !Config Def  = .FALSE.
1737    !Config Help =
1738    !
1739    ok_cosp_omp = .FALSE.
1740    CALL getin('ok_cosp',ok_cosp_omp)
1741
1742    !
1743    !Config Key  = ok_airs
1744    !Config Desc =
1745    !Config Def  = .FALSE.
1746    !Config Help =
1747    !
1748    ok_airs_omp = .FALSE.
1749    CALL getin('ok_airs',ok_airs_omp)
1750
1751    !
1752    !Config Key  = ok_mensuelCOSP
1753    !Config Desc =
1754    !Config Def  = .TRUE.
1755    !Config Help =
1756    !
1757    ok_mensuelCOSP_omp = .TRUE.
1758    CALL getin('ok_mensuelCOSP',ok_mensuelCOSP_omp)
1759
1760    !
1761    !Config Key  = ok_journeCOSP
1762    !Config Desc =
1763    !Config Def  = .TRUE.
1764    !Config Help =
1765    !
1766    ok_journeCOSP_omp = .TRUE.
1767    CALL getin('ok_journeCOSP',ok_journeCOSP_omp)
1768
1769    !
1770    !Config Key  = ok_hfCOSP
1771    !Config Desc =
1772    !Config Def  = .FALSE.
1773    !Config Help =
1774    !
1775    ok_hfCOSP_omp = .FALSE.
1776    CALL getin('ok_hfCOSP',ok_hfCOSP_omp)
1777
1778    !
1779    ! coordonnees (lonmin_ins, lonmax_ins, latmin_ins, latmax_ins) pour la zone
1780    ! avec sorties instantannees tous les pas de temps de la physique => "histbilKP_ins.nc"
1781    !
1782    !Config Key  = lonmin_ins
1783    !Config Desc = 100. 
1784    !Config Def  = longitude minimale sorties "bilKP_ins"
1785    !Config Help =
1786    !
1787    lonmin_ins_omp = 100.
1788    CALL getin('lonmin_ins',lonmin_ins_omp)
1789    !
1790    !Config Key  = lonmax_ins
1791    !Config Desc = 130.
1792    !Config Def  = longitude maximale sorties "bilKP_ins"
1793    !Config Help =
1794    !
1795    lonmax_ins_omp = 130.
1796    CALL getin('lonmax_ins',lonmax_ins_omp)
1797    !
1798    !Config Key  = latmin_ins
1799    !Config Desc = -20. 
1800    !Config Def  = latitude minimale sorties "bilKP_ins"
1801    !Config Help =
1802    !
1803    latmin_ins_omp = -20.
1804    CALL getin('latmin_ins',latmin_ins_omp)
1805    !
1806    !Config Key  = latmax_ins
1807    !Config Desc = 20.
1808    !Config Def  = latitude maximale sorties "bilKP_ins"
1809    !Config Help =
1810    !
1811    latmax_ins_omp = 20.
1812    CALL getin('latmax_ins',latmax_ins_omp)
1813    !
1814    !Config Key  = ecrit_hf
1815    !Config Desc =
1816    !Config Def  = 1./8. !toutes les 3h
1817    !Config Help =
1818    !
1819    ecrit_hf_omp = 1./8.
1820    CALL getin('ecrit_hf',ecrit_hf_omp)
1821    !
1822    !Config Key  = ecrit_ins
1823    !Config Desc =
1824    !Config Def  = 1./48. ! toutes les 1/2 h
1825    !Config Help =
1826    !
1827    ecrit_ins_omp = 1./48.
1828    CALL getin('ecrit_ins',ecrit_ins_omp)
1829    !
1830    !Config Key  = ecrit_day
1831    !Config Desc =
1832    !Config Def  = 1.0 !tous les jours
1833    !Config Help = nombre de jours pour ecriture fichier histday.nc
1834    !
1835    ecrit_day_omp = 1.0
1836    CALL getin('ecrit_day',ecrit_day_omp)
1837    !
1838    !Config Key  = ecrit_mth
1839    !Config Desc =
1840    !Config Def  = 30. !tous les 30jours (1 fois par mois)
1841    !Config Help =
1842    !
1843    ecrit_mth_omp = 30.
1844    CALL getin('ecrit_mth',ecrit_mth_omp)
1845    !
1846    !Config Key  = ecrit_tra
1847    !Config Desc =
1848    !Config Def  = 30. !tous les 30jours (1 fois par mois)
1849    !Config Help =
1850    !
1851    ecrit_tra_omp = 0.
1852    CALL getin('ecrit_tra',ecrit_tra_omp)
1853    !
1854    !Config Key  = ecrit_reg
1855    !Config Desc =
1856    !Config Def  = 0.25  !4 fois par jour
1857    !Config Help =
1858    !
1859    ecrit_reg_omp = 0.25   !4 fois par jour
1860    CALL getin('ecrit_reg',ecrit_reg_omp)
1861    !
1862    !
1863    print*,'CONFPHYS OOK avant drag_ter'
1864    !
1865    ! PARAMETRES CDRAG
1866    !
1867    f_cdrag_ter_omp = 0.8
1868    CALL getin('f_cdrag_ter',f_cdrag_ter_omp)
1869    !
1870    f_cdrag_oce_omp = 0.8
1871    CALL getin('f_cdrag_oce',f_cdrag_oce_omp)
1872    !
1873
1874    ! Gustiness flags
1875    f_z0qh_oce_omp = 1.
1876    CALL getin('f_z0qh_oce',f_z0qh_oce_omp)
1877    !
1878    f_qsat_oce_omp = 1.
1879    CALL getin('f_qsat_oce',f_qsat_oce_omp)
1880    !
1881    f_gust_bl_omp = 0.
1882    CALL getin('f_gust_bl',f_gust_bl_omp)
1883    !
1884    f_gust_wk_omp = 0.
1885    CALL getin('f_gust_wk',f_gust_wk_omp)
1886    !
1887    !Config Key  = iflag_z0_oce
1888    !Config Desc = 0 (z0h=z0m), 1 (diff. equ. for z0h and z0m), -1 (z0m=z0h=z0min)
1889    !Config Def  = 0   ! z0h = z0m
1890    !Config Help =
1891    !
1892    iflag_z0_oce_omp=0
1893    CALL getin('iflag_z0_oce',iflag_z0_oce_omp)
1894    !
1895    iflag_gusts_omp=0
1896    CALL getin('iflag_gusts',iflag_gusts_omp)
1897    !
1898    min_wind_speed_omp = 1.
1899    CALL getin('min_wind_speed',min_wind_speed_omp)
1900
1901    z0m_seaice_omp = 0.002 ; CALL getin('z0m_seaice',z0m_seaice_omp)
1902    z0h_seaice_omp = 0.002 ; CALL getin('z0h_seaice',z0h_seaice_omp)
1903
1904    f_rugoro_omp = 0.
1905    CALL getin('f_rugoro',f_rugoro_omp)
1906
1907    z0min_omp = 0.000015
1908    CALL getin('z0min',z0min_omp)
1909
1910
1911    ! PARAMETERS FOR CONVECTIVE INHIBITION BY TROPOS. DRYNESS
1912    !
1913    !Config Key  = supcrit1
1914    !Config Desc =
1915    !Config Def  = .540
1916    !Config Help =
1917    !
1918    supcrit1_omp = .540
1919    CALL getin('supcrit1',supcrit1_omp)
1920
1921    !
1922    !Config Key  = supcrit2
1923    !Config Desc =
1924    !Config Def  = .600
1925    !Config Help =
1926    !
1927    supcrit2_omp = .600
1928    CALL getin('supcrit2',supcrit2_omp)
1929
1930    !
1931    ! PARAMETERS FOR THE MIXING DISTRIBUTION
1932    ! iflag_mix: 0=OLD,
1933    !            1=NEW (JYG),           
1934    !            2=NEW + conv. depth inhib. by tropos. dryness
1935    ! '2' is NOT operationnal and should not be used.
1936    !
1937    !Config Key  = iflag_mix
1938    !Config Desc =
1939    !Config Def  = 1
1940    !Config Help =
1941    !
1942    iflag_mix_omp = 1
1943    CALL getin('iflag_mix',iflag_mix_omp)
1944
1945!
1946    ! PARAMETERS FOR THE EROSION OF THE ADIABATIC ASCENTS
1947    ! iflag_mix_adiab: 0=OLD,
1948    !                  1=NEW (CR),           
1949    !           
1950    !
1951    !Config Key  = iflag_mix_adiab
1952    !Config Desc =
1953    !Config Def  = 1
1954    !Config Help =
1955    !
1956    iflag_mix_adiab_omp = 0
1957    CALL getin('iflag_mix_adiab',iflag_mix_adiab_omp)
1958
1959    !
1960    !Config Key  = scut
1961    !Config Desc =
1962    !Config Def  = 0.95
1963    !Config Help =
1964    !
1965    scut_omp = 0.95
1966    CALL getin('scut',scut_omp)
1967
1968    !
1969    !Config Key  = qqa1
1970    !Config Desc =
1971    !Config Def  = 1.0
1972    !Config Help =
1973    !
1974    qqa1_omp = 1.0
1975    CALL getin('qqa1',qqa1_omp)
1976
1977    !
1978    !Config Key  = qqa2
1979    !Config Desc =
1980    !Config Def  = 0.0
1981    !Config Help =
1982    !
1983    qqa2_omp = 0.0
1984    CALL getin('qqa2',qqa2_omp)
1985
1986    !
1987    !Config Key  = gammas
1988    !Config Desc =
1989    !Config Def  = 0.05
1990    !Config Help =
1991    !
1992    gammas_omp = 0.05
1993    CALL getin('gammas',gammas_omp)
1994
1995    !
1996    !Config Key  = Fmax
1997    !Config Desc =
1998    !Config Def  = 0.65
1999    !Config Help =
2000    !
2001    Fmax_omp = 0.65
2002    CALL getin('Fmax',Fmax_omp)
2003
2004    !
2005    !Config Key  = tmax_fonte_cv
2006    !Config Desc =
2007    !Config Def  = 275.15
2008    !Config Help =
2009    !
2010    tmax_fonte_cv_omp = 275.15
2011    CALL getin('tmax_fonte_cv',tmax_fonte_cv_omp)
2012
2013    !
2014    !Config Key  = alphas 
2015    !Config Desc =
2016    !Config Def  = -5.
2017    !Config Help =
2018    !
2019    alphas_omp = -5.
2020    CALL getin('alphas',alphas_omp)
2021
2022    !Config key = ok_strato
2023    !Config  Desc = activation de la version strato
2024    !Config  Def  = .FALSE.
2025    !Config  Help = active la version stratosph\'erique de LMDZ de F. Lott
2026    !               Et la sponge layer (Runs Stratospheriques)
2027
2028    ok_strato_omp=.FALSE.
2029    CALL getin('ok_strato',ok_strato_omp)
2030
2031    !Config  key = ok_hines
2032    !Config  Desc = activation de la parametrisation de hines
2033    !Config  Def  = .FALSE.
2034    !Config  Help = Clefs controlant la parametrization de Hines
2035
2036    ok_hines_omp=.FALSE.
2037    CALL getin('ok_hines',ok_hines_omp)
2038
2039    !  Parametres pour les ondes de gravite
2040    ! 
2041    !  Subgrid Scale Orography (Lott Miller (1997), Lott (1999))
2042
2043    sso_gkdrag_omp = merge(0.1875, 0.2, ok_strato_omp)
2044    CALL getin('sso_gkdrag', sso_gkdrag_omp)
2045
2046    sso_grahil_omp=merge(0.1,1.,ok_strato_omp)
2047    CALL getin('sso_grahil', sso_grahil_omp)
2048
2049    sso_grcrit_omp =merge(1.,0.01,ok_strato_omp)
2050    CALL getin('sso_grcrit', sso_grcrit_omp)
2051
2052    sso_gfrcri_omp = 1.
2053    CALL getin('sso_gfrcri', sso_gfrcri_omp)
2054
2055    sso_gkwake_omp = 0.50
2056    CALL getin('sso_gkwake', sso_gkwake_omp)
2057
2058    sso_gklift_omp = merge(0.25,0.50,ok_strato_omp)
2059    CALL getin('sso_gklift', sso_gklift_omp)
2060
2061    ! Random gravity waves:
2062
2063    ok_gwd_rando_omp = .FALSE.
2064    IF ( klon_glo == 1 ) THEN
2065       print*,'La parametrisation des ondes de gravites non orographiques'
2066       print*,'ne fonctionne pas en 1D'
2067    ELSE
2068       CALL getin('ok_gwd_rando', ok_gwd_rando_omp)
2069    ENDIF
2070
2071    gwd_rando_ruwmax_omp = 2.00
2072    CALL getin('gwd_rando_ruwmax', gwd_rando_ruwmax_omp)
2073
2074    gwd_rando_sat_omp = 0.25
2075    CALL getin('gwd_rando_sat', gwd_rando_sat_omp)
2076
2077    gwd_front_ruwmax_omp = 2.50
2078    CALL getin('gwd_front_ruwmax', gwd_front_ruwmax_omp)
2079
2080    gwd_front_sat_omp = 0.60
2081    CALL getin('gwd_front_sat', gwd_front_sat_omp)
2082
2083
2084    !Config  key = ok_qch4
2085    !Config  Desc = activation de la parametrisation du methane
2086    !Config  Def  = .FALSE.
2087    !Config  Help = Clef controlant l'activation de la parametrisation
2088    !               de l'humidite due a oxydation+photolyse du methane strato
2089
2090    ok_qch4_omp=.FALSE.
2091    CALL getin('ok_qch4',ok_qch4_omp)
2092
2093    !Config Key  = OK_LES                                               
2094    !Config Desc = Pour des sorties LES                                 
2095    !Config Def  = .FALSE.                                             
2096    !Config Help = Pour creer le fichier histLES contenant les sorties 
2097    !              LES                                                 
2098    !                                                                   
2099    ok_LES_omp = .FALSE.                                             
2100    CALL getin('OK_LES', ok_LES_omp)                                 
2101
2102    !Config Key  = callstats                                               
2103    !Config Desc = Pour des sorties callstats                                 
2104    !Config Def  = .FALSE.                                             
2105    !Config Help = Pour creer le fichier stats contenant les sorties 
2106    !              stats                                                 
2107    !                                                                   
2108    callstats_omp = .FALSE.                                             
2109    CALL getin('callstats', callstats_omp)                                 
2110    !
2111    !Config Key  = ecrit_LES
2112    !Config Desc = Frequence d'ecriture des resultats du LES en nombre de jours;
2113    !              par defaut 1., i.e. 1 jour
2114    !Config Def  = 1./8.
2115    !Config Help = ...
2116    !
2117    !
2118    adjust_tropopause = .FALSE.
2119    CALL getin('adjust_tropopause', adjust_tropopause_omp)
2120    !
2121    !Config Key  = adjust_tropopause
2122    !Config Desc = Adjust the ozone field from the climoz file by stretching its
2123    !              tropopause so that it matches the one of LMDZ.
2124    !Config Def  = .FALSE.
2125    !Config Help = Ensure tropospheric ozone column conservation.
2126    !
2127    !
2128    ok_daily_climoz = .FALSE.
2129    CALL getin('ok_daily_climoz', ok_daily_climoz_omp)
2130    !
2131    !Config Key  = ok_daily_climoz
2132    !Config Desc = Interpolate in time the ozone forcings within ce0l.
2133    !              .TRUE. if backward compatibility is needed.
2134    !Config Def  = .TRUE.
2135    !Config Help = .FALSE. ensure much fewer (no calendar dependency)
2136    !  and lighter monthly climoz files, inetrpolated in time at gcm run time.
2137    !
2138    ecrit_LES_omp = 1./8.
2139    CALL getin('ecrit_LES', ecrit_LES_omp)
2140    !
2141    read_climoz = 0 ! default value
2142    CALL getin('read_climoz', read_climoz)
2143
2144    carbon_cycle_tr_omp=.FALSE.
2145    CALL getin('carbon_cycle_tr',carbon_cycle_tr_omp)
2146
2147    carbon_cycle_cpl_omp=.FALSE.
2148    CALL getin('carbon_cycle_cpl',carbon_cycle_cpl_omp)
2149
2150    !$OMP END MASTER
2151    !$OMP BARRIER
2152
2153    R_ecc = R_ecc_omp
2154    R_peri = R_peri_omp
2155    R_incl = R_incl_omp
2156    solaire = solaire_omp
2157    ok_suntime_rrtm = ok_suntime_rrtm_omp
2158    co2_ppm = co2_ppm_omp
2159    RCO2 = RCO2_omp
2160    CH4_ppb = CH4_ppb_omp
2161    RCH4 = RCH4_omp
2162    N2O_ppb = N2O_ppb_omp
2163    RN2O = RN2O_omp
2164    CFC11_ppt = CFC11_ppt_omp
2165    RCFC11 = RCFC11_omp
2166    CFC12_ppt = CFC12_ppt_omp
2167    RCFC12 = RCFC12_omp
2168    RCO2_act = RCO2
2169    RCH4_act = RCH4
2170    RN2O_act = RN2O
2171    RCFC11_act = RCFC11
2172    RCFC12_act = RCFC12
2173    RCO2_per = RCO2_per_omp
2174    RCH4_per = RCH4_per_omp
2175    RN2O_per = RN2O_per_omp
2176    RCFC11_per = RCFC11_per_omp
2177    RCFC12_per = RCFC12_per_omp
2178
2179    iflag_cycle_diurne = iflag_cycle_diurne_omp
2180    soil_model = soil_model_omp
2181    new_oliq = new_oliq_omp
2182    ok_orodr = ok_orodr_omp
2183    ok_orolf = ok_orolf_omp
2184    ok_limitvrai = ok_limitvrai_omp
2185    nbapp_rad = nbapp_rad_omp
2186    iflag_con = iflag_con_omp
2187    nbapp_cv = nbapp_cv_omp
2188    nbapp_wk = nbapp_wk_omp
2189    iflag_ener_conserv = iflag_ener_conserv_omp
2190    ok_conserv_q = ok_conserv_q_omp
2191    iflag_fisrtilp_qsat = iflag_fisrtilp_qsat_omp
2192    iflag_bergeron = iflag_bergeron_omp
2193
2194    epmax = epmax_omp
2195    coef_epmax_cape = coef_epmax_cape_omp
2196    ok_adj_ema = ok_adj_ema_omp
2197    iflag_clw = iflag_clw_omp
2198    cld_lc_lsc = cld_lc_lsc_omp
2199    cld_lc_con = cld_lc_con_omp
2200    cld_tau_lsc = cld_tau_lsc_omp
2201    cld_tau_con = cld_tau_con_omp
2202    ffallv_lsc = ffallv_lsc_omp
2203    ffallv_con = ffallv_con_omp
2204    coef_eva = coef_eva_omp
2205    reevap_ice = reevap_ice_omp
2206    iflag_pdf = iflag_pdf_omp
2207    solarlong0 = solarlong0_omp
2208    qsol0 = qsol0_omp
2209    evap0 = evap0_omp
2210    albsno0 = albsno0_omp
2211    iflag_sic = iflag_sic_omp
2212    inertie_sol = inertie_sol_omp
2213    inertie_sic = inertie_sic_omp
2214    inertie_lic = inertie_lic_omp
2215    inertie_sno = inertie_sno_omp
2216    rad_froid = rad_froid_omp
2217    rad_chau1 = rad_chau1_omp
2218    rad_chau2 = rad_chau2_omp
2219    t_glace_min = t_glace_min_omp
2220    t_glace_max = t_glace_max_omp
2221    exposant_glace = exposant_glace_omp
2222    iflag_t_glace = iflag_t_glace_omp
2223    iflag_cloudth_vert=iflag_cloudth_vert_omp
2224    iflag_rain_incloud_vol=iflag_rain_incloud_vol_omp
2225    iflag_ice_thermo = iflag_ice_thermo_omp
2226    rei_min = rei_min_omp
2227    rei_max = rei_max_omp
2228    top_height = top_height_omp
2229    overlap = overlap_omp
2230    cdmmax = cdmmax_omp
2231    cdhmax = cdhmax_omp
2232    ksta = ksta_omp
2233    ksta_ter = ksta_ter_omp
2234    f_ri_cd_min = f_ri_cd_min_omp
2235    ok_kzmin = ok_kzmin_omp
2236    pbl_lmixmin_alpha=pbl_lmixmin_alpha_omp
2237    fmagic = fmagic_omp
2238    pmagic = pmagic_omp
2239    iflag_pbl = iflag_pbl_omp
2240    iflag_pbl_split = iflag_pbl_split_omp
2241!FC
2242    ifl_pbltree = ifl_pbltree_omp
2243    Cd_frein    =Cd_frein_omp
2244    iflag_order2_sollw = iflag_order2_sollw_omp
2245    lev_histhf = lev_histhf_omp
2246    lev_histday = lev_histday_omp
2247    lev_histmth = lev_histmth_omp
2248    lev_histins = lev_histins_omp
2249    lev_histLES = lev_histLES_omp
2250    lev_histdayNMC = lev_histdayNMC_omp
2251    levout_histNMC = levout_histNMC_omp
2252    ok_histNMC(:) = ok_histNMC_omp(:)
2253    freq_outNMC(:) = freq_outNMC_omp(:)
2254    freq_calNMC(:) = freq_calNMC_omp(:)
2255
2256    type_ocean = type_ocean_omp
2257    version_ocean = version_ocean_omp
2258    t_coupl = t_coupl_omp
2259
2260    ok_veget=.TRUE.
2261    type_veget=type_veget_omp
2262    IF (type_veget=='n' .or. type_veget=='bucket' .or. type_veget=='betaclim') THEN
2263       ok_veget=.FALSE.
2264    ENDIF
2265    ! Martin
2266    ok_snow = ok_snow_omp
2267    ! Martin
2268
2269    ok_all_xml = ok_all_xml_omp
2270    ok_lwoff = ok_lwoff_omp
2271    ok_newmicro = ok_newmicro_omp
2272    ok_journe = ok_journe_omp
2273    ok_hf = ok_hf_omp
2274    ok_mensuel = ok_mensuel_omp
2275    ok_instan = ok_instan_omp
2276    freq_ISCCP = freq_ISCCP_omp
2277    ecrit_ISCCP = ecrit_ISCCP_omp
2278    freq_COSP = freq_COSP_omp
2279    freq_AIRS = freq_AIRS_omp
2280    ok_ade = ok_ade_omp
2281    ok_aie = ok_aie_omp
2282    ok_alw = ok_alw_omp
2283    ok_cdnc = ok_cdnc_omp
2284    aerosol_couple = aerosol_couple_omp
2285    chemistry_couple = chemistry_couple_omp
2286    flag_aerosol=flag_aerosol_omp
2287    flag_aerosol_strat=flag_aerosol_strat_omp
2288    flag_bc_internal_mixture=flag_bc_internal_mixture_omp
2289    new_aod=new_aod_omp
2290    aer_type = aer_type_omp
2291    bl95_b0 = bl95_b0_omp
2292    bl95_b1 = bl95_b1_omp
2293    fact_cldcon = fact_cldcon_omp
2294    facttemps = facttemps_omp
2295    ratqsbas = ratqsbas_omp
2296    ratqshaut = ratqshaut_omp
2297    tau_ratqs = tau_ratqs_omp
2298
2299    iflag_radia = iflag_radia_omp
2300    iflag_rrtm = iflag_rrtm_omp
2301    iflag_albedo = iflag_albedo_omp
2302    ok_chlorophyll = ok_chlorophyll_omp
2303    NSW = NSW_omp
2304    iflag_cld_th = iflag_cld_th_omp
2305    iflag_cld_cv = iflag_cld_cv_omp
2306    tau_cld_cv = tau_cld_cv_omp
2307    coefw_cld_cv = coefw_cld_cv_omp
2308    iflag_ratqs = iflag_ratqs_omp
2309    ip_ebil_phy = ip_ebil_phy_omp
2310    iflag_thermals = iflag_thermals_omp
2311    iflag_thermals_ed = iflag_thermals_ed_omp
2312    fact_thermals_ed_dz = fact_thermals_ed_dz_omp
2313    iflag_thermals_optflux = iflag_thermals_optflux_omp
2314    iflag_thermals_closure = iflag_thermals_closure_omp
2315    nsplit_thermals = nsplit_thermals_omp
2316    tau_thermals = tau_thermals_omp
2317    alp_bl_k = alp_bl_k_omp
2318    ! nrlmd le 10/04/2012
2319    iflag_trig_bl = iflag_trig_bl_omp
2320    s_trig = s_trig_omp
2321    tau_trig_shallow = tau_trig_shallow_omp
2322    tau_trig_deep = tau_trig_deep_omp
2323    iflag_clos_bl = iflag_clos_bl_omp
2324    ! fin nrlmd le 10/04/2012
2325    iflag_coupl = iflag_coupl_omp
2326    iflag_clos = iflag_clos_omp
2327    iflag_wake = iflag_wake_omp
2328    coef_clos_ls = coef_clos_ls_omp
2329    alp_offset = alp_offset_omp
2330    iflag_cvl_sigd = iflag_cvl_sigd_omp
2331    type_run = type_run_omp
2332    ok_cosp = ok_cosp_omp
2333    ok_airs = ok_airs_omp
2334
2335    ok_mensuelCOSP = ok_mensuelCOSP_omp
2336    ok_journeCOSP = ok_journeCOSP_omp
2337    ok_hfCOSP = ok_hfCOSP_omp
2338    seuil_inversion=seuil_inversion_omp
2339    lonmin_ins = lonmin_ins_omp
2340    lonmax_ins = lonmax_ins_omp
2341    latmin_ins = latmin_ins_omp
2342    latmax_ins = latmax_ins_omp
2343    ecrit_hf   = ecrit_hf_omp
2344    ecrit_ins   = ecrit_ins_omp
2345    ecrit_day = ecrit_day_omp
2346    ecrit_mth = ecrit_mth_omp
2347    ecrit_tra = ecrit_tra_omp
2348    ecrit_reg = ecrit_reg_omp
2349    cvl_comp_threshold = cvl_comp_threshold_omp
2350    cvl_sig2feed = cvl_sig2feed_omp
2351    cvl_corr = cvl_corr_omp
2352    ok_lic_melt = ok_lic_melt_omp
2353    ok_lic_cond = ok_lic_cond_omp
2354    f_cdrag_ter=f_cdrag_ter_omp
2355    f_cdrag_oce=f_cdrag_oce_omp
2356
2357    f_gust_wk=f_gust_wk_omp
2358    f_gust_bl=f_gust_bl_omp
2359    f_qsat_oce=f_qsat_oce_omp
2360    f_z0qh_oce=f_z0qh_oce_omp
2361    min_wind_speed=min_wind_speed_omp
2362    iflag_gusts=iflag_gusts_omp
2363    iflag_z0_oce=iflag_z0_oce_omp
2364
2365    z0m_seaice=z0m_seaice_omp
2366    z0h_seaice=z0h_seaice_omp
2367
2368    f_rugoro=f_rugoro_omp
2369
2370    z0min=z0min_omp
2371    supcrit1 = supcrit1_omp
2372    supcrit2 = supcrit2_omp
2373    iflag_mix = iflag_mix_omp
2374    iflag_mix_adiab = iflag_mix_adiab_omp
2375    scut = scut_omp
2376    qqa1 = qqa1_omp
2377    qqa2 = qqa2_omp
2378    gammas = gammas_omp
2379    Fmax = Fmax_omp
2380    tmax_fonte_cv = tmax_fonte_cv_omp
2381    alphas = alphas_omp
2382
2383    gkdrag=sso_gkdrag_omp
2384    grahilo=sso_grahil_omp
2385    grcrit=sso_grcrit_omp
2386    gfrcrit=sso_gfrcri_omp
2387    gkwake=sso_gkwake_omp
2388    gklift=sso_gklift_omp
2389
2390    ok_strato = ok_strato_omp
2391    ok_hines = ok_hines_omp
2392    ok_gwd_rando = ok_gwd_rando_omp
2393    gwd_rando_ruwmax = gwd_rando_ruwmax_omp
2394    gwd_rando_sat = gwd_rando_sat_omp
2395    gwd_front_ruwmax = gwd_front_ruwmax_omp
2396    gwd_front_sat = gwd_front_sat_omp
2397    ok_qch4 = ok_qch4_omp
2398    ok_LES = ok_LES_omp
2399    callstats = callstats_omp
2400    ecrit_LES = ecrit_LES_omp
2401    adjust_tropopause = adjust_tropopause_omp
2402    ok_daily_climoz = ok_daily_climoz_omp
2403    carbon_cycle_tr = carbon_cycle_tr_omp
2404    carbon_cycle_cpl = carbon_cycle_cpl_omp
2405
2406    ! Test of coherence between type_ocean and version_ocean
2407    IF (type_ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo') ) THEN
2408       WRITE(lunout,*)' ERROR version_ocean=',version_ocean,' not valid in coupled configuration'
2409       CALL abort_physic('conf_phys','version_ocean not valid',1)
2410    ENDIF
2411
2412    IF (type_ocean=='slab' .AND. version_ocean=='xxxxxx') THEN
2413       version_ocean='sicOBS'
2414    ELSE IF (type_ocean=='slab' .AND. version_ocean/='sicOBS' &
2415         .AND. version_ocean/='sicINT' .AND. version_ocean/='sicNO') THEN
2416       WRITE(lunout,*)' ERROR version_ocean=',version_ocean,' not valid with slab ocean'
2417       CALL abort_physic('conf_phys','version_ocean not valid',1)
2418    ENDIF
2419
2420    !--test on radiative scheme
2421    IF (iflag_rrtm .EQ. 0) THEN
2422      IF (NSW.NE.2) THEN
2423        WRITE(lunout,*) ' ERROR iflag_rrtm=0 and NSW<>2 not possible'
2424        CALL abort_physic('conf_phys','choice NSW not valid',1)
2425      ENDIF
2426    ELSE IF (iflag_rrtm .EQ. 1) THEN
2427      IF (NSW.NE.2.AND.NSW.NE.4.AND.NSW.NE.6) THEN
2428        WRITE(lunout,*) ' ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'
2429        CALL abort_physic('conf_phys','choice NSW not valid',1)
2430      ENDIF
2431    ELSE
2432       WRITE(lunout,*) ' ERROR iflag_rrtm<>0,1'
2433       CALL abort_physic('conf_phys','choice iflag_rrtm not valid',1)
2434    ENDIF
2435#ifdef CPP_StratAer
2436    IF (iflag_rrtm .NE. 1) THEN
2437       WRITE(lunout,*) ' ERROR iflag_rrtm<>1 but StratAer activated'
2438       CALL abort_physic('conf_phys','iflag_rrtm not valid for StratAer',1)
2439    ENDIF
2440    IF (NSW .NE. 6) THEN
2441       WRITE(lunout,*) ' ERROR NSW<>6 but StratAer activated'
2442       CALL abort_physic('conf_phys','NSW not valid for StratAer',1)
2443    ENDIF
2444#endif
2445
2446    !--test on ocean surface albedo
2447    IF (iflag_albedo.LT.0.OR.iflag_albedo.GT.2) THEN
2448       WRITE(lunout,*) ' ERROR iflag_albedo<>0,1'
2449       CALL abort_physic('conf_phys','choice iflag_albedo not valid',1)
2450    ENDIF
2451
2452    ! Test sur new_aod. Ce flag permet de retrouver les resultats de l'AR4
2453    ! il n'est utilisable que lors du couplage avec le SO4 seul
2454    IF (ok_ade .OR. ok_aie) THEN
2455       IF ( flag_aerosol .EQ. 0 ) THEN
2456          CALL abort_physic('conf_phys','flag_aerosol=0 not compatible avec ok_ade ou ok_aie=.TRUE.',1)
2457       ENDIF
2458       IF ( .NOT. new_aod .AND.  flag_aerosol .NE. 1) THEN
2459          CALL abort_physic('conf_phys','new_aod=.FALSE. not compatible avec flag_aerosol=1',1)
2460       ENDIF
2461    ENDIF
2462
2463    ! Flag_aerosol cannot be to zero if we are in coupled mode for aerosol
2464    IF (aerosol_couple .AND. flag_aerosol .EQ. 0 ) THEN
2465       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if aerosol_couple=y ', 1)
2466    ENDIF
2467
2468    ! Read_climoz need to be zero if we are in couple mode for chemistry
2469    IF (chemistry_couple .AND. read_climoz .ne. 0) THEN
2470       CALL abort_physic('conf_phys', 'read_climoz need to be to zero if chemistry_couple=y ', 1)
2471    ENDIF
2472
2473
2474    ! flag_aerosol need to be different to zero if ok_cdnc is activated
2475    IF (ok_cdnc .AND. flag_aerosol .EQ. 0) THEN
2476       CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if ok_cdnc is activated ', 1)
2477    ENDIF
2478
2479    ! ok_cdnc must be set to y if ok_aie is activated
2480    IF (ok_aie .AND. .NOT. ok_cdnc) THEN
2481       CALL abort_physic('conf_phys', 'ok_cdnc must be set to y if ok_aie is activated',1)
2482    ENDIF
2483
2484    ! flag_aerosol=7 => MACv2SP climatology
2485    IF (flag_aerosol.EQ.7.AND. iflag_rrtm.NE.1) THEN
2486       CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with RRTM',1)
2487    ENDIF
2488    IF (flag_aerosol.EQ.7.AND. NSW.NE.6) THEN
2489       CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with NSW=6',1)
2490    ENDIF
2491
2492    ! BC internal mixture is only possible with RRTM & NSW=6 & flag_aerosol=6 or aerosol_couple
2493    IF (flag_bc_internal_mixture .AND. NSW.NE.6) THEN
2494       CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with NSW=6',1)
2495    ENDIF
2496    IF (flag_bc_internal_mixture .AND. iflag_rrtm.NE.1) THEN
2497       CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with RRTM',1)
2498    ENDIF
2499    IF (flag_bc_internal_mixture .AND. flag_aerosol.NE.6) THEN
2500       CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6',1)
2501    ENDIF
2502
2503    ! ORCHIDEE must be activated for ifl_pbltree=1
2504    IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN
2505       WRITE(lunout,*)'Warning: ORCHIDEE must be activated for ifl_pbltree=1'
2506       WRITE(lunout,*)'ifl_pbltree is now changed to zero'
2507       ifl_pbltree=0
2508    END IF
2509
2510    !$OMP MASTER
2511
2512    write(lunout,*)' ##############################################'
2513    write(lunout,*)' Configuration des parametres de la physique: '
2514    write(lunout,*)' Type ocean = ', type_ocean
2515    write(lunout,*)' Version ocean = ', version_ocean
2516    write(lunout,*)' Config veget = ', ok_veget,type_veget
2517    write(lunout,*)' Snow model SISVAT : ok_snow = ', ok_snow
2518    write(lunout,*)' Config xml pour XIOS : ok_all_xml = ', ok_all_xml
2519    write(lunout,*)' Sortie journaliere = ', ok_journe
2520    write(lunout,*)' Sortie haute frequence = ', ok_hf
2521    write(lunout,*)' Sortie mensuelle = ', ok_mensuel
2522    write(lunout,*)' Sortie instantanee = ', ok_instan
2523    write(lunout,*)' Frequence appel simulateur ISCCP, freq_ISCCP =', freq_ISCCP
2524    write(lunout,*)' Frequence appel simulateur ISCCP, ecrit_ISCCP =', ecrit_ISCCP
2525    write(lunout,*)' Frequence appel simulateur COSP, freq_COSP =', freq_COSP
2526    write(lunout,*)' Frequence appel simulateur AIRS, freq_AIRS =', freq_AIRS
2527    write(lunout,*)' Sortie bilan d''energie, ip_ebil_phy =', ip_ebil_phy
2528    write(lunout,*)' Excentricite = ',R_ecc
2529    write(lunout,*)' Equinoxe = ',R_peri
2530    write(lunout,*)' Inclinaison =',R_incl
2531    write(lunout,*)' Constante solaire =',solaire
2532    write(lunout,*)' ok_suntime_rrtm =',ok_suntime_rrtm
2533    write(lunout,*)' co2_ppm =',co2_ppm
2534    write(lunout,*)' RCO2_act = ',RCO2_act
2535    write(lunout,*)' CH4_ppb =',CH4_ppb,' RCH4_act = ',RCH4_act
2536    write(lunout,*)' N2O_ppb =',N2O_ppb,' RN2O_act=  ',RN2O_act
2537    write(lunout,*)' CFC11_ppt=',CFC11_ppt,' RCFC11_act=  ',RCFC11_act
2538    write(lunout,*)' CFC12_ppt=',CFC12_ppt,' RCFC12_act=  ',RCFC12_act
2539    write(lunout,*)' RCO2_per = ',RCO2_per,' RCH4_per = ', RCH4_per
2540    write(lunout,*)' RN2O_per = ',RN2O_per,' RCFC11_per = ', RCFC11_per
2541    write(lunout,*)' RCFC12_per = ',RCFC12_per
2542    write(lunout,*)' cvl_comp_threshold=', cvl_comp_threshold
2543    write(lunout,*)' cvl_sig2feed=', cvl_sig2feed
2544    write(lunout,*)' cvl_corr=', cvl_corr
2545    write(lunout,*)'ok_lic_melt=', ok_lic_melt
2546    write(lunout,*)'ok_lic_cond=', ok_lic_cond
2547    write(lunout,*)'iflag_cycle_diurne=',iflag_cycle_diurne
2548    write(lunout,*)'soil_model=',soil_model
2549    write(lunout,*)'new_oliq=',new_oliq
2550    write(lunout,*)'ok_orodr=',ok_orodr
2551    write(lunout,*)'ok_orolf=',ok_orolf
2552    write(lunout,*)'ok_limitvrai=',ok_limitvrai
2553    write(lunout,*)'nbapp_rad=',nbapp_rad
2554    write(lunout,*)'iflag_con=',iflag_con
2555    write(lunout,*)'nbapp_cv=',nbapp_cv
2556    write(lunout,*)'nbapp_wk=',nbapp_wk
2557    write(lunout,*)'iflag_ener_conserv=',iflag_ener_conserv
2558    write(lunout,*)'ok_conserv_q=',ok_conserv_q
2559    write(lunout,*)'iflag_fisrtilp_qsat=',iflag_fisrtilp_qsat
2560    write(lunout,*)'iflag_bergeron=',iflag_bergeron
2561    write(lunout,*)' epmax = ', epmax
2562    write(lunout,*)' coef_epmax_cape = ', coef_epmax_cape
2563    write(lunout,*)' ok_adj_ema = ', ok_adj_ema
2564    write(lunout,*)' iflag_clw = ', iflag_clw
2565    write(lunout,*)' cld_lc_lsc = ', cld_lc_lsc
2566    write(lunout,*)' cld_lc_con = ', cld_lc_con
2567    write(lunout,*)' cld_tau_lsc = ', cld_tau_lsc
2568    write(lunout,*)' cld_tau_con = ', cld_tau_con
2569    write(lunout,*)' ffallv_lsc = ', ffallv_lsc
2570    write(lunout,*)' ffallv_con = ', ffallv_con
2571    write(lunout,*)' coef_eva = ', coef_eva
2572    write(lunout,*)' reevap_ice = ', reevap_ice
2573    write(lunout,*)' iflag_pdf = ', iflag_pdf
2574    write(lunout,*)' iflag_cld_th = ', iflag_cld_th
2575    write(lunout,*)' iflag_cld_cv = ', iflag_cld_cv
2576    write(lunout,*)' tau_cld_cv = ', tau_cld_cv
2577    write(lunout,*)' coefw_cld_cv = ', coefw_cld_cv
2578    write(lunout,*)' iflag_radia = ', iflag_radia
2579    write(lunout,*)' iflag_rrtm = ', iflag_rrtm
2580    write(lunout,*)' NSW = ', NSW
2581    write(lunout,*)' iflag_albedo = ', iflag_albedo !albedo SB
2582    write(lunout,*)' ok_chlorophyll =',ok_chlorophyll ! albedo SB
2583    write(lunout,*)' iflag_ratqs = ', iflag_ratqs
2584    write(lunout,*)' seuil_inversion = ', seuil_inversion
2585    write(lunout,*)' fact_cldcon = ', fact_cldcon
2586    write(lunout,*)' facttemps = ', facttemps
2587    write(lunout,*)' ok_newmicro = ',ok_newmicro
2588    write(lunout,*)' ratqsbas = ',ratqsbas
2589    write(lunout,*)' ratqshaut = ',ratqshaut
2590    write(lunout,*)' tau_ratqs = ',tau_ratqs
2591    write(lunout,*)' top_height = ',top_height
2592    write(lunout,*)' rad_froid = ',rad_froid
2593    write(lunout,*)' rad_chau1 = ',rad_chau1
2594    write(lunout,*)' rad_chau2 = ',rad_chau2
2595    write(lunout,*)' t_glace_min = ',t_glace_min
2596    write(lunout,*)' t_glace_max = ',t_glace_max
2597    write(lunout,*)' exposant_glace = ',exposant_glace
2598    write(lunout,*)' iflag_t_glace = ',iflag_t_glace
2599    write(lunout,*)' iflag_cloudth_vert = ',iflag_cloudth_vert
2600    write(lunout,*)' iflag_rain_incloud_vol = ',iflag_rain_incloud_vol
2601    write(lunout,*)' iflag_ice_thermo = ',iflag_ice_thermo
2602    write(lunout,*)' rei_min = ',rei_min
2603    write(lunout,*)' rei_max = ',rei_max
2604    write(lunout,*)' overlap = ',overlap
2605    write(lunout,*)' cdmmax = ',cdmmax
2606    write(lunout,*)' cdhmax = ',cdhmax
2607    write(lunout,*)' ksta = ',ksta
2608    write(lunout,*)' ksta_ter = ',ksta_ter
2609    write(lunout,*)' f_ri_cd_min = ',f_ri_cd_min
2610    write(lunout,*)' ok_kzmin = ',ok_kzmin
2611    write(lunout,*)' pbl_lmixmin_alpha = ',pbl_lmixmin_alpha
2612    write(lunout,*)' fmagic = ',fmagic
2613    write(lunout,*)' pmagic = ',pmagic
2614    write(lunout,*)' ok_ade = ',ok_ade
2615    write(lunout,*)' ok_aie = ',ok_aie
2616    write(lunout,*)' ok_alw = ',ok_alw
2617    write(lunout,*)' aerosol_couple = ', aerosol_couple
2618    write(lunout,*)' chemistry_couple = ', chemistry_couple
2619    write(lunout,*)' flag_aerosol = ', flag_aerosol
2620    write(lunout,*)' flag_aerosol_strat= ', flag_aerosol_strat
2621    write(lunout,*)' new_aod = ', new_aod
2622    write(lunout,*)' aer_type = ',aer_type
2623    write(lunout,*)' bl95_b0 = ',bl95_b0
2624    write(lunout,*)' bl95_b1 = ',bl95_b1
2625    write(lunout,*)' lev_histhf = ',lev_histhf
2626    write(lunout,*)' lev_histday = ',lev_histday
2627    write(lunout,*)' lev_histmth = ',lev_histmth
2628    write(lunout,*)' lev_histins = ',lev_histins
2629    write(lunout,*)' lev_histLES = ',lev_histLES
2630    write(lunout,*)' lev_histdayNMC = ',lev_histdayNMC
2631    write(lunout,*)' levout_histNMC = ',levout_histNMC
2632    write(lunout,*)' ok_histNMC = ',ok_histNMC
2633    write(lunout,*)' freq_outNMC = ',freq_outNMC
2634    write(lunout,*)' freq_calNMC = ',freq_calNMC
2635    write(lunout,*)' iflag_pbl = ', iflag_pbl
2636!FC
2637    write(lunout,*)' ifl_pbltree = ', ifl_pbltree
2638    write(lunout,*)' Cd_frein = ', Cd_frein
2639    write(lunout,*)' iflag_pbl_split = ', iflag_pbl_split
2640    write(lunout,*)' iflag_order2_sollw = ', iflag_order2_sollw
2641    write(lunout,*)' iflag_thermals = ', iflag_thermals
2642    write(lunout,*)' iflag_thermals_ed = ', iflag_thermals_ed
2643    write(lunout,*)' fact_thermals_ed_dz = ', fact_thermals_ed_dz
2644    write(lunout,*)' iflag_thermals_optflux = ', iflag_thermals_optflux
2645    write(lunout,*)' iflag_thermals_closure = ', iflag_thermals_closure
2646    write(lunout,*)' iflag_clos = ', iflag_clos
2647    write(lunout,*)' coef_clos_ls = ', coef_clos_ls
2648    write(lunout,*)' type_run = ',type_run
2649    write(lunout,*)' ok_cosp = ',ok_cosp
2650    write(lunout,*)' ok_airs = ',ok_airs
2651
2652    write(lunout,*)' ok_mensuelCOSP = ',ok_mensuelCOSP
2653    write(lunout,*)' ok_journeCOSP = ',ok_journeCOSP
2654    write(lunout,*)' ok_hfCOSP =',ok_hfCOSP
2655    write(lunout,*)' solarlong0 = ', solarlong0
2656    write(lunout,*)' qsol0 = ', qsol0
2657    write(lunout,*)' evap0 = ', evap0
2658    write(lunout,*)' albsno0 = ', albsno0
2659    write(lunout,*)' iflag_sic = ', iflag_sic
2660    write(lunout,*)' inertie_sol = ', inertie_sol
2661    write(lunout,*)' inertie_sic = ', inertie_sic
2662    write(lunout,*)' inertie_lic = ', inertie_lic
2663    write(lunout,*)' inertie_sno = ', inertie_sno
2664    write(lunout,*)' f_cdrag_ter = ',f_cdrag_ter
2665    write(lunout,*)' f_cdrag_oce = ',f_cdrag_oce
2666    write(lunout,*)' f_rugoro = ',f_rugoro
2667    write(lunout,*)' z0min = ',z0min
2668    write(lunout,*)' supcrit1 = ', supcrit1
2669    write(lunout,*)' supcrit2 = ', supcrit2
2670    write(lunout,*)' iflag_mix = ', iflag_mix
2671    write(lunout,*)' iflag_mix_adiab = ', iflag_mix_adiab
2672    write(lunout,*)' scut = ', scut
2673    write(lunout,*)' qqa1 = ', qqa1
2674    write(lunout,*)' qqa2 = ', qqa2
2675    write(lunout,*)' gammas = ', gammas
2676    write(lunout,*)' Fmax = ', Fmax
2677    write(lunout,*)' tmax_fonte_cv = ', tmax_fonte_cv
2678    write(lunout,*)' alphas = ', alphas
2679    write(lunout,*)' iflag_wake = ', iflag_wake
2680    write(lunout,*)' alp_offset = ', alp_offset
2681    ! nrlmd le 10/04/2012
2682    write(lunout,*)' iflag_trig_bl = ', iflag_trig_bl
2683    write(lunout,*)' s_trig = ', s_trig
2684    write(lunout,*)' tau_trig_shallow = ', tau_trig_shallow
2685    write(lunout,*)' tau_trig_deep = ', tau_trig_deep
2686    write(lunout,*)' iflag_clos_bl = ', iflag_clos_bl
2687    ! fin nrlmd le 10/04/2012
2688
2689    write(lunout,*)' lonmin lonmax latmin latmax bilKP_ins =',&
2690         lonmin_ins, lonmax_ins, latmin_ins, latmax_ins
2691    write(lunout,*)' ecrit_ hf, ins, day, mth, reg, tra, ISCCP, LES',&
2692         ecrit_hf, ecrit_ins, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES
2693
2694    write(lunout,*) 'ok_strato = ', ok_strato
2695    write(lunout,*) 'ok_hines = ',  ok_hines
2696    write(lunout,*) 'ok_gwd_rando = ',  ok_gwd_rando
2697    write(lunout,*) 'ok_qch4 = ',  ok_qch4
2698    write(lunout,*) 'gwd_rando_ruwmax = ', gwd_rando_ruwmax
2699    write(lunout,*) 'gwd_rando_sat = ', gwd_rando_sat
2700    write(lunout,*) 'gwd_front_ruwmax = ', gwd_front_ruwmax
2701    write(lunout,*) 'gwd_front_sat = ', gwd_front_sat
2702    write(lunout,*) 'SSO gkdrag =',gkdrag
2703    write(lunout,*) 'SSO grahilo=',grahilo
2704    write(lunout,*) 'SSO grcrit=',grcrit
2705    write(lunout,*) 'SSO gfrcrit=',gfrcrit
2706    write(lunout,*) 'SSO gkwake=',gkwake
2707    write(lunout,*) 'SSO gklift=',gklift
2708    write(lunout,*) 'adjust_tropopause = ', adjust_tropopause
2709    write(lunout,*) 'ok_daily_climoz = ',ok_daily_climoz
2710    write(lunout,*) 'read_climoz = ', read_climoz
2711    write(lunout,*) 'carbon_cycle_tr = ', carbon_cycle_tr
2712    write(lunout,*) 'carbon_cycle_cpl = ', carbon_cycle_cpl
2713
2714    !$OMP END MASTER
2715
2716    RETURN
2717
2718  END SUBROUTINE conf_phys
2719
2720END MODULE conf_phys_m
2721!
2722!#################################################################
2723!
2724
2725SUBROUTINE conf_interface(tau_calv)
2726
2727  USE IOIPSL
2728  USE print_control_mod, ONLY: lunout
2729  IMPLICIT NONE
2730  ! Configuration de l'interace atm/surf
2731  !
2732  ! tau_calv:    temps de relaxation pour la fonte des glaciers
2733
2734  REAL          :: tau_calv
2735  REAL,SAVE     :: tau_calv_omp
2736
2737  !
2738  !Config Key  = tau_calv
2739  !Config Desc = temps de relaxation pour fonte des glaciers en jours
2740  !Config Def  = 1 an
2741  !Config Help =
2742  !
2743  tau_calv_omp = 360.*10.
2744  !$OMP MASTER
2745  CALL getin('tau_calv',tau_calv_omp)
2746  !$OMP END MASTER
2747  !$OMP BARRIER
2748
2749  tau_calv=tau_calv_omp
2750
2751  !$OMP MASTER
2752  write(lunout,*)' ##############################################'
2753  WRITE(lunout,*)' Configuration de l''interface atm/surfaces  : '
2754  WRITE(lunout,*)' tau_calv = ',tau_calv
2755  !$OMP END MASTER
2756
2757  RETURN
2758
2759END SUBROUTINE conf_interface
Note: See TracBrowser for help on using the repository browser.