source: LMDZ5/branches/LMDZ_tree_FC/libf/phylmd/conf_phys_m.F90 @ 2925

Last change on this file since 2925 was 2925, checked in by fcheruy, 7 years ago

Update tree branch to trunk version

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