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

Last change on this file since 2789 was 2788, checked in by dcugnet, 8 years ago

Changes in ce0l about the way ozone forcing files are generated:

1) 3D raw input files "climoz.nc" are now handled.
2) Default behaviour is now to let the gcm interpolate in time online.

This helps to avoid huge forcing files (in particular for 3D fields).
In this case, the output files "climoz_LMDZ.nc" all have 14 records:

  • records 2-13 are obtained with records 1-12 of "climoz.nc".
  • records 1 and 14 are obtained respectively with:
    • record 12 of "climoz_m.nc" if available, of "climoz.nc" otherwise.
    • record 1 of "climoz_p.nc" if available, of "climoz.nc" otherwise.

3) If ok_daily_climoz key is TRUE, the time interpolation (one record

a day) is forced, using the 14 records described below.
This now depends on the calendar (it was on a 360 days basis only).

Changes in the gcm about the way zone forcing files are read/interpolated:

1) 3D horizontally interpolated "climoz_LMDZ.nc" files are now handled.
2) Daily files (already interpolated in time) are still handled, but their

number of records must match the expected number of days, that depends
on the calendar (records step is no longer 1/360 year).

3) 14 records monthly files are now handled (and prefered). This reduces

the I/O to a minimum and the aditional computational cost is low (simple
online linear time interpolation).

4) If adjust_tropopause key is TRUE, the input fields are stretched using

following method:

  • LMDZ dynamical tropopause is detected: Ptrop_lmdz = MAX ( P(Potential Vorticity==2PVU), P(theta==380K) )
  • file chemical tropopause is detected: Ptrop_file = P( tro3 == o3t ), where:

o3t = 91. + 28. * SIN(PI*(month-2)/6) (ppbV)

This formula comes from Thouret & al., ACP 6, 1033-1051, 2006.
The second term of the expression is multiplied by TANH(lat_deg/20.)
to account for latitude dependency.

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