source: LMDZ5/trunk/libf/phylmd/conf_phys_m.F90 @ 2186

Last change on this file since 2186 was 2179, checked in by fhourdin, 10 years ago

Désactivation des ondes de gravité non orographique en mode uni colonne.XX
Desactivation of non orographic gravity waves in SCM configurations.

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