source: LMDZ6/branches/Portage_acc/libf/dyn3d/conf_gcm.F90 @ 4584

Last change on this file since 4584 was 4584, checked in by Laurent Fairhead, 12 months ago

Merged trunk revisions from r4443 to r4582 (HEAD) into branch

  • 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 4584 2023-06-23 14:10:41Z 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, maxlatfilter
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  ! maxlatfilter
314  maxlatfilter=-1.0
315  CALL getin('maxlatfilter',maxlatfilter)
316  if (maxlatfilter > 90) &
317       call abort_gcm("conf_gcm", 'maxlatfilter should be <=90', 1)
318
319
320  ! ngroup
321  ngroup=3
322  CALL getin('ngroup',ngroup)
323
324  ! top_bound sponge: only active if ok_strato=.true. and iflag_top_bound!=0
325  !                   iflag_top_bound=0 for no sponge
326  !                   iflag_top_bound=1 for sponge over 4 topmost layers
327  !                   iflag_top_bound=2 for sponge from top to ~1% of top layer pressure
328  iflag_top_bound=1
329  CALL getin('iflag_top_bound',iflag_top_bound)
330  IF (iflag_top_bound < 0 .or. iflag_top_bound > 2) &
331       call abort_gcm("conf_gcm", 'iflag_top_bound must be 0, 1 or 2', 1)
332
333  ! mode_top_bound : fields towards which sponge relaxation will be done:
334  !                  mode_top_bound=0: no relaxation
335  !                  mode_top_bound=1: u and v relax towards 0
336  !                  mode_top_bound=2: u and v relax towards their zonal mean
337  !                  mode_top_bound=3: u,v and pot. temp. relax towards their zonal mean
338  mode_top_bound=3
339  CALL getin('mode_top_bound',mode_top_bound)
340
341  ! top_bound sponge : inverse of charactericstic relaxation time scale for sponge
342  tau_top_bound=1.e-5
343  CALL getin('tau_top_bound',tau_top_bound)
344
345  !Config  Key  = coefdis
346  !Config  Desc = coefficient pour gamdissip
347  !Config  Def  = 0
348  !Config  Help = coefficient pour gamdissip 
349  coefdis = 0.
350  CALL getin('coefdis',coefdis)
351
352  !Config  Key  = purmats
353  !Config  Desc = Schema d'integration
354  !Config  Def  = n
355  !Config  Help = Choix du schema d'integration temporel.
356  !Config         y = pure Matsuno sinon c'est du Matsuno-leapfrog
357  purmats = .FALSE.
358  CALL getin('purmats',purmats)
359
360  !Config  Key  = ok_guide
361  !Config  Desc = Guidage
362  !Config  Def  = n
363  !Config  Help = Guidage
364  ok_guide = .FALSE.
365  CALL getin('ok_guide',ok_guide)
366
367  !Config  Key  =  read_start
368  !Config  Desc = Initialize model using a 'start.nc' file
369  !Config  Def  = y
370  !Config  Help = y: intialize dynamical fields using a 'start.nc' file
371  !               n: fields are initialized by 'iniacademic' routine
372  read_start= .true.
373  CALL getin('read_start',read_start)
374
375  !Config  Key  = iflag_phys
376  !Config  Desc = Avec ls physique
377  !Config  Def  = 1
378  !Config  Help = Permet de faire tourner le modele sans
379  !Config         physique.
380  iflag_phys = 1
381  CALL getin('iflag_phys',iflag_phys)
382
383  !Config  Key  =  iphysiq
384  !Config  Desc = Periode de la physique
385  !Config  Def  = 5
386  !Config  Help = Periode de la physique en pas de temps de la dynamique.
387  iphysiq = 5
388  CALL getin('iphysiq', iphysiq)
389
390  !Config  Key  = ip_ebil_dyn
391  !Config  Desc = PRINT level for energy conserv. diag.
392  !Config  Def  = 0
393  !Config  Help = PRINT level for energy conservation diag. ;
394  !               les options suivantes existent :
395  !Config         0 pas de print
396  !Config         1 pas de print
397  !Config         2 print,
398  ip_ebil_dyn = 0
399  CALL getin('ip_ebil_dyn',ip_ebil_dyn)
400
401  !cc  ....   P. Le Van , ajout  le 7/03/95 .pour le zoom ...
402  !     .........   (  modif  le 17/04/96 )   .........
403
404  test_etatinit: IF (.not. etatinit) THEN
405     !Config  Key  = clon
406     !Config  Desc = centre du zoom, longitude
407     !Config  Def  = 0
408     !Config  Help = longitude en degres du centre
409     !Config         du zoom
410     clonn = 0.
411     CALL getin('clon',clonn)
412
413     !Config  Key  = clat
414     !Config  Desc = centre du zoom, latitude
415     !Config  Def  = 0
416     !Config  Help = latitude en degres du centre du zoom
417     !Config         
418     clatt = 0.
419     CALL getin('clat',clatt)
420
421     IF( ABS(clat - clatt).GE. 0.001 )  THEN
422        write(lunout,*)'conf_gcm: La valeur de clat passee par run.def', &
423             ' est differente de celle lue sur le fichier  start '
424        CALL abort_gcm("conf_gcm","stopped",1)
425     ENDIF
426
427     !Config  Key  = grossismx
428     !Config  Desc = zoom en longitude
429     !Config  Def  = 1.0
430     !Config  Help = facteur de grossissement du zoom,
431     !Config         selon la longitude
432     grossismxx = 1.0
433     CALL getin('grossismx',grossismxx)
434
435     IF( ABS(grossismx - grossismxx).GE. 0.001 )  THEN
436        write(lunout,*)'conf_gcm: La valeur de grossismx passee par ', &
437             'run.def est differente de celle lue sur le fichier  start '
438        CALL abort_gcm("conf_gcm","stopped",1)
439     ENDIF
440
441     !Config  Key  = grossismy
442     !Config  Desc = zoom en latitude
443     !Config  Def  = 1.0
444     !Config  Help = facteur de grossissement du zoom,
445     !Config         selon la latitude
446     grossismyy = 1.0
447     CALL getin('grossismy',grossismyy)
448
449     IF( ABS(grossismy - grossismyy).GE. 0.001 )  THEN
450        write(lunout,*)'conf_gcm: La valeur de grossismy passee par ', &
451             'run.def est differente de celle lue sur le fichier  start '
452        CALL abort_gcm("conf_gcm","stopped",1)
453     ENDIF
454
455     IF( grossismx.LT.1. )  THEN
456        write(lunout,*) &
457             'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
458        CALL abort_gcm("conf_gcm","stopped",1)
459     ELSE
460        alphax = 1. - 1./ grossismx
461     ENDIF
462
463     IF( grossismy.LT.1. )  THEN
464        write(lunout,*) &
465             'conf_gcm: ***  ATTENTION !! grossismy < 1 .   *** '
466        CALL abort_gcm("conf_gcm","stopped",1)
467     ELSE
468        alphay = 1. - 1./ grossismy
469     ENDIF
470
471     write(lunout,*)'conf_gcm: alphax alphay',alphax,alphay
472
473     !    alphax et alphay sont les anciennes formulat. des grossissements
474
475     !Config  Key  = fxyhypb
476     !Config  Desc = Fonction  hyperbolique
477     !Config  Def  = y
478     !Config  Help = Fonction  f(y)  hyperbolique  si = .true. 
479     !Config         sinon  sinusoidale
480     fxyhypbb = .TRUE.
481     CALL getin('fxyhypb',fxyhypbb)
482
483     IF( .NOT.fxyhypb )  THEN
484        IF( fxyhypbb )     THEN
485           write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
486           write(lunout,*)' *** fxyhypb lu sur le fichier start est ', &
487                'F alors  qu il est  T  sur  run.def  ***'
488           CALL abort_gcm("conf_gcm","stopped",1)
489        ENDIF
490     ELSE
491        IF( .NOT.fxyhypbb )   THEN
492           write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
493           write(lunout,*)' ***  fxyhypb lu sur le fichier start est ', &
494                'T alors  qu il est  F  sur  run.def  ****  '
495           CALL abort_gcm("conf_gcm","stopped",1)
496        ENDIF
497     ENDIF
498
499     !Config  Key  = dzoomx
500     !Config  Desc = extension en longitude
501     !Config  Def  = 0
502     !Config  Help = extension en longitude  de la zone du zoom 
503     !Config         ( fraction de la zone totale)
504     dzoomxx = 0.0
505     CALL getin('dzoomx',dzoomxx)
506
507     IF( fxyhypb )  THEN
508        IF( ABS(dzoomx - dzoomxx).GE. 0.001 )  THEN
509           write(lunout,*)'conf_gcm: La valeur de dzoomx passee par ', &
510                'run.def est differente de celle lue sur le fichier  start '
511           CALL abort_gcm("conf_gcm","stopped",1)
512        ENDIF
513     ENDIF
514
515     !Config  Key  = dzoomy
516     !Config  Desc = extension en latitude
517     !Config  Def  = 0
518     !Config  Help = extension en latitude de la zone  du zoom 
519     !Config         ( fraction de la zone totale)
520     dzoomyy = 0.0
521     CALL getin('dzoomy',dzoomyy)
522
523     IF( fxyhypb )  THEN
524        IF( ABS(dzoomy - dzoomyy).GE. 0.001 )  THEN
525           write(lunout,*)'conf_gcm: La valeur de dzoomy passee par ', &
526                'run.def est differente de celle lue sur le fichier  start '
527           CALL abort_gcm("conf_gcm","stopped",1)
528        ENDIF
529     ENDIF
530
531     !Config  Key  = taux
532     !Config  Desc = raideur du zoom en  X
533     !Config  Def  = 3
534     !Config  Help = raideur du zoom en  X
535     tauxx = 3.0
536     CALL getin('taux',tauxx)
537
538     IF( fxyhypb )  THEN
539        IF( ABS(taux - tauxx).GE. 0.001 )  THEN
540           write(lunout,*)'conf_gcm: La valeur de taux passee par ', &
541                'run.def est differente de celle lue sur le fichier  start '
542           CALL abort_gcm("conf_gcm","stopped",1)
543        ENDIF
544     ENDIF
545
546     !Config  Key  = tauyy
547     !Config  Desc = raideur du zoom en  Y
548     !Config  Def  = 3
549     !Config  Help = raideur du zoom en  Y
550     tauyy = 3.0
551     CALL getin('tauy',tauyy)
552
553     IF( fxyhypb )  THEN
554        IF( ABS(tauy - tauyy).GE. 0.001 )  THEN
555           write(lunout,*)'conf_gcm: La valeur de tauy passee par ', &
556                'run.def est differente de celle lue sur le fichier  start '
557           CALL abort_gcm("conf_gcm","stopped",1)
558        ENDIF
559     ENDIF
560
561     !c
562     IF( .NOT.fxyhypb  )  THEN
563
564        !Config  Key  = ysinus
565        !Config  IF   = !fxyhypb
566        !Config  Desc = Fonction en Sinus
567        !Config  Def  = y
568        !Config  Help = Fonction  f(y) avec y = Sin(latit.) si = .true.
569        !Config         sinon y = latit.
570        ysinuss = .TRUE.
571        CALL getin('ysinus',ysinuss)
572
573        IF( .NOT.ysinus )  THEN
574           IF( ysinuss )     THEN
575              write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
576              write(lunout,*)' *** ysinus lu sur le fichier start est F', &
577                   ' alors  qu il est  T  sur  run.def  ***'
578              CALL abort_gcm("conf_gcm","stopped",1)
579           ENDIF
580        ELSE
581           IF( .NOT.ysinuss )   THEN
582              write(lunout,*)' ********  PBS DANS  CONF_GCM  ******** '
583              write(lunout,*)' *** ysinus lu sur le fichier start est T', &
584                   ' alors  qu il est  F  sur  run.def  ****  '
585              CALL abort_gcm("conf_gcm","stopped",1)
586           ENDIF
587        ENDIF
588     ENDIF ! of IF( .NOT.fxyhypb  )
589
590     !Config  Key  = offline
591     !Config  Desc = Nouvelle eau liquide
592     !Config  Def  = n
593     !Config  Help = Permet de mettre en route la
594     !Config         nouvelle parametrisation de l'eau liquide !
595     offline = .FALSE.
596     CALL getin('offline',offline)
597
598     !Config  Key  = type_trac
599     !Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
600     !Config  Def  = lmdz
601     !Config  Help =
602     !Config         'lmdz' = pas de couplage, pur LMDZ
603     !Config         'inca' = model de chime INCA
604     !Config         'repr' = model de chime REPROBUS
605     !Config         'inco' = INCA + CO2i (temporaire)
606     type_trac = 'lmdz'
607     CALL getin('type_trac',type_trac)
608
609     !Config  Key  = ok_dynzon
610     !Config  Desc = calcul et sortie des transports
611     !Config  Def  = n
612     !Config  Help = Permet de mettre en route le calcul des transports
613     !Config         
614     ok_dynzon = .FALSE.
615     CALL getin('ok_dynzon',ok_dynzon)
616
617     !Config  Key  = ok_dyn_ins
618     !Config  Desc = sorties instantanees dans la dynamique
619     !Config  Def  = n
620     !Config  Help =
621     !Config         
622     ok_dyn_ins = .FALSE.
623     CALL getin('ok_dyn_ins',ok_dyn_ins)
624
625     !Config  Key  = ok_dyn_ave
626     !Config  Desc = sorties moyennes dans la dynamique
627     !Config  Def  = n
628     !Config  Help =
629     !Config         
630     ok_dyn_ave = .FALSE.
631     CALL getin('ok_dyn_ave',ok_dyn_ave)
632
633     write(lunout,*)' #########################################'
634     write(lunout,*)' Configuration des parametres du gcm: '
635     write(lunout,*)' planet_type = ', planet_type
636     write(lunout,*)' calend = ', calend
637     write(lunout,*)' dayref = ', dayref
638     write(lunout,*)' anneeref = ', anneeref
639     write(lunout,*)' nday = ', nday
640     write(lunout,*)' day_step = ', day_step
641     write(lunout,*)' iperiod = ', iperiod
642     write(lunout,*)' nsplit_phys = ', nsplit_phys
643     write(lunout,*)' iconser = ', iconser
644     write(lunout,*)' iecri = ', iecri
645     write(lunout,*)' periodav = ', periodav
646     write(lunout,*)' output_grads_dyn = ', output_grads_dyn
647     write(lunout,*)' dissip_period = ', dissip_period
648     write(lunout,*)' lstardis = ', lstardis
649     write(lunout,*)' nitergdiv = ', nitergdiv
650     write(lunout,*)' nitergrot = ', nitergrot
651     write(lunout,*)' niterh = ', niterh
652     write(lunout,*)' tetagdiv = ', tetagdiv
653     write(lunout,*)' tetagrot = ', tetagrot
654     write(lunout,*)' tetatemp = ', tetatemp
655     write(lunout,*)' coefdis = ', coefdis
656     write(lunout,*)' purmats = ', purmats
657     write(lunout,*)' read_start = ', read_start
658     write(lunout,*)' iflag_phys = ', iflag_phys
659     write(lunout,*)' iphysiq = ', iphysiq
660     write(lunout,*)' clonn = ', clonn
661     write(lunout,*)' clatt = ', clatt
662     write(lunout,*)' grossismx = ', grossismx
663     write(lunout,*)' grossismy = ', grossismy
664     write(lunout,*)' fxyhypbb = ', fxyhypbb
665     write(lunout,*)' dzoomxx = ', dzoomxx
666     write(lunout,*)' dzoomy = ', dzoomyy
667     write(lunout,*)' tauxx = ', tauxx
668     write(lunout,*)' tauyy = ', tauyy
669     write(lunout,*)' offline = ', offline
670     write(lunout,*)' type_trac = ', type_trac
671     write(lunout,*)' ok_dynzon = ', ok_dynzon
672     write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
673     write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
674  ELSE
675     !Config  Key  = clon
676     !Config  Desc = centre du zoom, longitude
677     !Config  Def  = 0
678     !Config  Help = longitude en degres du centre
679     !Config         du zoom
680     clon = 0.
681     CALL getin('clon',clon)
682
683     !Config  Key  = clat
684     !Config  Desc = centre du zoom, latitude
685     !Config  Def  = 0
686     !Config  Help = latitude en degres du centre du zoom
687     !Config         
688     clat = 0.
689     CALL getin('clat',clat)
690
691     !Config  Key  = grossismx
692     !Config  Desc = zoom en longitude
693     !Config  Def  = 1.0
694     !Config  Help = facteur de grossissement du zoom,
695     !Config         selon la longitude
696     grossismx = 1.0
697     CALL getin('grossismx',grossismx)
698
699     !Config  Key  = grossismy
700     !Config  Desc = zoom en latitude
701     !Config  Def  = 1.0
702     !Config  Help = facteur de grossissement du zoom,
703     !Config         selon la latitude
704     grossismy = 1.0
705     CALL getin('grossismy',grossismy)
706
707     IF( grossismx.LT.1. )  THEN
708        write(lunout,*) &
709             'conf_gcm: ***  ATTENTION !! grossismx < 1 .   *** '
710        CALL abort_gcm("conf_gcm","stopped",1)
711     ELSE
712        alphax = 1. - 1./ grossismx
713     ENDIF
714
715     IF( grossismy.LT.1. )  THEN
716        write(lunout,*) 'conf_gcm: ***ATTENTION !! grossismy < 1 . *** '
717        CALL abort_gcm("conf_gcm","stopped",1)
718     ELSE
719        alphay = 1. - 1./ grossismy
720     ENDIF
721
722     write(lunout,*)'conf_gcm: alphax alphay ',alphax,alphay
723
724     !    alphax et alphay sont les anciennes formulat. des grossissements
725
726     !Config  Key  = fxyhypb
727     !Config  Desc = Fonction  hyperbolique
728     !Config  Def  = y
729     !Config  Help = Fonction  f(y)  hyperbolique  si = .true. 
730     !Config         sinon  sinusoidale
731     fxyhypb = .TRUE.
732     CALL getin('fxyhypb',fxyhypb)
733
734     !Config  Key  = dzoomx
735     !Config  Desc = extension en longitude
736     !Config  Def  = 0
737     !Config  Help = extension en longitude  de la zone du zoom 
738     !Config         ( fraction de la zone totale)
739     dzoomx = 0.2
740     CALL getin('dzoomx',dzoomx)
741     call assert(dzoomx < 1, "conf_gcm: dzoomx must be < 1")
742
743     !Config  Key  = dzoomy
744     !Config  Desc = extension en latitude
745     !Config  Def  = 0
746     !Config  Help = extension en latitude de la zone  du zoom 
747     !Config         ( fraction de la zone totale)
748     dzoomy = 0.2
749     CALL getin('dzoomy',dzoomy)
750     call assert(dzoomy < 1, "conf_gcm: dzoomy must be < 1")
751
752     !Config  Key  = taux
753     !Config  Desc = raideur du zoom en  X
754     !Config  Def  = 3
755     !Config  Help = raideur du zoom en  X
756     taux = 3.0
757     CALL getin('taux',taux)
758
759     !Config  Key  = tauy
760     !Config  Desc = raideur du zoom en  Y
761     !Config  Def  = 3
762     !Config  Help = raideur du zoom en  Y
763     tauy = 3.0
764     CALL getin('tauy',tauy)
765
766     !Config  Key  = ysinus
767     !Config  IF   = !fxyhypb
768     !Config  Desc = Fonction en Sinus
769     !Config  Def  = y
770     !Config  Help = Fonction  f(y) avec y = Sin(latit.) si = .true.
771     !Config         sinon y = latit.
772     ysinus = .TRUE.
773     CALL getin('ysinus',ysinus)
774
775     !Config  Key  = offline
776     !Config  Desc = Nouvelle eau liquide
777     !Config  Def  = n
778     !Config  Help = Permet de mettre en route la
779     !Config         nouvelle parametrisation de l'eau liquide !
780     offline = .FALSE.
781     CALL getin('offline',offline)
782
783     !Config  Key  = type_trac
784     !Config  Desc = Choix de couplage avec model de chimie INCA ou REPROBUS
785     !Config  Def  = lmdz
786     !Config  Help =
787     !Config         'lmdz' = pas de couplage, pur LMDZ
788     !Config         'inca' = model de chime INCA
789     !Config         'repr' = model de chime REPROBUS
790     !Config         'inco' = INCA + CO2i (temporaire)
791     type_trac = 'lmdz'
792     CALL getin('type_trac',type_trac)
793
794     !Config  Key  = ok_dynzon
795     !Config  Desc = sortie des transports zonaux dans la dynamique
796     !Config  Def  = n
797     !Config  Help = Permet de mettre en route le calcul des transports
798     !Config         
799     ok_dynzon = .FALSE.
800     CALL getin('ok_dynzon',ok_dynzon)
801
802     !Config  Key  = ok_dyn_ins
803     !Config  Desc = sorties instantanees dans la dynamique
804     !Config  Def  = n
805     !Config  Help =
806     !Config         
807     ok_dyn_ins = .FALSE.
808     CALL getin('ok_dyn_ins',ok_dyn_ins)
809
810     !Config  Key  = ok_dyn_ave
811     !Config  Desc = sorties moyennes dans la dynamique
812     !Config  Def  = n
813     !Config  Help =
814     !Config         
815     ok_dyn_ave = .FALSE.
816     CALL getin('ok_dyn_ave',ok_dyn_ave)
817
818     !Config key = ok_strato
819     !Config  Desc = activation de la version strato
820     !Config  Def  = .FALSE.
821     !Config  Help = active la version stratosph\'erique de LMDZ de F. Lott
822
823     ok_strato=.FALSE.
824     CALL getin('ok_strato',ok_strato)
825
826     vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
827     CALL getin('vert_prof_dissip', vert_prof_dissip)
828     call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
829          "bad value for vert_prof_dissip")
830
831     !Config  Key  = ok_gradsfile
832     !Config  Desc = activation des sorties grads du guidage
833     !Config  Def  = n
834     !Config  Help = active les sorties grads du guidage
835
836     ok_gradsfile = .FALSE.
837     CALL getin('ok_gradsfile',ok_gradsfile)
838
839     !Config  Key  = ok_limit
840     !Config  Desc = creation des fichiers limit dans create_etat0_limit
841     !Config  Def  = y
842     !Config  Help = production du fichier limit.nc requise
843
844     ok_limit = .TRUE.
845     CALL getin('ok_limit',ok_limit)
846
847     !Config  Key  = ok_etat0
848     !Config  Desc = creation des fichiers etat0 dans create_etat0_limit
849     !Config  Def  = y
850     !Config  Help = production des fichiers start.nc, startphy.nc requise
851
852     ok_etat0 = .TRUE.
853     CALL getin('ok_etat0',ok_etat0)
854
855     !Config  Key  = read_orop
856     !Config  Desc = lecture du fichier de params orographiques sous maille
857     !Config  Def  = f
858     !Config  Help = lecture fichier plutot que grid_noro
859
860     read_orop = .FALSE.
861     CALL getin('read_orop',read_orop)
862
863     write(lunout,*)' #########################################'
864     write(lunout,*)' Configuration des parametres de cel0_limit: '
865     write(lunout,*)' planet_type = ', planet_type
866     write(lunout,*)' calend = ', calend
867     write(lunout,*)' dayref = ', dayref
868     write(lunout,*)' anneeref = ', anneeref
869     write(lunout,*)' nday = ', nday
870     write(lunout,*)' day_step = ', day_step
871     write(lunout,*)' iperiod = ', iperiod
872     write(lunout,*)' iconser = ', iconser
873     write(lunout,*)' iecri = ', iecri
874     write(lunout,*)' periodav = ', periodav
875     write(lunout,*)' output_grads_dyn = ', output_grads_dyn
876     write(lunout,*)' dissip_period = ', dissip_period
877     write(lunout,*)' lstardis = ', lstardis
878     write(lunout,*)' nitergdiv = ', nitergdiv
879     write(lunout,*)' nitergrot = ', nitergrot
880     write(lunout,*)' niterh = ', niterh
881     write(lunout,*)' tetagdiv = ', tetagdiv
882     write(lunout,*)' tetagrot = ', tetagrot
883     write(lunout,*)' tetatemp = ', tetatemp
884     write(lunout,*)' coefdis = ', coefdis
885     write(lunout,*)' purmats = ', purmats
886     write(lunout,*)' read_start = ', read_start
887     write(lunout,*)' iflag_phys = ', iflag_phys
888     write(lunout,*)' iphysiq = ', iphysiq
889     write(lunout,*)' clon = ', clon
890     write(lunout,*)' clat = ', clat
891     write(lunout,*)' grossismx = ', grossismx
892     write(lunout,*)' grossismy = ', grossismy
893     write(lunout,*)' fxyhypb = ', fxyhypb
894     write(lunout,*)' dzoomx = ', dzoomx
895     write(lunout,*)' dzoomy = ', dzoomy
896     write(lunout,*)' taux = ', taux
897     write(lunout,*)' tauy = ', tauy
898     write(lunout,*)' offline = ', offline
899     write(lunout,*)' type_trac = ', type_trac
900     write(lunout,*)' ok_dynzon = ', ok_dynzon
901     write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
902     write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
903     write(lunout,*)' ok_strato = ', ok_strato
904     write(lunout,*)' ok_gradsfile = ', ok_gradsfile
905     write(lunout,*)' ok_limit = ', ok_limit
906     write(lunout,*)' ok_etat0 = ', ok_etat0
907     write(lunout,*)' ok_guide = ', ok_guide
908     write(lunout,*)' read_orop = ', read_orop
909  ENDIF test_etatinit
910
911END SUBROUTINE conf_gcm
Note: See TracBrowser for help on using the repository browser.