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

Last change on this file since 1508 was 1441, checked in by emillour, 11 years ago

Updates in common dynamics (seq and ) to keep up with updates
in LMDZ5 (up to LMDZ5 trunk, rev 2250):

  • compilation:
  • added test in grid/dimension/makdim to check that # of longitudes is a multiple of 8
  • dyn3d_common:

Bug correction concerning zoom (cf LMDZ5 rev 2218)

  • coefpoly.F becomes coefpoly_m.F90 (in misc)
  • fxhyp.F => fxhyp_m.F90 , fyhyp.F => fyhyp_m.F90
  • new routines for zoom: invert_zoom_x_m.F90 and principal_cshift_m.F90
  • inigeom.F adapted to new zoom definition routines
  • fluxstokenc.F : got rid of calls to initial0()
  • dyn3d:
  • advtrac.F90 : got rid of calls to initial0()
  • conf_gcm.F90 : cosmetic changes and change in default dzoomx,dzoomy values
  • guide_mod.F90 : followed updates from Earth Model
  • gcm.F is now gcm.F90
  • dyn3dpar:
  • advtrac_p.F90, covcont_p.F90, mod_hallo.F90 : cosmetic changes
  • conf_gcm.F90 : cosmetic and changed in default dzoomx,dzoomy values
  • parallel_lmdz.F90 : updates to keep up with Earth model
  • misc:
  • arth.F90 becomes arth_m.F90
  • wxios.F90 updated wrt Earth model changes
  • nrtype.F90 and coefpoly_m.F90 added
  • ran1.F, sort.F, minmax.F, minmax2.F, juldate.F moved over from dyn3d_common

EM

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