source: LMDZ6/trunk/libf/phylmd/conf_phys_m.F90 @ 3378

Last change on this file since 3378 was 3378, checked in by oboucher, 6 years ago

Add a test to prevent change of solaire if ok_suntime_rrtm is activated

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