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

Last change on this file since 1793 was 1650, checked in by emillour, 8 years ago

Dynamical core: Further adaptations to stick with LMDZ5 (up to rev r2750)

  • libf
  • makelmdz[_fcm] : added Earth-specific "dust" and "strataer" cases and

-arch_path option

  • bld.cfg : added dust and strataer cases
  • dyn3d[par]
  • conf_gcm.F90 : added read_orop parameter (Earth-related) for

loading subgrid orography parameters.

  • guide[_p]_mod.F90: added output of nudging coefficients for winds

and temperature

  • temps_mod.F90 : cosmetics/comments
  • logic_mod.F90 : cosmetics/comments
  • dyn3d_common
  • comconst_mod.F90 : cosmetics/comments + added year_day module variable
  • conf_planete.F90 : added year_day from comconst_mod as done in LMDZ5
  • comvert_mod.F90 : cosmetics/comments
  • infotrac.F90 : added "startAer" case to follow up with LMDZ5
  • misc
  • wxios.F90 : follow up on changes in LMDZ5

EM

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