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

Last change on this file since 2125 was 1824, checked in by emillour, 8 years ago

Common dynamics:

  • enable possiblity to store multiple time steps in the restart.nc file (flag "ecritstart" gives the frequency, in dynamical steps).
  • fixed dynredem_mod.F90 to correctly write multiple time steps.
  • fixed computation of JH_cur in the mars case where "hour_ini" contains the initial time of day read from the start.nc file
  • minor fix in dynetat0.F90

RY

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