source: LMDZ5/branches/LMDZ6_rc0/libf/dyn3dmem/conf_gcm.F90 @ 2272

Last change on this file since 2272 was 2160, checked in by Laurent Fairhead, 10 years ago

Merged trunk changes -r2070:2158 into testing branch. Compilation problems introduced by revision r2155 have been corrected by hand

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