source: trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F90 @ 1428

Last change on this file since 1428 was 1422, checked in by milmd, 10 years ago

In GENERIC, MARS and COMMON models replace some include files by modules (usefull for decoupling physics with dynamics).

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