source: LMDZ5/branches/IPSLCM6.0.11.rc1/libf/phylmd/conf_phys_m.F90 @ 4103

Last change on this file since 4103 was 2915, checked in by jbmadeleine, 7 years ago

Improved the way thermal inertia works in simulations using imposed SST and sea ice.
Removed inertie_ice which was confusing; Added inertie_sic for sea-ice and inertie_lic for
land-ice. When snow is present, inertie_sno is used instead of inertie_sol, inertie_sic or
inertie_lic. For sea-ice, added a flag called iflag_sic:
If iflag_sic=0, thermal inertia is changed over sea-ice when snow is present
If iflag_sic=1, thermal inertia is kept constant and equal to inertie_sic

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