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

Last change on this file since 5314 was 3002, checked in by Ehouarn Millour, 7 years ago

Improved slab routines.
FC

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