source: LMDZ6/trunk/libf/dyn3dpar/conf_gcm.F90 @ 3981

Last change on this file since 3981 was 2665, checked in by dcugnet, 8 years ago
  • A (re)startphy.nc file (standard name: "startphy0.nc") can be read by ce0l to get land mask, so mask can be defined (in decreasing priority order) from: 1) "o2a.nc file" if this file is found 2) "startphy0.nc" if this file is found 3) "Relief.nc" otherwise
  • Sub-cell scales parameters for orographic gravity waves can be read from file "oro_params.nc" if the configuration key "read_orop" is TRUE. The effect is to bypass the "grid_noro" routine in ce0l, so that any pre-defined mask (from o2a.nc or startphy0.nc) is then overwritten.
  • The gcm stops if the "limit.nc" records number differs from the current year number of days. A warning is issued in case the gcm calendar does not match the time axis attribute "calendar" (if available) from the "limit.nc" file. This attribute is now added to the "limit.nc" time axis.
  • Few simplifications in grid_noro
  • Few parameters changes in acama_gwd and flott_gwd.
  • Variable d_u can be saved in the outputs.
  • 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: 32.9 KB
Line 
1
2! $Id: conf_gcm.F90 2665 2016-10-12 12:53:20Z 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 misc_mod
14  use mod_filtre_fft, ONLY : use_filtre_fft
15  use mod_hallo, ONLY : use_mpi_alloc
16  USE infotrac, ONLY : type_trac
17  use assert_m, only: assert
18  USE comconst_mod, ONLY: dissip_deltaz, dissip_factz, dissip_zref, &
19                          iflag_top_bound, mode_top_bound, tau_top_bound, &
20                          ngroup
21  USE logic_mod, ONLY: fxyhypb, iflag_phys, ok_etat0, ok_gradsfile, &
22                       ok_guide, ok_limit, ok_strato, purmats, read_start, &
23                       ysinus, read_orop
24  USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy, &
25                       alphax,alphay,taux,tauy
26  USE temps_mod, ONLY: calend
27
28  IMPLICIT NONE
29  !-----------------------------------------------------------------------
30  !     Auteurs :   L. Fairhead , P. Le Van  .
31
32  !     Arguments :
33
34  !     tapedef   :
35  !     etatinit  :     = TRUE   , on ne  compare pas les valeurs des para-
36  !     -metres  du zoom  avec  celles lues sur le fichier start .
37
38  LOGICAL,INTENT(IN) :: etatinit
39  INTEGER,INTENT(IN) :: tapedef
40
41  !   Declarations :
42  !   --------------
43  include "dimensions.h"
44  include "paramet.h"
45  include "comdissnew.h"
46  include "iniprint.h"
47
48  !   local:
49  !   ------
50
51  CHARACTER ch1*72,ch2*72,ch3*72,ch4*12
52  REAL clonn,clatt,grossismxx,grossismyy
53  REAL dzoomxx,dzoomyy, tauxx,tauyy
54  LOGICAL  fxyhypbb, ysinuss
55  INTEGER i
56  character(len=*),parameter :: modname="conf_gcm"
57  character (len=80) :: abort_message
58#ifdef CPP_OMP
59  integer,external :: OMP_GET_NUM_THREADS
60#endif
61
62  !  -------------------------------------------------------------------
63
64  !       .........     Version  du 29/04/97       ..........
65
66  !   Nouveaux parametres nitergdiv,nitergrot,niterh,tetagdiv,tetagrot,
67  !      tetatemp   ajoutes  pour la dissipation   .
68
69  !   Autre parametre ajoute en fin de liste de tapedef : ** fxyhypb **
70
71  !  Si fxyhypb = .TRUE. , choix de la fonction a derivee tangente hyperb.
72  !    Sinon , choix de fxynew  , a derivee sinusoidale  ..
73
74  !   ......  etatinit = . TRUE. si defrun  est appele dans ETAT0_LMD  ou
75  !         LIMIT_LMD  pour l'initialisation de start.dat (dic) et
76  !                de limit.dat ( dic)                        ...........
77  !           Sinon  etatinit = . FALSE .
78
79  !   Donc etatinit = .F.  si on veut comparer les valeurs de  grossismx ,
80  !    grossismy,clon,clat, fxyhypb  lues sur  le fichier  start  avec
81  !   celles passees  par run.def ,  au debut du gcm, apres l'appel a
82  !    lectba . 
83  !   Ces parmetres definissant entre autres la grille et doivent etre
84  !   pareils et coherents , sinon il y aura  divergence du gcm .
85
86  !-----------------------------------------------------------------------
87  !   initialisations:
88  !   ----------------
89
90  !Config  Key  = lunout
91  !Config  Desc = unite de fichier pour les impressions
92  !Config  Def  = 6
93  !Config  Help = unite de fichier pour les impressions
94  !Config         (defaut sortie standard = 6)
95  lunout=6
96  CALL getin('lunout', lunout)
97  IF (lunout /= 5 .and. lunout /= 6) THEN
98     OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write',  &
99          STATUS='unknown',FORM='formatted')
100  ENDIF
101
102  adjust=.false.
103  call getin('adjust',adjust)
104
105#ifdef CPP_OMP
106  ! adjust=y not implemented in case of OpenMP threads...
107  !$OMP PARALLEL
108  if ((OMP_GET_NUM_THREADS()>1).and.adjust) then
109     write(lunout,*)'conf_gcm: Error, adjust should be set to n' &
110          ,' when running with OpenMP threads'
111     abort_message = 'Wrong value for adjust'
112     call abort_gcm(modname,abort_message,1)
113  endif
114  !$OMP END PARALLEL         
115#endif
116
117  itaumax=0
118  call getin('itaumax',itaumax);
119  if (itaumax<=0) itaumax=HUGE(itaumax)
120
121  !Config  Key  = prt_level
122  !Config  Desc = niveau d'impressions de débogage
123  !Config  Def  = 0
124  !Config  Help = Niveau d'impression pour le débogage
125  !Config         (0 = minimum d'impression)
126  prt_level = 0
127  CALL getin('prt_level',prt_level)
128
129  !-----------------------------------------------------------------------
130  !  Parametres de controle du run:
131  !-----------------------------------------------------------------------
132  !Config  Key  = planet_type
133  !Config  Desc = planet type ("earth", "mars", "venus", ...)
134  !Config  Def  = earth
135  !Config  Help = this flag sets the type of atymosphere that is considered
136  planet_type="earth"
137  CALL getin('planet_type',planet_type)
138
139  !Config  Key  = calend
140  !Config  Desc = type de calendrier utilise
141  !Config  Def  = earth_360d
142  !Config  Help = valeur possible: earth_360d, earth_365d, earth_366d
143  !Config         
144  calend = 'earth_360d'
145  CALL getin('calend', calend)
146
147  !Config  Key  = dayref
148  !Config  Desc = Jour de l'etat initial
149  !Config  Def  = 1
150  !Config  Help = Jour de l'etat initial ( = 350  si 20 Decembre ,
151  !Config         par expl. ,comme ici ) ... A completer
152  dayref=1
153  CALL getin('dayref', dayref)
154
155  !Config  Key  = anneeref
156  !Config  Desc = Annee de l'etat initial
157  !Config  Def  = 1998
158  !Config  Help = Annee de l'etat  initial
159  !Config         (   avec  4  chiffres   ) ... A completer
160  anneeref = 1998
161  CALL getin('anneeref',anneeref)
162
163  !Config  Key  = raz_date
164  !Config  Desc = Remise a zero de la date initiale
165  !Config  Def  = 0 (pas de remise a zero)
166  !Config  Help = Remise a zero de la date initiale
167  !Config         0 pas de remise a zero, on garde la date du fichier restart
168  !Config         1 prise en compte de la date de gcm.def avec remise a zero
169  !Config         des compteurs de pas de temps
170  raz_date = 0
171  CALL getin('raz_date', raz_date)
172
173  !Config  Key  = resetvarc
174  !Config  Desc = Reinit des variables de controle
175  !Config  Def  = n
176  !Config  Help = Reinit des variables de controle
177  resetvarc = .false.
178  CALL getin('resetvarc',resetvarc)
179
180  !Config  Key  = nday
181  !Config  Desc = Nombre de jours d'integration
182  !Config  Def  = 10
183  !Config  Help = Nombre de jours d'integration
184  !Config         ... On pourait aussi permettre des mois ou des annees !
185  nday = 10
186  CALL getin('nday',nday)
187
188  !Config  Key  = starttime
189  !Config  Desc = Heure de depart de la simulation
190  !Config  Def  = 0
191  !Config  Help = Heure de depart de la simulation
192  !Config         en jour
193  starttime = 0
194  CALL getin('starttime',starttime)
195
196  !Config  Key  = day_step
197  !Config  Desc = nombre de pas par jour
198  !Config  Def  = 240
199  !Config  Help = nombre de pas par jour (multiple de iperiod) (
200  !Config          ici pour  dt = 1 min )
201  day_step = 240
202  CALL getin('day_step',day_step)
203
204  !Config  Key  = nsplit_phys
205  nsplit_phys = 1
206  CALL getin('nsplit_phys',nsplit_phys)
207
208  !Config  Key  = iperiod
209  !Config  Desc = periode pour le pas Matsuno
210  !Config  Def  = 5
211  !Config  Help = periode pour le pas Matsuno (en pas de temps)
212  iperiod = 5
213  CALL getin('iperiod',iperiod)
214
215  !Config  Key  = iapp_tracvl
216  !Config  Desc = frequence du groupement des flux
217  !Config  Def  = iperiod
218  !Config  Help = frequence du groupement des flux (en pas de temps)
219  iapp_tracvl = iperiod
220  CALL getin('iapp_tracvl',iapp_tracvl)
221
222  !Config  Key  = iconser
223  !Config  Desc = periode de sortie des variables de controle
224  !Config  Def  = 240 
225  !Config  Help = periode de sortie des variables de controle
226  !Config         (En pas de temps)
227  iconser = 240 
228  CALL getin('iconser', iconser)
229
230  !Config  Key  = iecri
231  !Config  Desc = periode d'ecriture du fichier histoire
232  !Config  Def  = 1
233  !Config  Help = periode d'ecriture du fichier histoire (en jour)
234  iecri = 1
235  CALL getin('iecri',iecri)
236
237  !Config  Key  = periodav
238  !Config  Desc = periode de stockage fichier histmoy
239  !Config  Def  = 1
240  !Config  Help = periode de stockage fichier histmoy (en jour)
241  periodav = 1.
242  CALL getin('periodav',periodav)
243
244  !Config  Key  = output_grads_dyn
245  !Config  Desc = output dynamics diagnostics in 'dyn.dat' file
246  !Config  Def  = n
247  !Config  Help = output dynamics diagnostics in Grads-readable 'dyn.dat' file
248  output_grads_dyn=.false.
249  CALL getin('output_grads_dyn',output_grads_dyn)
250
251  !Config  Key  = dissip_period
252  !Config  Desc = periode de la dissipation
253  !Config  Def  = 0
254  !Config  Help = periode de la dissipation
255  !Config  dissip_period=0 => la valeur sera calcule dans inidissip       
256  !Config  dissip_period>0 => on prend cette valeur
257  dissip_period = 0
258  CALL getin('dissip_period',dissip_period)
259
260  !cc  ....   P. Le Van , modif le 29/04/97 .pour la dissipation  ...
261  !cc
262
263  !Config  Key  = lstardis
264  !Config  Desc = choix de l'operateur de dissipation
265  !Config  Def  = y
266  !Config  Help = choix de l'operateur de dissipation
267  !Config         'y' si on veut star et 'n' si on veut non-start !
268  !Config         Moi y en a pas comprendre !
269  lstardis = .TRUE.
270  CALL getin('lstardis',lstardis)
271
272  !Config  Key  = nitergdiv
273  !Config  Desc = Nombre d'iteration de gradiv
274  !Config  Def  = 1
275  !Config  Help = nombre d'iterations de l'operateur de dissipation
276  !Config         gradiv
277  nitergdiv = 1
278  CALL getin('nitergdiv',nitergdiv)
279
280  !Config  Key  = nitergrot
281  !Config  Desc = nombre d'iterations de nxgradrot
282  !Config  Def  = 2
283  !Config  Help = nombre d'iterations de l'operateur de dissipation 
284  !Config         nxgradrot
285  nitergrot = 2
286  CALL getin('nitergrot',nitergrot)
287
288  !Config  Key  = niterh
289  !Config  Desc = nombre d'iterations de divgrad
290  !Config  Def  = 2
291  !Config  Help = nombre d'iterations de l'operateur de dissipation
292  !Config         divgrad
293  niterh = 2
294  CALL getin('niterh',niterh)
295
296  !Config  Key  = tetagdiv
297  !Config  Desc = temps de dissipation pour div
298  !Config  Def  = 7200
299  !Config  Help = temps de dissipation des plus petites longeur
300  !Config         d'ondes pour u,v (gradiv)
301  tetagdiv = 7200.
302  CALL getin('tetagdiv',tetagdiv)
303
304  !Config  Key  = tetagrot
305  !Config  Desc = temps de dissipation pour grad
306  !Config  Def  = 7200
307  !Config  Help = temps de dissipation des plus petites longeur
308  !Config         d'ondes pour u,v (nxgradrot)
309  tetagrot = 7200.
310  CALL getin('tetagrot',tetagrot)
311
312  !Config  Key  = tetatemp
313  !Config  Desc = temps de dissipation pour h
314  !Config  Def  = 7200
315  !Config  Help =  temps de dissipation des plus petites longeur
316  !Config         d'ondes pour h (divgrad)   
317  tetatemp  = 7200.
318  CALL getin('tetatemp',tetatemp )
319
320  ! Parametres controlant la variation sur la verticale des constantes de
321  ! dissipation.
322  ! Pour le moment actifs uniquement dans la version a 39 niveaux
323  ! avec ok_strato=y
324
325  dissip_factz=4.
326  dissip_deltaz=10.
327  dissip_zref=30.
328  CALL getin('dissip_factz',dissip_factz )
329  CALL getin('dissip_deltaz',dissip_deltaz )
330  CALL getin('dissip_zref',dissip_zref )
331
332  ! ngroup
333  ngroup=3
334  CALL getin('ngroup',ngroup)
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
872     IF (use_filtre_fft .AND. grossismx /= 1.0) THEN
873        write(lunout,*)'WARNING !!! '
874        write(lunout,*)"Le zoom en longitude est incompatible", &
875             " avec l'utilisation du filtre FFT ", &
876             "---> FFT filter not active"
877        use_filtre_fft=.FALSE.
878     ENDIF
879
880     !Config  Key  = use_mpi_alloc
881     !Config  Desc = Utilise un buffer MPI en m�moire globale
882     !Config  Def  = false
883     !Config  Help = permet d'activer l'utilisation d'un buffer MPI
884     !Config         en m�moire globale a l'aide de la fonction MPI_ALLOC.
885     !Config         Cela peut am�liorer la bande passante des transferts MPI
886     !Config         d'un facteur 2 
887     use_mpi_alloc=.FALSE.
888     CALL getin('use_mpi_alloc',use_mpi_alloc)
889
890     !Config key = ok_strato
891     !Config  Desc = activation de la version strato
892     !Config  Def  = .FALSE.
893     !Config  Help = active la version stratosphérique de LMDZ de F. Lott
894
895     ok_strato=.FALSE.
896     CALL getin('ok_strato',ok_strato)
897
898     vert_prof_dissip = merge(1, 0, ok_strato .and. llm==39)
899     CALL getin('vert_prof_dissip', vert_prof_dissip)
900     call assert(vert_prof_dissip == 0 .or. vert_prof_dissip ==  1, &
901          "bad value for vert_prof_dissip")
902
903     !Config  Key  = ok_gradsfile
904     !Config  Desc = activation des sorties grads du guidage
905     !Config  Def  = n
906     !Config  Help = active les sorties grads du guidage
907
908     ok_gradsfile = .FALSE.
909     CALL getin('ok_gradsfile',ok_gradsfile)
910
911     !Config  Key  = ok_limit
912     !Config  Desc = creation des fichiers limit dans create_etat0_limit
913     !Config  Def  = y
914     !Config  Help = production du fichier limit.nc requise
915
916     ok_limit = .TRUE.
917     CALL getin('ok_limit',ok_limit)
918
919     !Config  Key  = ok_etat0
920     !Config  Desc = creation des fichiers etat0 dans create_etat0_limit
921     !Config  Def  = y
922     !Config  Help = production des fichiers start.nc, startphy.nc requise
923
924     ok_etat0 = .TRUE.
925     CALL getin('ok_etat0',ok_etat0)
926
927     !Config  Key  = read_orop
928     !Config  Desc = lecture du fichier de params orographiques sous maille
929     !Config  Def  = f
930     !Config  Help = lecture fichier plutot que grid_noro
931
932     read_orop = .FALSE.
933     CALL getin('read_orop',read_orop)
934
935     write(lunout,*)' #########################################'
936     write(lunout,*)' Configuration des parametres de cel0' &
937          //'_limit: '
938     write(lunout,*)' planet_type = ', planet_type
939     write(lunout,*)' calend = ', calend
940     write(lunout,*)' dayref = ', dayref
941     write(lunout,*)' anneeref = ', anneeref
942     write(lunout,*)' nday = ', nday
943     write(lunout,*)' day_step = ', day_step
944     write(lunout,*)' iperiod = ', iperiod
945     write(lunout,*)' iconser = ', iconser
946     write(lunout,*)' iecri = ', iecri
947     write(lunout,*)' periodav = ', periodav
948     write(lunout,*)' output_grads_dyn = ', output_grads_dyn
949     write(lunout,*)' dissip_period = ', dissip_period
950     write(lunout,*)' lstardis = ', lstardis
951     write(lunout,*)' nitergdiv = ', nitergdiv
952     write(lunout,*)' nitergrot = ', nitergrot
953     write(lunout,*)' niterh = ', niterh
954     write(lunout,*)' tetagdiv = ', tetagdiv
955     write(lunout,*)' tetagrot = ', tetagrot
956     write(lunout,*)' tetatemp = ', tetatemp
957     write(lunout,*)' coefdis = ', coefdis
958     write(lunout,*)' purmats = ', purmats
959     write(lunout,*)' read_start = ', read_start
960     write(lunout,*)' iflag_phys = ', iflag_phys
961     write(lunout,*)' iphysiq = ', iphysiq
962     write(lunout,*)' clon = ', clon
963     write(lunout,*)' clat = ', clat
964     write(lunout,*)' grossismx = ', grossismx
965     write(lunout,*)' grossismy = ', grossismy
966     write(lunout,*)' fxyhypb = ', fxyhypb
967     write(lunout,*)' dzoomx = ', dzoomx
968     write(lunout,*)' dzoomy = ', dzoomy
969     write(lunout,*)' taux = ', taux
970     write(lunout,*)' tauy = ', tauy
971     write(lunout,*)' offline = ', offline
972     write(lunout,*)' type_trac = ', type_trac
973     write(lunout,*)' config_inca = ', config_inca
974     write(lunout,*)' ok_dynzon = ', ok_dynzon
975     write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins
976     write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave
977     write(lunout,*)' use_filtre_fft = ', use_filtre_fft
978     write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc
979     write(lunout,*)' ok_strato = ', ok_strato
980     write(lunout,*)' ok_gradsfile = ', ok_gradsfile
981     write(lunout,*)' ok_limit = ', ok_limit
982     write(lunout,*)' ok_etat0 = ', ok_etat0
983     write(lunout,*)' read_orop = ', read_orop
984  end IF test_etatinit
985
986END SUBROUTINE conf_gcm
Note: See TracBrowser for help on using the repository browser.