source: LMDZ6/branches/DYNAMICO-conv/libf/phylmd/conf_phys_m.F90 @ 3356

Last change on this file since 3356 was 3356, checked in by Laurent Fairhead, 6 years ago

First attempt at merging with trunk

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