source: trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F90 @ 1615

Last change on this file since 1615 was 1572, checked in by emillour, 9 years ago

All GCMs:
Further adaptations to keep up with changes in LMDZ5 concerning
physics/dynamics separation (up to rev r2500 of LMDZ5)

  • arch:
  • remove ifort debug option '-check all', replace it with '-check bounds,format,output_conversion,pointers,uninit' (i.e. get it to stop complaining about copying into temporary arrays)
  • dyn3d_common:
  • comconst_mod.F90 : add ngroup
  • dyn3d:
  • gcm.F90 : minor bug fix (arguments to a call_abort())
  • leapfrog.F90 : recompute geopotential for bilan_dyn outputs
  • conf_gcm.F90 : read "ngroup" from run.def
  • groupe.F , groupeun.F : ngroup no longer a local parameter
  • dyn3d_par:
  • conf_gcm.F90 : read "ngroup" from run.def
  • groupe_p.F , groupeun_p.F : ngroup no longer a local parameter
  • misc:
  • regr1_step_av_m.F90 : removed (not used)
  • phy_common:
  • mod_phys_lmdz_mpi_transfert.F90 , mod_phys_lmdz_mpi_data.F90 : change is_north_pole and is_south_pole to is_north_pole_dyn and is_south_pole_dyn
  • mod_phys_lmdz_omp_data.F90 : introduce is_nort_pole_phy and is_south_pole_phy
  • dynphy_lonlat:
  • mod_interface_dyn_phys.F90 : use is_north_pole_dyn and is_south_pole_dyn
  • calfis_p.F : use is_north_pole_dyn and is_south_pole_dyn
  • phyvenus:
  • physiq_mod , write_hist*.h : use is_north_pole_phy and is_south_pole_phy to correctly compute mesh area at poles to send to hist*nc files.
  • phytitan:
  • physiq_mod , write_hist*.h : use is_north_pole_phy and is_south_pole_phy to correctly compute mesh area at poles to send to hist*nc files.

EM

File size: 32.5 KB
Line 
1!
2! $Id: conf_gcm.F 1438 2010-10-08 10:19:34Z jghattas $
3!
4!
5!
6SUBROUTINE conf_gcm( tapedef, etatinit )
7!
8#ifdef CPP_IOIPSL
9  use IOIPSL
10#else
11! if not using IOIPSL, we still need to use (a local version of) getin
12  use ioipsl_getincom
13#endif
14  use misc_mod
15  use mod_filtre_fft, ONLY : use_filtre_fft
16  use mod_hallo, ONLY : use_mpi_alloc
17  USE control_mod
18  USE infotrac, ONLY : type_trac
19  use assert_m, only: assert
20  use sponge_mod_p, only: callsponge,mode_sponge,nsponge,tetasponge
21  USE comconst_mod, ONLY: dissip_factz,dissip_deltaz,dissip_zref,               &
22                dissip_fac_mid,dissip_fac_up,dissip_hdelta,dissip_pupstart,     &
23                mode_top_bound,tau_top_bound,iflag_top_bound,ngroup
24  USE logic_mod, ONLY: tidal,purmats,ok_guide,read_start,iflag_phys,iflag_trac, &
25                ok_strato,ok_gradsfile,ok_limit,ok_etat0,moyzon_mu,moyzon_ch,   &
26                fxyhypb,ysinus
27  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy,             &
28                alphax,alphay,taux,tauy
29  USE temps_mod, ONLY: calend
30
31  IMPLICIT NONE
32!-----------------------------------------------------------------------
33!     Auteurs :   L. Fairhead , P. Le Van  .
34!
35!     Arguments :
36!
37!     tapedef   :
38!     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para-
39!     -metres  du zoom  avec  celles lues sur le fichier start .
40!
41  LOGICAL,INTENT(IN) :: etatinit
42  INTEGER,INTENT(IN) :: tapedef
43
44!   Declarations :
45!   --------------
46  include "dimensions.h"
47  include "paramet.h"
48  include "comdissnew.h"
49  include "iniprint.h"
50!
51!
52!   local:
53!   ------
54
55  CHARACTER ch1*72,ch2*72,ch3*72,ch4*12
56  REAL clonn,clatt,grossismxx,grossismyy
57  REAL dzoomxx,dzoomyy, tauxx,tauyy
58  LOGICAL  fxyhypbb, ysinuss
59  INTEGER i
60  character(len=*),parameter :: modname="conf_gcm"
61  character (len=80) :: abort_message
62#ifdef CPP_OMP
63      integer,external :: OMP_GET_NUM_THREADS
64#endif     
65!
66!  -------------------------------------------------------------------
67!
68!       .........     Version  du 29/04/97       ..........
69!
70!   Nouveaux parametres nitergdiv,nitergrot,niterh,tetagdiv,tetagrot,
71!      tetatemp   ajoutes  pour la dissipation   .
72!
73!   Autre parametre ajoute en fin de liste de tapedef : ** fxyhypb **
74!
75!  Si fxyhypb = .TRUE. , choix de la fonction a derivee tangente hyperb.
76!    Sinon , choix de fxynew  , a derivee sinusoidale  ..
77!
78!   ......  etatinit = . TRUE. si defrun  est appele dans ETAT0_LMD  ou
79!         LIMIT_LMD  pour l'initialisation de start.dat (dic) et
80!                de limit.dat ( dic)                        ...........
81!           Sinon  etatinit = . FALSE .
82!
83!   Donc etatinit = .F.  si on veut comparer les valeurs de  grossismx ,
84!    grossismy,clon,clat, fxyhypb  lues sur  le fichier  start  avec
85!   celles passees  par run.def ,  au debut du gcm, apres l'appel a
86!    lectba . 
87!   Ces parmetres definissant entre autres la grille et doivent etre
88!   pareils et coherents , sinon il y aura  divergence du gcm .
89!
90!-----------------------------------------------------------------------
91!   initialisations:
92!   ----------------
93
94!Config  Key  = lunout
95!Config  Desc = unite de fichier pour les impressions
96!Config  Def  = 6
97!Config  Help = unite de fichier pour les impressions
98!Config         (defaut sortie standard = 6)
99  lunout=6
100  CALL getin('lunout', lunout)
101  IF (lunout /= 5 .and. lunout /= 6) THEN
102        OPEN(UNIT=lunout,FILE='lmdz.out',ACTION='write',                      &
103          STATUS='unknown',FORM='formatted')
104  ENDIF
105
106  adjust=.false.
107  call getin('adjust',adjust)
108     
109#ifdef CPP_OMP
110  ! adjust=y not implemented in case of OpenMP threads...
111!$OMP PARALLEL
112  if ((OMP_GET_NUM_THREADS()>1).and.adjust) then
113    write(lunout,*)'conf_gcm: Error, adjust should be set to n' &
114         ,' when running with OpenMP threads'
115    abort_message = 'Wrong value for adjust'
116    call abort_gcm(modname,abort_message,1)
117  endif
118!$OMP END PARALLEL         
119#endif
120
121  itaumax=0
122  call getin('itaumax',itaumax);
123  if (itaumax<=0) itaumax=HUGE(itaumax)
124     
125!Config  Key  = prt_level
126!Config  Desc = niveau d'impressions de débogage
127!Config  Def  = 0
128!Config  Help = Niveau d'impression pour le débogage
129!Config         (0 = minimum d'impression)
130  prt_level = 0
131  CALL getin('prt_level',prt_level)
132
133!-----------------------------------------------------------------------
134!  Parametres de controle du run:
135!-----------------------------------------------------------------------
136!Config  Key  = planet_type
137!Config  Desc = planet type ("earth", "mars", "venus", ...)
138!Config  Def  = earth
139!Config  Help = this flag sets the type of atymosphere that is considered
140  planet_type="earth"
141  CALL getin('planet_type',planet_type)
142
143!Config  Key  = calend
144!Config  Desc = type de calendrier utilise
145!Config  Def  = earth_360d
146!Config  Help = valeur possible: earth_360d, earth_365d, earth_366d
147!Config         
148  calend = 'earth_360d'
149  CALL getin('calend', calend)
150
151!Config  Key  = dayref
152!Config  Desc = Jour de l'etat initial
153!Config  Def  = 1
154!Config  Help = Jour de l'etat initial ( = 350  si 20 Decembre ,
155!Config         par expl. ,comme ici ) ... A completer
156  dayref=1
157  CALL getin('dayref', dayref)
158
159!Config  Key  = anneeref
160!Config  Desc = Annee de l'etat initial
161!Config  Def  = 1998
162!Config  Help = Annee de l'etat  initial
163!Config         (   avec  4  chiffres   ) ... A completer
164  anneeref = 1998
165  CALL getin('anneeref',anneeref)
166
167!Config  Key  = raz_date
168!Config  Desc = Remise a zero de la date initiale
169!Config  Def  = 0 (pas de remise a zero)
170!Config  Help = Remise a zero de la date initiale
171!Config         0 pas de remise a zero, on garde la date du fichier restart
172!Config         1 prise en compte de la date de gcm.def avec remise a zero
173!Config         des compteurs de pas de temps
174  raz_date = 0
175  CALL getin('raz_date', raz_date)
176
177!Config  Key  = resetvarc
178!Config  Desc = Reinit des variables de controle
179!Config  Def  = n
180!Config  Help = Reinit des variables de controle
181  resetvarc = .false.
182  CALL getin('resetvarc',resetvarc)
183
184!Config  Key  = nday
185!Config  Desc = Nombre de jours d'integration
186!Config  Def  = 10
187!Config  Help = Nombre de jours d'integration
188!Config         ... On pourait aussi permettre des mois ou des annees !
189  nday = 10
190  CALL getin('nday',nday)
191
192  ! alternative to specifying nday (see also 'less1day' and 'fractday'
193  ! options below: sopecify numbre of dynamic steps to run:
194  ndynstep = -9999 ! default value ; if ndynstep <0 then option not used.
195  call getin('ndynstep',ndynstep)
196     
197!Config  Key  = starttime
198!Config  Desc = Heure de depart de la simulation
199!Config  Def  = 0
200!Config  Help = Heure de depart de la simulation
201!Config         en jour
202  starttime = 0
203  CALL getin('starttime',starttime)
204
205  ! Mars: time of start for run in "start.nc" (when there are multiple time
206  !       steps stored in the file)
207  timestart=-9999 ! default value; if <0, use last stored time
208  call getin("timestart",timestart)
209     
210!Config  Key  = less1day
211!Config  Desc = Possibilite d'integrer moins d'un jour
212!Config  Def  = n
213!Config  Help = Possibilite d'integrer moins d'un jour
214  less1day = .false.
215  CALL getin('less1day',less1day)
216
217!Config  Key  = fractday
218!Config  Desc = integration sur une fraction de jour
219!Config  Def  = 0.01
220!Config  Help = integration sur une fraction de jour
221  fractday = 0.01
222  CALL getin('fractday',fractday)
223
224!Config  Key  = day_step
225!Config  Desc = nombre de pas par jour
226!Config  Def  = 240
227!Config  Help = nombre de pas par jour (multiple de iperiod) (
228!Config          ici pour  dt = 1 min )
229  day_step = 240
230  CALL getin('day_step',day_step)
231
232!Config  Key  = nsplit_phys
233!Config  Desc = nombre de subdivisions par pas physique
234!Config  Def  = 1
235!Config  Help = nombre de subdivisions par pas physique
236  nsplit_phys = 1
237  CALL getin('nsplit_phys',nsplit_phys)
238
239!Config  Key  = iperiod
240!Config  Desc = periode pour le pas Matsuno
241!Config  Def  = 5
242!Config  Help = periode pour le pas Matsuno (en pas de temps)
243  iperiod = 5
244  CALL getin('iperiod',iperiod)
245
246!Config  Key  = iapp_tracvl
247!Config  Desc = frequence du groupement des flux
248!Config  Def  = iperiod
249!Config  Help = frequence du groupement des flux (en pas de temps)
250  iapp_tracvl = iperiod
251  CALL getin('iapp_tracvl',iapp_tracvl)
252
253!Config  Key  = iconser
254!Config  Desc = periode de sortie des variables de controle
255!Config  Def  = 240 
256!Config  Help = periode de sortie des variables de controle
257!Config         (En pas de temps)
258  iconser = 240 
259  CALL getin('iconser', iconser)
260
261!Config  Key  = iecri
262!Config  Desc = periode d'ecriture du fichier histoire
263!Config  Def  = 1
264!Config  Help = periode d'ecriture du fichier histoire (en jour)
265  iecri = 1
266  CALL getin('iecri',iecri)
267
268!Config  Key  = periodav
269!Config  Desc = periode de stockage fichier histmoy
270!Config  Def  = 1
271!Config  Help = periode de stockage fichier histmoy (en jour)
272  periodav = 1.
273  CALL getin('periodav',periodav)
274
275!Config  Key  = output_grads_dyn
276!Config  Desc = output dynamics diagnostics in 'dyn.dat' file
277!Config  Def  = n
278!Config  Help = output dynamics diagnostics in Grads-readable 'dyn.dat' file
279  output_grads_dyn=.false.
280  CALL getin('output_grads_dyn',output_grads_dyn)
281
282!Config  Key  = dissip_period
283!Config  Desc = periode de la dissipation
284!Config  Def  = 0
285!Config  Help = periode de la dissipation
286!Config  dissip_period=0 => la valeur sera calcule dans inidissip       
287!Config  dissip_period>0 => on prend cette valeur
288  dissip_period = 0
289  call getin('idissip',dissip_period) ! old Mars/Genreic model parameter
290  ! if there is a "dissip_period" in run.def, it overrides "idissip"
291  CALL getin('dissip_period',dissip_period)
292
293!cc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
294!cc
295
296!Config  Key  = lstardis
297!Config  Desc = choix de l'operateur de dissipation
298!Config  Def  = y
299!Config  Help = choix de l'operateur de dissipation
300!Config         'y' si on veut star et 'n' si on veut non-start !
301!Config         Moi y en a pas comprendre !
302  lstardis = .TRUE.
303  CALL getin('lstardis',lstardis)
304
305
306!Config  Key  = nitergdiv
307!Config  Desc = Nombre d'iteration de gradiv
308!Config  Def  = 1
309!Config  Help = nombre d'iterations de l'operateur de dissipation
310!Config         gradiv
311  nitergdiv = 1
312  CALL getin('nitergdiv',nitergdiv)
313
314!Config  Key  = nitergrot
315!Config  Desc = nombre d'iterations de nxgradrot
316!Config  Def  = 2
317!Config  Help = nombre d'iterations de l'operateur de dissipation 
318!Config         nxgradrot
319  nitergrot = 2
320  CALL getin('nitergrot',nitergrot)
321
322!Config  Key  = niterh
323!Config  Desc = nombre d'iterations de divgrad
324!Config  Def  = 2
325!Config  Help = nombre d'iterations de l'operateur de dissipation
326!Config         divgrad
327  niterh = 2
328  CALL getin('niterh',niterh)
329
330!Config  Key  = tetagdiv
331!Config  Desc = temps de dissipation pour div
332!Config  Def  = 7200
333!Config  Help = temps de dissipation des plus petites longeur
334!Config         d'ondes pour u,v (gradiv)
335  tetagdiv = 7200.
336  CALL getin('tetagdiv',tetagdiv)
337
338!Config  Key  = tetagrot
339!Config  Desc = temps de dissipation pour grad
340!Config  Def  = 7200
341!Config  Help = temps de dissipation des plus petites longeur
342!Config         d'ondes pour u,v (nxgradrot)
343  tetagrot = 7200.
344  CALL getin('tetagrot',tetagrot)
345
346!Config  Key  = tetatemp
347!Config  Desc = temps de dissipation pour h
348!Config  Def  = 7200
349!Config  Help =  temps de dissipation des plus petites longeur
350!Config         d'ondes pour h (divgrad)   
351  tetatemp  = 7200.
352  CALL getin('tetatemp',tetatemp )
353
354! For Earth model only:
355! Parametres controlant la variation sur la verticale des constantes de
356! dissipation.
357! Pour le moment actifs uniquement dans la version a 39 niveaux
358! avec ok_strato=y
359
360  dissip_factz=4.
361  dissip_deltaz=10.
362  dissip_zref=30.
363  CALL getin('dissip_factz',dissip_factz )
364  CALL getin('dissip_deltaz',dissip_deltaz )
365  CALL getin('dissip_zref',dissip_zref )
366
367! For other planets:
368! Parametres controlant la variation sur la verticale des constantes de
369! dissipation.
370! Actifs uniquement avec ok_strato=y
371
372  dissip_fac_mid=2.
373  dissip_fac_up=10.
374  dissip_deltaz=10.! Intervalle (km) pour le changement mid / up
375  dissip_hdelta=5. ! scale height (km) dans la zone de la transition(m)
376  dissip_pupstart=1.e3  ! pression (Pa) au bas la transition mid / up
377  CALL getin('dissip_fac_mid',dissip_fac_mid )
378  CALL getin('dissip_fac_up',dissip_fac_up )
379  CALL getin('dissip_deltaz',dissip_deltaz )
380  CALL getin('dissip_hdelta',dissip_hdelta )
381  CALL getin('dissip_pupstart',dissip_pupstart )
382
383! top_bound sponge: only active if iflag_top_bound!=0
384!                   iflag_top_bound=0 for no sponge
385!                   iflag_top_bound=1 for sponge over 4 topmost layers
386!                   iflag_top_bound=2 for sponge from top to ~1% of top layer pressure
387  iflag_top_bound=0
388  CALL getin('iflag_top_bound',iflag_top_bound)
389
390! mode_top_bound : fields towards which sponge relaxation will be done:
391!                  mode_top_bound=0: no relaxation
392!                  mode_top_bound=1: u and v relax towards 0
393!                  mode_top_bound=2: u and v relax towards their zonal mean
394!                  mode_top_bound=3: u,v and pot. temp. relax towards their zonal mean
395  mode_top_bound=3
396  CALL getin('mode_top_bound',mode_top_bound)
397
398! top_bound sponge : inverse of charactericstic relaxation time scale for sponge
399  tau_top_bound=1.e-5
400  CALL getin('tau_top_bound',tau_top_bound)
401
402! the other possible sponge layer (sponge_mod)
403  callsponge=.false. ! default value; don't use the sponge
404  call getin("callsponge",callsponge)
405  ! check that user is not trying to use both sponge models
406  if ((iflag_top_bound.ge.1).and.callsponge) then
407    write(lunout,*)'Bad choice of options:'
408    write(lunout,*)' iflag_top_bound=',iflag_top_bound
409    write(lunout,*)' and callsponge=.true.'
410    write(lunout,*)'But both sponge models should not be', &
411                   ' used simultaneously!'
412    stop
413  endif
414       
415! nsponge: number of atmospheric layers over which the sponge extends
416  nsponge=3 ! default value
417  call getin("nsponge",nsponge)
418
419! mode_sponge: (quenching is towards ... over the upper nsponge layers)
420!      0: (h=hmean,u=v=0)
421!      1: (h=hmean,u=umean,v=0)
422!      2: (h=hmean,u=umean,v=vmean)"
423  mode_sponge=2 ! default value
424  call getin("mode_sponge",mode_sponge)
425
426! tetasponge: characteristic time scale (seconds) at topmost layer
427!            (time scale then doubles with decreasing layer index)."
428  tetasponge=50000.0
429  call getin("tetasponge",tetasponge)
430
431! ngroup: to group longitudinaly near the pole (groupe/groupeun routines)
432!        (implies that iim has to be a multiple of 2**ngroup)
433  ngroup=3
434  CALL getin('ngroup',ngroup)
435
436! FOR TITAN: tidal forces
437  if (planet_type=="titan") then
438    tidal=.TRUE.
439    CALL getin('tidal',tidal)
440  else
441    tidal=.false.
442  endif
443
444!Config  Key  = coefdis
445!Config  Desc = coefficient pour gamdissip
446!Config  Def  = 0
447!Config  Help = coefficient pour gamdissip 
448  coefdis = 0.
449  CALL getin('coefdis',coefdis)
450
451!Config  Key  = purmats
452!Config  Desc = Schema d'integration
453!Config  Def  = n
454!Config  Help = Choix du schema d'integration temporel.
455!Config         y = pure Matsuno sinon c'est du Matsuno-leapfrog
456  purmats = .FALSE.
457  CALL getin('purmats',purmats)
458
459!Config  Key  = ok_guide
460!Config  Desc = Guidage
461!Config  Def  = n
462!Config  Help = Guidage
463  ok_guide = .FALSE.
464  CALL getin('ok_guide',ok_guide)
465
466!     ...............................................................
467
468!Config  Key  =  read_start
469!Config  Desc = Initialize model using a 'start.nc' file
470!Config  Def  = y
471!Config  Help = y: intialize dynamical fields using a 'start.nc' file
472!               n: fields are initialized by 'iniacademic' routine
473  read_start= .true.
474  CALL getin('read_start',read_start)
475
476!Config  Key  = iflag_phys
477!Config  Desc = Avec ls physique
478!Config  Def  = 1
479!Config  Help = Permet de faire tourner le modele sans
480!Config         physique.
481  iflag_phys = 1
482  CALL getin('iflag_phys',iflag_phys)
483
484
485!Config  Key  =  iphysiq
486!Config  Desc = Periode de la physique
487!Config  Def  = 5
488!Config  Help = Periode de la physique en pas de temps de la dynamique.
489  iphysiq = 5
490  CALL getin('iphysiq', iphysiq)
491
492!Config  Key  = iflag_trac
493!Config  Desc = traceurs presents ou non
494!Config  Def  = 1
495!Config  Help = Permet de faire tourner le modele sans traceurs
496!Config         
497  iflag_trac = 1
498  CALL getin('iflag_trac',iflag_trac)
499
500!Config  Key  = ip_ebil_dyn
501!Config  Desc = PRINT level for energy conserv. diag.
502!Config  Def  = 0
503!Config  Help = PRINT level for energy conservation diag. ;
504!               les options suivantes existent :
505!Config         0 pas de print
506!Config         1 pas de print
507!Config         2 print,
508  ip_ebil_dyn = 0
509  CALL getin('ip_ebil_dyn',ip_ebil_dyn)
510
511!Config  Key  = offline
512!Config  Desc = Nouvelle eau liquide
513!Config  Def  = n
514!Config  Help = Permet de mettre en route la
515!Config         nouvelle parametrisation de l'eau liquide !
516  offline = .FALSE.
517  CALL getin('offline',offline)
518  IF (offline .AND. adjust) THEN
519    WRITE(lunout,*)'WARNING : option offline does not work with adjust=y :'
520    WRITE(lunout,*)'the files defstoke.nc, fluxstoke.nc ', &
521                   'and fluxstokev.nc will not be created'
522    WRITE(lunout,*) 'only the file phystoke.nc will still be created '
523  END IF
524       
525!Config  Key  = type_trac
526!Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
527!Config  Def  = lmdz
528!Config  Help =
529!Config         'lmdz' = pas de couplage, pur LMDZ
530!Config         'inca' = model de chime INCA
531!Config         'repr' = model de chime REPROBUS
532  type_trac = 'lmdz'
533  CALL getin('type_trac',type_trac)
534
535!Config  Key  = config_inca
536!Config  Desc = Choix de configuration de INCA
537!Config  Def  = none
538!Config  Help = Choix de configuration de INCA :
539!Config         'none' = sans INCA
540!Config         'chem' = INCA avec calcul de chemie
541!Config         'aero' = INCA avec calcul des aerosols
542  config_inca = 'none'
543  CALL getin('config_inca',config_inca)
544
545!Config  Key  = ok_dynzon
546!Config  Desc = calcul et sortie des transports
547!Config  Def  = n
548!Config  Help = Permet de mettre en route le calcul des transports
549!Config         
550  ok_dynzon = .FALSE.
551  CALL getin('ok_dynzon',ok_dynzon)
552
553!Config  Key  = ok_dyn_ins
554!Config  Desc = sorties instantanees dans la dynamique
555!Config  Def  = n
556!Config  Help =
557!Config         
558  ok_dyn_ins = .FALSE.
559  CALL getin('ok_dyn_ins',ok_dyn_ins)
560
561!Config  Key  = ok_dyn_ave
562!Config  Desc = sorties moyennes dans la dynamique
563!Config  Def  = n
564!Config  Help =
565!Config         
566  ok_dyn_ave = .FALSE.
567  CALL getin('ok_dyn_ave',ok_dyn_ave)
568
569!Config  Key  = use_filtre_fft
570!Config  Desc = flag d'activation des FFT pour le filtre
571!Config  Def  = false
572!Config  Help = permet d'activer l'utilisation des FFT pour effectuer
573!Config         le filtrage aux poles.
574  use_filtre_fft=.FALSE.
575  CALL getin('use_filtre_fft',use_filtre_fft)
576
577! Ehouarn: at this point grossismx is undefined...
578!      IF (use_filtre_fft .AND. grossismx /= 1.0) THEN
579!        write(lunout,*)'WARNING !!! '
580!        write(lunout,*)"the zoom in longitude grossismx=",grossismx,
581!     &                 " is not compatible with an FFT filter",
582!     &                 "---> FFT filter not active"
583!       use_filtre_fft=.FALSE.
584!      ENDIF
585
586!Config  Key  = use_mpi_alloc
587!Config  Desc = Utilise un buffer MPI en memoire globale
588!Config  Def  = false
589!Config  Help = permet d'activer l'utilisation d'un buffer MPI
590!Config         en memoire globale a l'aide de la fonction MPI_ALLOC.
591!Config         Cela peut ameliorer la bande passante des transferts MPI
592!Config         d'un facteur 2 
593  use_mpi_alloc=.FALSE.
594  CALL getin('use_mpi_alloc',use_mpi_alloc)
595
596!Config key = ok_strato
597!Config  Desc = activation de la version strato
598!Config  Def  = .FALSE.
599!Config  Help = active la version stratosphérique de LMDZ de F. Lott
600
601  ok_strato=.TRUE.
602  CALL getin('ok_strato',ok_strato)
603
604! NB: vert_prof_dissip is Earth-specific; should not impact other models
605  if (planet_type=="earth") then
606    vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
607    CALL getin('vert_prof_dissip', vert_prof_dissip)
608    call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1,&
609               "bad value for vert_prof_dissip")
610  else
611    vert_prof_dissip=0 ! default for planets !
612    if (planet_type=="mars") then
613      vert_prof_dissip=1 ! use fac_mid & fac_up & startalt & delta
614    endif
615  endif
616
617!Config  Key  = ok_gradsfile
618!Config  Desc = activation des sorties grads du guidage
619!Config  Def  = n
620!Config  Help = active les sorties grads du guidage
621
622  ok_gradsfile = .FALSE.
623  CALL getin('ok_gradsfile',ok_gradsfile)
624
625!Config  Key  = ok_limit
626!Config  Desc = creation des fichiers limit dans create_etat0_limit
627!Config  Def  = y
628!Config  Help = production du fichier limit.nc requise
629
630  ok_limit = .TRUE.
631  CALL getin('ok_limit',ok_limit)
632
633!Config  Key  = ok_etat0
634!Config  Desc = creation des fichiers etat0 dans create_etat0_limit
635!Config  Def  = y
636!Config  Help = production des fichiers start.nc, startphy.nc requise
637
638  ok_etat0 = .TRUE.
639  CALL getin('ok_etat0',ok_etat0)
640
641!----------------------------------------
642! Parameters for zonal averages in the case of Titan
643  moyzon_mu = .false.
644  moyzon_ch = .false.
645  if (planet_type=="titan") then
646    CALL getin('moyzon_mu', moyzon_mu)
647    CALL getin('moyzon_ch', moyzon_ch)
648  endif
649!----------------------------------------
650
651!----------------------------------------
652!cc  ....   P. Le Van , ajout  le 7/03/95 .pour le zoom ...
653!     .........   (  modif  le 17/04/96 )   .........
654!
655! ZOOM PARAMETERS ... the ones read in start.nc prevail anyway ! (SL, 2012)
656!
657!----------------------------------------
658  test_etatinit: IF (.not. etatinit) then
659     !Config  Key  = clon
660     !Config  Desc = centre du zoom, longitude
661     !Config  Def  = 0
662     !Config  Help = longitude en degres du centre
663     !Config         du zoom
664     clonn = 0.
665     CALL getin('clon',clonn)
666
667     !Config  Key  = clat
668     !Config  Desc = centre du zoom, latitude
669     !Config  Def  = 0
670     !Config  Help = latitude en degres du centre du zoom
671     !Config         
672     clatt = 0.
673     CALL getin('clat',clatt)
674
675     IF( ABS(clat - clatt).GE. 0.001 )  THEN
676        write(lunout,*)'conf_gcm: La valeur de clat passee par run.def', &
677             ' est differente de celle lue sur le fichier  start '
678        STOP
679     ENDIF
680
681     !Config  Key  = grossismx
682     !Config  Desc = zoom en longitude
683     !Config  Def  = 1.0
684     !Config  Help = facteur de grossissement du zoom,
685     !Config         selon la longitude
686     grossismxx = 1.0
687     CALL getin('grossismx',grossismxx)
688
689     IF( ABS(grossismx - grossismxx).GE. 0.001 )  THEN
690        write(lunout,*)'conf_gcm: La valeur de grossismx passee par ', &
691             'run.def est differente de celle lue sur le fichier  start '
692        STOP
693     ENDIF
694
695     !Config  Key  = grossismy
696     !Config  Desc = zoom en latitude
697     !Config  Def  = 1.0
698     !Config  Help = facteur de grossissement du zoom,
699     !Config         selon la latitude
700     grossismyy = 1.0
701     CALL getin('grossismy',grossismyy)
702
703     IF( ABS(grossismy - grossismyy).GE. 0.001 )  THEN
704        write(lunout,*)'conf_gcm: La valeur de grossismy passee par ', &
705             'run.def est differente de celle lue sur le fichier  start '
706        STOP
707     ENDIF
708
709     IF( grossismx.LT.1. )  THEN
710        write(lunout,*) &
711             'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
712        STOP
713     ELSE
714        alphax = 1. - 1./ grossismx
715     ENDIF
716
717     IF( grossismy.LT.1. )  THEN
718        write(lunout,*) &
719             'conf_gcm: ***  ATTENTION !! grossismy < 1 .   *** '
720        STOP
721     ELSE
722        alphay = 1. - 1./ grossismy
723     ENDIF
724
725     write(lunout,*)'conf_gcm: alphax alphay',alphax,alphay
726
727     !    alphax et alphay sont les anciennes formulat. des grossissements
728
729     !Config  Key  = fxyhypb
730     !Config  Desc = Fonction  hyperbolique
731     !Config  Def  = y
732     !Config  Help = Fonction  f(y)  hyperbolique  si = .true. 
733     !Config         sinon  sinusoidale
734     fxyhypbb = .TRUE.
735     CALL getin('fxyhypb',fxyhypbb)
736
737     IF( .NOT.fxyhypb )  THEN
738        IF( fxyhypbb )     THEN
739           write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
740           write(lunout,*)' *** fxyhypb lu sur le fichier start est ', &
741                'F alors  qu il est  T  sur  run.def  ***'
742           STOP
743        ENDIF
744     ELSE
745        IF( .NOT.fxyhypbb )   THEN
746           write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
747           write(lunout,*)' ***  fxyhypb lu sur le fichier start est ', &
748                'T alors  qu il est  F  sur  run.def  ****  '
749           STOP
750        ENDIF
751     ENDIF
752
753     !Config  Key  = dzoomx
754     !Config  Desc = extension en longitude
755     !Config  Def  = 0
756     !Config  Help = extension en longitude  de la zone du zoom 
757     !Config         ( fraction de la zone totale)
758     dzoomxx = 0.0
759     CALL getin('dzoomx',dzoomxx)
760
761     IF( fxyhypb )  THEN
762        IF( ABS(dzoomx - dzoomxx).GE. 0.001 )  THEN
763           write(lunout,*)'conf_gcm: La valeur de dzoomx passee par ', &
764                'run.def est differente de celle lue sur le fichier  start '
765           STOP
766        ENDIF
767     ENDIF
768
769     !Config  Key  = dzoomy
770     !Config  Desc = extension en latitude
771     !Config  Def  = 0
772     !Config  Help = extension en latitude de la zone  du zoom 
773     !Config         ( fraction de la zone totale)
774     dzoomyy = 0.0
775     CALL getin('dzoomy',dzoomyy)
776
777     IF( fxyhypb )  THEN
778        IF( ABS(dzoomy - dzoomyy).GE. 0.001 )  THEN
779           write(lunout,*)'conf_gcm: La valeur de dzoomy passee par ', &
780                'run.def est differente de celle lue sur le fichier  start '
781           STOP
782        ENDIF
783     ENDIF
784
785     !Config  Key  = taux
786     !Config  Desc = raideur du zoom en  X
787     !Config  Def  = 3
788     !Config  Help = raideur du zoom en  X
789     tauxx = 3.0
790     CALL getin('taux',tauxx)
791
792     IF( fxyhypb )  THEN
793        IF( ABS(taux - tauxx).GE. 0.001 )  THEN
794           write(lunout,*)'conf_gcm: La valeur de taux passee par ', &
795                'run.def est differente de celle lue sur le fichier  start '
796           STOP
797        ENDIF
798     ENDIF
799
800     !Config  Key  = tauyy
801     !Config  Desc = raideur du zoom en  Y
802     !Config  Def  = 3
803     !Config  Help = raideur du zoom en  Y
804     tauyy = 3.0
805     CALL getin('tauy',tauyy)
806
807     IF( fxyhypb )  THEN
808        IF( ABS(tauy - tauyy).GE. 0.001 )  THEN
809           write(lunout,*)'conf_gcm: La valeur de tauy passee par ', &
810                'run.def est differente de celle lue sur le fichier  start '
811           STOP
812        ENDIF
813     ENDIF
814
815     !c
816     IF( .NOT.fxyhypb  )  THEN
817
818        !Config  Key  = ysinus
819        !Config  IF   = !fxyhypb
820        !Config  Desc = Fonction en Sinus
821        !Config  Def  = y
822        !Config  Help = Fonction  f(y) avec y = Sin(latit.) si = .true.
823        !Config         sinon y = latit.
824        ysinuss = .TRUE.
825        CALL getin('ysinus',ysinuss)
826
827        IF( .NOT.ysinus )  THEN
828           IF( ysinuss )     THEN
829              write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
830              write(lunout,*)' *** ysinus lu sur le fichier start est F', &
831                   ' alors  qu il est  T  sur  run.def  ***'
832              STOP
833           ENDIF
834        ELSE
835           IF( .NOT.ysinuss )   THEN
836              write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
837              write(lunout,*)' *** ysinus lu sur le fichier start est T', &
838                   ' alors  qu il est  F  sur  run.def  ****  '
839              STOP
840           ENDIF
841        ENDIF
842     ENDIF ! of IF( .NOT.fxyhypb  )
843
844  else
845     !Config  Key  = clon
846     !Config  Desc = centre du zoom, longitude
847     !Config  Def  = 0
848     !Config  Help = longitude en degres du centre
849     !Config         du zoom
850     clon = 0.
851     CALL getin('clon',clon)
852
853     !Config  Key  = clat
854     !Config  Desc = centre du zoom, latitude
855     !Config  Def  = 0
856     !Config  Help = latitude en degres du centre du zoom
857     !Config         
858     clat = 0.
859     CALL getin('clat',clat)
860
861     !Config  Key  = grossismx
862     !Config  Desc = zoom en longitude
863     !Config  Def  = 1.0
864     !Config  Help = facteur de grossissement du zoom,
865     !Config         selon la longitude
866     grossismx = 1.0
867     CALL getin('grossismx',grossismx)
868
869     !Config  Key  = grossismy
870     !Config  Desc = zoom en latitude
871     !Config  Def  = 1.0
872     !Config  Help = facteur de grossissement du zoom,
873     !Config         selon la latitude
874     grossismy = 1.0
875     CALL getin('grossismy',grossismy)
876
877     IF( grossismx.LT.1. )  THEN
878        write(lunout,*) &
879             'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
880        STOP
881     ELSE
882        alphax = 1. - 1./ grossismx
883     ENDIF
884
885     IF( grossismy.LT.1. )  THEN
886        write(lunout,*) 'conf_gcm: ***ATTENTION !! grossismy < 1 . *** '
887        STOP
888     ELSE
889        alphay = 1. - 1./ grossismy
890     ENDIF
891
892     write(lunout,*)'conf_gcm: alphax alphay ',alphax,alphay
893
894     !    alphax et alphay sont les anciennes formulat. des grossissements
895
896     !Config  Key  = fxyhypb
897     !Config  Desc = Fonction  hyperbolique
898     !Config  Def  = y
899     !Config  Help = Fonction  f(y)  hyperbolique  si = .true. 
900     !Config         sinon  sinusoidale
901     fxyhypb = .TRUE.
902     CALL getin('fxyhypb',fxyhypb)
903
904     !Config  Key  = dzoomx
905     !Config  Desc = extension en longitude
906     !Config  Def  = 0
907     !Config  Help = extension en longitude  de la zone du zoom 
908     !Config         ( fraction de la zone totale)
909     dzoomx = 0.2
910     CALL getin('dzoomx',dzoomx)
911
912     !Config  Key  = dzoomy
913     !Config  Desc = extension en latitude
914     !Config  Def  = 0
915     !Config  Help = extension en latitude de la zone  du zoom 
916     !Config         ( fraction de la zone totale)
917     dzoomy = 0.2
918     CALL getin('dzoomy',dzoomy)
919
920     !Config  Key  = taux
921     !Config  Desc = raideur du zoom en  X
922     !Config  Def  = 3
923     !Config  Help = raideur du zoom en  X
924     taux = 3.0
925     CALL getin('taux',taux)
926
927     !Config  Key  = tauy
928     !Config  Desc = raideur du zoom en  Y
929     !Config  Def  = 3
930     !Config  Help = raideur du zoom en  Y
931     tauy = 3.0
932     CALL getin('tauy',tauy)
933
934     !Config  Key  = ysinus
935     !Config  IF   = !fxyhypb
936     !Config  Desc = Fonction en Sinus
937     !Config  Def  = y
938     !Config  Help = Fonction  f(y) avec y = Sin(latit.) si = .true.
939     !Config         sinon y = latit.
940     ysinus = .TRUE.
941     CALL getin('ysinus',ysinus)
942  endif test_etatinit
943!----------------------------------------
944
945
946      write(lunout,*)' #########################################'
947      write(lunout,*)' Configuration des parametres lus via run.def '
948      write(lunout,*)' planet_type = ', planet_type
949      write(lunout,*)' calend = ', calend
950      write(lunout,*)' dayref = ', dayref
951      write(lunout,*)' anneeref = ', anneeref
952      write(lunout,*)' nday = ', nday
953      if (ndynstep.ne.-9999) write(lunout,*)' ndynstep = ', ndynstep
954      if (less1day) write(lunout,*)' fractday = ', fractday
955      write(lunout,*)' day_step = ', day_step
956      write(lunout,*)' iperiod = ', iperiod
957      write(lunout,*)' nsplit_phys = ', nsplit_phys
958      write(lunout,*)' iconser = ', iconser
959      write(lunout,*)' iecri = ', iecri
960      write(lunout,*)' periodav = ', periodav
961      write(lunout,*)' output_grads_dyn = ', output_grads_dyn
962      write(lunout,*)' dissip_period = ', dissip_period
963      write(lunout,*)' lstardis = ', lstardis
964      write(lunout,*)' nitergdiv = ', nitergdiv
965      write(lunout,*)' nitergrot = ', nitergrot
966      write(lunout,*)' niterh = ', niterh
967      write(lunout,*)' tetagdiv = ', tetagdiv
968      write(lunout,*)' tetagrot = ', tetagrot
969      write(lunout,*)' tetatemp = ', tetatemp
970      write(lunout,*)' coefdis = ', coefdis
971      write(lunout,*)' purmats = ', purmats
972      write(lunout,*)' read_start = ', read_start
973      write(lunout,*)' iflag_phys = ', iflag_phys
974      write(lunout,*)' iphysiq = ', iphysiq
975      write(lunout,*)' iflag_trac = ', iflag_trac
976      write(lunout,*)' clon = ', clon
977      write(lunout,*)' clat = ', clat
978      write(lunout,*)' grossismx = ', grossismx
979      write(lunout,*)' grossismy = ', grossismy
980      write(lunout,*)' fxyhypb = ', fxyhypb
981      write(lunout,*)' dzoomx = ', dzoomx
982      write(lunout,*)' dzoomy = ', dzoomy
983      write(lunout,*)' taux = ', taux
984      write(lunout,*)' tauy = ', tauy
985      write(lunout,*)' offline = ', offline
986      write(lunout,*)' type_trac = ', type_trac
987      write(lunout,*)' config_inca = ', config_inca
988      write(lunout,*)' ok_dynzon = ', ok_dynzon
989      write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
990      write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
991      write(lunout,*)' use_filtre_fft = ', use_filtre_fft
992      write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc
993      write(lunout,*)' ok_strato = ', ok_strato
994      write(lunout,*)' ok_gradsfile = ', ok_gradsfile
995      write(lunout,*)' ok_limit = ', ok_limit
996      write(lunout,*)' ok_etat0 = ', ok_etat0
997      if (planet_type=="titan") then
998       write(lunout,*)' moyzon_mu = ', moyzon_mu
999       write(lunout,*)' moyzon_ch = ', moyzon_ch
1000      endif
1001
1002      RETURN
1003      END
Note: See TracBrowser for help on using the repository browser.