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

Last change on this file since 2952 was 2952, checked in by Laurent Fairhead, 7 years ago

Parametrization of drag by copses
Need version 4465 of ORCHIDEE at least

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