source: LMDZ6/trunk/libf/dyn3d/conf_gcm.F90 @ 3540

Last change on this file since 3540 was 3540, checked in by Laurent Fairhead, 5 years ago

Modifications needed for "real" calendar in 1D model
MPL/EM

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